contracts: Add seal_rent_status (#8780)

* Move public functions up in rent.rs

* Added RentStatus

* Fix test name for consistency

Co-authored-by: Michael Müller <michi@parity.io>

* Mark rent functions as unstable

* Add unstable interfaces to README

* Fix doc typos

Co-authored-by: Andrew Jones <ascjones@gmail.com>

* Use DefaultNoBound

* Simplify calc_share(1)

* Don't output empty debug messages

* Make `seal_debug_message` unstable

Co-authored-by: Michael Müller <michi@parity.io>
Co-authored-by: Andrew Jones <ascjones@gmail.com>
This commit is contained in:
Alexander Theißen
2021-05-20 14:01:43 +02:00
committed by GitHub
parent f29a6fdad3
commit 0057c0b53f
17 changed files with 1380 additions and 1109 deletions
@@ -103,6 +103,7 @@ impl ImportedMemory {
}
pub struct ImportedFunction {
pub module: &'static str,
pub name: &'static str,
pub params: Vec<ValueType>,
pub return_type: Option<ValueType>,
@@ -171,7 +172,7 @@ where
.build_sig();
let sig = contract.push_signature(sig);
contract = contract.import()
.module("seal0")
.module(func.module)
.field(func.name)
.with_external(parity_wasm::elements::External::Function(sig))
.build();
@@ -292,6 +293,7 @@ where
ModuleDefinition {
memory: Some(ImportedMemory::max::<T>()),
imported_functions: vec![ImportedFunction {
module: "seal0",
name: getter_name,
params: vec![ValueType::I32, ValueType::I32],
return_type: None,
@@ -321,6 +323,7 @@ where
ModuleDefinition {
memory: Some(ImportedMemory::max::<T>()),
imported_functions: vec![ImportedFunction {
module: "seal0",
name,
params: vec![ValueType::I32, ValueType::I32, ValueType::I32],
return_type: None,