mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 03:31:05 +00:00
04b185e3d4
* 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
35 lines
958 B
WebAssembly Text Format
35 lines
958 B
WebAssembly Text Format
(module
|
|
(import "seal0" "seal_input" (func $seal_input (param i32 i32)))
|
|
(import "seal0" "seal_return" (func $seal_return (param i32 i32 i32)))
|
|
(import "env" "memory" (memory 1 1))
|
|
|
|
(func (export "deploy")
|
|
(call $ok_trap_revert)
|
|
)
|
|
|
|
(func (export "call")
|
|
(call $ok_trap_revert)
|
|
)
|
|
|
|
(func $ok_trap_revert
|
|
(i32.store (i32.const 4) (i32.const 4))
|
|
(call $seal_input (i32.const 0) (i32.const 4))
|
|
(block $IF_2
|
|
(block $IF_1
|
|
(block $IF_0
|
|
(br_table $IF_0 $IF_1 $IF_2
|
|
(i32.load8_u (i32.const 0))
|
|
)
|
|
(unreachable)
|
|
)
|
|
;; 0 = return with success
|
|
return
|
|
)
|
|
;; 1 = revert
|
|
(call $seal_return (i32.const 1) (i32.const 0) (i32.const 0))
|
|
(unreachable)
|
|
)
|
|
;; 2 = trap
|
|
(unreachable)
|
|
)
|
|
) |