mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 13:27:57 +00:00
seal: Change prefix and module name from "ext_" to "seal_" for contract callable functions (#6798)
* seal: Change prefix "ext_" to "seal_" for contract callable functions The word Ext is a overloaded term in the context of substrate. It usually is a trait which abstracts away access to external resources usually in order to mock them away for the purpose of tests. The contract module has its own `Ext` trait in addition the the substrate `Ext` which makes things even more confusing. In order to differentiate the contract callable functions more clearly from this `Ext` concept we rename them to use the "seal_" prefix instead. This should change no behaviour at all. This is a pure renaming commit. * seal: Rename import module from "env" to "seal0" * seal: Fixup integration test * seal: Add more tests for new import module names
This commit is contained in:
committed by
GitHub
parent
f9f8262303
commit
04b185e3d4
@@ -485,7 +485,7 @@ fn full_wasm_block_import_works() {
|
||||
|
||||
const CODE_TRANSFER: &str = r#"
|
||||
(module
|
||||
;; ext_call(
|
||||
;; seal_call(
|
||||
;; callee_ptr: u32,
|
||||
;; callee_len: u32,
|
||||
;; gas: u64,
|
||||
@@ -496,15 +496,15 @@ const CODE_TRANSFER: &str = r#"
|
||||
;; output_ptr: u32,
|
||||
;; output_len_ptr: u32
|
||||
;; ) -> u32
|
||||
(import "env" "ext_call" (func $ext_call (param i32 i32 i64 i32 i32 i32 i32 i32 i32) (result i32)))
|
||||
(import "env" "ext_input" (func $ext_input (param i32 i32)))
|
||||
(import "seal0" "seal_call" (func $seal_call (param i32 i32 i64 i32 i32 i32 i32 i32 i32) (result i32)))
|
||||
(import "seal0" "seal_input" (func $seal_input (param i32 i32)))
|
||||
(import "env" "memory" (memory 1 1))
|
||||
(func (export "deploy")
|
||||
)
|
||||
(func (export "call")
|
||||
(block $fail
|
||||
;; Load input data to contract memory
|
||||
(call $ext_input
|
||||
(call $seal_input
|
||||
(i32.const 0)
|
||||
(i32.const 52)
|
||||
)
|
||||
@@ -543,7 +543,7 @@ const CODE_TRANSFER: &str = r#"
|
||||
)
|
||||
|
||||
(drop
|
||||
(call $ext_call
|
||||
(call $seal_call
|
||||
(i32.const 4) ;; Pointer to "callee" address.
|
||||
(i32.const 32) ;; Length of "callee" address.
|
||||
(i64.const 0) ;; How much gas to devote for the execution. 0 = all.
|
||||
|
||||
Reference in New Issue
Block a user