Files: e9cc1b70b5ae3919582f9fc597c7a5b088f2a7d2 / tests / interface / balance.wast
625 bytesRaw
1 | ;; address of 5d48c1018904a172886829bbbd9c6f4a2d06c47b has a balance of 0x056bc75e2d63100000 (100 ETH) |
2 | (module |
3 | (import "ethereum" "getBalance" (func $balance (param i32 i32 i32))) |
4 | (memory 1 ) |
5 | (data (i32.const 0) "\5d\48\c1\01\89\04\a1\72\88\68\29\bb\bd\9c\6f\4a\2d\06\c4\7b") |
6 | (export "memory" (memory 0)) |
7 | (export "main" (func $main)) |
8 | (export "1" (func $callback)) |
9 | |
10 | (func $main |
11 | (call $balance (i32.const 0) (i32.const 0) (i32.const 1)) |
12 | ) |
13 | |
14 | (func $callback |
15 | (block |
16 | (if (i64.eq (i64.load (i32.const 0)) (i64.const 0x0500000000000000)) |
17 | (return) |
18 | ) |
19 | (unreachable) |
20 | ) |
21 | ) |
22 | ) |
23 | |
24 |
Built with git-ssb-web