Finish off srml-contract create -> instantiate renamings (#3649)

* Finish off srml-contract create -> instantiate renamings

* bumped spec_version
This commit is contained in:
Ashley
2019-09-20 20:53:03 +12:00
committed by Sergei Pepyakin
parent eba6dd73c6
commit c95fdd53d8
5 changed files with 16 additions and 16 deletions
+3 -3
View File
@@ -478,7 +478,7 @@ mod tests {
const CODE_CREATE: &str = r#"
(module
;; ext_create(
;; ext_instantiate(
;; code_ptr: u32,
;; code_len: u32,
;; gas: u64,
@@ -487,11 +487,11 @@ mod tests {
;; input_data_ptr: u32,
;; input_data_len: u32,
;; ) -> u32
(import "env" "ext_create" (func $ext_create (param i32 i32 i64 i32 i32 i32 i32) (result i32)))
(import "env" "ext_instantiate" (func $ext_instantiate (param i32 i32 i64 i32 i32 i32 i32) (result i32)))
(import "env" "memory" (memory 1 1))
(func (export "call")
(drop
(call $ext_create
(call $ext_instantiate
(i32.const 16) ;; Pointer to `code_hash`
(i32.const 32) ;; Length of `code_hash`
(i64.const 0) ;; How much gas to devote for the execution. 0 = all.
+2 -2
View File
@@ -29,7 +29,7 @@ use rstd::mem;
use codec::{Decode, Encode};
use sr_primitives::traits::{Bounded, SaturatedConversion};
/// The value returned from ext_call and ext_create contract external functions if the call or
/// The value returned from ext_call and ext_instantiate contract external functions if the call or
/// instantiation traps. This value is chosen as if the execution does not trap, the return value
/// will always be an 8-bit integer, so 0x0100 is the smallest value that could not be returned.
const TRAP_RETURN_CODE: u32 = 0x0100;
@@ -456,7 +456,7 @@ define_env!(Env, <E: Ext>,
// - value_len: length of the value buffer.
// - input_data_ptr: a pointer to a buffer to be used as input data to the initializer code.
// - input_data_len: length of the input data buffer.
ext_create(
ext_instantiate(
ctx,
code_hash_ptr: u32,
code_hash_len: u32,