Skip to content

Commit

Permalink
Improve documentation.
Browse files Browse the repository at this point in the history
Co-authored-by: Emil Holm Gjørup <[email protected]>
  • Loading branch information
abizjak and limemloh authored Nov 11, 2022
1 parent a965702 commit 3a3ff23
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions concordium-consensus/testdata/contracts/v1/transfer-cases.wat
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
(return (i32.const 0))) ;; Successful init

(func $receive_upgrade (export "contract.transfer") (param $amount i64) (result i32)
;; Read the module reference from the parameter into memory, and on byte 33 the test scenario
;; Read account address (32 bytes), an amount (8 bytes) used for transfer and a flag (1 byte) from the parameter into memory. Setting the flag to: 0 means do not update the state, 1 means update the state before invoking transfer, 2 means update the state after invoking transfer.
;; 0 means do not update the state, 1 means do
(call $host_get_parameter_section
(i32.const 0) ;; index.
(i32.const 0) ;; starting write offset in memory.
(i32.const 41) ;; number of bytes to read (32 bytes for the module reference).
(i32.const 41) ;; number of bytes to read.
(i32.const 0)) ;; starting offset in parameter.
(if (i32.eq (i32.const 1) (i32.load8_u (i32.const 40)))
;; update the state now
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
(return (i32.const 0))) ;; Successful init

(func $receive_upgrade (export "contract.upgrade") (param $amount i64) (result i32)
;; Read the module reference from the parameter into memory, and on byte 33 the test scenario
;; 0 means do not update the state, 1 means do
(call $host_get_parameter_section
(i32.const 0) ;; index.
(i32.const 0) ;; starting write offset in memory.
Expand Down

0 comments on commit 3a3ff23

Please sign in to comment.