git ssb

0+

wanderer🌟 / js-primea-hypervisor



Tree: 35dfa5477c5c02ad53d5eef194860e48f9677897

Files: 35dfa5477c5c02ad53d5eef194860e48f9677897 / tests / interface / sstore.wast

854 bytesRaw
1;; starts with an caller of 5d48c1018904a172886829bbbd9c6f4a2d06c47b
2(module
3 (import "ethereum" "storageStore" (func $sstore (param i32 i32 i32)))
4 (import "ethereum" "storageLoad" (func $sload (param i32 i32 i32)))
5
6 (memory 1)
7 (export "main" (func $main))
8 (export "memory" (memory 0))
9 (func $main
10 (local $temp i64)
11 (block
12 ;; should roundtrip store and load a value from storage
13 (i64.store (i32.const 0) (i64.const 173553719826446289))
14 (call $sstore (i32.const 64) (i32.const 0) (i32.const 1))
15 )
16 )
17
18 (export "1" (func $callback))
19 (func $callback
20 (block
21 (call $sload (i32.const 64) (i32.const 64) (i32.const 2))
22 )
23 )
24
25 (export "2" (func $callback2))
26 (func $callback2
27 (block
28 (if (i64.ne (i64.load (i32.const 64)) (i64.const 173553719826446289))
29 (unreachable))
30
31 )
32 )
33)
34

Built with git-ssb-web