git ssb

0+

wanderer🌟 / js-primea-hypervisor



Tree: a9ce2e3d2d7449ca0005d46cb47468fcfaf15223

Files: a9ce2e3d2d7449ca0005d46cb47468fcfaf15223 / tests / interface / call.wast

812 bytesRaw
1;; starts with an address of 5d48c1018904a172886829bbbd9c6f4a2d06c47b
2(module
3 (memory 1)
4
5 (import $call "ethereum" "call" (param i32 i32 i32 i32 i32 i32 i32) (result i32))
6 (export "test" 0)
7 (export "a" memory)
8 (func
9 (block
10 ;; Memory layout:
11 ;; 0 - 20 bytes: address (4)
12 ;; 20 - 52 bytes: value (0)
13 ;; 52 - 56 bytes: data (0x42004200)
14 ;; 56 - 60 bytes: result
15 (i32.store (i32.const 0) (i32.const 0x4))
16 (i32.store (i32.const 52) (i32.const 0x42004200))
17 (if (i32.eq (call_import $call (i32.const 2000) (i32.const 0) (i32.const 20) (i32.const 52) (i32.const 4) (i32.const 56) (i32.const 4)) (i32.const 0))
18 (if (i32.eq (i32.load (i32.const 56)) (i32.const 0x42004200))
19 (return)
20 )
21 )
22 (unreachable)
23 )
24 )
25)
26

Built with git-ssb-web