diff --git a/rskj-core/src/test/resources/dsl/opcode/mcopy/testFullMemoryCopy.txt b/rskj-core/src/test/resources/dsl/opcode/mcopy/testFullMemoryCopy.txt index 366597c3ea..a7ac349ae8 100644 --- a/rskj-core/src/test/resources/dsl/opcode/mcopy/testFullMemoryCopy.txt +++ b/rskj-core/src/test/resources/dsl/opcode/mcopy/testFullMemoryCopy.txt @@ -1,3 +1,8 @@ +comment + +// CONTRACT CODE +// + // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.20; @@ -68,4 +73,81 @@ contract TestMCopy { } -} \ No newline at end of file +} + +// DESCRIPTION + +This contract contains two types of functions: + +* checkMCopy runs the tes function and based on its return value: + - Emits an OK event if it returned true. + - Emits an ERROR otherwise. + +* testFullMemoryCopy initialize, modifies and checks memory and then: + - Returns true if all the checks passed. + - Returns false otherwise. + +// CONTRACT BYTECODE + +6080604052348015600e575f80fd5b506103548061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610034575f3560e01c80638c2bcab914610038578063c0b80c4f14610042575b5f80fd5b610040610060565b005b61004a6100cd565b6040516100579190610305565b60405180910390f35b6100686100cd565b1561009e577fd48fe2800bace8f5ca2450feacbd6efc681b1cd0115019bb49fa529b6171bf6760405160405180910390a16100cb565b7f1c9c433b57013295d61f5c5738f5e2cb1de70bb5ba5b2896edfa8efae345965e60405160405180910390a15b565b5f807e0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f5f1b90505f7f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f5f1b90505f7f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f5f1b90505f7f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f5f1b90505f7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f5f1b90505f7fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebf5f1b90505f7fc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedf5f1b90505f7fe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff5f1b90505f80895f52886020528760405286606052856080528460a0528360c0528260e0525991506101005f6101005e599050895f51149a5088602051148b169a5087604051148b169a5086606051148b169a5085608051148b169a508460a051148b169a508360c051148b169a508260e051148b169a508961010051148b169a508861012051148b169a508761014051148b169a508661016051148b169a508561018051148b169a50846101a051148b169a50836101c051148b169a50826101e051148b169a508a80156102cf575061010082145b80156102dc575061020081145b9a505050505050505050505090565b5f8115159050919050565b6102ff816102eb565b82525050565b5f6020820190506103185f8301846102f6565b9291505056fea26469706673582212206300c7f37f94930d3bc96bba8b03c281abe4667f5dc4b92938d6479b051a62cb64736f6c634300081a0033 + +// CONTRACT CALL + +- checkMCopy() + + 8c2bcab9 + +end + +# Create and fund new account +account_new acc1 10000000 + +# Create transaction to deploy TestMCopy contract +transaction_build txTestMCopy + sender acc1 + receiverAddress 00 + value 0 + data 6080604052348015600e575f80fd5b506103548061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610034575f3560e01c80638c2bcab914610038578063c0b80c4f14610042575b5f80fd5b610040610060565b005b61004a6100cd565b6040516100579190610305565b60405180910390f35b6100686100cd565b1561009e577fd48fe2800bace8f5ca2450feacbd6efc681b1cd0115019bb49fa529b6171bf6760405160405180910390a16100cb565b7f1c9c433b57013295d61f5c5738f5e2cb1de70bb5ba5b2896edfa8efae345965e60405160405180910390a15b565b5f807e0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f5f1b90505f7f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f5f1b90505f7f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f5f1b90505f7f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f5f1b90505f7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f5f1b90505f7fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebf5f1b90505f7fc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedf5f1b90505f7fe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff5f1b90505f80895f52886020528760405286606052856080528460a0528360c0528260e0525991506101005f6101005e599050895f51149a5088602051148b169a5087604051148b169a5086606051148b169a5085608051148b169a508460a051148b169a508360c051148b169a508260e051148b169a508961010051148b169a508861012051148b169a508761014051148b169a508661016051148b169a508561018051148b169a50846101a051148b169a50836101c051148b169a50826101e051148b169a508a80156102cf575061010082145b80156102dc575061020081145b9a505050505050505050505090565b5f8115159050919050565b6102ff816102eb565b82525050565b5f6020820190506103185f8301846102f6565b9291505056fea26469706673582212206300c7f37f94930d3bc96bba8b03c281abe4667f5dc4b92938d6479b051a62cb64736f6c634300081a0033 + gas 1200000 + build + +# Create block to hold txTestMCopy transaction +block_build b01 + parent g00 + transactions txTestMCopy + build + +# Connect block +block_connect b01 + +# Check b01 is best block +assert_best b01 + +# Check txTestMCopy succeeded +assert_tx_success txTestMCopy + +# Create transaction to execute checkMCopy() method +transaction_build txTestMCopyOKCall + sender acc1 + nonce 1 + contract txTestMCopy + value 0 + data 8c2bcab9 + gas 300000 + build + +# Create block to hold txTestMCopyOKCall transaction +block_build b02 + parent b01 + transactions txTestMCopyOKCall + gasLimit 6500000 + build + +# Connect block +block_connect b02 + +# Check b02 is best block +assert_best b02 + +# Check txTestMCopyOKCall succeeded +assert_tx_success txTestMCopyOKCall \ No newline at end of file diff --git a/rskj-core/src/test/resources/dsl/opcode/mcopy/testFullMemoryCopyOffset.txt b/rskj-core/src/test/resources/dsl/opcode/mcopy/testFullMemoryCopyOffset.txt index 0c735280b7..9986ec792c 100644 --- a/rskj-core/src/test/resources/dsl/opcode/mcopy/testFullMemoryCopyOffset.txt +++ b/rskj-core/src/test/resources/dsl/opcode/mcopy/testFullMemoryCopyOffset.txt @@ -1,3 +1,8 @@ +comment + +// CONTRACT CODE +// + // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.20; @@ -79,4 +84,81 @@ contract TestMCopy { } -} \ No newline at end of file +} + +// DESCRIPTION + +This contract contains two types of functions: + +* checkMCopy runs the tes function and based on its return value: + - Emits an OK event if it returned true. + - Emits an ERROR otherwise. + +* testFullMemoryCopyOffset initialize, modifies and checks memory and then: + - Returns true if all the checks passed. + - Returns false otherwise. + +// CONTRACT BYTECODE + +6080604052348015600e575f80fd5b506103ab8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610034575f3560e01c8063555ef883146100385780638c2bcab914610056575b5f80fd5b610040610060565b60405161004d919061035c565b60405180910390f35b61005e6102d5565b005b5f807e0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f5f1b90505f7f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f5f1b90505f7f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f5f1b90505f7f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f5f1b90505f7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f5f1b90505f7fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebf5f1b90505f7fc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedf5f1b90505f7fe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff5f1b90505f805f1b90505f808a5f52896020528860405287606052866080528560a0528460c0528360e0525991506101005f6102005e5990508a5f51149b5089602051148c169b5088604051148c169b5087606051148c169b5086608051148c169b508560a051148c169b508460c051148c169b508360e051148c169b508261010051148c169b508261012051148c169b508261014051148c169b508261016051148c169b508261018051148c169b50826101a051148c169b50826101c051148c169b50826101e051148c169b508a61020051148c169b508961022051148c169b508861024051148c169b508761026051148c169b508661028051148c169b50856102a051148c169b50846102c051148c169b50836102e051148c169b508b80156102b8575061010082145b80156102c5575061030081145b9b50505050505050505050505090565b6102dd610060565b15610313577fd48fe2800bace8f5ca2450feacbd6efc681b1cd0115019bb49fa529b6171bf6760405160405180910390a1610340565b7f1c9c433b57013295d61f5c5738f5e2cb1de70bb5ba5b2896edfa8efae345965e60405160405180910390a15b565b5f8115159050919050565b61035681610342565b82525050565b5f60208201905061036f5f83018461034d565b9291505056fea2646970667358221220c4e94d0d017a821439be881bd7ae577b35556e64a80392c127a557d02e3656eb64736f6c634300081a0033 + +// CONTRACT CALL + +- checkMCopy() + + 8c2bcab9 + +end + +# Create and fund new account +account_new acc1 10000000 + +# Create transaction to deploy TestMCopy contract +transaction_build txTestMCopy + sender acc1 + receiverAddress 00 + value 0 + data 6080604052348015600e575f80fd5b506103ab8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610034575f3560e01c8063555ef883146100385780638c2bcab914610056575b5f80fd5b610040610060565b60405161004d919061035c565b60405180910390f35b61005e6102d5565b005b5f807e0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f5f1b90505f7f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f5f1b90505f7f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f5f1b90505f7f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f5f1b90505f7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f5f1b90505f7fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebf5f1b90505f7fc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedf5f1b90505f7fe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff5f1b90505f805f1b90505f808a5f52896020528860405287606052866080528560a0528460c0528360e0525991506101005f6102005e5990508a5f51149b5089602051148c169b5088604051148c169b5087606051148c169b5086608051148c169b508560a051148c169b508460c051148c169b508360e051148c169b508261010051148c169b508261012051148c169b508261014051148c169b508261016051148c169b508261018051148c169b50826101a051148c169b50826101c051148c169b50826101e051148c169b508a61020051148c169b508961022051148c169b508861024051148c169b508761026051148c169b508661028051148c169b50856102a051148c169b50846102c051148c169b50836102e051148c169b508b80156102b8575061010082145b80156102c5575061030081145b9b50505050505050505050505090565b6102dd610060565b15610313577fd48fe2800bace8f5ca2450feacbd6efc681b1cd0115019bb49fa529b6171bf6760405160405180910390a1610340565b7f1c9c433b57013295d61f5c5738f5e2cb1de70bb5ba5b2896edfa8efae345965e60405160405180910390a15b565b5f8115159050919050565b61035681610342565b82525050565b5f60208201905061036f5f83018461034d565b9291505056fea2646970667358221220c4e94d0d017a821439be881bd7ae577b35556e64a80392c127a557d02e3656eb64736f6c634300081a0033 + gas 1200000 + build + +# Create block to hold txTestMCopy transaction +block_build b01 + parent g00 + transactions txTestMCopy + build + +# Connect block +block_connect b01 + +# Check b01 is best block +assert_best b01 + +# Check txTestMCopy succeeded +assert_tx_success txTestMCopy + +# Create transaction to execute checkMCopy() method +transaction_build txTestMCopyOKCall + sender acc1 + nonce 1 + contract txTestMCopy + value 0 + data 8c2bcab9 + gas 300000 + build + +# Create block to hold txTestMCopyOKCall transaction +block_build b02 + parent b01 + transactions txTestMCopyOKCall + gasLimit 6500000 + build + +# Connect block +block_connect b02 + +# Check b02 is best block +assert_best b02 + +# Check txTestMCopyOKCall succeeded +assert_tx_success txTestMCopyOKCall \ No newline at end of file diff --git a/rskj-core/src/test/resources/dsl/opcode/mcopy/testFullMemoryRewrite.txt b/rskj-core/src/test/resources/dsl/opcode/mcopy/testFullMemoryRewrite.txt index c52b1b5470..7e959c5ac8 100644 --- a/rskj-core/src/test/resources/dsl/opcode/mcopy/testFullMemoryRewrite.txt +++ b/rskj-core/src/test/resources/dsl/opcode/mcopy/testFullMemoryRewrite.txt @@ -1,3 +1,8 @@ +comment + +// CONTRACT CODE +// + // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.20; @@ -59,4 +64,81 @@ contract TestMCopy { } -} \ No newline at end of file +} + +// DESCRIPTION + +This contract contains two types of functions: + +* checkMCopy runs the tes function and based on its return value: + - Emits an OK event if it returned true. + - Emits an ERROR otherwise. + +* testFullMemoryRewrite initialize, modifies and checks memory and then: + - Returns true if all the checks passed. + - Returns false otherwise. + +// CONTRACT BYTECODE + +6080604052348015600e575f80fd5b506103028061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610034575f3560e01c80633a05a424146100385780638c2bcab914610056575b5f80fd5b610040610060565b60405161004d91906102b3565b60405180910390f35b61005e61022c565b005b5f807e0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f5f1b90505f7f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f5f1b90505f7f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f5f1b90505f7f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f5f1b90505f7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f5f1b90505f7fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebf5f1b90505f7fc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedf5f1b90505f7fe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff5f1b90505f80895f52886020528760405286606052856080528460a0528360c0528260e0525991506101005f805e599050895f51149a5088602051148b169a5087604051148b169a5086606051148b169a5085608051148b169a508460a051148b169a508360c051148b169a508260e051148b169a508a8015610210575061010082145b801561021d575061010081145b9a505050505050505050505090565b610234610060565b1561026a577fd48fe2800bace8f5ca2450feacbd6efc681b1cd0115019bb49fa529b6171bf6760405160405180910390a1610297565b7f1c9c433b57013295d61f5c5738f5e2cb1de70bb5ba5b2896edfa8efae345965e60405160405180910390a15b565b5f8115159050919050565b6102ad81610299565b82525050565b5f6020820190506102c65f8301846102a4565b9291505056fea2646970667358221220403c015d6168a20ce36383a9cbd22e79e8f007dcf460a1a87e6bbff01226f61464736f6c634300081a0033 + +// CONTRACT CALL + +- checkMCopy() + + 8c2bcab9 + +end + +# Create and fund new account +account_new acc1 10000000 + +# Create transaction to deploy TestMCopy contract +transaction_build txTestMCopy + sender acc1 + receiverAddress 00 + value 0 + data 6080604052348015600e575f80fd5b506103028061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610034575f3560e01c80633a05a424146100385780638c2bcab914610056575b5f80fd5b610040610060565b60405161004d91906102b3565b60405180910390f35b61005e61022c565b005b5f807e0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f5f1b90505f7f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f5f1b90505f7f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f5f1b90505f7f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f5f1b90505f7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f5f1b90505f7fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebf5f1b90505f7fc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedf5f1b90505f7fe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff5f1b90505f80895f52886020528760405286606052856080528460a0528360c0528260e0525991506101005f805e599050895f51149a5088602051148b169a5087604051148b169a5086606051148b169a5085608051148b169a508460a051148b169a508360c051148b169a508260e051148b169a508a8015610210575061010082145b801561021d575061010081145b9a505050505050505050505090565b610234610060565b1561026a577fd48fe2800bace8f5ca2450feacbd6efc681b1cd0115019bb49fa529b6171bf6760405160405180910390a1610297565b7f1c9c433b57013295d61f5c5738f5e2cb1de70bb5ba5b2896edfa8efae345965e60405160405180910390a15b565b5f8115159050919050565b6102ad81610299565b82525050565b5f6020820190506102c65f8301846102a4565b9291505056fea2646970667358221220403c015d6168a20ce36383a9cbd22e79e8f007dcf460a1a87e6bbff01226f61464736f6c634300081a0033 + gas 1200000 + build + +# Create block to hold txTestMCopy transaction +block_build b01 + parent g00 + transactions txTestMCopy + build + +# Connect block +block_connect b01 + +# Check b01 is best block +assert_best b01 + +# Check txTestMCopy succeeded +assert_tx_success txTestMCopy + +# Create transaction to execute checkMCopy() method +transaction_build txTestMCopyOKCall + sender acc1 + nonce 1 + contract txTestMCopy + value 0 + data 8c2bcab9 + gas 300000 + build + +# Create block to hold txTestMCopyOKCall transaction +block_build b02 + parent b01 + transactions txTestMCopyOKCall + gasLimit 6500000 + build + +# Connect block +block_connect b02 + +# Check b02 is best block +assert_best b02 + +# Check txTestMCopyOKCall succeeded +assert_tx_success txTestMCopyOKCall \ No newline at end of file diff --git a/rskj-core/src/test/resources/dsl/opcode/mcopy/testOutOfBoundsMemoryExtension.txt b/rskj-core/src/test/resources/dsl/opcode/mcopy/testOutOfBoundsMemoryExtension.txt index 9adc540137..1bab9c967d 100644 --- a/rskj-core/src/test/resources/dsl/opcode/mcopy/testOutOfBoundsMemoryExtension.txt +++ b/rskj-core/src/test/resources/dsl/opcode/mcopy/testOutOfBoundsMemoryExtension.txt @@ -1,3 +1,8 @@ +comment + +// CONTRACT CODE +// + // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.20; @@ -63,4 +68,81 @@ contract TestMCopy { } -} \ No newline at end of file +} + +// DESCRIPTION + +This contract contains two types of functions: + +* checkMCopy runs the tes function and based on its return value: + - Emits an OK event if it returned true. + - Emits an ERROR otherwise. + +* testOutOfBoundsMemoryExtension initialize, modifies and checks memory and then: + - Returns true if all the checks passed. + - Returns false otherwise. + +// CONTRACT BYTECODE + +6080604052348015600e575f80fd5b506103148061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610034575f3560e01c80638c2bcab9146100385780638e97cccf14610042575b5f80fd5b610040610060565b005b61004a6100cd565b60405161005791906102c5565b60405180910390f35b6100686100cd565b1561009e577fd48fe2800bace8f5ca2450feacbd6efc681b1cd0115019bb49fa529b6171bf6760405160405180910390a16100cb565b7f1c9c433b57013295d61f5c5738f5e2cb1de70bb5ba5b2896edfa8efae345965e60405160405180910390a15b565b5f807e0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f5f1b90505f7f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f5f1b90505f7f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f5f1b90505f7f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f5f1b90505f7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f5f1b90505f7fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebf5f1b90505f7fc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedf5f1b90505f7fe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff5f1b90505f805f1b90505f808a5f52896020528860405287606052866080528560a0528460c0528360e0525991506001610100805e5990508a5f51149b5089602051148c169b5088604051148c169b5087606051148c169b5086608051148c169b508560a051148c169b508460c051148c169b508360e051148c169b508261010051148c169b508b801561028e575061010082145b801561029b575061012081145b9b50505050505050505050505090565b5f8115159050919050565b6102bf816102ab565b82525050565b5f6020820190506102d85f8301846102b6565b9291505056fea2646970667358221220158e838124016e3e2b38988de977bc64e257f5f39460a26e461104d0e815677d64736f6c634300081a0033 + +// CONTRACT CALL + +- checkMCopy() + + 8c2bcab9 + +end + +# Create and fund new account +account_new acc1 10000000 + +# Create transaction to deploy TestMCopy contract +transaction_build txTestMCopy + sender acc1 + receiverAddress 00 + value 0 + data 6080604052348015600e575f80fd5b506103148061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610034575f3560e01c80638c2bcab9146100385780638e97cccf14610042575b5f80fd5b610040610060565b005b61004a6100cd565b60405161005791906102c5565b60405180910390f35b6100686100cd565b1561009e577fd48fe2800bace8f5ca2450feacbd6efc681b1cd0115019bb49fa529b6171bf6760405160405180910390a16100cb565b7f1c9c433b57013295d61f5c5738f5e2cb1de70bb5ba5b2896edfa8efae345965e60405160405180910390a15b565b5f807e0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f5f1b90505f7f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f5f1b90505f7f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f5f1b90505f7f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f5f1b90505f7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f5f1b90505f7fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebf5f1b90505f7fc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedf5f1b90505f7fe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff5f1b90505f805f1b90505f808a5f52896020528860405287606052866080528560a0528460c0528360e0525991506001610100805e5990508a5f51149b5089602051148c169b5088604051148c169b5087606051148c169b5086608051148c169b508560a051148c169b508460c051148c169b508360e051148c169b508261010051148c169b508b801561028e575061010082145b801561029b575061012081145b9b50505050505050505050505090565b5f8115159050919050565b6102bf816102ab565b82525050565b5f6020820190506102d85f8301846102b6565b9291505056fea2646970667358221220158e838124016e3e2b38988de977bc64e257f5f39460a26e461104d0e815677d64736f6c634300081a0033 + gas 1200000 + build + +# Create block to hold txTestMCopy transaction +block_build b01 + parent g00 + transactions txTestMCopy + build + +# Connect block +block_connect b01 + +# Check b01 is best block +assert_best b01 + +# Check txTestMCopy succeeded +assert_tx_success txTestMCopy + +# Create transaction to execute checkMCopy() method +transaction_build txTestMCopyOKCall + sender acc1 + nonce 1 + contract txTestMCopy + value 0 + data 8c2bcab9 + gas 300000 + build + +# Create block to hold txTestMCopyOKCall transaction +block_build b02 + parent b01 + transactions txTestMCopyOKCall + gasLimit 6500000 + build + +# Connect block +block_connect b02 + +# Check b02 is best block +assert_best b02 + +# Check txTestMCopyOKCall succeeded +assert_tx_success txTestMCopyOKCall \ No newline at end of file diff --git a/rskj-core/src/test/resources/dsl/opcode/mcopy/testSingleByteMemoryExtension.txt b/rskj-core/src/test/resources/dsl/opcode/mcopy/testSingleByteMemoryExtension.txt index 29f984056d..93c1ff5ef1 100644 --- a/rskj-core/src/test/resources/dsl/opcode/mcopy/testSingleByteMemoryExtension.txt +++ b/rskj-core/src/test/resources/dsl/opcode/mcopy/testSingleByteMemoryExtension.txt @@ -1,3 +1,8 @@ +comment + +// CONTRACT CODE +// + // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.20; @@ -63,4 +68,81 @@ contract TestMCopy { } -} \ No newline at end of file +} + +// DESCRIPTION + +This contract contains two types of functions: + +* checkMCopy runs the tes function and based on its return value: + - Emits an OK event if it returned true. + - Emits an ERROR otherwise. + +* testSingleByteMemoryExtension initialize, modifies and checks memory and then: + - Returns true if all the checks passed. + - Returns false otherwise. + +// CONTRACT BYTECODE + +6080604052348015600e575f80fd5b506103348061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610034575f3560e01c80638c2bcab914610038578063b8e40c3114610042575b5f80fd5b610040610060565b005b61004a6100cd565b60405161005791906102e5565b60405180910390f35b6100686100cd565b1561009e577fd48fe2800bace8f5ca2450feacbd6efc681b1cd0115019bb49fa529b6171bf6760405160405180910390a16100cb565b7f1c9c433b57013295d61f5c5738f5e2cb1de70bb5ba5b2896edfa8efae345965e60405160405180910390a15b565b5f807e0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f5f1b90505f7f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f5f1b90505f7f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f5f1b90505f7f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f5f1b90505f7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f5f1b90505f7fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebf5f1b90505f7fc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedf5f1b90505f7fe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff5f1b90505f7f01000000000000000000000000000000000000000000000000000000000000005f1b90505f808a5f52896020528860405287606052866080528560a0528460c0528360e0525991506001806101005e5990508a5f51149b5089602051148c169b5088604051148c169b5087606051148c169b5086608051148c169b508560a051148c169b508460c051148c169b508360e051148c169b508261010051148c169b508b80156102ae575061010082145b80156102bb575061012081145b9b50505050505050505050505090565b5f8115159050919050565b6102df816102cb565b82525050565b5f6020820190506102f85f8301846102d6565b9291505056fea2646970667358221220a1f31ba0c8bc3a6d1fa5855df4a6cebad6d0d3907398139c9a3ae656ef82ea9664736f6c634300081a0033 + +// CONTRACT CALL + +- checkMCopy() + + 8c2bcab9 + +end + +# Create and fund new account +account_new acc1 10000000 + +# Create transaction to deploy TestMCopy contract +transaction_build txTestMCopy + sender acc1 + receiverAddress 00 + value 0 + data 6080604052348015600e575f80fd5b506103348061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610034575f3560e01c80638c2bcab914610038578063b8e40c3114610042575b5f80fd5b610040610060565b005b61004a6100cd565b60405161005791906102e5565b60405180910390f35b6100686100cd565b1561009e577fd48fe2800bace8f5ca2450feacbd6efc681b1cd0115019bb49fa529b6171bf6760405160405180910390a16100cb565b7f1c9c433b57013295d61f5c5738f5e2cb1de70bb5ba5b2896edfa8efae345965e60405160405180910390a15b565b5f807e0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f5f1b90505f7f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f5f1b90505f7f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f5f1b90505f7f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f5f1b90505f7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f5f1b90505f7fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebf5f1b90505f7fc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedf5f1b90505f7fe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff5f1b90505f7f01000000000000000000000000000000000000000000000000000000000000005f1b90505f808a5f52896020528860405287606052866080528560a0528460c0528360e0525991506001806101005e5990508a5f51149b5089602051148c169b5088604051148c169b5087606051148c169b5086608051148c169b508560a051148c169b508460c051148c169b508360e051148c169b508261010051148c169b508b80156102ae575061010082145b80156102bb575061012081145b9b50505050505050505050505090565b5f8115159050919050565b6102df816102cb565b82525050565b5f6020820190506102f85f8301846102d6565b9291505056fea2646970667358221220a1f31ba0c8bc3a6d1fa5855df4a6cebad6d0d3907398139c9a3ae656ef82ea9664736f6c634300081a0033 + gas 1200000 + build + +# Create block to hold txTestMCopy transaction +block_build b01 + parent g00 + transactions txTestMCopy + build + +# Connect block +block_connect b01 + +# Check b01 is best block +assert_best b01 + +# Check txTestMCopy succeeded +assert_tx_success txTestMCopy + +# Create transaction to execute checkMCopy() method +transaction_build txTestMCopyOKCall + sender acc1 + nonce 1 + contract txTestMCopy + value 0 + data 8c2bcab9 + gas 300000 + build + +# Create block to hold txTestMCopyOKCall transaction +block_build b02 + parent b01 + transactions txTestMCopyOKCall + gasLimit 6500000 + build + +# Connect block +block_connect b02 + +# Check b02 is best block +assert_best b02 + +# Check txTestMCopyOKCall succeeded +assert_tx_success txTestMCopyOKCall \ No newline at end of file diff --git a/rskj-core/src/test/resources/dsl/opcode/mcopy/testSingleWordMemoryExtension.txt b/rskj-core/src/test/resources/dsl/opcode/mcopy/testSingleWordMemoryExtension.txt index 9bb5959191..fc9abba21f 100644 --- a/rskj-core/src/test/resources/dsl/opcode/mcopy/testSingleWordMemoryExtension.txt +++ b/rskj-core/src/test/resources/dsl/opcode/mcopy/testSingleWordMemoryExtension.txt @@ -1,3 +1,8 @@ +comment + +// CONTRACT CODE +// + // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.20; @@ -63,4 +68,81 @@ contract TestMCopy { } -} \ No newline at end of file +} + +// DESCRIPTION + +This contract contains two types of functions: + +* checkMCopy runs the tes function and based on its return value: + - Emits an OK event if it returned true. + - Emits an ERROR otherwise. + +* testSingleWordMemoryExtension initialize, modifies and checks memory and then: + - Returns true if all the checks passed. + - Returns false otherwise. + +// CONTRACT BYTECODE + +6080604052348015600e575f80fd5b506103358061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610034575f3560e01c80638c2bcab914610038578063a42a7a8414610042575b5f80fd5b610040610060565b005b61004a6100cd565b60405161005791906102e6565b60405180910390f35b6100686100cd565b1561009e577fd48fe2800bace8f5ca2450feacbd6efc681b1cd0115019bb49fa529b6171bf6760405160405180910390a16100cb565b7f1c9c433b57013295d61f5c5738f5e2cb1de70bb5ba5b2896edfa8efae345965e60405160405180910390a15b565b5f807e0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f5f1b90505f7f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f5f1b90505f7f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f5f1b90505f7f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f5f1b90505f7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f5f1b90505f7fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebf5f1b90505f7fc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedf5f1b90505f7fe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff5f1b90505f7f0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f205f1b90505f808a5f52896020528860405287606052866080528560a0528460c0528360e052599150602060016101005e5990508a5f51149b5089602051148c169b5088604051148c169b5087606051148c169b5086608051148c169b508560a051148c169b508460c051148c169b508360e051148c169b508261010051148c169b508b80156102af575061010082145b80156102bc575061012081145b9b50505050505050505050505090565b5f8115159050919050565b6102e0816102cc565b82525050565b5f6020820190506102f95f8301846102d7565b9291505056fea264697066735822122019824cc688e40f146d6e6896e474c3ff854d45ece1b135fba692a677d36354b064736f6c634300081a0033 + +// CONTRACT CALL + +- checkMCopy() + + 8c2bcab9 + +end + +# Create and fund new account +account_new acc1 10000000 + +# Create transaction to deploy TestMCopy contract +transaction_build txTestMCopy + sender acc1 + receiverAddress 00 + value 0 + data 6080604052348015600e575f80fd5b506103358061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610034575f3560e01c80638c2bcab914610038578063a42a7a8414610042575b5f80fd5b610040610060565b005b61004a6100cd565b60405161005791906102e6565b60405180910390f35b6100686100cd565b1561009e577fd48fe2800bace8f5ca2450feacbd6efc681b1cd0115019bb49fa529b6171bf6760405160405180910390a16100cb565b7f1c9c433b57013295d61f5c5738f5e2cb1de70bb5ba5b2896edfa8efae345965e60405160405180910390a15b565b5f807e0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f5f1b90505f7f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f5f1b90505f7f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f5f1b90505f7f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f5f1b90505f7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f5f1b90505f7fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebf5f1b90505f7fc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedf5f1b90505f7fe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff5f1b90505f7f0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f205f1b90505f808a5f52896020528860405287606052866080528560a0528460c0528360e052599150602060016101005e5990508a5f51149b5089602051148c169b5088604051148c169b5087606051148c169b5086608051148c169b508560a051148c169b508460c051148c169b508360e051148c169b508261010051148c169b508b80156102af575061010082145b80156102bc575061012081145b9b50505050505050505050505090565b5f8115159050919050565b6102e0816102cc565b82525050565b5f6020820190506102f95f8301846102d7565b9291505056fea264697066735822122019824cc688e40f146d6e6896e474c3ff854d45ece1b135fba692a677d36354b064736f6c634300081a0033 + gas 1200000 + build + +# Create block to hold txTestMCopy transaction +block_build b01 + parent g00 + transactions txTestMCopy + build + +# Connect block +block_connect b01 + +# Check b01 is best block +assert_best b01 + +# Check txTestMCopy succeeded +assert_tx_success txTestMCopy + +# Create transaction to execute checkMCopy() method +transaction_build txTestMCopyOKCall + sender acc1 + nonce 1 + contract txTestMCopy + value 0 + data 8c2bcab9 + gas 300000 + build + +# Create block to hold txTestMCopyOKCall transaction +block_build b02 + parent b01 + transactions txTestMCopyOKCall + gasLimit 6500000 + build + +# Connect block +block_connect b02 + +# Check b02 is best block +assert_best b02 + +# Check txTestMCopyOKCall succeeded +assert_tx_success txTestMCopyOKCall \ No newline at end of file diff --git a/rskj-core/src/test/resources/dsl/opcode/mcopy/testSingleWordMinusOneByteMemoryExtension.txt b/rskj-core/src/test/resources/dsl/opcode/mcopy/testSingleWordMinusOneByteMemoryExtension.txt index 64c76773b3..7bcb8a27da 100644 --- a/rskj-core/src/test/resources/dsl/opcode/mcopy/testSingleWordMinusOneByteMemoryExtension.txt +++ b/rskj-core/src/test/resources/dsl/opcode/mcopy/testSingleWordMinusOneByteMemoryExtension.txt @@ -1,3 +1,8 @@ +comment + +// CONTRACT CODE +// + // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.20; @@ -63,4 +68,81 @@ contract TestMCopy { } -} \ No newline at end of file +} + +// DESCRIPTION + +This contract contains two types of functions: + +* checkMCopy runs the tes function and based on its return value: + - Emits an OK event if it returned true. + - Emits an ERROR otherwise. + +* testSingleWordMinusOneByteMemoryExtension initialize, modifies and checks memory and then: + - Returns true if all the checks passed. + - Returns false otherwise. + +// CONTRACT BYTECODE + +6080604052348015600e575f80fd5b506103358061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610034575f3560e01c806318235dcc146100385780638c2bcab914610056575b5f80fd5b610040610060565b60405161004d91906102e6565b60405180910390f35b61005e61025f565b005b5f807e0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f5f1b90505f7f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f5f1b90505f7f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f5f1b90505f7f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f5f1b90505f7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f5f1b90505f7fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebf5f1b90505f7fc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedf5f1b90505f7fe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff5f1b90505f7f0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f005f1b90505f808a5f52896020528860405287606052866080528560a0528460c0528360e052599150601f60016101005e5990508a5f51149b5089602051148c169b5088604051148c169b5087606051148c169b5086608051148c169b508560a051148c169b508460c051148c169b508360e051148c169b508261010051148c169b508b8015610242575061010082145b801561024f575061012081145b9b50505050505050505050505090565b610267610060565b1561029d577fd48fe2800bace8f5ca2450feacbd6efc681b1cd0115019bb49fa529b6171bf6760405160405180910390a16102ca565b7f1c9c433b57013295d61f5c5738f5e2cb1de70bb5ba5b2896edfa8efae345965e60405160405180910390a15b565b5f8115159050919050565b6102e0816102cc565b82525050565b5f6020820190506102f95f8301846102d7565b9291505056fea264697066735822122047a49a13689ca3e813987e614c0df5b097f5fb0befb034e7d9e64750e196694864736f6c634300081a0033 + +// CONTRACT CALL + +- checkMCopy() + + 8c2bcab9 + +end + +# Create and fund new account +account_new acc1 10000000 + +# Create transaction to deploy TestMCopy contract +transaction_build txTestMCopy + sender acc1 + receiverAddress 00 + value 0 + data 6080604052348015600e575f80fd5b506103358061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610034575f3560e01c806318235dcc146100385780638c2bcab914610056575b5f80fd5b610040610060565b60405161004d91906102e6565b60405180910390f35b61005e61025f565b005b5f807e0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f5f1b90505f7f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f5f1b90505f7f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f5f1b90505f7f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f5f1b90505f7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f5f1b90505f7fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebf5f1b90505f7fc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedf5f1b90505f7fe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff5f1b90505f7f0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f005f1b90505f808a5f52896020528860405287606052866080528560a0528460c0528360e052599150601f60016101005e5990508a5f51149b5089602051148c169b5088604051148c169b5087606051148c169b5086608051148c169b508560a051148c169b508460c051148c169b508360e051148c169b508261010051148c169b508b8015610242575061010082145b801561024f575061012081145b9b50505050505050505050505090565b610267610060565b1561029d577fd48fe2800bace8f5ca2450feacbd6efc681b1cd0115019bb49fa529b6171bf6760405160405180910390a16102ca565b7f1c9c433b57013295d61f5c5738f5e2cb1de70bb5ba5b2896edfa8efae345965e60405160405180910390a15b565b5f8115159050919050565b6102e0816102cc565b82525050565b5f6020820190506102f95f8301846102d7565b9291505056fea264697066735822122047a49a13689ca3e813987e614c0df5b097f5fb0befb034e7d9e64750e196694864736f6c634300081a0033 + gas 1200000 + build + +# Create block to hold txTestMCopy transaction +block_build b01 + parent g00 + transactions txTestMCopy + build + +# Connect block +block_connect b01 + +# Check b01 is best block +assert_best b01 + +# Check txTestMCopy succeeded +assert_tx_success txTestMCopy + +# Create transaction to execute checkMCopy() method +transaction_build txTestMCopyOKCall + sender acc1 + nonce 1 + contract txTestMCopy + value 0 + data 8c2bcab9 + gas 300000 + build + +# Create block to hold txTestMCopyOKCall transaction +block_build b02 + parent b01 + transactions txTestMCopyOKCall + gasLimit 6500000 + build + +# Connect block +block_connect b02 + +# Check b02 is best block +assert_best b02 + +# Check txTestMCopyOKCall succeeded +assert_tx_success txTestMCopyOKCall \ No newline at end of file diff --git a/rskj-core/src/test/resources/dsl/opcode/mcopy/testSingleWordPlusOneByteMemoryExtension.txt b/rskj-core/src/test/resources/dsl/opcode/mcopy/testSingleWordPlusOneByteMemoryExtension.txt index 2b6b817460..29256c0069 100644 --- a/rskj-core/src/test/resources/dsl/opcode/mcopy/testSingleWordPlusOneByteMemoryExtension.txt +++ b/rskj-core/src/test/resources/dsl/opcode/mcopy/testSingleWordPlusOneByteMemoryExtension.txt @@ -1,3 +1,8 @@ +comment + +// CONTRACT CODE +// + // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.20; @@ -66,4 +71,81 @@ contract TestMCopy { } -} \ No newline at end of file +} + +// DESCRIPTION + +This contract contains two types of functions: + +* checkMCopy runs the tes function and based on its return value: + - Emits an OK event if it returned true. + - Emits an ERROR otherwise. + +* testSingleWordPlusOneByteMemoryExtension initialize, modifies and checks memory and then: + - Returns true if all the checks passed. + - Returns false otherwise. + +// CONTRACT BYTECODE + +6080604052348015600e575f80fd5b506103668061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610034575f3560e01c80631802a516146100385780638c2bcab914610056575b5f80fd5b610040610060565b60405161004d9190610317565b60405180910390f35b61005e610290565b005b5f807e0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f5f1b90505f7f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f5f1b90505f7f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f5f1b90505f7f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f5f1b90505f7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f5f1b90505f7fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebf5f1b90505f7fc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedf5f1b90505f7fe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff5f1b90505f7f0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f205f1b90505f7f21000000000000000000000000000000000000000000000000000000000000005f1b90505f808b5f528a6020528960405288606052876080528660a0528560c0528460e052599150602160016101005e5990508b5f51149c508a602051148d169c5089604051148d169c5088606051148d169c5087608051148d169c508660a051148d169c508560c051148d169c508460e051148d169c508361010051148d169c508261012051148d169c508c8015610272575061010082145b801561027f575061014081145b9c5050505050505050505050505090565b610298610060565b156102ce577fd48fe2800bace8f5ca2450feacbd6efc681b1cd0115019bb49fa529b6171bf6760405160405180910390a16102fb565b7f1c9c433b57013295d61f5c5738f5e2cb1de70bb5ba5b2896edfa8efae345965e60405160405180910390a15b565b5f8115159050919050565b610311816102fd565b82525050565b5f60208201905061032a5f830184610308565b9291505056fea264697066735822122069f4ef6b0ae12a6ae1a9d7d028c4d25928b8081ff24888c4c714aeeb1937fc1264736f6c634300081a0033 + +// CONTRACT CALL + +- checkMCopy() + + 8c2bcab9 + +end + +# Create and fund new account +account_new acc1 10000000 + +# Create transaction to deploy TestMCopy contract +transaction_build txTestMCopy + sender acc1 + receiverAddress 00 + value 0 + data 6080604052348015600e575f80fd5b506103668061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610034575f3560e01c80631802a516146100385780638c2bcab914610056575b5f80fd5b610040610060565b60405161004d9190610317565b60405180910390f35b61005e610290565b005b5f807e0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f5f1b90505f7f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f5f1b90505f7f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f5f1b90505f7f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f5f1b90505f7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f5f1b90505f7fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebf5f1b90505f7fc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedf5f1b90505f7fe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff5f1b90505f7f0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f205f1b90505f7f21000000000000000000000000000000000000000000000000000000000000005f1b90505f808b5f528a6020528960405288606052876080528660a0528560c0528460e052599150602160016101005e5990508b5f51149c508a602051148d169c5089604051148d169c5088606051148d169c5087608051148d169c508660a051148d169c508560c051148d169c508460e051148d169c508361010051148d169c508261012051148d169c508c8015610272575061010082145b801561027f575061014081145b9c5050505050505050505050505090565b610298610060565b156102ce577fd48fe2800bace8f5ca2450feacbd6efc681b1cd0115019bb49fa529b6171bf6760405160405180910390a16102fb565b7f1c9c433b57013295d61f5c5738f5e2cb1de70bb5ba5b2896edfa8efae345965e60405160405180910390a15b565b5f8115159050919050565b610311816102fd565b82525050565b5f60208201905061032a5f830184610308565b9291505056fea264697066735822122069f4ef6b0ae12a6ae1a9d7d028c4d25928b8081ff24888c4c714aeeb1937fc1264736f6c634300081a0033 + gas 1200000 + build + +# Create block to hold txTestMCopy transaction +block_build b01 + parent g00 + transactions txTestMCopy + build + +# Connect block +block_connect b01 + +# Check b01 is best block +assert_best b01 + +# Check txTestMCopy succeeded +assert_tx_success txTestMCopy + +# Create transaction to execute checkMCopy() method +transaction_build txTestMCopyOKCall + sender acc1 + nonce 1 + contract txTestMCopy + value 0 + data 8c2bcab9 + gas 300000 + build + +# Create block to hold txTestMCopyOKCall transaction +block_build b02 + parent b01 + transactions txTestMCopyOKCall + gasLimit 6500000 + build + +# Connect block +block_connect b02 + +# Check b02 is best block +assert_best b02 + +# Check txTestMCopyOKCall succeeded +assert_tx_success txTestMCopyOKCall \ No newline at end of file