From 3a3ff23ea65983b5bd8e87637e55c98f26a9872e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Bizjak?= Date: Fri, 11 Nov 2022 10:40:01 +0100 Subject: [PATCH] Improve documentation. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Emil Holm Gjørup --- concordium-consensus/testdata/contracts/v1/transfer-cases.wat | 4 ++-- .../testdata/contracts/v1/upgrading-cases.wat | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/concordium-consensus/testdata/contracts/v1/transfer-cases.wat b/concordium-consensus/testdata/contracts/v1/transfer-cases.wat index 93523936c6..0103252648 100644 --- a/concordium-consensus/testdata/contracts/v1/transfer-cases.wat +++ b/concordium-consensus/testdata/contracts/v1/transfer-cases.wat @@ -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 diff --git a/concordium-consensus/testdata/contracts/v1/upgrading-cases.wat b/concordium-consensus/testdata/contracts/v1/upgrading-cases.wat index fe7af28df2..ea21789a2b 100644 --- a/concordium-consensus/testdata/contracts/v1/upgrading-cases.wat +++ b/concordium-consensus/testdata/contracts/v1/upgrading-cases.wat @@ -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.