mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 16:57:58 +00:00
199b2883af
* Stableize `seal_debug_message` * Update changelog * Enable more tests * Cargo fmt
29 lines
596 B
WebAssembly Text Format
29 lines
596 B
WebAssembly Text Format
;; Emit a "Hello World!" debug message
|
|
(module
|
|
(import "seal0" "seal_debug_message" (func $seal_debug_message (param i32 i32) (result i32)))
|
|
(import "env" "memory" (memory 1 1))
|
|
|
|
(data (i32.const 0) "Hello World!")
|
|
|
|
(func $assert_eq (param i32 i32)
|
|
(block $ok
|
|
(br_if $ok
|
|
(i32.eq (get_local 0) (get_local 1))
|
|
)
|
|
(unreachable)
|
|
)
|
|
)
|
|
|
|
(func (export "call")
|
|
(call $assert_eq
|
|
(call $seal_debug_message
|
|
(i32.const 0) ;; Pointer to the text buffer
|
|
(i32.const 12) ;; The size of the buffer
|
|
)
|
|
(i32.const 0) ;; success return code
|
|
)
|
|
)
|
|
|
|
(func (export "deploy"))
|
|
)
|