1(module2 (import "seal0" "seal_transfer" (func $seal_transfer (param i32 i32 i32 i32) (result i32)))3 (import "seal0" "seal_set_storage" (func $seal_set_storage (param i32 i32 i32)))4 (import "seal0" "seal_clear_storage" (func $seal_clear_storage (param i32)))5 (import "seal0" "seal_set_rent_allowance" (func $seal_set_rent_allowance (param i32 i32)))6 (import "seal0" "seal_input" (func $seal_input (param i32 i32)))7 (import "env" "memory" (memory 1 1))89 ;; insert a value of 4 bytes into storage10 (func $call_011 (call $seal_set_storage12 (i32.const 1)13 (i32.const 0)14 (i32.const 4)15 )16 )1718 ;; remove the value inserted by call_119 (func $call_120 (call $seal_clear_storage21 (i32.const 1)22 )23 )2425 ;; transfer 50 to CHARLIE26 (func $call_227 (call $assert28 (i32.eq29 (call $seal_transfer (i32.const 136) (i32.const 32) (i32.const 100) (i32.const 8))30 (i32.const 0)31 )32 )33 )3435 ;; do nothing36 (func $call_else)3738 (func $assert (param i32)39 (block $ok40 (br_if $ok41 (get_local 0)42 )43 (unreachable)44 )45 )4647 ;; Dispatch the call according to input size48 (func (export "call")49 (local $input_size i32)50 ;; 4 byte i32 for br_table followed by 32 byte destination for transfer51 (i32.store (i32.const 128) (i32.const 36))52 (call $seal_input (i32.const 132) (i32.const 128))53 (set_local $input_size54 (i32.load (i32.const 132))55 )56 (block $IF_ELSE57 (block $IF_258 (block $IF_159 (block $IF_060 (br_table $IF_0 $IF_1 $IF_2 $IF_ELSE61 (get_local $input_size)62 )63 (unreachable)64 )65 (call $call_0)66 return67 )68 (call $call_1)69 return70 )71 (call $call_2)72 return73 )74 (call $call_else)75 )7677 ;; Set into storage a 4 bytes value78 ;; Set call set_rent_allowance with input79 (func (export "deploy")80 (call $seal_set_storage81 (i32.const 0)82 (i32.const 0)83 (i32.const 4)84 )85 (i32.store (i32.const 128) (i32.const 64))86 (call $seal_input87 (i32.const 132)88 (i32.const 128)89 )90 (call $seal_set_rent_allowance91 (i32.const 132)92 (i32.load (i32.const 128))93 )94 )9596 ;; Encoding of 10 in balance97 (data (i32.const 0) "\28")9899 ;; encoding of 50 balance100 (data (i32.const 100) "\32")101102 ;; [128, 132) size of seal input buffer103104 ;; [132, inf) output buffer for seal input105)