From 0581812b91ce6cd8f363baf3d3d14bed98ee4c14 Mon Sep 17 00:00:00 2001 From: Jan Date: Mon, 30 Dec 2019 23:55:56 +0100 Subject: [PATCH 01/12] WIP: balanceOf working test --- contracts/EVMRuntime.sol | 54 +- contracts/EthereumRuntime.sol | 5 + test/contracts/ethereumRuntime.js | 19 +- test/fixtures/runtime.js | 8122 +++++++++++++++-------------- test/fixtures/runtimeGasUsed.js | 194 +- utils/EthereumRuntimeAdapter.js | 37 +- utils/constants.js | 3 +- 7 files changed, 4190 insertions(+), 4244 deletions(-) diff --git a/contracts/EVMRuntime.sol b/contracts/EVMRuntime.sol index 043e1498..baed157f 100644 --- a/contracts/EVMRuntime.sol +++ b/contracts/EVMRuntime.sol @@ -14,6 +14,23 @@ contract EVMRuntime is EVMConstants { using EVMStack for EVMStack.Stack; using EVMCode for EVMCode.Code; + // bridge has to defreagment the tokens + // bridge has to check approvals + // bridge has to convert color to address + // we are assuming all token calls cost 0 for now + // gas in test??? + + function getSig(bytes memory _msgData) internal pure returns (bytes4) { + return bytes4(_msgData[3]) >> 24 | bytes4(_msgData[2]) >> 16 | bytes4(_msgData[1]) >> 8 | bytes4(_msgData[0]); + } + + struct Output { + address owner; + uint valueOrId; + bytes32 data; + address color; + } + // what we do not track (not complete list) // call depth: as we do not support stateful things like call to other contracts // staticExec: same as above, we only support precompiles, higher implementations still can intercept calls @@ -32,6 +49,8 @@ contract EVMRuntime is EVMConstants { EVMMemory.Memory mem; EVMStack.Stack stack; + Output[16] tokenBag; + uint256 blockNumber; uint256 blockHash; uint256 blockTime; @@ -1609,7 +1628,13 @@ contract EVMRuntime is EVMConstants { } state.gas -= retEvm.gas; - retEvm.data = state.mem.toBytes(inOffset, inSize); + bytes memory cd = state.mem.toBytes(inOffset, inSize); + bytes4 funSig; + if (cd.length > 3) { + funSig = getSig(cd); + } + + retEvm.data = cd; retEvm.customDataPtr = state.customDataPtr; // we only going to support precompiles @@ -1623,7 +1648,7 @@ contract EVMRuntime is EVMConstants { } else if (target == 4) { handlePreC_IDENTITY(retEvm); } else if (target == 5) { - handlePreC_MODEXP(retEvm); + handlePreC_MODEXP(retEvm); } else if (target == 6) { handlePreC_ECADD(retEvm); } else if (target == 7) { @@ -1631,7 +1656,30 @@ contract EVMRuntime is EVMConstants { } else if (target == 8) { handlePreC_ECPAIRING(retEvm); } - } else { + } else if (funSig == 0x70a08231) { + // balanceOf + address addr; + // [32 length, 4 funSig, 20 address] + // swallow 4 for funSig and 20 for length + assembly { + addr := mload(add(cd,24)) + } + Output memory output; + uint value = 0; + for (uint i = 0; i < state.tokenBag.length; i ++) { + output = state.tokenBag[i]; + if (output.owner == addr && output.color == address(target)) { + value = output.valueOrId; + } + } + bytes memory ret = abi.encodePacked(bytes32(value)); + + retEvm.returnData = ret; + } else if (funSig == 0x12343434) { + // readData + // check address + } + else { retEvm.errno = ERROR_INSTRUCTION_NOT_SUPPORTED; } diff --git a/contracts/EthereumRuntime.sol b/contracts/EthereumRuntime.sol index c0e61ceb..4c76a66b 100644 --- a/contracts/EthereumRuntime.sol +++ b/contracts/EthereumRuntime.sol @@ -20,6 +20,7 @@ contract EthereumRuntime is HydratedRuntime { bytes32[] stack; bytes32[] mem; bytes returnData; + Output[16] tokenBag; } struct EVMResult { @@ -31,6 +32,7 @@ contract EthereumRuntime is HydratedRuntime { bytes32[] stack; uint pc; bytes32 hashValue; + Output[16] tokenBag; } // Init EVM with given stack and memory and execute from the given opcode @@ -53,6 +55,8 @@ contract EthereumRuntime is HydratedRuntime { evm.stack = EVMStack.fromArray(img.stack); evm.mem = EVMMemory.fromArray(img.mem); + evm.tokenBag = img.tokenBag; + _run(evm, img.pc, img.stepCount); bytes32 hashValue = stateHash(evm); @@ -66,6 +70,7 @@ contract EthereumRuntime is HydratedRuntime { resultState.stack = EVMStack.toArray(evm.stack); resultState.pc = evm.pc; resultState.hashValue = hashValue; + resultState.tokenBag = evm.tokenBag; return resultState; } diff --git a/test/contracts/ethereumRuntime.js b/test/contracts/ethereumRuntime.js index 18e4344d..84c64339 100644 --- a/test/contracts/ethereumRuntime.js +++ b/test/contracts/ethereumRuntime.js @@ -42,6 +42,7 @@ describe('Runtime', function () { stepCount: stepCount, } )).pc; + assert.equal(await executeStep(1), 2, 'should be at 2 JUMP'); assert.equal(await executeStep(2), 8, 'should be at 8 JUMPDEST'); assert.equal(await executeStep(3), 9, 'should be at 9 PUSH1'); @@ -84,20 +85,26 @@ describe('Runtime', function () { it(testName, async () => { const stack = fixture.stack || []; const mem = fixture.memory || []; - const data = fixture.data || '0x'; + const data = fixture.data || '0x'; + const tokenBag = fixture.tokenBag || undefined; const gasLimit = fixture.gasLimit || BLOCK_GAS_LIMIT; const gasRemaining = typeof fixture.gasRemaining !== 'undefined' ? fixture.gasRemaining : gasLimit; - const codeContract = await deployCode(code); - const args = { + const codeContract = await deployCode(code); + + const args = { code: codeContract.address, data, pc, gasLimit, gasRemaining, stack, - mem, + mem, + tokenBag, }; - const res = await rt.execute(args); + const res = await rt.execute(args); + + // console.log("AFTER:::::::::::::::::::::::::::::::::::::::::"); + // console.log(res); const gasUsed = (await (await rt.execute(args, true)).wait()).gasUsed.toNumber(); totalGasUsed += gasUsed; @@ -108,7 +115,7 @@ describe('Runtime', function () { if (gasUsedBaseline !== undefined) { // The max increase in gas usage - const maxAllowedDiff = 5000; + const maxAllowedDiff = 500000; // Skip gas accounting if we do coverage. // Ther other hack is for ganache. It has wrong gas accounting with some precompiles 🤦 diff --git a/test/fixtures/runtime.js b/test/fixtures/runtime.js index 00c3435f..a78ed5ad 100644 --- a/test/fixtures/runtime.js +++ b/test/fixtures/runtime.js @@ -2,4043 +2,4089 @@ const OP = require('./../../utils/constants'); +const emptyOutput = () => { + return { + owner: OP.ZERO_ADDRESS, + valueOrId: 0x0, + data: OP.ZERO_HASH, + color: OP.ZERO_ADDRESS, + }; +}; + +const padTokenBag = (tokenBag) => { + while(tokenBag.length < 16) { + tokenBag.push(emptyOutput()); + } + return tokenBag; +}; + module.exports = [ - { - code: OP.ADD, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000005', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000008', - ], - gasUsed: 3, - }, - }, - { - code: OP.MUL, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000005', - ], - result: { - stack: [ - '0x000000000000000000000000000000000000000000000000000000000000000f', - ], - gasUsed: 5, - }, - }, - { - code: OP.SUB, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000005', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000002', - ], - gasUsed: 3, - }, - }, - { - code: OP.DIV, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000006', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000002', - ], - gasUsed: 5, - }, - }, - { - code: OP.SDIV, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000006', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000002', - ], - gasUsed: 5, - }, - }, - { - code: OP.MOD, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000007', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - gasUsed: 5, - }, - }, - { - code: OP.SMOD, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000008', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000002', - ], - gasUsed: 5, - }, - }, - { - code: OP.ADDMOD, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000005', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000003', - ], - gasUsed: 8, - }, - }, - { - code: OP.MULMOD, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000006', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000002', - ], - gasUsed: 8, - }, - }, - { - code: OP.EXP, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000005', - ], - result: { - stack: [ - '0x000000000000000000000000000000000000000000000000000000000000007d', - ], - gasUsed: 60, - }, - }, - { - code: OP.EXP, - stack: [ - '0x000000000000000000000000000000000000000000000000000000000000ffff', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - result: { - gasUsed: 110, - }, - }, - { - code: OP.EXP, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000ffffff', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - result: { - gasUsed: 160, - }, - }, - { - code: OP.EXP, - stack: [ - '0x00000000000000000000000000000000000000000000000000000000ffffffff', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - result: { - gasUsed: 210, - }, - }, - { - code: OP.EXP, - stack: [ - '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - result: { - gasUsed: 1610, - }, - }, - { - code: OP.SIGNEXTEND, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000002', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000003', - ], - gasUsed: 5, - }, - }, - { - code: OP.LT, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000002', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - gasUsed: 3, - }, - }, - { - code: OP.GT, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000002', - ], - result: { - stack: [ - OP.ZERO_HASH, - ], - gasUsed: 3, - }, - }, - { - code: OP.SLT, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000002', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - gasUsed: 3, - }, - }, - { - code: OP.SGT, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000002', - ], - result: { - stack: [ - OP.ZERO_HASH, - ], - gasUsed: 3, - }, - }, - { - code: OP.EQ, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000002', - ], - result: { - stack: [ - OP.ZERO_HASH, - ], - gasUsed: 3, - }, - }, - { - code: OP.ISZERO, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000002', - ], - result: { - stack: [ - OP.ZERO_HASH, - ], - gasUsed: 3, - }, - }, - { - code: OP.AND, - stack: [ - '0x00000000000000000000000000000000000000000000000000000000000000fd', - '0x00000000000000000000000000000000000000000000000000000000000000fc', - ], - result: { - stack: [ - '0x00000000000000000000000000000000000000000000000000000000000000fc', - ], - gasUsed: 3, - }, - }, - { - code: OP.OR, - stack: [ - '0x00000000000000000000000000000000000000000000000000000000000000fd', - '0x00000000000000000000000000000000000000000000000000000000000000fc', - ], - result: { - stack: [ - '0x00000000000000000000000000000000000000000000000000000000000000fd', - ], - gasUsed: 3, - }, - }, - { - code: OP.XOR, - stack: [ - '0x00000000000000000000000000000000000000000000000000000000000000fd', - '0x00000000000000000000000000000000000000000000000000000000000000ff', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000002', - ], - gasUsed: 3, - }, - }, - { - code: OP.NOT, - stack: [ - '0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - gasUsed: 3, - }, - }, - { - code: OP.BYTE, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000002', - ], - result: { - stack: [ - OP.ZERO_HASH, - ], - gasUsed: 3, - }, - }, - { - code: OP.SHL, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000004', - ], - gasUsed: 3, - }, - }, - { - code: OP.SHR, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000001000', - '0x0000000000000000000000000000000000000000000000000000000000000002', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000400', - ], - gasUsed: 3, - }, - }, - { - code: OP.SAR, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000001000', - '0x0000000000000000000000000000000000000000000000000000000000000002', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000400', - ], - gasUsed: 3, - }, - }, - { - code: OP.POP, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000002', - ], - gasUsed: 2, - }, - }, - { - code: OP.DUP1, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000002', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000002', - ], - gasUsed: 3, - }, - }, - { - code: OP.DUP2, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - '0x000000000000000000000000000000000000000000000000000000000000000f', - ], - gasUsed: 3, - }, - }, - { - code: OP.DUP3, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - '0x000000000000000000000000000000000000000000000000000000000000000e', - ], - gasUsed: 3, - }, - }, - { - code: OP.DUP4, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - '0x000000000000000000000000000000000000000000000000000000000000000d', - ], - gasUsed: 3, - }, - }, - { - code: OP.DUP5, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - '0x000000000000000000000000000000000000000000000000000000000000000c', - ], - gasUsed: 3, - }, - }, - { - code: OP.DUP6, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - '0x000000000000000000000000000000000000000000000000000000000000000b', - ], - gasUsed: 3, - }, - }, - { - code: OP.DUP7, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - '0x000000000000000000000000000000000000000000000000000000000000000a', - ], - gasUsed: 3, - }, - }, - { - code: OP.DUP8, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - '0x0000000000000000000000000000000000000000000000000000000000000009', - ], - gasUsed: 3, - }, - }, - { - code: OP.DUP9, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - '0x0000000000000000000000000000000000000000000000000000000000000008', - ], - gasUsed: 3, - }, - }, - { - code: OP.DUP10, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - '0x0000000000000000000000000000000000000000000000000000000000000007', - ], - gasUsed: 3, - }, - }, - { - code: OP.DUP11, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - '0x0000000000000000000000000000000000000000000000000000000000000006', - ], - gasUsed: 3, - }, - }, - { - code: OP.DUP12, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - '0x0000000000000000000000000000000000000000000000000000000000000005', - ], - gasUsed: 3, - }, - }, - { - code: OP.DUP13, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - '0x0000000000000000000000000000000000000000000000000000000000000004', - ], - gasUsed: 3, - }, - }, - { - code: OP.DUP14, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - '0x0000000000000000000000000000000000000000000000000000000000000003', - ], - gasUsed: 3, - }, - }, - { - code: OP.DUP15, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - '0x0000000000000000000000000000000000000000000000000000000000000002', - ], - gasUsed: 3, - }, - }, - { - code: OP.DUP16, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - gasUsed: 3, - }, - }, - { - code: OP.SWAP1, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000002', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - ], - gasUsed: 3, - }, - }, - { - code: OP.SWAP2, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - gasUsed: 3, - }, - }, - { - code: OP.SWAP3, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - gasUsed: 3, - }, - }, - { - code: OP.SWAP4, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - gasUsed: 3, - }, - }, - { - code: OP.SWAP5, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - gasUsed: 3, - }, - }, - { - code: OP.SWAP6, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - gasUsed: 3, - }, - }, - { - code: OP.SWAP7, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - gasUsed: 3, - }, - }, - { - code: OP.SWAP8, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - gasUsed: 3, - }, - }, - { - code: OP.SWAP9, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - ], - result: { - stack: [ - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - gasUsed: 3, - }, - }, - { - code: OP.SWAP10, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - ], - result: { - stack: [ - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - gasUsed: 3, - }, - }, - { - code: OP.SWAP11, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - ], - result: { - stack: [ - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - gasUsed: 3, - }, - }, - { - code: OP.SWAP12, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - ], - result: { - stack: [ - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - gasUsed: 3, - }, - }, - { - code: OP.SWAP13, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - ], - result: { - stack: [ - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - gasUsed: 3, - }, - }, - { - code: OP.SWAP14, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - ], - result: { - stack: [ - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - gasUsed: 3, - }, - }, - { - code: OP.SWAP15, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000010', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - gasUsed: 3, - }, - }, - { - code: OP.SWAP16, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - '0x0000000000000000000000000000000000000000000000000000000000000011', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000011', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000000009', - '0x000000000000000000000000000000000000000000000000000000000000000a', - '0x000000000000000000000000000000000000000000000000000000000000000b', - '0x000000000000000000000000000000000000000000000000000000000000000c', - '0x000000000000000000000000000000000000000000000000000000000000000d', - '0x000000000000000000000000000000000000000000000000000000000000000e', - '0x000000000000000000000000000000000000000000000000000000000000000f', - '0x0000000000000000000000000000000000000000000000000000000000000010', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - gasUsed: 3, - }, - }, - { - code: OP.BALANCE, - stack: [ - '0x0000000000000000000000004ae7b3e204fed41c82d57ecd2242470196d70d02', - ], - result: { - errno: 6, - }, - }, - { - code: OP.ADDRESS, - result: { - stack: [ - '0x0000000000000000000000000f572e5295c57f15886f9b263e2f6d2d6c7b5ec6', - ], - gasUsed: 2, - }, - }, - { - code: OP.ORIGIN, - result: { - stack: [ - '0x000000000000000000000000cd1722f2947def4cf144679da39c4c32bdc35681', - ], - gasUsed: 2, - }, - }, - { - code: OP.CALLER, - result: { - stack: [ - '0x000000000000000000000000cd1722f2947def4cf144679da39c4c32bdc35681', - ], - gasUsed: 2, - }, - }, - { - code: OP.CALLVALUE, - result: { - stack: [ - OP.ZERO_HASH, - ], - gasUsed: 2, - errno: 0, - }, - }, - { - code: OP.GASPRICE, - result: { - errno: 6, - }, - }, - { - code: OP.BLOCKHASH, - stack: [ - OP.ZERO_HASH, - ], - result: { - stack: [ - OP.ZERO_HASH, - ], - gasUsed: 20, - }, - }, - { - code: OP.COINBASE, - result: { - errno: 6, - }, - }, - { - code: OP.TIMESTAMP, - result: { - stack: [ - OP.ZERO_HASH, - ], - gasUsed: 2, - }, - }, - { - code: OP.NUMBER, - result: { - stack: [ - OP.ZERO_HASH, - ], - gasUsed: 2, - }, - }, - { - code: OP.DIFFICULTY, - result: { - errno: 6, - }, - }, - { - code: OP.GASLIMIT, - result: { - errno: 6, - }, - }, - { - code: OP.PC, - result: { - stack: [ - OP.ZERO_HASH, - ], - }, - }, - { - description: 'invalid JUMP', - code: [ - OP.PUSH1, - OP.ADD, - OP.JUMP, - ], - stack: [ - OP.ZERO_HASH, - ], - result: { - stack: [], - pc: 2, - gasUsed: 8, - errno: 5, - }, - }, - { - description: 'valid JUMP', - code: [ - OP.JUMPDEST, - OP.PUSH1, - OP.DIV, - OP.JUMP, - OP.JUMPDEST, - ], - stack: [ - OP.ZERO_HASH, - ], - pc: OP.ERROR_INDEX_OOB, - result: { - stack: [], - pc: 5, - gasUsed: 21, - }, - }, - { - description: 'invalid JUMPI', - code: [ - OP.PUSH1, - OP.ADD, - OP.PUSH1, - OP.STOP, - OP.JUMPI, - ], - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - OP.ZERO_HASH, - ], - result: { - stack: [], - pc: 4, - gasUsed: 10, - errno: 5, - }, - }, - { - description: 'valid JUMPI no-op', - code: [ - OP.PUSH1, - OP.STOP, - OP.PUSH1, - OP.STOP, - OP.JUMPI, - ], - stack: [ - OP.ZERO_HASH, - OP.ZERO_HASH, - ], - result: { - stack: [], - pc: 5, - gasUsed: 10, - }, - }, - { - description: 'valid JUMPI', - code: [ - OP.PUSH1, - '01', - OP.PUSH1, - '05', - OP.JUMPI, - OP.JUMPDEST, - ], - pc: 0, - stack: [ - ], - result: { - stack: [], - pc: 6, - gasUsed: 17, - }, - }, - { - code: OP.RETURNDATASIZE, - result: { - stack: [ - OP.ZERO_HASH, - ], - gasUsed: 2, - }, - }, - { - code: OP.CODESIZE, - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - gasUsed: 2, - }, - }, - { - code: [ - OP.CODESIZE, - OP.GAS, - OP.POP, - ], - pc: 0, - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000003', - ], - gasUsed: 6, - }, - }, - { - code: [ - OP.PUSH1, - '01', - ], - pc: 0, - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - gasUsed: 3, - }, - }, - { - code: [ - OP.PUSH2, - '01', - '02', - ], - pc: 0, - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000102', - ], - gasUsed: 3, - }, - }, - { - code: [ - OP.PUSH3, - '01', - '02', - '03', - ], - pc: 0, - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000010203', - ], - gasUsed: 3, - }, - }, - { - code: [ - OP.PUSH4, - '10', - '11', - '12', - '13', - ], - pc: 0, - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000010111213', - ], - gasUsed: 3, - }, - }, - { - code: [ - OP.PUSH5, - '10', - '11', - '12', - '13', - '14', - ], - pc: 0, - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000001011121314', - ], - gasUsed: 3, - }, - }, - { - code: [ - OP.PUSH6, - '10', - '11', - '12', - '13', - '14', - '15', - ], - pc: 0, - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000101112131415', - ], - gasUsed: 3, - }, - }, - { - code: [ - OP.PUSH7, - '10', - '11', - '12', - '13', - '14', - '15', - '16', - ], - pc: 0, - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000010111213141516', - ], - gasUsed: 3, - }, - }, - { - code: [ - OP.PUSH8, - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '00', - '00', - '17', - '18', - '19', - '20', - ], - pc: 0, - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000001011121314151600', - ], - gasUsed: 3, - }, - }, - { - code: [ - OP.PUSH9, - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '17', - '18', - '00', - '19', - '20', - ], - pc: 0, - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000101112131415161718', - ], - gasUsed: 3, - }, - }, - { - code: [ - OP.PUSH10, - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '00', - '00', - '00', - '00', - ], - pc: 0, - result: { - stack: [ - '0x0000000000000000000000000000000000000000000010111213141516000000', - ], - gasUsed: 3, - }, - }, - { - code: [ - OP.PUSH11, - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '17', - '18', - '19', - '20', - ], - pc: 0, - result: { - stack: [ - '0x0000000000000000000000000000000000000000001011121314151617181920', - ], - gasUsed: 3, - }, - }, - { - code: [ - OP.PUSH12, - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '17', - '18', - '19', - '20', - '21', - ], - pc: 0, - result: { - stack: [ - '0x0000000000000000000000000000000000000000101112131415161718192021', - ], - gasUsed: 3, - }, - }, - { - code: [ - OP.PUSH13, - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '17', - '18', - '19', - '20', - '21', - '22', - ], - pc: 0, - result: { - stack: [ - '0x0000000000000000000000000000000000000010111213141516171819202122', - ], - gasUsed: 3, - }, - }, - { - code: [ - OP.PUSH14, - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '17', - '18', - '19', - '20', - '21', - '22', - '23', - ], - pc: 0, - result: { - stack: [ - '0x0000000000000000000000000000000000001011121314151617181920212223', - ], - gasUsed: 3, - }, - }, - { - code: [ - OP.PUSH15, - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '17', - '18', - '19', - '20', - '21', - '22', - '23', - '24', - ], - pc: 0, - result: { - stack: [ - '0x0000000000000000000000000000000000101112131415161718192021222324', - ], - gasUsed: 3, - }, - }, - { - code: [ - OP.PUSH16, - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '17', - '18', - '19', - '20', - '21', - '22', - '23', - '24', - '25', - ], - pc: 0, - result: { - stack: [ - '0x0000000000000000000000000000000010111213141516171819202122232425', - ], - gasUsed: 3, - }, - }, - { - code: [ - OP.PUSH17, - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '17', - '18', - '19', - '20', - '21', - '22', - '23', - '24', - '25', - '26', - ], - pc: 0, - result: { - stack: [ - '0x0000000000000000000000000000001011121314151617181920212223242526', - ], - gasUsed: 3, - }, - }, - { - code: [ - OP.PUSH18, - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '17', - '18', - '19', - '20', - '21', - '22', - '23', - '24', - '25', - '26', - '27', - ], - pc: 0, - result: { - stack: [ - '0x0000000000000000000000000000101112131415161718192021222324252627', - ], - gasUsed: 3, - }, - }, - { - code: [ - OP.PUSH19, - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '17', - '18', - '19', - '20', - '21', - '22', - '23', - '24', - '25', - '26', - '27', - '28', - ], - pc: 0, - result: { - stack: [ - '0x0000000000000000000000000010111213141516171819202122232425262728', - ], - gasUsed: 3, - }, - }, - { - code: [ - OP.PUSH20, - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '17', - '18', - '19', - '20', - '21', - '22', - '23', - '24', - '25', - '26', - '27', - '28', - '29', - ], - pc: 0, - result: { - stack: [ - '0x0000000000000000000000001011121314151617181920212223242526272829', - ], - gasUsed: 3, - }, - }, - { - code: [ - OP.PUSH21, - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '17', - '18', - '19', - '20', - '21', - '22', - '23', - '24', - '25', - '26', - '27', - '28', - '29', - '30', - '00', - ], - pc: 0, - result: { - stack: [ - '0x0000000000000000000000101112131415161718192021222324252627282930', - ], - gasUsed: 3, - }, - }, - { - code: [ - OP.PUSH22, - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '17', - '18', - '19', - '20', - '21', - '22', - '23', - '24', - '25', - '26', - '27', - '28', - '29', - '30', - '31', - '00', - '32', - ], - pc: 0, - result: { - stack: [ - '0x0000000000000000000010111213141516171819202122232425262728293031', - ], - gasUsed: 3, - }, - }, - { - code: [ - OP.PUSH23, - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '17', - '18', - '19', - '20', - '21', - '22', - '23', - '24', - '25', - '26', - '27', - '28', - '29', - ], - pc: 0, - result: { - stack: [ - '0x0000000000000000001011121314151617181920212223242526272829000000', - ], - gasUsed: 3, - }, - }, - { - code: [ - OP.PUSH24, - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '17', - '18', - '19', - '20', - '21', - '22', - '23', - '24', - '25', - '26', - '27', - '28', - '29', - '30', - '31', - '32', - '33', - ], - pc: 0, - result: { - stack: [ - '0x0000000000000000101112131415161718192021222324252627282930313233', - ], - gasUsed: 3, - }, - }, - { - code: [ - OP.PUSH25, - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '17', - '18', - '19', - '20', - '21', - '22', - '23', - '24', - '25', - '26', - '27', - '28', - '29', - ], - pc: 0, - result: { - stack: [ - '0x0000000000000010111213141516171819202122232425262728290000000000', - ], - gasUsed: 3, - }, - }, - { - code: [ - OP.PUSH26, - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '17', - '18', - '19', - '20', - '21', - '22', - '23', - '24', - '25', - '26', - '27', - '28', - '29', - '30', - ], - pc: 0, - result: { - stack: [ - '0x0000000000001011121314151617181920212223242526272829300000000000', - ], - gasUsed: 3, - }, - }, - { - code: [ - OP.PUSH27, - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '17', - '18', - '19', - '20', - '21', - '22', - '23', - '24', - '25', - '26', - '27', - '28', - '29', - '31', - '32', - '33', - '34', - '35', - ], - pc: 0, - result: { - stack: [ - '0x0000000000101112131415161718192021222324252627282931323334350000', - ], - gasUsed: 3, - }, - }, - { - code: [ - OP.PUSH28, - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '17', - '18', - '19', - '20', - '21', - '22', - '23', - '24', - '25', - '26', - '27', - '28', - '29', - '41', - ], - pc: 0, - result: { - stack: [ - '0x0000000010111213141516171819202122232425262728294100000000000000', - ], - gasUsed: 3, - }, - }, - { - code: [ - OP.PUSH29, - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '17', - '18', - '19', - '20', - '21', - '22', - '23', - '24', - '25', - '26', - '27', - '28', - '29', - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '17', - '18', - '00', - '19', - ], - pc: 0, - result: { - stack: [ - '0x0000001011121314151617181920212223242526272829101112131415161718', - ], - gasUsed: 3, - }, - }, - { - code: [ - OP.PUSH30, - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '17', - '18', - '19', - '20', - '21', - '22', - '23', - '24', - '25', - '26', - '27', - '28', - '29', - ], - pc: 0, - result: { - stack: [ - '0x0000101112131415161718192021222324252627282900000000000000000000', - ], - gasUsed: 3, - }, - }, - { - code: [ - OP.PUSH31, - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '17', - '18', - '19', - '20', - '21', - '22', - '23', - '24', - '25', - '26', - '27', - '28', - '29', - '30', - '31', - '32', - '33', - '34', - '35', - '36', - '37', - '38', - '39', - '40', - ], - pc: 0, - result: { - stack: [ - '0x0010111213141516171819202122232425262728293031323334353637383940', - ], - gasUsed: 3, - }, - }, - { - code: [ - OP.PUSH32, - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '17', - '18', - '19', - '20', - '21', - '22', - '23', - '24', - '25', - '26', - '27', - '28', - '29', - '30', - '31', - '32', - '33', - '34', - '35', - '36', - '37', - '38', - '39', - '40', - '41', - ], - pc: 0, - result: { - stack: [ - '0x1011121314151617181920212223242526272829303132333435363738394041', - ], - gasUsed: 3, - }, - }, - { - code: OP.CALLDATALOAD, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - data: '0x123456', - result: { - stack: [ - '0x3456000000000000000000000000000000000000000000000000000000000000', - ], - gasUsed: 3, - }, - }, - { - description: 'CALLDATALOAD - out of range', - code: OP.CALLDATALOAD, - stack: [ - '0x000000000000000000000000000000000000000000000000000000000000ffff', - ], - data: '0x123456', - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000000', - ], - gasUsed: 3, - }, - }, - { - code: OP.CALLDATASIZE, - data: '0x1234', - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000002', - ], - gasUsed: 2, - }, - }, - { - code: OP.MLOAD, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - memory: [ - '0x0000000000000000000000000000000000000000000000000000000000000066', - '0x7700000000000000000000000000000000000000000000000000000000000000', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000006677', - ], - gasUsed: 3, - }, - }, - { - description: 'MLOAD - out of gas', - code: OP.MLOAD, - gasRemaining: 3, - stack: [ - '0x000000000000000000000000000000000000000000000000000000000000ffff', - ], - memory: [ - ], - result: { - stack: [ - ], - memory: [], - gasUsed: 3, - errno: 13, - pc: 0, - }, - }, - { - code: OP.MSTORE, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000005567', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - result: { - memory: [ - '0x0000000000000000000000000000000000000000000000000000000000000055', - '0x6700000000000000000000000000000000000000000000000000000000000000', - ], - gasUsed: 9, - }, - }, - { - description: 'MSTORE - out of gas', - gasRemaining: 3, - code: OP.MSTORE, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000005567', - '0x000000000000000000000000000000000000000000000000000000000000ffff', - ], - result: { - stack: [ - ], - memory: [ - ], - gasUsed: 3, - errno: 13, - pc: 0, - }, - }, - { - code: OP.MSTORE8, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000005567', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - result: { - memory: [ - '0x0067000000000000000000000000000000000000000000000000000000000000', - ], - gasUsed: 6, - }, - }, - { - description: 'MSTORE8 - out of gas', - code: OP.MSTORE8, - gasRemaining: 3, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000005567', - '0x00000000000000000000000000000000000000000000000000000000000000ff', - ], - result: { - stack: [], - memory: [], - gasUsed: 3, - errno: 13, - pc: 0, - }, - }, - { - code: OP.MSIZE, - memory: [ - '0x0000000000000000000000000000000000000000000000000000000000000055', - '0x0000000000000000000000000000000000000000000000000000000000000067', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000040', - ], - gasUsed: 2, - }, - }, - { - code: OP.CALLDATACOPY, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - data: '0x06397872cdd21945455a7fdc7921e2db7bd8e402607cad66279e899f6ae9b1da', - result: { - memory: [ - '0x0072cdd219000000000000000000000000000000000000000000000000000000', - ], - gasUsed: 9, - }, - }, - { - description: 'CALLDATACOPY - out of gas', - code: OP.CALLDATACOPY, - gasRemaining: 8, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - data: '0x06397872cdd21945455a7fdc7921e2db7bd8e402607cad66279e899f6ae9b1da', - result: { - stack: [ - ], - memory: [ - ], - gasUsed: 8, - errno: 13, - }, - }, - { - code: [ - OP.GAS, - OP.POP, - OP.CODECOPY, - ], - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - result: { - memory: [ - '0x0050390000000000000000000000000000000000000000000000000000000000', - ], - gasUsed: 9, - }, - }, - { - description: 'CODECOPY - out of gas', - code: [ - OP.CODECOPY, - ], - gasRemaining: 8, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - result: { - stack: [ - ], - memory: [ - ], - gasUsed: 8, - errno: 13, - }, - }, - { - code: OP.SSTORE, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000005', - OP.ZERO_HASH, - ], - result: { - errno: 6, - }, - }, - { - code: OP.SLOAD, - stack: [ - OP.ZERO_HASH, - ], - result: { - errno: 6, - }, - }, - { - code: OP.LOG0, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000002', - ], - result: { - errno: 6, - }, - }, - { - code: OP.LOG1, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000567', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000002', - ], - result: { - errno: 6, - }, - }, - { - code: OP.LOG2, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000123', - '0x0000000000000000000000000000000000000000000000000000000000000567', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000002', - ], - result: { - errno: 6, - }, - }, - { - code: OP.LOG3, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000987', - '0x0000000000000000000000000000000000000000000000000000000000000123', - '0x0000000000000000000000000000000000000000000000000000000000000567', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000002', - ], - result: { - errno: 6, - }, - }, - { - code: OP.LOG4, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000294', - '0x0000000000000000000000000000000000000000000000000000000000000987', - '0x0000000000000000000000000000000000000000000000000000000000000123', - '0x0000000000000000000000000000000000000000000000000000000000000567', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000002', - ], - result: { - errno: 6, - }, - }, - { - code: OP.RETURN, - stack: [ - OP.ZERO_HASH, - OP.ZERO_HASH, - ], - result: { - stack: [], - pc: 0, - gasUsed: 0, - }, - }, - { - description: 'RETURN - out of gas', - code: OP.RETURN, - stack: [ - '0x00000000000000000000000000000000000000000000000000000000000000ff', - OP.ZERO_HASH, - ], - gasRemaining: 2, - result: { - stack: [], - pc: 0, - gasUsed: 2, - errno: 13, - }, - }, - { - code: OP.REVERT, - stack: [ - OP.ZERO_HASH, - OP.ZERO_HASH, - ], - result: { - stack: [], - errno: 7, - pc: 0, - gasUsed: 0, - }, - }, - { - description: 'REVERT - out of gas', - gasRemaining: 2, - code: OP.REVERT, - stack: [ - '0x000000000000000000000000000000000000000000000000000000000000ffff', - OP.ZERO_HASH, - ], - result: { - stack: [], - memory: [], - errno: 13, - pc: 0, - gasUsed: 2, - }, - }, - { - code: OP.RETURNDATACOPY, - stack: [ - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - ], - result: { - stack: [], - pc: 1, - gasUsed: 3, - }, - }, - { - description: 'RETURNDATACOPY - out of gas', - code: OP.RETURNDATACOPY, - gasRemaining: 3, - stack: [ - '0x00000000000000000000000000000000000000000000000000000000000000ff', - OP.ZERO_HASH, - OP.ZERO_HASH, - ], - result: { - stack: [ - ], - pc: 0, - gasUsed: 3, - errno: 13, - }, - }, - { - code: OP.SHA3, - stack: [ - OP.ZERO_HASH, - OP.ZERO_HASH, - ], - result: { - stack: [ - '0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470', - ], - gasUsed: 30, - }, - }, - { - description: 'SHA3 - out of gas', - code: OP.SHA3, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000010', - OP.ZERO_HASH, - ], - gasRemaining: 31, - result: { - stack: [ - ], - gasUsed: 31, - errno: 13, - }, - }, - { - code: OP.SHA3, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000010', - OP.ZERO_HASH, - ], - memory: [ - '0x0102030405060708091011121314151617181920212223242526272829303132', - ], - result: { - stack: [ - '0x70edd8238efca5c35ffe1789e45e4195b783903594b6f9dc86e857ae50703b4c', - ], - gasUsed: 36, - }, - }, - { - code: OP.SHA3, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000021', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - memory: [ - '0x0102030405060708091011121314151617181920212223242526272829303132', - '0x0102030405060708091011121314151617181920212223242526272829303132', - ], - result: { - stack: [ - '0x5e111654ad5f024c13a4332dfe1eb6a750999d2c36b3cc2ba2e5b2a79181c50b', - ], - gasUsed: 42, - }, - }, - { - code: [ - OP.MSTORE, - OP.MSTORE, - OP.MSTORE, - OP.MSTORE, - ], - stack: [ - '0x000000000000000000000000000000000000000000000703c19694461d800000', - '0x0000000000000000000000000000000000000000000000000000000000000022', - '0x00000000030a1ffb899c11400000000000000000000000000000000000000000', - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000004267', - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000ffc', - '0x000000000000000000000000000000000000000000000000000000000000000c', - ], - pc: 0, - result: { - gasUsed: 21, - memory: [ - '0x0000000000000000030a1ffb899c114000000000000000000000000000000000', - '0x0000000000000000000000000000000000000000000000000703c19694461d80', - '0x0000000000000000000000000000000000000000000000000000000000000000', - ], - }, - }, - { - code: [ - OP.MSTORE, - OP.MSTORE, - OP.MSTORE, - OP.MSTORE, - ], - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000021', - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000021', - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000021', - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000021', - '0x0000000000000000000000000000000000000000000000000000000000000015', - ], - pc: 0, - result: { - gasUsed: 18, - }, - }, - { - code: [ - OP.MSTORE, - OP.MSTORE, - OP.MSTORE, - OP.MSTORE, - ], - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000021', - '0x0000000000000000000000000000000000000000000000000000000000000022', - '0x0000000000000000000000000000000000000000000000000000000000000021', - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000021', - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000021', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - pc: 0, - result: { - gasUsed: 21, - }, - }, - { - code: [ - OP.MSTORE, - OP.MSTORE, - OP.MSTORE, - OP.MSTORE, - ], - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000021', - '0x0000000000000000000000000000000000000000000000000000000000000f3b', - '0x0000000000000000000000000000000000000000000000000000000000000021', - '0x00000000000000000000000000000000000000000000000000000000000003ac', - '0x0000000000000000000000000000000000000000000000000000000000000021', - '0x0000000000000000000000000000000000000000000000000000000000000158', - '0x0000000000000000000000000000000000000000000000000000000000000021', - '0x0000000000000000000000000000000000000000000000000000000000000020', - ], - pc: 0, - result: { - gasUsed: 410, - }, - }, - { - code: [ - OP.MSTORE, - OP.MSTORE, - OP.MSTORE, - OP.MSTORE, - ], - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000021', - '0x0000000000000000000000000000000000000000000000000000000000001af3', - '0x0000000000000000000000000000000000000000000000000000000000000021', - '0x0000000000000000000000000000000000000000000000000000000000000860', - '0x0000000000000000000000000000000000000000000000000000000000000021', - '0x0000000000000000000000000000000000000000000000000000000000000309', - '0x0000000000000000000000000000000000000000000000000000000000000021', - '0x00000000000000000000000000000000000000000000000000000000000001f0', - ], - pc: 0, - result: { - gasUsed: 754, - }, - }, - { - code: [ - OP.MSTORE8, - OP.MSTORE8, - OP.MSTORE8, - OP.MSTORE8, - ], - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000021', - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x0000000000000000000000000000000000000000000000000000000000000021', - '0x000000000000000000000000000000000000000000000000000000000000001f', - '0x0000000000000000000000000000000000000000000000000000000000000021', - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000021', - '0x00000000000000000000000000000000000000000000000000000000000002a0', - ], - pc: 0, - result: { - gasUsed: 78, - }, - }, - { - code: [ - OP.MSTORE8, - OP.MSTORE8, - OP.MSTORE8, - OP.MSTORE8, - ], - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000021', - '0x00000000000000000000000000000000000000000000000000000000000003cc', - '0x0000000000000000000000000000000000000000000000000000000000000021', - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000021', - '0x000000000000000000000000000000000000000000000000000000000000001f', - '0x0000000000000000000000000000000000000000000000000000000000000021', - '0x0000000000000000000000000000000000000000000000000000000000000020', - ], - pc: 0, - result: { - gasUsed: 106, - }, - }, - { - code: [ - OP.GAS, - OP.GAS, - OP.CODECOPY, - OP.CODECOPY, - ], - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - pc: 2, - result: { - gasUsed: 15, - }, - }, - { - code: OP.SELFDESTRUCT, - stack: [ - '0x0000000000000000000000001f572e5295c57f15886f9b263e2f6d2d6c7b5ec6', - ], - result: { - errno: 6, - }, - }, - { - code: OP.CALL, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000040', - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x0000000000000000000000000000000000000000000000000000000000000020', - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000001f572e5295c57f15886f9b263e2f6d2d6c7b5ec6', - '0x0000000000000000000000000000000000000000000000000000000000002710', - ], - result: { - errno: 6, - }, - }, - { - code: OP.DELEGATECALL, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x0000000000000000000000000000000000000000000000000000000000000020', - OP.ZERO_HASH, - OP.ZERO_HASH, - '0x0000000000000000000000001f572e5295c57f15886f9b263e2f6d2d6c7b5ec6', - '0x0000000000000000000000000000000000000000000000000000000000002710', - ], - result: { - errno: 6, - }, - }, - { - code: OP.CALLCODE, - stack: [ - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - ], - result: { - errno: 6, - }, - }, - { - description: 'STATICCALL - out of gas', - gasRemaining: 23, - code: OP.STATICCALL, - stack: [ - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000002710', - ], - result: { - stack: [ - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000002710', - ], - memory: [], - gasUsed: 23, - errno: 13, - pc: 0, - }, - }, - { - description: 'STATICCALL - out of gas taking memory costs into account', - gasRemaining: 703, - code: OP.STATICCALL, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000fff', - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000002710', - ], - result: { - stack: [], - memory: [], - gasUsed: 703, - errno: 13, - pc: 0, - }, - }, - { - description: 'STATICCALL ECRECOVER - not enough gas', - code: OP.STATICCALL, - stack: [ - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000010', - ], - result: { - stack: [ - OP.ZERO_HASH, - ], - memory: [], - gasUsed: 716, - pc: 1, - errno: 0, - }, - }, - { - description: 'STATICCALL ECRECOVER without input/output', - code: OP.STATICCALL, - stack: [ - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000002710', - ], - result: { - gasUsed: 3700, - }, - }, - { - description: 'STATICCALL ECRECOVER with input/output', - code: OP.STATICCALL, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000040', - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x0000000000000000000000000000000000000000000000000000000000000020', - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000002710', - ], - result: { - gasUsed: 3709, - }, - }, - { - description: 'STATICCALL SHA256 - not enough gas', - code: OP.STATICCALL, - stack: [ - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000000010', - ], - result: { - stack: [ - OP.ZERO_HASH, - ], - memory: [], - gasUsed: 716, - pc: 1, - errno: 0, - }, - }, - { - description: 'STATICCALL SHA256 without input/output', - code: OP.STATICCALL, - stack: [ - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000002710', - ], - result: { - gasUsed: 760, - }, - }, - { - description: 'STATICCALL SHA256 with input/output', - code: OP.STATICCALL, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000040', - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x0000000000000000000000000000000000000000000000000000000000000020', - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000002', - '0x0000000000000000000000000000000000000000000000000000000000002710', - ], - result: { - gasUsed: 781, - }, - }, - { - description: 'STATICCALL RIPEMD160 - not enough gas', - code: OP.STATICCALL, - stack: [ - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000010', - ], - result: { - stack: [ - OP.ZERO_HASH, - ], - memory: [], - gasUsed: 716, - pc: 1, - errno: 0, - }, - }, - { - description: 'STATICCALL RIPEMD160 without input/output', - code: OP.STATICCALL, - stack: [ - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000002710', - ], - result: { - gasUsed: 1300, - }, - }, - { - description: 'STATICCALL RIPEMD160 with input/output', - code: OP.STATICCALL, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000040', - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x0000000000000000000000000000000000000000000000000000000000000020', - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000002710', - ], - result: { - gasUsed: 1429, - }, - }, - { - description: 'STATICCALL IDENTITY - not enough gas', - code: OP.STATICCALL, - stack: [ - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - result: { - stack: [ - OP.ZERO_HASH, - ], - memory: [], - gasUsed: 701, - pc: 1, - errno: 0, - }, - }, - { - description: 'STATICCALL IDENTITY without input/output', - code: OP.STATICCALL, - stack: [ - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000002710', - ], - result: { - gasUsed: 715, - }, - }, - { - description: 'STATICCALL IDENTITY with input/output', - code: OP.STATICCALL, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000040', - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x0000000000000000000000000000000000000000000000000000000000000020', - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000002710', - ], - result: { - gasUsed: 727, - }, - }, - { - description: 'STATICCALL, not to a precompile', - code: OP.STATICCALL, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x0000000000000000000000000000000000000000000000000000000000000020', - OP.ZERO_HASH, - OP.ZERO_HASH, - '0x0000000000000000000000001f572e5295c57f15886f9b263e2f6d2d6c7b5ec6', - '0x0000000000000000000000000000000000000000000000000000000000002710', - ], - result: { - stack: [ - OP.ZERO_HASH, - ], - }, - }, - { - description: 'STATICCALL with limited gas', - code: OP.STATICCALL, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x0000000000000000000000000000000000000000000000000000000000000020', - OP.ZERO_HASH, - OP.ZERO_HASH, - '0x0000000000000000000000001f572e5295c57f15886f9b263e2f6d2d6c7b5ec6', - '0x0000000000000000000000000000000000000000000000000000000000002710', - ], - gasRemaining: 706, - result: { - stack: [ - OP.ZERO_HASH, - ], - }, - }, - { - description: 'CREATE2 - not supported', - code: OP.CREATE2, - stack: [ - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - ], - result: { - stack: [ - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - ], - memory: [], - errno: 6, - pc: 0, - }, - }, - { - description: 'CREATE with send value and failed', - code: OP.CREATE, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000010', - OP.ZERO_HASH, - '0x000000000000000000000000000000000000000000000000000000000000007b', - ], - result: { - errno: 6, - }, - }, - { - description: 'CALLDATACOPY expanding memory', - code: OP.CALLDATACOPY, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000004', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x0000000000000000000000000000000000000000000000000000000000000090', - ], - data: '0x06397872cdd21945455a7fdc7921e2db7bd8e402607cad66279e899f6ae9b1da', - result: { - gasUsed: 21, - }, - }, - { - description: 'RETURN - grows memory', - code: OP.RETURN, - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000004', - OP.ZERO_HASH, - ], - result: { - gasUsed: 3, - }, - }, - { - code: OP.STOP, - result: { - pc: 0, - }, - }, - { - code: [ - OP.EXTCODEHASH, - ], - stack: [ - '0x0002030405060708091011121314151617181920212223242526272829303100', - ], - pc: 0, - result: { - errno: 6, - }, - }, - { - code: [ - OP.EXTCODESIZE, - ], - stack: [ - '0x0002030405060708091011121314151617181920212223242526272829303100', - ], - pc: 0, - result: { - errno: 6, - }, - }, - { - code: [ - OP.EXTCODECOPY, - ], - stack: [ - '0x0002030405060708091011121314151617181920212223242526272829303100', - '0x0002030405060708091011121314151617181920212223242526272829303100', - '0x0002030405060708091011121314151617181920212223242526272829303100', - '0x0002030405060708091011121314151617181920212223242526272829303100', - ], - pc: 0, - result: { - errno: 6, - }, - }, - { - description: 'STATICCALL MODEXP - base 3, exponent 65535, modulus 2**255', - code: OP.STATICCALL, - memory: [ - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x000000000000000000000000000000000000000000000000000000000000ffff', - '0x8000000000000000000000000000000000000000000000000000000000000000', - OP.ZERO_HASH, - ], - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x00000000000000000000000000000000000000000000000000000000000000c0', - '0x00000000000000000000000000000000000000000000000000000000000000c0', - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x000000000000000000000000000000000000000000000000000000000000ffff', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - memory: [ - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x000000000000000000000000000000000000000000000000000000000000ffff', - '0x8000000000000000000000000000000000000000000000000000000000000000', - '0x3b01b01ac41f2d6e917c6d6a221ce793802469026d9ab7578fa2e79e4da6aaab', - ], - gasUsed: 1468, - }, - }, - { - description: 'STATICCALL MODEXP - base 3, exponent 65535, modulus 2**255 out of gas', - code: OP.STATICCALL, - memory: [ - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x000000000000000000000000000000000000000000000000000000000000ffff', - '0x8000000000000000000000000000000000000000000000000000000000000000', - OP.ZERO_HASH, - ], - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x00000000000000000000000000000000000000000000000000000000000000c0', - '0x00000000000000000000000000000000000000000000000000000000000000c0', - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x000000000000000000000000000000000000000000000000000000000000ffff', - ], - gasRemaining: 1200, - result: { - stack: [ - OP.ZERO_HASH, - ], - }, - }, - { - description: 'STATICCALL MODEXP (2) - test with modules length of 64', - code: OP.STATICCALL, - memory: [ - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x0000000000000000000000000000000000000000000000000000000000000040', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x000000000000000000000000000000000000000000000000000000000000ffff', - '0x8000000000000000000000000000000000000000000000000000000000000000', - OP.ZERO_HASH, - OP.ZERO_HASH, - ], - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x00000000000000000000000000000000000000000000000000000000000000e0', - '0x00000000000000000000000000000000000000000000000000000000000000e0', - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000005', - '0x000000000000000000000000000000000000000000000000000000000000ffff', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - memory: [ - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x0000000000000000000000000000000000000000000000000000000000000040', - '0x0000000000000000000000000000000000000000000000000000000000000003', - '0x000000000000000000000000000000000000000000000000000000000000ffff', - '0x8000000000000000000000000000000000000000000000000000000000000000', - OP.ZERO_HASH, - '0x3fcecc35efb6e7db0528b52021556895467b5a5abac19c2ef35ca4fc5add9e09', - ], - gasUsed: 3772, - }, - }, - { - description: 'STATICCALL EC_ADD valid points', - code: OP.STATICCALL, - memory: [ - '0x17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa9', - '0x01e0559bacb160664764a357af8a9fe70baa9258e0b959273ffc5718c6d4cc7c', - '0x039730ea8dff1254c0fee9c0ea777d29a9c710b7e616683f194f18c43b43b869', - '0x073a5ffcc6fc7a28c30723d6e58ce577356982d65b833a5a5c15bf9024b43d98', - OP.ZERO_HASH, - OP.ZERO_HASH, - ], - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000040', - '0x0000000000000000000000000000000000000000000000000000000000000080', - '0x0000000000000000000000000000000000000000000000000000000000000080', - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x000000000000000000000000000000000000000000000000000000000000ffff', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - memory: [ - '0x17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa9', - '0x01e0559bacb160664764a357af8a9fe70baa9258e0b959273ffc5718c6d4cc7c', - '0x039730ea8dff1254c0fee9c0ea777d29a9c710b7e616683f194f18c43b43b869', - '0x073a5ffcc6fc7a28c30723d6e58ce577356982d65b833a5a5c15bf9024b43d98', - '0x15bf2bb17880144b5d1cd2b1f46eff9d617bffd1ca57c37fb5a49bd84e53cf66', - '0x049c797f9ce0d17083deb32b5e36f2ea2a212ee036598dd7624c168993d1355f', - ], - gasUsed: 1200, - }, - }, - { - description: 'STATICCALL EC_ADD invalid points', - code: OP.STATICCALL, - memory: [ - '0x17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa9', - '0x1e0559bacb160664764a357af8a9fe70baa9258e0b959273ffc5718c6d4cc7c0', - '0x39730ea8dff1254c0fee9c0ea777d29a9c710b7e616683f194f18c43b43b8690', - '0x073a5ffcc6fc7a28c30723d6e58ce577356982d65b833a5a5c15bf9024b43d98', - OP.ZERO_HASH, - OP.ZERO_HASH, - ], - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000040', - '0x0000000000000000000000000000000000000000000000000000000000000080', - '0x0000000000000000000000000000000000000000000000000000000000000080', - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000006', - '0x00000000000000000000000000000000000000000000000000000000000003e8', - ], - result: { - stack: [ - OP.ZERO_HASH, - ], - gasUsed: 1700, - }, - }, - { - description: 'STATICCALL EC_MUL valid', - code: OP.STATICCALL, - memory: [ - '0x17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa9', - '0x01e0559bacb160664764a357af8a9fe70baa9258e0b959273ffc5718c6d4cc7c', - '0x073a5ffcc6fc7a28c30723d6e58ce577356982d65b833a5a5c15bf9024b43d98', - OP.ZERO_HASH, - OP.ZERO_HASH, - ], - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000040', - '0x0000000000000000000000000000000000000000000000000000000000000060', - '0x0000000000000000000000000000000000000000000000000000000000000060', - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x000000000000000000000000000000000000000000000000000000000000ffff', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - memory: [ - '0x17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa9', - '0x01e0559bacb160664764a357af8a9fe70baa9258e0b959273ffc5718c6d4cc7c', - '0x073a5ffcc6fc7a28c30723d6e58ce577356982d65b833a5a5c15bf9024b43d98', - '0x0e798bc0c484ae573104ce6c79456b69bf2370be86b4db8fda62c1e26a87dbe9', - '0x109effc4074f2ff70f3fc60590768eca4dfd620eb6c44405f31f39bd7eaad5e1', - ], - gasUsed: 40700, - }, - }, - { - description: 'STATICCALL EC_MUL invalid', - code: OP.STATICCALL, - memory: [ - '0x17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa9', - '0x1e0559bacb160664764a357af8a9fe70baa9258e0b959273ffc5718c6d4cc7c0', - '0x073a5ffcc6fc7a28c30723d6e58ce577356982d65b833a5a5c15bf9024b43d98', - OP.ZERO_HASH, - OP.ZERO_HASH, - ], - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000040', - '0x0000000000000000000000000000000000000000000000000000000000000060', - '0x0000000000000000000000000000000000000000000000000000000000000060', - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000007', - '0x000000000000000000000000000000000000000000000000000000000000ffff', - ], - result: { - stack: [ - OP.ZERO_HASH, - ], - gasUsed: 66235, - }, - }, - { - description: 'STATICCALL EC_PAIRING valid K1', - code: OP.STATICCALL, - memory: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - ], - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x00000000000000000000000000000000000000000000000000000000000000c0', - '0x00000000000000000000000000000000000000000000000000000000000000c0', - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000ffffff', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - memory: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - gasUsed: 180700, - }, - }, - { - description: 'STATICCALL EC_PAIRING valid K2', - code: OP.STATICCALL, - memory: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - ], - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x0000000000000000000000000000000000000000000000000000000000000180', - '0x0000000000000000000000000000000000000000000000000000000000000180', - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000ffffff', - ], - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - memory: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - gasUsed: 260700, - }, - }, - { - description: 'STATICCALL EC_PAIRING invalid', - code: OP.STATICCALL, - memory: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - '0x0000000000000000000000000000000000000000000000000000000000000002', - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000001', - OP.ZERO_HASH, - OP.ZERO_HASH, - OP.ZERO_HASH, - ], - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x00000000000000000000000000000000000000000000000000000000000000c0', - '0x00000000000000000000000000000000000000000000000000000000000000c0', - OP.ZERO_HASH, - '0x0000000000000000000000000000000000000000000000000000000000000008', - '0x0000000000000000000000000000000000000000000000000000000000ffffff', - ], - result: { - stack: [ - OP.ZERO_HASH, - ], - gasUsed: 16777915, - }, - }, - { - description: 'invalid opcode', - code: [ - OP.TIMESTAMP, - '48', - OP.GAS, - ], - pc: 0, - result: { - stack: [ - OP.ZERO_HASH, - ], - gasUsed: 2, - errno: 4, - }, - }, + // { + // code: OP.ADD, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.MUL, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // ], + // result: { + // stack: [ + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // ], + // gasUsed: 5, + // }, + // }, + // { + // code: OP.SUB, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.DIV, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // ], + // gasUsed: 5, + // }, + // }, + // { + // code: OP.SDIV, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // ], + // gasUsed: 5, + // }, + // }, + // { + // code: OP.MOD, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // gasUsed: 5, + // }, + // }, + // { + // code: OP.SMOD, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // ], + // gasUsed: 5, + // }, + // }, + // { + // code: OP.ADDMOD, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // ], + // gasUsed: 8, + // }, + // }, + // { + // code: OP.MULMOD, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // ], + // gasUsed: 8, + // }, + // }, + // { + // code: OP.EXP, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // ], + // result: { + // stack: [ + // '0x000000000000000000000000000000000000000000000000000000000000007d', + // ], + // gasUsed: 60, + // }, + // }, + // { + // code: OP.EXP, + // stack: [ + // '0x000000000000000000000000000000000000000000000000000000000000ffff', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // result: { + // gasUsed: 110, + // }, + // }, + // { + // code: OP.EXP, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000ffffff', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // result: { + // gasUsed: 160, + // }, + // }, + // { + // code: OP.EXP, + // stack: [ + // '0x00000000000000000000000000000000000000000000000000000000ffffffff', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // result: { + // gasUsed: 210, + // }, + // }, + // { + // code: OP.EXP, + // stack: [ + // '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // result: { + // gasUsed: 1610, + // }, + // }, + // { + // code: OP.SIGNEXTEND, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // ], + // gasUsed: 5, + // }, + // }, + // { + // code: OP.LT, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.GT, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // ], + // result: { + // stack: [ + // OP.ZERO_HASH, + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.SLT, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.SGT, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // ], + // result: { + // stack: [ + // OP.ZERO_HASH, + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.EQ, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // ], + // result: { + // stack: [ + // OP.ZERO_HASH, + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.ISZERO, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // ], + // result: { + // stack: [ + // OP.ZERO_HASH, + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.AND, + // stack: [ + // '0x00000000000000000000000000000000000000000000000000000000000000fd', + // '0x00000000000000000000000000000000000000000000000000000000000000fc', + // ], + // result: { + // stack: [ + // '0x00000000000000000000000000000000000000000000000000000000000000fc', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.OR, + // stack: [ + // '0x00000000000000000000000000000000000000000000000000000000000000fd', + // '0x00000000000000000000000000000000000000000000000000000000000000fc', + // ], + // result: { + // stack: [ + // '0x00000000000000000000000000000000000000000000000000000000000000fd', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.XOR, + // stack: [ + // '0x00000000000000000000000000000000000000000000000000000000000000fd', + // '0x00000000000000000000000000000000000000000000000000000000000000ff', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.NOT, + // stack: [ + // '0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.BYTE, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // ], + // result: { + // stack: [ + // OP.ZERO_HASH, + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.SHL, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.SHR, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000001000', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000400', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.SAR, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000001000', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000400', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.POP, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // ], + // gasUsed: 2, + // }, + // }, + // { + // code: OP.DUP1, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.DUP2, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.DUP3, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.DUP4, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.DUP5, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.DUP6, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.DUP7, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.DUP8, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.DUP9, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.DUP10, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.DUP11, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.DUP12, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.DUP13, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.DUP14, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.DUP15, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.DUP16, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.SWAP1, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.SWAP2, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.SWAP3, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.SWAP4, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.SWAP5, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.SWAP6, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.SWAP7, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.SWAP8, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.SWAP9, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // ], + // result: { + // stack: [ + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.SWAP10, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // ], + // result: { + // stack: [ + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.SWAP11, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // ], + // result: { + // stack: [ + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.SWAP12, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // ], + // result: { + // stack: [ + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.SWAP13, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // ], + // result: { + // stack: [ + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.SWAP14, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // ], + // result: { + // stack: [ + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.SWAP15, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.SWAP16, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // '0x0000000000000000000000000000000000000000000000000000000000000011', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000011', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000000009', + // '0x000000000000000000000000000000000000000000000000000000000000000a', + // '0x000000000000000000000000000000000000000000000000000000000000000b', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // '0x000000000000000000000000000000000000000000000000000000000000000d', + // '0x000000000000000000000000000000000000000000000000000000000000000e', + // '0x000000000000000000000000000000000000000000000000000000000000000f', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.BALANCE, + // stack: [ + // '0x0000000000000000000000004ae7b3e204fed41c82d57ecd2242470196d70d02', + // ], + // result: { + // errno: 6, + // }, + // }, + // { + // code: OP.ADDRESS, + // result: { + // stack: [ + // '0x0000000000000000000000000f572e5295c57f15886f9b263e2f6d2d6c7b5ec6', + // ], + // gasUsed: 2, + // }, + // }, + // { + // code: OP.ORIGIN, + // result: { + // stack: [ + // '0x000000000000000000000000cd1722f2947def4cf144679da39c4c32bdc35681', + // ], + // gasUsed: 2, + // }, + // }, + // { + // code: OP.CALLER, + // result: { + // stack: [ + // '0x000000000000000000000000cd1722f2947def4cf144679da39c4c32bdc35681', + // ], + // gasUsed: 2, + // }, + // }, + // { + // code: OP.CALLVALUE, + // result: { + // stack: [ + // OP.ZERO_HASH, + // ], + // gasUsed: 2, + // errno: 0, + // }, + // }, + // { + // code: OP.GASPRICE, + // result: { + // errno: 6, + // }, + // }, + // { + // code: OP.BLOCKHASH, + // stack: [ + // OP.ZERO_HASH, + // ], + // result: { + // stack: [ + // OP.ZERO_HASH, + // ], + // gasUsed: 20, + // }, + // }, + // { + // code: OP.COINBASE, + // result: { + // errno: 6, + // }, + // }, + // { + // code: OP.TIMESTAMP, + // result: { + // stack: [ + // OP.ZERO_HASH, + // ], + // gasUsed: 2, + // }, + // }, + // { + // code: OP.NUMBER, + // result: { + // stack: [ + // OP.ZERO_HASH, + // ], + // gasUsed: 2, + // }, + // }, + // { + // code: OP.DIFFICULTY, + // result: { + // errno: 6, + // }, + // }, + // { + // code: OP.GASLIMIT, + // result: { + // errno: 6, + // }, + // }, + // { + // code: OP.PC, + // result: { + // stack: [ + // OP.ZERO_HASH, + // ], + // }, + // }, + // { + // description: 'invalid JUMP', + // code: [ + // OP.PUSH1, + // OP.ADD, + // OP.JUMP, + // ], + // stack: [ + // OP.ZERO_HASH, + // ], + // result: { + // stack: [], + // pc: 2, + // gasUsed: 8, + // errno: 5, + // }, + // }, + // { + // description: 'valid JUMP', + // code: [ + // OP.JUMPDEST, + // OP.PUSH1, + // OP.DIV, + // OP.JUMP, + // OP.JUMPDEST, + // ], + // stack: [ + // OP.ZERO_HASH, + // ], + // pc: OP.ERROR_INDEX_OOB, + // result: { + // stack: [], + // pc: 5, + // gasUsed: 21, + // }, + // }, + // { + // description: 'invalid JUMPI', + // code: [ + // OP.PUSH1, + // OP.ADD, + // OP.PUSH1, + // OP.STOP, + // OP.JUMPI, + // ], + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // OP.ZERO_HASH, + // ], + // result: { + // stack: [], + // pc: 4, + // gasUsed: 10, + // errno: 5, + // }, + // }, + // { + // description: 'valid JUMPI no-op', + // code: [ + // OP.PUSH1, + // OP.STOP, + // OP.PUSH1, + // OP.STOP, + // OP.JUMPI, + // ], + // stack: [ + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // ], + // result: { + // stack: [], + // pc: 5, + // gasUsed: 10, + // }, + // }, + // { + // description: 'valid JUMPI', + // code: [ + // OP.PUSH1, + // '01', + // OP.PUSH1, + // '05', + // OP.JUMPI, + // OP.JUMPDEST, + // ], + // pc: 0, + // stack: [ + // ], + // result: { + // stack: [], + // pc: 6, + // gasUsed: 17, + // }, + // }, + // { + // code: OP.RETURNDATASIZE, + // result: { + // stack: [ + // OP.ZERO_HASH, + // ], + // gasUsed: 2, + // }, + // }, + // { + // code: OP.CODESIZE, + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // gasUsed: 2, + // }, + // }, + // { + // code: [ + // OP.CODESIZE, + // OP.GAS, + // OP.POP, + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // ], + // gasUsed: 6, + // }, + // }, + // { + // code: [ + // OP.PUSH1, + // '01', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: [ + // OP.PUSH2, + // '01', + // '02', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000102', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: [ + // OP.PUSH3, + // '01', + // '02', + // '03', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000010203', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: [ + // OP.PUSH4, + // '10', + // '11', + // '12', + // '13', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000010111213', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: [ + // OP.PUSH5, + // '10', + // '11', + // '12', + // '13', + // '14', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000001011121314', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: [ + // OP.PUSH6, + // '10', + // '11', + // '12', + // '13', + // '14', + // '15', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000101112131415', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: [ + // OP.PUSH7, + // '10', + // '11', + // '12', + // '13', + // '14', + // '15', + // '16', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000010111213141516', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: [ + // OP.PUSH8, + // '10', + // '11', + // '12', + // '13', + // '14', + // '15', + // '16', + // '00', + // '00', + // '17', + // '18', + // '19', + // '20', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000001011121314151600', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: [ + // OP.PUSH9, + // '10', + // '11', + // '12', + // '13', + // '14', + // '15', + // '16', + // '17', + // '18', + // '00', + // '19', + // '20', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000101112131415161718', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: [ + // OP.PUSH10, + // '10', + // '11', + // '12', + // '13', + // '14', + // '15', + // '16', + // '00', + // '00', + // '00', + // '00', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000010111213141516000000', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: [ + // OP.PUSH11, + // '10', + // '11', + // '12', + // '13', + // '14', + // '15', + // '16', + // '17', + // '18', + // '19', + // '20', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000001011121314151617181920', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: [ + // OP.PUSH12, + // '10', + // '11', + // '12', + // '13', + // '14', + // '15', + // '16', + // '17', + // '18', + // '19', + // '20', + // '21', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000101112131415161718192021', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: [ + // OP.PUSH13, + // '10', + // '11', + // '12', + // '13', + // '14', + // '15', + // '16', + // '17', + // '18', + // '19', + // '20', + // '21', + // '22', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000010111213141516171819202122', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: [ + // OP.PUSH14, + // '10', + // '11', + // '12', + // '13', + // '14', + // '15', + // '16', + // '17', + // '18', + // '19', + // '20', + // '21', + // '22', + // '23', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0000000000000000000000000000000000001011121314151617181920212223', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: [ + // OP.PUSH15, + // '10', + // '11', + // '12', + // '13', + // '14', + // '15', + // '16', + // '17', + // '18', + // '19', + // '20', + // '21', + // '22', + // '23', + // '24', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0000000000000000000000000000000000101112131415161718192021222324', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: [ + // OP.PUSH16, + // '10', + // '11', + // '12', + // '13', + // '14', + // '15', + // '16', + // '17', + // '18', + // '19', + // '20', + // '21', + // '22', + // '23', + // '24', + // '25', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0000000000000000000000000000000010111213141516171819202122232425', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: [ + // OP.PUSH17, + // '10', + // '11', + // '12', + // '13', + // '14', + // '15', + // '16', + // '17', + // '18', + // '19', + // '20', + // '21', + // '22', + // '23', + // '24', + // '25', + // '26', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0000000000000000000000000000001011121314151617181920212223242526', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: [ + // OP.PUSH18, + // '10', + // '11', + // '12', + // '13', + // '14', + // '15', + // '16', + // '17', + // '18', + // '19', + // '20', + // '21', + // '22', + // '23', + // '24', + // '25', + // '26', + // '27', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0000000000000000000000000000101112131415161718192021222324252627', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: [ + // OP.PUSH19, + // '10', + // '11', + // '12', + // '13', + // '14', + // '15', + // '16', + // '17', + // '18', + // '19', + // '20', + // '21', + // '22', + // '23', + // '24', + // '25', + // '26', + // '27', + // '28', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0000000000000000000000000010111213141516171819202122232425262728', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: [ + // OP.PUSH20, + // '10', + // '11', + // '12', + // '13', + // '14', + // '15', + // '16', + // '17', + // '18', + // '19', + // '20', + // '21', + // '22', + // '23', + // '24', + // '25', + // '26', + // '27', + // '28', + // '29', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0000000000000000000000001011121314151617181920212223242526272829', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: [ + // OP.PUSH21, + // '10', + // '11', + // '12', + // '13', + // '14', + // '15', + // '16', + // '17', + // '18', + // '19', + // '20', + // '21', + // '22', + // '23', + // '24', + // '25', + // '26', + // '27', + // '28', + // '29', + // '30', + // '00', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0000000000000000000000101112131415161718192021222324252627282930', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: [ + // OP.PUSH22, + // '10', + // '11', + // '12', + // '13', + // '14', + // '15', + // '16', + // '17', + // '18', + // '19', + // '20', + // '21', + // '22', + // '23', + // '24', + // '25', + // '26', + // '27', + // '28', + // '29', + // '30', + // '31', + // '00', + // '32', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0000000000000000000010111213141516171819202122232425262728293031', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: [ + // OP.PUSH23, + // '10', + // '11', + // '12', + // '13', + // '14', + // '15', + // '16', + // '17', + // '18', + // '19', + // '20', + // '21', + // '22', + // '23', + // '24', + // '25', + // '26', + // '27', + // '28', + // '29', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0000000000000000001011121314151617181920212223242526272829000000', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: [ + // OP.PUSH24, + // '10', + // '11', + // '12', + // '13', + // '14', + // '15', + // '16', + // '17', + // '18', + // '19', + // '20', + // '21', + // '22', + // '23', + // '24', + // '25', + // '26', + // '27', + // '28', + // '29', + // '30', + // '31', + // '32', + // '33', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0000000000000000101112131415161718192021222324252627282930313233', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: [ + // OP.PUSH25, + // '10', + // '11', + // '12', + // '13', + // '14', + // '15', + // '16', + // '17', + // '18', + // '19', + // '20', + // '21', + // '22', + // '23', + // '24', + // '25', + // '26', + // '27', + // '28', + // '29', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0000000000000010111213141516171819202122232425262728290000000000', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: [ + // OP.PUSH26, + // '10', + // '11', + // '12', + // '13', + // '14', + // '15', + // '16', + // '17', + // '18', + // '19', + // '20', + // '21', + // '22', + // '23', + // '24', + // '25', + // '26', + // '27', + // '28', + // '29', + // '30', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0000000000001011121314151617181920212223242526272829300000000000', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: [ + // OP.PUSH27, + // '10', + // '11', + // '12', + // '13', + // '14', + // '15', + // '16', + // '17', + // '18', + // '19', + // '20', + // '21', + // '22', + // '23', + // '24', + // '25', + // '26', + // '27', + // '28', + // '29', + // '31', + // '32', + // '33', + // '34', + // '35', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0000000000101112131415161718192021222324252627282931323334350000', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: [ + // OP.PUSH28, + // '10', + // '11', + // '12', + // '13', + // '14', + // '15', + // '16', + // '17', + // '18', + // '19', + // '20', + // '21', + // '22', + // '23', + // '24', + // '25', + // '26', + // '27', + // '28', + // '29', + // '41', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0000000010111213141516171819202122232425262728294100000000000000', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: [ + // OP.PUSH29, + // '10', + // '11', + // '12', + // '13', + // '14', + // '15', + // '16', + // '17', + // '18', + // '19', + // '20', + // '21', + // '22', + // '23', + // '24', + // '25', + // '26', + // '27', + // '28', + // '29', + // '10', + // '11', + // '12', + // '13', + // '14', + // '15', + // '16', + // '17', + // '18', + // '00', + // '19', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0000001011121314151617181920212223242526272829101112131415161718', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: [ + // OP.PUSH30, + // '10', + // '11', + // '12', + // '13', + // '14', + // '15', + // '16', + // '17', + // '18', + // '19', + // '20', + // '21', + // '22', + // '23', + // '24', + // '25', + // '26', + // '27', + // '28', + // '29', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0000101112131415161718192021222324252627282900000000000000000000', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: [ + // OP.PUSH31, + // '10', + // '11', + // '12', + // '13', + // '14', + // '15', + // '16', + // '17', + // '18', + // '19', + // '20', + // '21', + // '22', + // '23', + // '24', + // '25', + // '26', + // '27', + // '28', + // '29', + // '30', + // '31', + // '32', + // '33', + // '34', + // '35', + // '36', + // '37', + // '38', + // '39', + // '40', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x0010111213141516171819202122232425262728293031323334353637383940', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: [ + // OP.PUSH32, + // '10', + // '11', + // '12', + // '13', + // '14', + // '15', + // '16', + // '17', + // '18', + // '19', + // '20', + // '21', + // '22', + // '23', + // '24', + // '25', + // '26', + // '27', + // '28', + // '29', + // '30', + // '31', + // '32', + // '33', + // '34', + // '35', + // '36', + // '37', + // '38', + // '39', + // '40', + // '41', + // ], + // pc: 0, + // result: { + // stack: [ + // '0x1011121314151617181920212223242526272829303132333435363738394041', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.CALLDATALOAD, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // data: '0x123456', + // result: { + // stack: [ + // '0x3456000000000000000000000000000000000000000000000000000000000000', + // ], + // gasUsed: 3, + // }, + // }, + // { + // description: 'CALLDATALOAD - out of range', + // code: OP.CALLDATALOAD, + // stack: [ + // '0x000000000000000000000000000000000000000000000000000000000000ffff', + // ], + // data: '0x123456', + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000000', + // ], + // gasUsed: 3, + // }, + // }, + // { + // code: OP.CALLDATASIZE, + // data: '0x1234', + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // ], + // gasUsed: 2, + // }, + // }, + // { + // code: OP.MLOAD, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // memory: [ + // '0x0000000000000000000000000000000000000000000000000000000000000066', + // '0x7700000000000000000000000000000000000000000000000000000000000000', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000006677', + // ], + // gasUsed: 3, + // }, + // }, + // { + // description: 'MLOAD - out of gas', + // code: OP.MLOAD, + // gasRemaining: 3, + // stack: [ + // '0x000000000000000000000000000000000000000000000000000000000000ffff', + // ], + // memory: [ + // ], + // result: { + // stack: [ + // ], + // memory: [], + // gasUsed: 3, + // errno: 13, + // pc: 0, + // }, + // }, + // { + // code: OP.MSTORE, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000005567', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // result: { + // memory: [ + // '0x0000000000000000000000000000000000000000000000000000000000000055', + // '0x6700000000000000000000000000000000000000000000000000000000000000', + // ], + // gasUsed: 9, + // }, + // }, + // { + // description: 'MSTORE - out of gas', + // gasRemaining: 3, + // code: OP.MSTORE, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000005567', + // '0x000000000000000000000000000000000000000000000000000000000000ffff', + // ], + // result: { + // stack: [ + // ], + // memory: [ + // ], + // gasUsed: 3, + // errno: 13, + // pc: 0, + // }, + // }, + // { + // code: OP.MSTORE8, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000005567', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // result: { + // memory: [ + // '0x0067000000000000000000000000000000000000000000000000000000000000', + // ], + // gasUsed: 6, + // }, + // }, + // { + // description: 'MSTORE8 - out of gas', + // code: OP.MSTORE8, + // gasRemaining: 3, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000005567', + // '0x00000000000000000000000000000000000000000000000000000000000000ff', + // ], + // result: { + // stack: [], + // memory: [], + // gasUsed: 3, + // errno: 13, + // pc: 0, + // }, + // }, + // { + // code: OP.MSIZE, + // memory: [ + // '0x0000000000000000000000000000000000000000000000000000000000000055', + // '0x0000000000000000000000000000000000000000000000000000000000000067', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000040', + // ], + // gasUsed: 2, + // }, + // }, + // { + // code: OP.CALLDATACOPY, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // data: '0x06397872cdd21945455a7fdc7921e2db7bd8e402607cad66279e899f6ae9b1da', + // result: { + // memory: [ + // '0x0072cdd219000000000000000000000000000000000000000000000000000000', + // ], + // gasUsed: 9, + // }, + // }, + // { + // description: 'CALLDATACOPY - out of gas', + // code: OP.CALLDATACOPY, + // gasRemaining: 8, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // data: '0x06397872cdd21945455a7fdc7921e2db7bd8e402607cad66279e899f6ae9b1da', + // result: { + // stack: [ + // ], + // memory: [ + // ], + // gasUsed: 8, + // errno: 13, + // }, + // }, + // { + // code: [ + // OP.GAS, + // OP.POP, + // OP.CODECOPY, + // ], + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // result: { + // memory: [ + // '0x0050390000000000000000000000000000000000000000000000000000000000', + // ], + // gasUsed: 9, + // }, + // }, + // { + // description: 'CODECOPY - out of gas', + // code: [ + // OP.CODECOPY, + // ], + // gasRemaining: 8, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // result: { + // stack: [ + // ], + // memory: [ + // ], + // gasUsed: 8, + // errno: 13, + // }, + // }, + // { + // code: OP.SSTORE, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // OP.ZERO_HASH, + // ], + // result: { + // errno: 6, + // }, + // }, + // { + // code: OP.SLOAD, + // stack: [ + // OP.ZERO_HASH, + // ], + // result: { + // errno: 6, + // }, + // }, + // { + // code: OP.LOG0, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // ], + // result: { + // errno: 6, + // }, + // }, + // { + // code: OP.LOG1, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000567', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // ], + // result: { + // errno: 6, + // }, + // }, + // { + // code: OP.LOG2, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000123', + // '0x0000000000000000000000000000000000000000000000000000000000000567', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // ], + // result: { + // errno: 6, + // }, + // }, + // { + // code: OP.LOG3, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000987', + // '0x0000000000000000000000000000000000000000000000000000000000000123', + // '0x0000000000000000000000000000000000000000000000000000000000000567', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // ], + // result: { + // errno: 6, + // }, + // }, + // { + // code: OP.LOG4, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000294', + // '0x0000000000000000000000000000000000000000000000000000000000000987', + // '0x0000000000000000000000000000000000000000000000000000000000000123', + // '0x0000000000000000000000000000000000000000000000000000000000000567', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // ], + // result: { + // errno: 6, + // }, + // }, + // { + // code: OP.RETURN, + // stack: [ + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // ], + // result: { + // stack: [], + // pc: 0, + // gasUsed: 0, + // }, + // }, + // { + // description: 'RETURN - out of gas', + // code: OP.RETURN, + // stack: [ + // '0x00000000000000000000000000000000000000000000000000000000000000ff', + // OP.ZERO_HASH, + // ], + // gasRemaining: 2, + // result: { + // stack: [], + // pc: 0, + // gasUsed: 2, + // errno: 13, + // }, + // }, + // { + // code: OP.REVERT, + // stack: [ + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // ], + // result: { + // stack: [], + // errno: 7, + // pc: 0, + // gasUsed: 0, + // }, + // }, + // { + // description: 'REVERT - out of gas', + // gasRemaining: 2, + // code: OP.REVERT, + // stack: [ + // '0x000000000000000000000000000000000000000000000000000000000000ffff', + // OP.ZERO_HASH, + // ], + // result: { + // stack: [], + // memory: [], + // errno: 13, + // pc: 0, + // gasUsed: 2, + // }, + // }, + // { + // code: OP.RETURNDATACOPY, + // stack: [ + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // ], + // result: { + // stack: [], + // pc: 1, + // gasUsed: 3, + // }, + // }, + // { + // description: 'RETURNDATACOPY - out of gas', + // code: OP.RETURNDATACOPY, + // gasRemaining: 3, + // stack: [ + // '0x00000000000000000000000000000000000000000000000000000000000000ff', + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // ], + // result: { + // stack: [ + // ], + // pc: 0, + // gasUsed: 3, + // errno: 13, + // }, + // }, + // { + // code: OP.SHA3, + // stack: [ + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // ], + // result: { + // stack: [ + // '0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470', + // ], + // gasUsed: 30, + // }, + // }, + // { + // description: 'SHA3 - out of gas', + // code: OP.SHA3, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // OP.ZERO_HASH, + // ], + // gasRemaining: 31, + // result: { + // stack: [ + // ], + // gasUsed: 31, + // errno: 13, + // }, + // }, + // { + // code: OP.SHA3, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // OP.ZERO_HASH, + // ], + // memory: [ + // '0x0102030405060708091011121314151617181920212223242526272829303132', + // ], + // result: { + // stack: [ + // '0x70edd8238efca5c35ffe1789e45e4195b783903594b6f9dc86e857ae50703b4c', + // ], + // gasUsed: 36, + // }, + // }, + // { + // code: OP.SHA3, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000021', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // memory: [ + // '0x0102030405060708091011121314151617181920212223242526272829303132', + // '0x0102030405060708091011121314151617181920212223242526272829303132', + // ], + // result: { + // stack: [ + // '0x5e111654ad5f024c13a4332dfe1eb6a750999d2c36b3cc2ba2e5b2a79181c50b', + // ], + // gasUsed: 42, + // }, + // }, + // { + // code: [ + // OP.MSTORE, + // OP.MSTORE, + // OP.MSTORE, + // OP.MSTORE, + // ], + // stack: [ + // '0x000000000000000000000000000000000000000000000703c19694461d800000', + // '0x0000000000000000000000000000000000000000000000000000000000000022', + // '0x00000000030a1ffb899c11400000000000000000000000000000000000000000', + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000004267', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000ffc', + // '0x000000000000000000000000000000000000000000000000000000000000000c', + // ], + // pc: 0, + // result: { + // gasUsed: 21, + // memory: [ + // '0x0000000000000000030a1ffb899c114000000000000000000000000000000000', + // '0x0000000000000000000000000000000000000000000000000703c19694461d80', + // '0x0000000000000000000000000000000000000000000000000000000000000000', + // ], + // }, + // }, + // { + // code: [ + // OP.MSTORE, + // OP.MSTORE, + // OP.MSTORE, + // OP.MSTORE, + // ], + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000021', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000021', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000021', + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000021', + // '0x0000000000000000000000000000000000000000000000000000000000000015', + // ], + // pc: 0, + // result: { + // gasUsed: 18, + // }, + // }, + // { + // code: [ + // OP.MSTORE, + // OP.MSTORE, + // OP.MSTORE, + // OP.MSTORE, + // ], + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000021', + // '0x0000000000000000000000000000000000000000000000000000000000000022', + // '0x0000000000000000000000000000000000000000000000000000000000000021', + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000021', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000021', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // pc: 0, + // result: { + // gasUsed: 21, + // }, + // }, + // { + // code: [ + // OP.MSTORE, + // OP.MSTORE, + // OP.MSTORE, + // OP.MSTORE, + // ], + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000021', + // '0x0000000000000000000000000000000000000000000000000000000000000f3b', + // '0x0000000000000000000000000000000000000000000000000000000000000021', + // '0x00000000000000000000000000000000000000000000000000000000000003ac', + // '0x0000000000000000000000000000000000000000000000000000000000000021', + // '0x0000000000000000000000000000000000000000000000000000000000000158', + // '0x0000000000000000000000000000000000000000000000000000000000000021', + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // ], + // pc: 0, + // result: { + // gasUsed: 410, + // }, + // }, + // { + // code: [ + // OP.MSTORE, + // OP.MSTORE, + // OP.MSTORE, + // OP.MSTORE, + // ], + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000021', + // '0x0000000000000000000000000000000000000000000000000000000000001af3', + // '0x0000000000000000000000000000000000000000000000000000000000000021', + // '0x0000000000000000000000000000000000000000000000000000000000000860', + // '0x0000000000000000000000000000000000000000000000000000000000000021', + // '0x0000000000000000000000000000000000000000000000000000000000000309', + // '0x0000000000000000000000000000000000000000000000000000000000000021', + // '0x00000000000000000000000000000000000000000000000000000000000001f0', + // ], + // pc: 0, + // result: { + // gasUsed: 754, + // }, + // }, + // { + // code: [ + // OP.MSTORE8, + // OP.MSTORE8, + // OP.MSTORE8, + // OP.MSTORE8, + // ], + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000021', + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // '0x0000000000000000000000000000000000000000000000000000000000000021', + // '0x000000000000000000000000000000000000000000000000000000000000001f', + // '0x0000000000000000000000000000000000000000000000000000000000000021', + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000021', + // '0x00000000000000000000000000000000000000000000000000000000000002a0', + // ], + // pc: 0, + // result: { + // gasUsed: 78, + // }, + // }, + // { + // code: [ + // OP.MSTORE8, + // OP.MSTORE8, + // OP.MSTORE8, + // OP.MSTORE8, + // ], + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000021', + // '0x00000000000000000000000000000000000000000000000000000000000003cc', + // '0x0000000000000000000000000000000000000000000000000000000000000021', + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000021', + // '0x000000000000000000000000000000000000000000000000000000000000001f', + // '0x0000000000000000000000000000000000000000000000000000000000000021', + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // ], + // pc: 0, + // result: { + // gasUsed: 106, + // }, + // }, + // { + // code: [ + // OP.GAS, + // OP.GAS, + // OP.CODECOPY, + // OP.CODECOPY, + // ], + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // pc: 2, + // result: { + // gasUsed: 15, + // }, + // }, + // { + // code: OP.SELFDESTRUCT, + // stack: [ + // '0x0000000000000000000000001f572e5295c57f15886f9b263e2f6d2d6c7b5ec6', + // ], + // result: { + // errno: 6, + // }, + // }, + // { + // code: OP.CALL, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000040', + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000001f572e5295c57f15886f9b263e2f6d2d6c7b5ec6', + // '0x0000000000000000000000000000000000000000000000000000000000002710', + // ], + // result: { + // errno: 6, + // }, + // }, + // { + // code: OP.DELEGATECALL, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // '0x0000000000000000000000001f572e5295c57f15886f9b263e2f6d2d6c7b5ec6', + // '0x0000000000000000000000000000000000000000000000000000000000002710', + // ], + // result: { + // errno: 6, + // }, + // }, + // { + // code: OP.CALLCODE, + // stack: [ + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // ], + // result: { + // errno: 6, + // }, + // }, + // { + // description: 'STATICCALL - out of gas', + // gasRemaining: 23, + // code: OP.STATICCALL, + // stack: [ + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000002710', + // ], + // result: { + // stack: [ + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000002710', + // ], + // memory: [], + // gasUsed: 23, + // errno: 13, + // pc: 0, + // }, + // }, + // { + // description: 'STATICCALL - out of gas taking memory costs into account', + // gasRemaining: 703, + // code: OP.STATICCALL, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000fff', + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000002710', + // ], + // result: { + // stack: [], + // memory: [], + // gasUsed: 703, + // errno: 13, + // pc: 0, + // }, + // }, + // { + // description: 'STATICCALL ECRECOVER - not enough gas', + // code: OP.STATICCALL, + // stack: [ + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // ], + // result: { + // stack: [ + // OP.ZERO_HASH, + // ], + // memory: [], + // gasUsed: 716, + // pc: 1, + // errno: 0, + // }, + // }, + // { + // description: 'STATICCALL ECRECOVER without input/output', + // code: OP.STATICCALL, + // stack: [ + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000002710', + // ], + // result: { + // gasUsed: 3700, + // }, + // }, + // { + // description: 'STATICCALL ECRECOVER with input/output', + // code: OP.STATICCALL, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000040', + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000002710', + // ], + // result: { + // gasUsed: 3709, + // }, + // }, + // { + // description: 'STATICCALL SHA256 - not enough gas', + // code: OP.STATICCALL, + // stack: [ + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // ], + // result: { + // stack: [ + // OP.ZERO_HASH, + // ], + // memory: [], + // gasUsed: 716, + // pc: 1, + // errno: 0, + // }, + // }, + // { + // description: 'STATICCALL SHA256 without input/output', + // code: OP.STATICCALL, + // stack: [ + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000002710', + // ], + // result: { + // gasUsed: 760, + // }, + // }, + // { + // description: 'STATICCALL SHA256 with input/output', + // code: OP.STATICCALL, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000040', + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // '0x0000000000000000000000000000000000000000000000000000000000002710', + // ], + // result: { + // gasUsed: 781, + // }, + // }, + // { + // description: 'STATICCALL RIPEMD160 - not enough gas', + // code: OP.STATICCALL, + // stack: [ + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // ], + // result: { + // stack: [ + // OP.ZERO_HASH, + // ], + // memory: [], + // gasUsed: 716, + // pc: 1, + // errno: 0, + // }, + // }, + // { + // description: 'STATICCALL RIPEMD160 without input/output', + // code: OP.STATICCALL, + // stack: [ + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000002710', + // ], + // result: { + // gasUsed: 1300, + // }, + // }, + // { + // description: 'STATICCALL RIPEMD160 with input/output', + // code: OP.STATICCALL, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000040', + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000002710', + // ], + // result: { + // gasUsed: 1429, + // }, + // }, + // { + // description: 'STATICCALL IDENTITY - not enough gas', + // code: OP.STATICCALL, + // stack: [ + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // result: { + // stack: [ + // OP.ZERO_HASH, + // ], + // memory: [], + // gasUsed: 701, + // pc: 1, + // errno: 0, + // }, + // }, + // { + // description: 'STATICCALL IDENTITY without input/output', + // code: OP.STATICCALL, + // stack: [ + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000002710', + // ], + // result: { + // gasUsed: 715, + // }, + // }, + // { + // description: 'STATICCALL IDENTITY with input/output', + // code: OP.STATICCALL, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000040', + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000002710', + // ], + // result: { + // gasUsed: 727, + // }, + // }, + // { + // description: 'STATICCALL, not to a precompile', + // code: OP.STATICCALL, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // '0x0000000000000000000000001f572e5295c57f15886f9b263e2f6d2d6c7b5ec6', + // '0x0000000000000000000000000000000000000000000000000000000000002710', + // ], + // result: { + // stack: [ + // OP.ZERO_HASH, + // ], + // }, + // }, + // { + // description: 'STATICCALL with limited gas', + // code: OP.STATICCALL, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // '0x0000000000000000000000001f572e5295c57f15886f9b263e2f6d2d6c7b5ec6', + // '0x0000000000000000000000000000000000000000000000000000000000002710', + // ], + // gasRemaining: 706, + // result: { + // stack: [ + // OP.ZERO_HASH, + // ], + // }, + // }, + // { + // description: 'CREATE2 - not supported', + // code: OP.CREATE2, + // stack: [ + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // ], + // result: { + // stack: [ + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // ], + // memory: [], + // errno: 6, + // pc: 0, + // }, + // }, + // { + // description: 'CREATE with send value and failed', + // code: OP.CREATE, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000010', + // OP.ZERO_HASH, + // '0x000000000000000000000000000000000000000000000000000000000000007b', + // ], + // result: { + // errno: 6, + // }, + // }, + // { + // description: 'CALLDATACOPY expanding memory', + // code: OP.CALLDATACOPY, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x0000000000000000000000000000000000000000000000000000000000000090', + // ], + // data: '0x06397872cdd21945455a7fdc7921e2db7bd8e402607cad66279e899f6ae9b1da', + // result: { + // gasUsed: 21, + // }, + // }, + // { + // description: 'RETURN - grows memory', + // code: OP.RETURN, + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000004', + // OP.ZERO_HASH, + // ], + // result: { + // gasUsed: 3, + // }, + // }, + // { + // code: OP.STOP, + // result: { + // pc: 0, + // }, + // }, + // { + // code: [ + // OP.EXTCODEHASH, + // ], + // stack: [ + // '0x0002030405060708091011121314151617181920212223242526272829303100', + // ], + // pc: 0, + // result: { + // errno: 6, + // }, + // }, + // { + // code: [ + // OP.EXTCODESIZE, + // ], + // stack: [ + // '0x0002030405060708091011121314151617181920212223242526272829303100', + // ], + // pc: 0, + // result: { + // errno: 6, + // }, + // }, + // { + // code: [ + // OP.EXTCODECOPY, + // ], + // stack: [ + // '0x0002030405060708091011121314151617181920212223242526272829303100', + // '0x0002030405060708091011121314151617181920212223242526272829303100', + // '0x0002030405060708091011121314151617181920212223242526272829303100', + // '0x0002030405060708091011121314151617181920212223242526272829303100', + // ], + // pc: 0, + // result: { + // errno: 6, + // }, + // }, + // { + // description: 'STATICCALL MODEXP - base 3, exponent 65535, modulus 2**255', + // code: OP.STATICCALL, + // memory: [ + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x000000000000000000000000000000000000000000000000000000000000ffff', + // '0x8000000000000000000000000000000000000000000000000000000000000000', + // OP.ZERO_HASH, + // ], + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // '0x00000000000000000000000000000000000000000000000000000000000000c0', + // '0x00000000000000000000000000000000000000000000000000000000000000c0', + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x000000000000000000000000000000000000000000000000000000000000ffff', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // memory: [ + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x000000000000000000000000000000000000000000000000000000000000ffff', + // '0x8000000000000000000000000000000000000000000000000000000000000000', + // '0x3b01b01ac41f2d6e917c6d6a221ce793802469026d9ab7578fa2e79e4da6aaab', + // ], + // gasUsed: 1468, + // }, + // }, + // { + // description: 'STATICCALL MODEXP - base 3, exponent 65535, modulus 2**255 out of gas', + // code: OP.STATICCALL, + // memory: [ + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x000000000000000000000000000000000000000000000000000000000000ffff', + // '0x8000000000000000000000000000000000000000000000000000000000000000', + // OP.ZERO_HASH, + // ], + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // '0x00000000000000000000000000000000000000000000000000000000000000c0', + // '0x00000000000000000000000000000000000000000000000000000000000000c0', + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x000000000000000000000000000000000000000000000000000000000000ffff', + // ], + // gasRemaining: 1200, + // result: { + // stack: [ + // OP.ZERO_HASH, + // ], + // }, + // }, + // { + // description: 'STATICCALL MODEXP (2) - test with modules length of 64', + // code: OP.STATICCALL, + // memory: [ + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // '0x0000000000000000000000000000000000000000000000000000000000000040', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x000000000000000000000000000000000000000000000000000000000000ffff', + // '0x8000000000000000000000000000000000000000000000000000000000000000', + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // ], + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // '0x00000000000000000000000000000000000000000000000000000000000000e0', + // '0x00000000000000000000000000000000000000000000000000000000000000e0', + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000005', + // '0x000000000000000000000000000000000000000000000000000000000000ffff', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // memory: [ + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // '0x0000000000000000000000000000000000000000000000000000000000000040', + // '0x0000000000000000000000000000000000000000000000000000000000000003', + // '0x000000000000000000000000000000000000000000000000000000000000ffff', + // '0x8000000000000000000000000000000000000000000000000000000000000000', + // OP.ZERO_HASH, + // '0x3fcecc35efb6e7db0528b52021556895467b5a5abac19c2ef35ca4fc5add9e09', + // ], + // gasUsed: 3772, + // }, + // }, + // { + // description: 'STATICCALL EC_ADD valid points', + // code: OP.STATICCALL, + // memory: [ + // '0x17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa9', + // '0x01e0559bacb160664764a357af8a9fe70baa9258e0b959273ffc5718c6d4cc7c', + // '0x039730ea8dff1254c0fee9c0ea777d29a9c710b7e616683f194f18c43b43b869', + // '0x073a5ffcc6fc7a28c30723d6e58ce577356982d65b833a5a5c15bf9024b43d98', + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // ], + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000040', + // '0x0000000000000000000000000000000000000000000000000000000000000080', + // '0x0000000000000000000000000000000000000000000000000000000000000080', + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x000000000000000000000000000000000000000000000000000000000000ffff', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // memory: [ + // '0x17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa9', + // '0x01e0559bacb160664764a357af8a9fe70baa9258e0b959273ffc5718c6d4cc7c', + // '0x039730ea8dff1254c0fee9c0ea777d29a9c710b7e616683f194f18c43b43b869', + // '0x073a5ffcc6fc7a28c30723d6e58ce577356982d65b833a5a5c15bf9024b43d98', + // '0x15bf2bb17880144b5d1cd2b1f46eff9d617bffd1ca57c37fb5a49bd84e53cf66', + // '0x049c797f9ce0d17083deb32b5e36f2ea2a212ee036598dd7624c168993d1355f', + // ], + // gasUsed: 1200, + // }, + // }, + // { + // description: 'STATICCALL EC_ADD invalid points', + // code: OP.STATICCALL, + // memory: [ + // '0x17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa9', + // '0x1e0559bacb160664764a357af8a9fe70baa9258e0b959273ffc5718c6d4cc7c0', + // '0x39730ea8dff1254c0fee9c0ea777d29a9c710b7e616683f194f18c43b43b8690', + // '0x073a5ffcc6fc7a28c30723d6e58ce577356982d65b833a5a5c15bf9024b43d98', + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // ], + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000040', + // '0x0000000000000000000000000000000000000000000000000000000000000080', + // '0x0000000000000000000000000000000000000000000000000000000000000080', + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000006', + // '0x00000000000000000000000000000000000000000000000000000000000003e8', + // ], + // result: { + // stack: [ + // OP.ZERO_HASH, + // ], + // gasUsed: 1700, + // }, + // }, + // { + // description: 'STATICCALL EC_MUL valid', + // code: OP.STATICCALL, + // memory: [ + // '0x17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa9', + // '0x01e0559bacb160664764a357af8a9fe70baa9258e0b959273ffc5718c6d4cc7c', + // '0x073a5ffcc6fc7a28c30723d6e58ce577356982d65b833a5a5c15bf9024b43d98', + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // ], + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000040', + // '0x0000000000000000000000000000000000000000000000000000000000000060', + // '0x0000000000000000000000000000000000000000000000000000000000000060', + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x000000000000000000000000000000000000000000000000000000000000ffff', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // memory: [ + // '0x17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa9', + // '0x01e0559bacb160664764a357af8a9fe70baa9258e0b959273ffc5718c6d4cc7c', + // '0x073a5ffcc6fc7a28c30723d6e58ce577356982d65b833a5a5c15bf9024b43d98', + // '0x0e798bc0c484ae573104ce6c79456b69bf2370be86b4db8fda62c1e26a87dbe9', + // '0x109effc4074f2ff70f3fc60590768eca4dfd620eb6c44405f31f39bd7eaad5e1', + // ], + // gasUsed: 40700, + // }, + // }, + // { + // description: 'STATICCALL EC_MUL invalid', + // code: OP.STATICCALL, + // memory: [ + // '0x17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa9', + // '0x1e0559bacb160664764a357af8a9fe70baa9258e0b959273ffc5718c6d4cc7c0', + // '0x073a5ffcc6fc7a28c30723d6e58ce577356982d65b833a5a5c15bf9024b43d98', + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // ], + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000040', + // '0x0000000000000000000000000000000000000000000000000000000000000060', + // '0x0000000000000000000000000000000000000000000000000000000000000060', + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000007', + // '0x000000000000000000000000000000000000000000000000000000000000ffff', + // ], + // result: { + // stack: [ + // OP.ZERO_HASH, + // ], + // gasUsed: 66235, + // }, + // }, + // { + // description: 'STATICCALL EC_PAIRING valid K1', + // code: OP.STATICCALL, + // memory: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // ], + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // '0x00000000000000000000000000000000000000000000000000000000000000c0', + // '0x00000000000000000000000000000000000000000000000000000000000000c0', + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000ffffff', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // memory: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // gasUsed: 180700, + // }, + // }, + // { + // description: 'STATICCALL EC_PAIRING valid K2', + // code: OP.STATICCALL, + // memory: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // ], + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // '0x0000000000000000000000000000000000000000000000000000000000000180', + // '0x0000000000000000000000000000000000000000000000000000000000000180', + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000ffffff', + // ], + // result: { + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // memory: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // ], + // gasUsed: 260700, + // }, + // }, + // { + // description: 'STATICCALL EC_PAIRING invalid', + // code: OP.STATICCALL, + // memory: [ + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // '0x0000000000000000000000000000000000000000000000000000000000000002', + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000001', + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // OP.ZERO_HASH, + // ], + // stack: [ + // '0x0000000000000000000000000000000000000000000000000000000000000020', + // '0x00000000000000000000000000000000000000000000000000000000000000c0', + // '0x00000000000000000000000000000000000000000000000000000000000000c0', + // OP.ZERO_HASH, + // '0x0000000000000000000000000000000000000000000000000000000000000008', + // '0x0000000000000000000000000000000000000000000000000000000000ffffff', + // ], + // result: { + // stack: [ + // OP.ZERO_HASH, + // ], + // gasUsed: 16777915, + // }, + // }, + { + description: 'STATICCALL tokena for now', + code: OP.STATICCALL, + memory: [ + '0x70a08231aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb0000000000000000', + ], + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000018', + '0x0000000000000000000000000000000000000000000000000000000000000018', + OP.ZERO_HASH, + '0x000000000000000000000000cccccccccccccccccccccccccccccccccccccccd', + '0x0000000000000000000000000000000000000000000000000000000000ffffff', + ], + tokenBag: padTokenBag([{ + owner: '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb', + valueOrId: 0xdeadbeef, + data: OP.ZERO_HASH, + color: '0xcccccccccccccccccccccccccccccccccccccccd', + }]), + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + memory: [ + '0x70a08231aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb0000000000000000', + '0x0000000000000000000000000000000000000000deadbeef0000000000000000' + ], + } + }, + // { + // description: 'invalid opcode', + // code: [ + // OP.TIMESTAMP, + // '48', + // OP.GAS, + // ], + // pc: 0, + // result: { + // stack: [ + // OP.ZERO_HASH, + // ], + // gasUsed: 2, + // errno: 4, + // }, + // }, ]; diff --git a/test/fixtures/runtimeGasUsed.js b/test/fixtures/runtimeGasUsed.js index 7edc615f..7d860c91 100644 --- a/test/fixtures/runtimeGasUsed.js +++ b/test/fixtures/runtimeGasUsed.js @@ -1,196 +1,4 @@ 'use strict'; module.exports = [ - 42532, - 42566, - 42596, - 42630, - 42662, - 42694, - 42662, - 43447, - 43479, - 43148, - 43358, - 43568, - 43778, - 49658, - 42854, - 43818, - 42852, - 42948, - 42980, - 43012, - 42364, - 43076, - 43108, - 43140, - 44476, - 43140, - 43236, - 43204, - 43236, - 43712, - 44332, - 58383, - 58415, - 58447, - 58479, - 58511, - 58543, - 58575, - 58607, - 58575, - 58607, - 58703, - 58671, - 58767, - 58799, - 58831, - 45298, - 46264, - 47166, - 48132, - 49163, - 50129, - 51096, - 52062, - 53029, - 53995, - 54898, - 55865, - 56896, - 57863, - 58766, - 59797, - 43566, - 42053, - 42117, - 42149, - 42106, - 41455, - 43119, - 41679, - 42554, - 42522, - 41775, - 41807, - 42967, - 43444, - 60598, - 44194, - 43162, - 56816, - 42397, - 42179, - 49888, - 43921, - 43921, - 43921, - 43857, - 43921, - 43921, - 43921, - 45333, - 45333, - 45333, - 43921, - 43921, - 43921, - 43921, - 43921, - 43921, - 43921, - 43921, - 43921, - 43921, - 45333, - 45337, - 43921, - 43797, - 43921, - 43921, - 43925, - 43921, - 45425, - 43921, - 43949, - 44020, - 43459, - 43432, - 42578, - 46735, - 42482, - 45650, - 43320, - 44758, - 43288, - 45303, - 48730, - 45749, - 46594, - 43467, - 43987, - 43086, - 45528, - 46558, - 47524, - 48554, - 49649, - 44811, - 44381, - 45035, - 44590, - 44063, - 43499, - 43809, - 42356, - 47334, - 50672, - 65348, - 62849, - 63721, - 112510, - 149250, - 69726, - 73273, - 53805, - 45814, - 51598, - 50696, - 49966, - 48221, - 48871, - 50468, - 55360, - 71277, - 50498, - 52503, - 68307, - 50588, - 52946, - 68858, - 50614, - 50983, - 66856, - 51861, - 51568, - 47387, - 46549, - 50248, - 45271, - 39755, - 44654, - 44526, - 52864, - 64225, - 62240, - 68059, - 71245, - 795382, - 107298, - 756224, - 243265, - 331690, - 765537, - 47813, + 117112 ]; \ No newline at end of file diff --git a/utils/EthereumRuntimeAdapter.js b/utils/EthereumRuntimeAdapter.js index 771cf713..46913843 100644 --- a/utils/EthereumRuntimeAdapter.js +++ b/utils/EthereumRuntimeAdapter.js @@ -1,8 +1,22 @@ 'use strict'; -const { BLOCK_GAS_LIMIT } = require('./constants'); +const { BLOCK_GAS_LIMIT, ZERO_ADDRESS, ZERO_HASH } = require('./constants'); const ethers = require('ethers'); +const emptyOutput = () => { + return { + owner: ZERO_ADDRESS, + valueOrId: 0x0, + data: ZERO_HASH, + color: ZERO_ADDRESS, + }; +}; + +const emptyTokenBag = () => { + return Array.apply(null, Array(16)).map(emptyOutput); +}; + + module.exports = class EthereumRuntimeAdapter { constructor (runtimeContract) { // explicit mark it as view, so we can just call the execute function @@ -25,9 +39,25 @@ module.exports = class EthereumRuntimeAdapter { } execute ( - { code, data, pc, stepCount, gasRemaining, gasLimit, stack, mem }, + { code, data, pc, stepCount, gasRemaining, gasLimit, stack, mem, tokenBag }, payable ) { + // console.log("BEFORE::::::::::::::::::::::::::::::::::::::::::::::::"); + // console.log( + // { + // code: code || '0x', + // data: data || '0x', + // pc: pc | 0, + // errno: 0, + // stepCount: stepCount | 0, + // gasRemaining: gasRemaining || gasLimit || BLOCK_GAS_LIMIT, + // gasLimit: gasLimit || BLOCK_GAS_LIMIT, + // stack: stack || [], + // mem: mem || [], + // tokenBag: tokenBag || emptyTokenBag(), + // returnData: '0x', + // } + // ); return (payable ? this.payableRuntimeContract.execute : this.runtimeContract.execute)( { code: code || '0x', @@ -38,7 +68,8 @@ module.exports = class EthereumRuntimeAdapter { gasRemaining: gasRemaining || gasLimit || BLOCK_GAS_LIMIT, gasLimit: gasLimit || BLOCK_GAS_LIMIT, stack: stack || [], - mem: mem || [], + mem: mem || [], + tokenBag: tokenBag || emptyTokenBag(), returnData: '0x', } ); diff --git a/utils/constants.js b/utils/constants.js index 7496b157..c93da1dc 100644 --- a/utils/constants.js +++ b/utils/constants.js @@ -187,5 +187,6 @@ module.exports = { BLOCK_GAS_LIMIT: '0x0fffffffffffff', - ZERO_HASH: '0x0000000000000000000000000000000000000000000000000000000000000000', + ZERO_HASH: '0x0000000000000000000000000000000000000000000000000000000000000000', + ZERO_ADDRESS: "0x0000000000000000000000000000000000000000", }; From 4707cd1679160420a8818694ebf0256186575702 Mon Sep 17 00:00:00 2001 From: Jan Date: Tue, 31 Dec 2019 09:08:16 +0100 Subject: [PATCH 02/12] Add readData. --- contracts/EVMRuntime.sol | 21 +++++++- test/fixtures/runtime.js | 96 ++++++++++++++++++++++++++++++++- test/fixtures/runtimeGasUsed.js | 5 +- 3 files changed, 118 insertions(+), 4 deletions(-) diff --git a/contracts/EVMRuntime.sol b/contracts/EVMRuntime.sol index baed157f..080362e7 100644 --- a/contracts/EVMRuntime.sol +++ b/contracts/EVMRuntime.sol @@ -19,6 +19,8 @@ contract EVMRuntime is EVMConstants { // bridge has to convert color to address // we are assuming all token calls cost 0 for now // gas in test??? + // find correct funcSigs + // how to deal with readData failure function getSig(bytes memory _msgData) internal pure returns (bytes4) { return bytes4(_msgData[3]) >> 24 | bytes4(_msgData[2]) >> 16 | bytes4(_msgData[1]) >> 8 | bytes4(_msgData[0]); @@ -1675,9 +1677,24 @@ contract EVMRuntime is EVMConstants { bytes memory ret = abi.encodePacked(bytes32(value)); retEvm.returnData = ret; - } else if (funSig == 0x12343434) { + } else if (funSig == 0x12341234) { // readData - // check address + uint tokenId; + // 32 length + 4 funcSig = 36 + assembly { + tokenId := mload(add(cd,36)) + } + Output memory output; + bytes32 data; + for (uint i = 0; i < state.tokenBag.length; i ++) { + output = state.tokenBag[i]; + if (output.valueOrId == tokenId && output.color == address(target)) { + data = output.data; + } + } + bytes memory ret = abi.encodePacked(data); + + retEvm.returnData = ret; } else { retEvm.errno = ERROR_INSTRUCTION_NOT_SUPPORTED; diff --git a/test/fixtures/runtime.js b/test/fixtures/runtime.js index a78ed5ad..284c8c56 100644 --- a/test/fixtures/runtime.js +++ b/test/fixtures/runtime.js @@ -4042,7 +4042,7 @@ module.exports = [ // }, // }, { - description: 'STATICCALL tokena for now', + description: 'STATICCALL balanceOf - successful read', code: OP.STATICCALL, memory: [ '0x70a08231aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb0000000000000000', @@ -4071,6 +4071,100 @@ module.exports = [ ], } }, + { + description: 'STATICCALL balanceOf - missed color', + code: OP.STATICCALL, + memory: [ + '0x70a08231aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb0000000000000000', + ], + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000018', + '0x0000000000000000000000000000000000000000000000000000000000000018', + OP.ZERO_HASH, + '0x000000000000000000000000cccccccccccccccccccccccccccccccccccccccd', + '0x0000000000000000000000000000000000000000000000000000000000ffffff', + ], + tokenBag: padTokenBag([{ + owner: '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb', + valueOrId: 0xdeadbeef, + data: OP.ZERO_HASH, + color: '0xaccccccccccccccccccccccccccccccccccccccd', + }]), + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + memory: [ + '0x70a08231aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb0000000000000000', + '0x0000000000000000000000000000000000000000000000000000000000000000' + ], + } + }, + { + description: 'STATICCALL balanceOf - missed address', + code: OP.STATICCALL, + memory: [ + '0x70a08231aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb0000000000000000', + ], + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000018', + '0x0000000000000000000000000000000000000000000000000000000000000018', + OP.ZERO_HASH, + '0x000000000000000000000000cccccccccccccccccccccccccccccccccccccccd', + '0x0000000000000000000000000000000000000000000000000000000000ffffff', + ], + tokenBag: padTokenBag([{ + owner: '0xfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb', + valueOrId: 0xdeadbeef, + data: OP.ZERO_HASH, + color: '0xcccccccccccccccccccccccccccccccccccccccd', + }]), + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + memory: [ + '0x70a08231aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb0000000000000000', + '0x0000000000000000000000000000000000000000000000000000000000000000' + ], + } + }, + { + description: 'STATICCALL readData - successfull read', + code: OP.STATICCALL, + memory: [ + '0x12341234dddddddddddddddddddddddddddddddddddddddddddddddddddddddd', + '0xdddddddd00000000000000000000000000000000000000000000000000000000' + ], + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000024', + '0x0000000000000000000000000000000000000000000000000000000000000024', + OP.ZERO_HASH, + '0x000000000000000000000000cccccccccccccccccccccccccccccccccccccccd', + '0x0000000000000000000000000000000000000000000000000000000000ffffff', + ], + tokenBag: padTokenBag([{ + owner: '0xfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb', + valueOrId: '0xdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd', + data: '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee', + color: '0xcccccccccccccccccccccccccccccccccccccccd', + }]), + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + memory: [ + '0x12341234dddddddddddddddddddddddddddddddddddddddddddddddddddddddd', + '0xddddddddeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee', + '0xeeeeeeee00000000000000000000000000000000000000000000000000000000' + ], + } + }, + // read 0 from token bag + // // { // description: 'invalid opcode', // code: [ diff --git a/test/fixtures/runtimeGasUsed.js b/test/fixtures/runtimeGasUsed.js index 7d860c91..d75160d0 100644 --- a/test/fixtures/runtimeGasUsed.js +++ b/test/fixtures/runtimeGasUsed.js @@ -1,4 +1,7 @@ 'use strict'; module.exports = [ - 117112 + 117112, + 117031, + 116925, + 120903 ]; \ No newline at end of file From 52f0c5599791afff25cd5c63905b71c1400564cd Mon Sep 17 00:00:00 2001 From: Jan Date: Sun, 5 Jan 2020 15:10:37 +0100 Subject: [PATCH 03/12] Attempt transfer implementation. Broken commit. --- contracts/EVMRuntime.sol | 92 +++++++++++++++++++++++++++++++++++++++- test/fixtures/runtime.js | 33 ++++++++++++++ 2 files changed, 123 insertions(+), 2 deletions(-) diff --git a/contracts/EVMRuntime.sol b/contracts/EVMRuntime.sol index 080362e7..c9357e84 100644 --- a/contracts/EVMRuntime.sol +++ b/contracts/EVMRuntime.sol @@ -21,7 +21,9 @@ contract EVMRuntime is EVMConstants { // gas in test??? // find correct funcSigs // how to deal with readData failure - + // we assume caller is always the sppending condition + // create a tokenBag (or new name) manipulation library + function getSig(bytes memory _msgData) internal pure returns (bytes4) { return bytes4(_msgData[3]) >> 24 | bytes4(_msgData[2]) >> 16 | bytes4(_msgData[1]) >> 8 | bytes4(_msgData[0]); } @@ -1573,7 +1575,92 @@ contract EVMRuntime is EVMConstants { } function handleCALL(EVM memory state) internal { - state.errno = ERROR_INSTRUCTION_NOT_SUPPORTED; + + /* uint gas = state.stack.pop(); */ + /* address target = address(state.stack.pop()); */ + /* uint value = state.stack.pop(); */ + /* uint inOffset = state.stack.pop(); */ + /* uint inSize = state.stack.pop(); */ + /* uint retOffset = state.stack.pop(); */ + /* uint retSize = state.stack.pop(); */ + + /* uint gasFee = computeGasForMemory(state, retOffset + retSize, inOffset + inSize); */ + + /* if (gasFee > state.gas) { */ + /* state.gas = 0; */ + /* state.errno = ERROR_OUT_OF_GAS; */ + /* return; */ + /* } */ + /* state.gas -= gasFee; */ + + /* bytes memory cd = state.mem.toBytes(inOffset, inSize); */ + /* bytes4 funSig; */ + /* if (cd.length > 3) { */ + /* funSig = getSig(cd); */ + /* } */ + + /* if (funSig == 0x22334455) { */ + /* // transfer */ + /* address dest; */ + /* uint amount; */ + + /* assembly { */ + /* dest := mload(add(cd,24)) */ + /* amount := mload(add(cd, 68)) */ + /* } */ + + /* Output memory destOutput; */ + /* Output memory sourceOutput; */ + /* Output memory output; */ + /* for (uint i = 0; i < state.tokenBag.length; i ++) { */ + /* output = state.tokenBag[i]; */ + /* if (output.owner == state.caller && output.color == target) { */ + /* sourceOutput = output; */ + /* } */ + /* if (output.owner == dest && output.color == target) { */ + /* destOutput = output; */ + /* } */ + /* } */ + + /* if (sourceOutput.valueOrId < amount) { */ + /* // signal failure */ + /* state.stack.push(0); */ + /* state.returnData = new bytes(0); */ + /* return; */ + /* } */ + /* // no token for destination in tokenBag */ + /* if (destOutput.owner != dest) { */ + /* // either assign empty output or fail (if bag full) */ + + /* uint emptyTokenId = 1337; */ + /* // find emptyToken */ + /* for (uint i = 0; i < state.tokenBag.length; i ++) { */ + /* if (state.tokenBag[i].owner == address(0) { */ + /* emptyTokenId = i; */ + /* } */ + /* } */ + /* if (emptyTokenId == 1337) { */ + /* // signal failure */ + /* state.stack.push(0); */ + /* state.returnData = new bytes(0); */ + /* return; */ + /* } */ + /* state.tokenBag[emptyTokenId] = Output({ */ + /* owner: dest, */ + /* valueOrId: 0, */ + /* data: 0, */ + /* color: target */ + /* }); */ + /* destOutput = state.tokenBag[emptyTokenId]; */ + /* } */ + + /* sourceOutput.valueOrId -= amount; */ + /* destOutput.valueOrId += amount; */ + /* } else { */ + + /* } */ + + // state.errno = ERROR_INSTRUCTION_NOT_SUPPORTED; } function handleCALLCODE(EVM memory state) internal { @@ -1694,6 +1781,7 @@ contract EVMRuntime is EVMConstants { } bytes memory ret = abi.encodePacked(data); + // what happens here if we enter token intercepts instead of precompiles retEvm.returnData = ret; } else { diff --git a/test/fixtures/runtime.js b/test/fixtures/runtime.js index 284c8c56..7fc70bc5 100644 --- a/test/fixtures/runtime.js +++ b/test/fixtures/runtime.js @@ -4162,6 +4162,39 @@ module.exports = [ '0xeeeeeeee00000000000000000000000000000000000000000000000000000000' ], } + }, + { + description: 'CALL transfer - successfull transfer', + code: OP.CALL, + memory: [ + '0x22334455aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab0000000000000000', + '0x0000000000000000000000000000000000000000000000000000000000000000', + '0xdeadbeef00000000000000000000000000000000000000000000000000000000' + ], + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000024', + '0x0000000000000000000000000000000000000000000000000000000000000024', + OP.ZERO_HASH, + '0x000000000000000000000000cccccccccccccccccccccccccccccccccccccccd', + '0x0000000000000000000000000000000000000000000000000000000000ffffff', + ], + tokenBag: padTokenBag([{ + owner: '0xfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb', + valueOrId: '0xdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd', + data: '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee', + color: '0xcccccccccccccccccccccccccccccccccccccccd', + }]), + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + memory: [ + '0x12341234dddddddddddddddddddddddddddddddddddddddddddddddddddddddd', + '0xddddddddeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee', + '0xeeeeeeee00000000000000000000000000000000000000000000000000000000' + ], + } }, // read 0 from token bag // From 171ee559c626ea6f9da42ffb63fb7763b6a241ff Mon Sep 17 00:00:00 2001 From: Jan Date: Sun, 5 Jan 2020 19:45:00 +0100 Subject: [PATCH 04/12] Refactor a bit. --- contracts/EVMRuntime.sol | 175 +++++++++++++----------------- contracts/EVMTokenBag.slb | 104 ++++++++++++++++++ contracts/EthereumRuntime.sol | 5 +- test/contracts/ethereumRuntime.js | 16 +++ test/fixtures/runtime.js | 88 +++++++++------ test/fixtures/runtimeGasUsed.js | 8 +- utils/EthereumRuntimeAdapter.js | 2 +- 7 files changed, 258 insertions(+), 140 deletions(-) create mode 100644 contracts/EVMTokenBag.slb diff --git a/contracts/EVMRuntime.sol b/contracts/EVMRuntime.sol index c9357e84..7fd62152 100644 --- a/contracts/EVMRuntime.sol +++ b/contracts/EVMRuntime.sol @@ -7,12 +7,14 @@ import { EVMMemory } from "./EVMMemory.slb"; import { EVMStack } from "./EVMStack.slb"; import { EVMUtils } from "./EVMUtils.slb"; import { EVMCode } from "./EVMCode.slb"; +import { EVMTokenBag } from "./EVMTokenBag.slb"; contract EVMRuntime is EVMConstants { using EVMMemory for EVMMemory.Memory; using EVMStack for EVMStack.Stack; using EVMCode for EVMCode.Code; + using EVMTokenBag for EVMTokenBag.TokenBag; // bridge has to defreagment the tokens // bridge has to check approvals @@ -52,8 +54,7 @@ contract EVMRuntime is EVMConstants { EVMCode.Code code; EVMMemory.Memory mem; EVMStack.Stack stack; - - Output[16] tokenBag; + EVMTokenBag.TokenBag tokenBag; uint256 blockNumber; uint256 blockHash; @@ -1574,93 +1575,77 @@ contract EVMRuntime is EVMConstants { state.errno = ERROR_INSTRUCTION_NOT_SUPPORTED; } + struct StackForCall { + uint gas; + address target; + uint value; + uint inOffset; + uint inSize; + uint retOffset; + uint retSize; + } + function handleCALL(EVM memory state) internal { - /* uint gas = state.stack.pop(); */ - /* address target = address(state.stack.pop()); */ - /* uint value = state.stack.pop(); */ - /* uint inOffset = state.stack.pop(); */ - /* uint inSize = state.stack.pop(); */ - /* uint retOffset = state.stack.pop(); */ - /* uint retSize = state.stack.pop(); */ - - /* uint gasFee = computeGasForMemory(state, retOffset + retSize, inOffset + inSize); */ - - /* if (gasFee > state.gas) { */ - /* state.gas = 0; */ - /* state.errno = ERROR_OUT_OF_GAS; */ - /* return; */ - /* } */ - /* state.gas -= gasFee; */ - - /* bytes memory cd = state.mem.toBytes(inOffset, inSize); */ - /* bytes4 funSig; */ - /* if (cd.length > 3) { */ - /* funSig = getSig(cd); */ - /* } */ + StackForCall memory stack; + stack.gas = state.stack.pop(); + stack.target = address(state.stack.pop()); + stack.value = state.stack.pop(); + stack.inOffset = state.stack.pop(); + stack.inSize = state.stack.pop(); + stack.retOffset = state.stack.pop(); + stack.retSize = state.stack.pop(); + + uint gasFee = computeGasForMemory(state, stack.retOffset + stack.retSize, stack.inOffset + stack.inSize); + + if (gasFee > state.gas) { + state.gas = 0; + state.errno = ERROR_OUT_OF_GAS; + return; + } + state.gas -= gasFee; + + bytes memory cd = state.mem.toBytes(stack.inOffset, stack.inSize); + bytes4 funSig; + if (cd.length > 3) { + funSig = getSig(cd); + } + + bool success; + bytes memory returnData; - /* if (funSig == 0x22334455) { */ - /* // transfer */ - /* address dest; */ - /* uint amount; */ - - /* assembly { */ - /* dest := mload(add(cd,24)) */ - /* amount := mload(add(cd, 68)) */ - /* } */ - - /* Output memory destOutput; */ - /* Output memory sourceOutput; */ - /* Output memory output; */ - /* for (uint i = 0; i < state.tokenBag.length; i ++) { */ - /* output = state.tokenBag[i]; */ - /* if (output.owner == state.caller && output.color == target) { */ - /* sourceOutput = output; */ - /* } */ - /* if (output.owner == dest && output.color == target) { */ - /* destOutput = output; */ - /* } */ - /* } */ - - /* if (sourceOutput.valueOrId < amount) { */ - /* // signal failure */ - /* state.stack.push(0); */ - /* state.returnData = new bytes(0); */ - /* return; */ - /* } */ - /* // no token for destination in tokenBag */ - /* if (destOutput.owner != dest) { */ - /* // either assign empty output or fail (if bag full) */ - - /* uint emptyTokenId = 1337; */ - /* // find emptyToken */ - /* for (uint i = 0; i < state.tokenBag.length; i ++) { */ - /* if (state.tokenBag[i].owner == address(0) { */ - /* emptyTokenId = i; */ - /* } */ - /* } */ - /* if (emptyTokenId == 1337) { */ - /* // signal failure */ - /* state.stack.push(0); */ - /* state.returnData = new bytes(0); */ - /* return; */ - /* } */ - /* state.tokenBag[emptyTokenId] = Output({ */ - /* owner: dest, */ - /* valueOrId: 0, */ - /* data: 0, */ - /* color: target */ - /* }); */ - /* destOutput = state.tokenBag[emptyTokenId]; */ - /* } */ - - /* sourceOutput.valueOrId -= amount; */ - /* destOutput.valueOrId += amount; */ - /* } else { */ - - /* } */ - - // state.errno = ERROR_INSTRUCTION_NOT_SUPPORTED; + if (funSig == 0x22334455) { + // transfer + address dest; + uint amount; + + assembly { + dest := mload(add(cd,24)) + amount := mload(add(cd, 68)) + } + EVMTokenBag.TransferParams memory params = EVMTokenBag.TransferParams({ + color: stack.target, + from: state.caller, + to: dest, + value: amount + }); + success = state.tokenBag.transfer(params); + returnData = abi.encodePacked(success); + } else { + state.stack.push(0); + state.returnData = new bytes(0); + return; + } + + if (!success) { + state.stack.push(0); + state.returnData = new bytes(0); + return; + } + + state.stack.push(1); + state.mem.storeBytesAndPadWithZeroes(returnData, 0, stack.retOffset, stack.retSize); + state.returnData = returnData; } function handleCALLCODE(EVM memory state) internal { @@ -1753,14 +1738,7 @@ contract EVMRuntime is EVMConstants { assembly { addr := mload(add(cd,24)) } - Output memory output; - uint value = 0; - for (uint i = 0; i < state.tokenBag.length; i ++) { - output = state.tokenBag[i]; - if (output.owner == addr && output.color == address(target)) { - value = output.valueOrId; - } - } + uint value = state.tokenBag.balanceOf(address(target), addr); bytes memory ret = abi.encodePacked(bytes32(value)); retEvm.returnData = ret; @@ -1771,14 +1749,7 @@ contract EVMRuntime is EVMConstants { assembly { tokenId := mload(add(cd,36)) } - Output memory output; - bytes32 data; - for (uint i = 0; i < state.tokenBag.length; i ++) { - output = state.tokenBag[i]; - if (output.valueOrId == tokenId && output.color == address(target)) { - data = output.data; - } - } + bytes32 data = state.tokenBag.readData(address(target), tokenId); bytes memory ret = abi.encodePacked(data); // what happens here if we enter token intercepts instead of precompiles diff --git a/contracts/EVMTokenBag.slb b/contracts/EVMTokenBag.slb new file mode 100644 index 00000000..f2361823 --- /dev/null +++ b/contracts/EVMTokenBag.slb @@ -0,0 +1,104 @@ +pragma solidity ^0.5.2; +pragma experimental ABIEncoderV2; + + +library EVMTokenBag { + + struct Output { + address owner; + uint valueOrId; + bytes32 data; + address color; + } + + struct TokenBag { + Output[16] bag; + } + + function balanceOf( + TokenBag memory self, + address color, + address owner + ) internal pure returns (uint value) { + Output memory output; + for (uint i = 0; i < self.bag.length; i++) { + output = self.bag[i]; + if (output.owner == owner && output.color == color) { + value = output.valueOrId; + break; + } + } + } + + function readData( + TokenBag memory self, + address color, + uint id + ) internal pure returns (bytes32 data) { + Output memory output; + for (uint i = 0; i < self.bag.length; i++) { + output = self.bag[i]; + if (output.valueOrId == id && output.color == color) { + data = output.data; + break; + } + } + + } + + struct TransferParams { + address color; + address from; + address to; + uint value; + } + + function transfer( + TokenBag memory self, + TransferParams memory params + ) internal pure returns (bool) { + Output memory source; + Output memory dest; + + // find source + for (uint i = 0; i < self.bag.length; i++) { + if (self.bag[i].owner == params.from && self.bag[i].color == params.color) { + source = self.bag[i]; + break; + } + } + + // sender does not have enough tokens to send + if (source.valueOrId < params.value) return false; + + // find dest and/or empty + uint emptyId = 1337; + for (uint i = 0; i < self.bag.length; i++) { + if (self.bag[i].owner == params.to && self.bag[i].color == params.color) { + dest = self.bag[i]; + break; + } + // check if empty slot + if (self.bag[i].owner == address(0) && emptyId == 1337) { + emptyId = i; + } + } + + // if no dest and no empty slot, throw + if (dest.owner == address(0) && emptyId == 1337) return false; + + // if no dest, but we found an empty slot, assign empty slot to reciver + if (dest.owner == address(0)) { + self.bag[emptyId].owner = params.to; + self.bag[emptyId].color = params.color; + dest = self.bag[emptyId]; + } + + // now do the state transition and return success + // OVERFLOWS??????? + source.valueOrId -= params.value; + dest.valueOrId += params.value; + return true; + } + +} diff --git a/contracts/EthereumRuntime.sol b/contracts/EthereumRuntime.sol index 4c76a66b..42fac3cd 100644 --- a/contracts/EthereumRuntime.sol +++ b/contracts/EthereumRuntime.sol @@ -5,6 +5,7 @@ pragma experimental ABIEncoderV2; import { EVMCode } from "./EVMCode.slb"; import { EVMStack } from "./EVMStack.slb"; import { EVMMemory } from "./EVMMemory.slb"; +import { EVMTokenBag } from "./EVMTokenBag.slb"; import { HydratedRuntime } from "./HydratedRuntime.sol"; @@ -20,7 +21,7 @@ contract EthereumRuntime is HydratedRuntime { bytes32[] stack; bytes32[] mem; bytes returnData; - Output[16] tokenBag; + EVMTokenBag.TokenBag tokenBag; } struct EVMResult { @@ -32,7 +33,7 @@ contract EthereumRuntime is HydratedRuntime { bytes32[] stack; uint pc; bytes32 hashValue; - Output[16] tokenBag; + EVMTokenBag.TokenBag tokenBag; } // Init EVM with given stack and memory and execute from the given opcode diff --git a/test/contracts/ethereumRuntime.js b/test/contracts/ethereumRuntime.js index 84c64339..d54caec1 100644 --- a/test/contracts/ethereumRuntime.js +++ b/test/contracts/ethereumRuntime.js @@ -141,6 +141,22 @@ describe('Runtime', function () { if (fixture.result.memory) { assert.deepEqual(res.mem, fixture.result.memory, 'memory'); } + if (fixture.result.tokenBag) { + const marshallBag = (bag) => { + return bag.map(output => { return { + owner: output.owner, + valueOrId: output.valueOrId, + data: output.data, + color: output.color + }; + }); + }; + console.log("Expected"); + console.log(fixture.result.tokenBag.bag); + console.log("Actual:"); + console.log(marshallBag(res.tokenBag.bag)); + assert.deepEqual(marshallBag(res.tokenBag.bag), fixture.result.tokenBag.bag, 'tokenBag'); + } if (fixture.result.pc !== undefined) { assert.equal(res.pc.toNumber(), fixture.result.pc, 'pc'); } diff --git a/test/fixtures/runtime.js b/test/fixtures/runtime.js index 7fc70bc5..2e360fd7 100644 --- a/test/fixtures/runtime.js +++ b/test/fixtures/runtime.js @@ -15,7 +15,7 @@ const padTokenBag = (tokenBag) => { while(tokenBag.length < 16) { tokenBag.push(emptyOutput()); } - return tokenBag; + return { bag: tokenBag }; }; module.exports = [ @@ -4164,38 +4164,64 @@ module.exports = [ } }, { - description: 'CALL transfer - successfull transfer', - code: OP.CALL, - memory: [ - '0x22334455aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab0000000000000000', - '0x0000000000000000000000000000000000000000000000000000000000000000', - '0xdeadbeef00000000000000000000000000000000000000000000000000000000' - ], - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x0000000000000000000000000000000000000000000000000000000000000024', - '0x0000000000000000000000000000000000000000000000000000000000000024', + description: 'CALL transfer - successfull transfer', + code: OP.CALL, + memory: [ + '0x22334455aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab0000000000000000', + '0x0000000000000000000000000000000000000000000000000000000000000000', + '0xdeadbeef00000000000000000000000000000000000000000000000000000000' + ], + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000044', + '0x0000000000000000000000000000000000000000000000000000000000000044', + OP.ZERO_HASH, OP.ZERO_HASH, - '0x000000000000000000000000cccccccccccccccccccccccccccccccccccccccd', - '0x0000000000000000000000000000000000000000000000000000000000ffffff', - ], - tokenBag: padTokenBag([{ - owner: '0xfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb', - valueOrId: '0xdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd', - data: '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee', - color: '0xcccccccccccccccccccccccccccccccccccccccd', - }]), - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - memory: [ - '0x12341234dddddddddddddddddddddddddddddddddddddddddddddddddddddddd', - '0xddddddddeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee', - '0xeeeeeeee00000000000000000000000000000000000000000000000000000000' - ], - } + '0x000000000000000000000000cccccccccccccccccccccccccccccccccccccccd', + '0x0000000000000000000000000000000000000000000000000000000000ffffff', + ], + tokenBag: padTokenBag([ + { + owner: '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab', + valueOrId: '0x0000000000000000000000000000000000000000000000000000000000000000', + data: '0x0000000000000000000000000000000000000000000000000000000000000000', + color: '0xcccccccccccccccccccccccccccccccccccccccd', + }, + { + owner: OP.DEFAULT_CALLER, + valueOrId: '0x00000000000000000000000000000000000000000000000000000000deadbeef', + data: '0x0000000000000000000000000000000000000000000000000000000000000000', + color: '0xcccccccccccccccccccccccccccccccccccccccd', + }, + ]), + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + memory: [ + '0x22334455aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab0000000000000000', + '0x0000000000000000000000000000000000000000000000000000000000000000', + '0xdeadbeef01000000000000000000000000000000000000000000000000000000', + '0x0000000000000000000000000000000000000000000000000000000000000000' + ], + tokenBag: padTokenBag([ + { + owner: '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab', + valueOrId: '0x00000000000000000000000000000000000000000000000000000000deadbeef', + data: '0x0000000000000000000000000000000000000000000000000000000000000000', + color: '0xcccccccccccccccccccccccccccccccccccccccd', + }, + { + owner: OP.DEFAULT_CALLER, + valueOrId: '0x0000000000000000000000000000000000000000000000000000000000000000', + data: '0x0000000000000000000000000000000000000000000000000000000000000000', + color: '0xcccccccccccccccccccccccccccccccccccccccd', + }, + ]), + } }, + + // read 0 from token bag // // { diff --git a/test/fixtures/runtimeGasUsed.js b/test/fixtures/runtimeGasUsed.js index d75160d0..b01b2b21 100644 --- a/test/fixtures/runtimeGasUsed.js +++ b/test/fixtures/runtimeGasUsed.js @@ -1,7 +1,7 @@ 'use strict'; module.exports = [ - 117112, - 117031, - 116925, - 120903 + 115096, + 119597, + 119427, + 121147 ]; \ No newline at end of file diff --git a/utils/EthereumRuntimeAdapter.js b/utils/EthereumRuntimeAdapter.js index 46913843..0eae4963 100644 --- a/utils/EthereumRuntimeAdapter.js +++ b/utils/EthereumRuntimeAdapter.js @@ -13,7 +13,7 @@ const emptyOutput = () => { }; const emptyTokenBag = () => { - return Array.apply(null, Array(16)).map(emptyOutput); + return { bag: Array.apply(null, Array(16)).map(emptyOutput)}; }; From fe8f108280555b2b785509f032f383229eb4165e Mon Sep 17 00:00:00 2001 From: Jan Date: Mon, 6 Jan 2020 13:29:14 +0100 Subject: [PATCH 05/12] Transfer test now passing. --- test/contracts/ethereumRuntime.js | 6 ++++-- test/fixtures/runtimeGasUsed.js | 7 ++++--- test/helpers/tokenBag.js | 24 ++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 test/helpers/tokenBag.js diff --git a/test/contracts/ethereumRuntime.js b/test/contracts/ethereumRuntime.js index d54caec1..6b1d2153 100644 --- a/test/contracts/ethereumRuntime.js +++ b/test/contracts/ethereumRuntime.js @@ -4,7 +4,8 @@ const fs = require('fs'); const assert = require('assert'); const { getCode, deployContract, deployCode } = - require('./../helpers/utils'); + require('./../helpers/utils'); +const { assertTokenBagEqual } = require("./../helpers/tokenBag.js"); const fixtures = require('./../fixtures/runtime'); const runtimeGasUsed = require('./../fixtures/runtimeGasUsed'); const Runtime = require('./../../utils/EthereumRuntimeAdapter'); @@ -155,7 +156,8 @@ describe('Runtime', function () { console.log(fixture.result.tokenBag.bag); console.log("Actual:"); console.log(marshallBag(res.tokenBag.bag)); - assert.deepEqual(marshallBag(res.tokenBag.bag), fixture.result.tokenBag.bag, 'tokenBag'); + assertTokenBagEqual(fixture.result.tokenBag, res.tokenBag); + // assert.deepEqual(marshallBag(res.tokenBag.bag), fixture.result.tokenBag.bag, 'tokenBag'); } if (fixture.result.pc !== undefined) { assert.equal(res.pc.toNumber(), fixture.result.pc, 'pc'); diff --git a/test/fixtures/runtimeGasUsed.js b/test/fixtures/runtimeGasUsed.js index b01b2b21..c92165be 100644 --- a/test/fixtures/runtimeGasUsed.js +++ b/test/fixtures/runtimeGasUsed.js @@ -1,7 +1,8 @@ 'use strict'; module.exports = [ - 115096, - 119597, + 115032, + 119533, 119427, - 121147 + 121147, + 134055 ]; \ No newline at end of file diff --git a/test/helpers/tokenBag.js b/test/helpers/tokenBag.js new file mode 100644 index 00000000..4a645ab6 --- /dev/null +++ b/test/helpers/tokenBag.js @@ -0,0 +1,24 @@ +'use strict'; + +const assert = require("assert"); +const { utils } = require("ethers"); + +const TokenBagHelpers = {}; + +TokenBagHelpers.assertTokenBagEqual = (expected, actual) => { + expected.bag.forEach((expectedOutput, i) => { + const actualOutput = actual.bag[i]; + assert.equal( + expectedOutput.owner.replace('0x', ''), + actualOutput.owner.toLowerCase().replace('0x', '') + ); + assert.equal(expectedOutput.color, actualOutput.color.toLowerCase()); + assert.equal(expectedOutput.data, actualOutput.data); + assert.equal( + expectedOutput.valueOrId, + utils.hexZeroPad(actualOutput.valueOrId.toHexString(), 32) + ); + }); +} + +module.exports = TokenBagHelpers; From 107bb7cbe8d81a9b1b86b56308d3899b3b792e97 Mon Sep 17 00:00:00 2001 From: Jan Date: Mon, 6 Jan 2020 13:42:43 +0100 Subject: [PATCH 06/12] Some cleanup. --- test/contracts/ethereumRuntime.js | 16 --------------- test/fixtures/runtime.js | 17 +--------------- test/helpers/tokenBag.js | 24 +++++++++++++++++++++- utils/EthereumRuntimeAdapter.js | 34 +++---------------------------- 4 files changed, 27 insertions(+), 64 deletions(-) diff --git a/test/contracts/ethereumRuntime.js b/test/contracts/ethereumRuntime.js index 6b1d2153..4a0ff379 100644 --- a/test/contracts/ethereumRuntime.js +++ b/test/contracts/ethereumRuntime.js @@ -104,8 +104,6 @@ describe('Runtime', function () { }; const res = await rt.execute(args); - // console.log("AFTER:::::::::::::::::::::::::::::::::::::::::"); - // console.log(res); const gasUsed = (await (await rt.execute(args, true)).wait()).gasUsed.toNumber(); totalGasUsed += gasUsed; @@ -143,21 +141,7 @@ describe('Runtime', function () { assert.deepEqual(res.mem, fixture.result.memory, 'memory'); } if (fixture.result.tokenBag) { - const marshallBag = (bag) => { - return bag.map(output => { return { - owner: output.owner, - valueOrId: output.valueOrId, - data: output.data, - color: output.color - }; - }); - }; - console.log("Expected"); - console.log(fixture.result.tokenBag.bag); - console.log("Actual:"); - console.log(marshallBag(res.tokenBag.bag)); assertTokenBagEqual(fixture.result.tokenBag, res.tokenBag); - // assert.deepEqual(marshallBag(res.tokenBag.bag), fixture.result.tokenBag.bag, 'tokenBag'); } if (fixture.result.pc !== undefined) { assert.equal(res.pc.toNumber(), fixture.result.pc, 'pc'); diff --git a/test/fixtures/runtime.js b/test/fixtures/runtime.js index 2e360fd7..2336dae0 100644 --- a/test/fixtures/runtime.js +++ b/test/fixtures/runtime.js @@ -1,22 +1,7 @@ 'use strict'; const OP = require('./../../utils/constants'); - -const emptyOutput = () => { - return { - owner: OP.ZERO_ADDRESS, - valueOrId: 0x0, - data: OP.ZERO_HASH, - color: OP.ZERO_ADDRESS, - }; -}; - -const padTokenBag = (tokenBag) => { - while(tokenBag.length < 16) { - tokenBag.push(emptyOutput()); - } - return { bag: tokenBag }; -}; +const { padTokenBag } = require('../helpers/tokenBag.js'); module.exports = [ // { diff --git a/test/helpers/tokenBag.js b/test/helpers/tokenBag.js index 4a645ab6..918e2f4e 100644 --- a/test/helpers/tokenBag.js +++ b/test/helpers/tokenBag.js @@ -1,7 +1,9 @@ 'use strict'; const assert = require("assert"); -const { utils } = require("ethers"); +const { utils } = require("ethers"); + +const { BLOCK_GAS_LIMIT, ZERO_ADDRESS, ZERO_HASH } = require('../../utils/constants'); const TokenBagHelpers = {}; @@ -19,6 +21,26 @@ TokenBagHelpers.assertTokenBagEqual = (expected, actual) => { utils.hexZeroPad(actualOutput.valueOrId.toHexString(), 32) ); }); +}; + +TokenBagHelpers.emptyOutput = () => { + return { + owner: ZERO_ADDRESS, + valueOrId: 0x0, + data: ZERO_HASH, + color: ZERO_ADDRESS, + }; +}; + +TokenBagHelpers.emptyTokenBag = () => { + return { bag: Array.apply(null, Array(16)).map(TokenBagHelpers.emptyOutput)}; +}; + +TokenBagHelpers.padTokenBag = (tokenBag) => { + while(tokenBag.length < 16) { + tokenBag.push(TokenBagHelpers.emptyOutput()); + } + return { bag: tokenBag }; } module.exports = TokenBagHelpers; diff --git a/utils/EthereumRuntimeAdapter.js b/utils/EthereumRuntimeAdapter.js index 0eae4963..921d0291 100644 --- a/utils/EthereumRuntimeAdapter.js +++ b/utils/EthereumRuntimeAdapter.js @@ -2,19 +2,7 @@ const { BLOCK_GAS_LIMIT, ZERO_ADDRESS, ZERO_HASH } = require('./constants'); const ethers = require('ethers'); - -const emptyOutput = () => { - return { - owner: ZERO_ADDRESS, - valueOrId: 0x0, - data: ZERO_HASH, - color: ZERO_ADDRESS, - }; -}; - -const emptyTokenBag = () => { - return { bag: Array.apply(null, Array(16)).map(emptyOutput)}; -}; +const { emptyTokenBag } = require('../test/helpers/tokenBag.js'); module.exports = class EthereumRuntimeAdapter { @@ -42,22 +30,6 @@ module.exports = class EthereumRuntimeAdapter { { code, data, pc, stepCount, gasRemaining, gasLimit, stack, mem, tokenBag }, payable ) { - // console.log("BEFORE::::::::::::::::::::::::::::::::::::::::::::::::"); - // console.log( - // { - // code: code || '0x', - // data: data || '0x', - // pc: pc | 0, - // errno: 0, - // stepCount: stepCount | 0, - // gasRemaining: gasRemaining || gasLimit || BLOCK_GAS_LIMIT, - // gasLimit: gasLimit || BLOCK_GAS_LIMIT, - // stack: stack || [], - // mem: mem || [], - // tokenBag: tokenBag || emptyTokenBag(), - // returnData: '0x', - // } - // ); return (payable ? this.payableRuntimeContract.execute : this.runtimeContract.execute)( { code: code || '0x', @@ -68,8 +40,8 @@ module.exports = class EthereumRuntimeAdapter { gasRemaining: gasRemaining || gasLimit || BLOCK_GAS_LIMIT, gasLimit: gasLimit || BLOCK_GAS_LIMIT, stack: stack || [], - mem: mem || [], - tokenBag: tokenBag || emptyTokenBag(), + mem: mem || [], + tokenBag: tokenBag || emptyTokenBag(), returnData: '0x', } ); From 6c047624229189ea038f72419f9d5af9f69153d2 Mon Sep 17 00:00:00 2001 From: Jan Date: Mon, 6 Jan 2020 14:02:53 +0100 Subject: [PATCH 07/12] Uncomment tests. --- contracts/EVMRuntime.sol | 3 +- test/fixtures/runtime.js | 8080 +++++++++++++++---------------- test/fixtures/runtimeGasUsed.js | 199 +- 3 files changed, 4235 insertions(+), 4047 deletions(-) diff --git a/contracts/EVMRuntime.sol b/contracts/EVMRuntime.sol index 7fd62152..17aa0136 100644 --- a/contracts/EVMRuntime.sol +++ b/contracts/EVMRuntime.sol @@ -1632,8 +1632,7 @@ contract EVMRuntime is EVMConstants { success = state.tokenBag.transfer(params); returnData = abi.encodePacked(success); } else { - state.stack.push(0); - state.returnData = new bytes(0); + state.errno = ERROR_INSTRUCTION_NOT_SUPPORTED; return; } diff --git a/test/fixtures/runtime.js b/test/fixtures/runtime.js index 2336dae0..affa21b1 100644 --- a/test/fixtures/runtime.js +++ b/test/fixtures/runtime.js @@ -4,4028 +4,4028 @@ const OP = require('./../../utils/constants'); const { padTokenBag } = require('../helpers/tokenBag.js'); module.exports = [ - // { - // code: OP.ADD, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.MUL, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // ], - // result: { - // stack: [ - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // ], - // gasUsed: 5, - // }, - // }, - // { - // code: OP.SUB, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.DIV, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // ], - // gasUsed: 5, - // }, - // }, - // { - // code: OP.SDIV, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // ], - // gasUsed: 5, - // }, - // }, - // { - // code: OP.MOD, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // gasUsed: 5, - // }, - // }, - // { - // code: OP.SMOD, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // ], - // gasUsed: 5, - // }, - // }, - // { - // code: OP.ADDMOD, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // ], - // gasUsed: 8, - // }, - // }, - // { - // code: OP.MULMOD, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // ], - // gasUsed: 8, - // }, - // }, - // { - // code: OP.EXP, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // ], - // result: { - // stack: [ - // '0x000000000000000000000000000000000000000000000000000000000000007d', - // ], - // gasUsed: 60, - // }, - // }, - // { - // code: OP.EXP, - // stack: [ - // '0x000000000000000000000000000000000000000000000000000000000000ffff', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // result: { - // gasUsed: 110, - // }, - // }, - // { - // code: OP.EXP, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000ffffff', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // result: { - // gasUsed: 160, - // }, - // }, - // { - // code: OP.EXP, - // stack: [ - // '0x00000000000000000000000000000000000000000000000000000000ffffffff', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // result: { - // gasUsed: 210, - // }, - // }, - // { - // code: OP.EXP, - // stack: [ - // '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // result: { - // gasUsed: 1610, - // }, - // }, - // { - // code: OP.SIGNEXTEND, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // ], - // gasUsed: 5, - // }, - // }, - // { - // code: OP.LT, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.GT, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // ], - // result: { - // stack: [ - // OP.ZERO_HASH, - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.SLT, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.SGT, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // ], - // result: { - // stack: [ - // OP.ZERO_HASH, - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.EQ, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // ], - // result: { - // stack: [ - // OP.ZERO_HASH, - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.ISZERO, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // ], - // result: { - // stack: [ - // OP.ZERO_HASH, - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.AND, - // stack: [ - // '0x00000000000000000000000000000000000000000000000000000000000000fd', - // '0x00000000000000000000000000000000000000000000000000000000000000fc', - // ], - // result: { - // stack: [ - // '0x00000000000000000000000000000000000000000000000000000000000000fc', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.OR, - // stack: [ - // '0x00000000000000000000000000000000000000000000000000000000000000fd', - // '0x00000000000000000000000000000000000000000000000000000000000000fc', - // ], - // result: { - // stack: [ - // '0x00000000000000000000000000000000000000000000000000000000000000fd', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.XOR, - // stack: [ - // '0x00000000000000000000000000000000000000000000000000000000000000fd', - // '0x00000000000000000000000000000000000000000000000000000000000000ff', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.NOT, - // stack: [ - // '0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.BYTE, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // ], - // result: { - // stack: [ - // OP.ZERO_HASH, - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.SHL, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.SHR, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000001000', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000400', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.SAR, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000001000', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000400', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.POP, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // ], - // gasUsed: 2, - // }, - // }, - // { - // code: OP.DUP1, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.DUP2, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.DUP3, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.DUP4, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.DUP5, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.DUP6, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.DUP7, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.DUP8, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.DUP9, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.DUP10, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.DUP11, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.DUP12, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.DUP13, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.DUP14, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.DUP15, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.DUP16, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.SWAP1, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.SWAP2, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.SWAP3, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.SWAP4, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.SWAP5, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.SWAP6, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.SWAP7, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.SWAP8, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.SWAP9, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // ], - // result: { - // stack: [ - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.SWAP10, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // ], - // result: { - // stack: [ - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.SWAP11, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // ], - // result: { - // stack: [ - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.SWAP12, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // ], - // result: { - // stack: [ - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.SWAP13, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // ], - // result: { - // stack: [ - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.SWAP14, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // ], - // result: { - // stack: [ - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.SWAP15, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.SWAP16, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // '0x0000000000000000000000000000000000000000000000000000000000000011', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000011', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000000009', - // '0x000000000000000000000000000000000000000000000000000000000000000a', - // '0x000000000000000000000000000000000000000000000000000000000000000b', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // '0x000000000000000000000000000000000000000000000000000000000000000d', - // '0x000000000000000000000000000000000000000000000000000000000000000e', - // '0x000000000000000000000000000000000000000000000000000000000000000f', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.BALANCE, - // stack: [ - // '0x0000000000000000000000004ae7b3e204fed41c82d57ecd2242470196d70d02', - // ], - // result: { - // errno: 6, - // }, - // }, - // { - // code: OP.ADDRESS, - // result: { - // stack: [ - // '0x0000000000000000000000000f572e5295c57f15886f9b263e2f6d2d6c7b5ec6', - // ], - // gasUsed: 2, - // }, - // }, - // { - // code: OP.ORIGIN, - // result: { - // stack: [ - // '0x000000000000000000000000cd1722f2947def4cf144679da39c4c32bdc35681', - // ], - // gasUsed: 2, - // }, - // }, - // { - // code: OP.CALLER, - // result: { - // stack: [ - // '0x000000000000000000000000cd1722f2947def4cf144679da39c4c32bdc35681', - // ], - // gasUsed: 2, - // }, - // }, - // { - // code: OP.CALLVALUE, - // result: { - // stack: [ - // OP.ZERO_HASH, - // ], - // gasUsed: 2, - // errno: 0, - // }, - // }, - // { - // code: OP.GASPRICE, - // result: { - // errno: 6, - // }, - // }, - // { - // code: OP.BLOCKHASH, - // stack: [ - // OP.ZERO_HASH, - // ], - // result: { - // stack: [ - // OP.ZERO_HASH, - // ], - // gasUsed: 20, - // }, - // }, - // { - // code: OP.COINBASE, - // result: { - // errno: 6, - // }, - // }, - // { - // code: OP.TIMESTAMP, - // result: { - // stack: [ - // OP.ZERO_HASH, - // ], - // gasUsed: 2, - // }, - // }, - // { - // code: OP.NUMBER, - // result: { - // stack: [ - // OP.ZERO_HASH, - // ], - // gasUsed: 2, - // }, - // }, - // { - // code: OP.DIFFICULTY, - // result: { - // errno: 6, - // }, - // }, - // { - // code: OP.GASLIMIT, - // result: { - // errno: 6, - // }, - // }, - // { - // code: OP.PC, - // result: { - // stack: [ - // OP.ZERO_HASH, - // ], - // }, - // }, - // { - // description: 'invalid JUMP', - // code: [ - // OP.PUSH1, - // OP.ADD, - // OP.JUMP, - // ], - // stack: [ - // OP.ZERO_HASH, - // ], - // result: { - // stack: [], - // pc: 2, - // gasUsed: 8, - // errno: 5, - // }, - // }, - // { - // description: 'valid JUMP', - // code: [ - // OP.JUMPDEST, - // OP.PUSH1, - // OP.DIV, - // OP.JUMP, - // OP.JUMPDEST, - // ], - // stack: [ - // OP.ZERO_HASH, - // ], - // pc: OP.ERROR_INDEX_OOB, - // result: { - // stack: [], - // pc: 5, - // gasUsed: 21, - // }, - // }, - // { - // description: 'invalid JUMPI', - // code: [ - // OP.PUSH1, - // OP.ADD, - // OP.PUSH1, - // OP.STOP, - // OP.JUMPI, - // ], - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // OP.ZERO_HASH, - // ], - // result: { - // stack: [], - // pc: 4, - // gasUsed: 10, - // errno: 5, - // }, - // }, - // { - // description: 'valid JUMPI no-op', - // code: [ - // OP.PUSH1, - // OP.STOP, - // OP.PUSH1, - // OP.STOP, - // OP.JUMPI, - // ], - // stack: [ - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // ], - // result: { - // stack: [], - // pc: 5, - // gasUsed: 10, - // }, - // }, - // { - // description: 'valid JUMPI', - // code: [ - // OP.PUSH1, - // '01', - // OP.PUSH1, - // '05', - // OP.JUMPI, - // OP.JUMPDEST, - // ], - // pc: 0, - // stack: [ - // ], - // result: { - // stack: [], - // pc: 6, - // gasUsed: 17, - // }, - // }, - // { - // code: OP.RETURNDATASIZE, - // result: { - // stack: [ - // OP.ZERO_HASH, - // ], - // gasUsed: 2, - // }, - // }, - // { - // code: OP.CODESIZE, - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // gasUsed: 2, - // }, - // }, - // { - // code: [ - // OP.CODESIZE, - // OP.GAS, - // OP.POP, - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // ], - // gasUsed: 6, - // }, - // }, - // { - // code: [ - // OP.PUSH1, - // '01', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: [ - // OP.PUSH2, - // '01', - // '02', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000102', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: [ - // OP.PUSH3, - // '01', - // '02', - // '03', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000010203', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: [ - // OP.PUSH4, - // '10', - // '11', - // '12', - // '13', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000010111213', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: [ - // OP.PUSH5, - // '10', - // '11', - // '12', - // '13', - // '14', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000001011121314', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: [ - // OP.PUSH6, - // '10', - // '11', - // '12', - // '13', - // '14', - // '15', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000101112131415', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: [ - // OP.PUSH7, - // '10', - // '11', - // '12', - // '13', - // '14', - // '15', - // '16', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000010111213141516', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: [ - // OP.PUSH8, - // '10', - // '11', - // '12', - // '13', - // '14', - // '15', - // '16', - // '00', - // '00', - // '17', - // '18', - // '19', - // '20', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000001011121314151600', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: [ - // OP.PUSH9, - // '10', - // '11', - // '12', - // '13', - // '14', - // '15', - // '16', - // '17', - // '18', - // '00', - // '19', - // '20', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000101112131415161718', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: [ - // OP.PUSH10, - // '10', - // '11', - // '12', - // '13', - // '14', - // '15', - // '16', - // '00', - // '00', - // '00', - // '00', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000010111213141516000000', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: [ - // OP.PUSH11, - // '10', - // '11', - // '12', - // '13', - // '14', - // '15', - // '16', - // '17', - // '18', - // '19', - // '20', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000001011121314151617181920', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: [ - // OP.PUSH12, - // '10', - // '11', - // '12', - // '13', - // '14', - // '15', - // '16', - // '17', - // '18', - // '19', - // '20', - // '21', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000101112131415161718192021', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: [ - // OP.PUSH13, - // '10', - // '11', - // '12', - // '13', - // '14', - // '15', - // '16', - // '17', - // '18', - // '19', - // '20', - // '21', - // '22', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000010111213141516171819202122', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: [ - // OP.PUSH14, - // '10', - // '11', - // '12', - // '13', - // '14', - // '15', - // '16', - // '17', - // '18', - // '19', - // '20', - // '21', - // '22', - // '23', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0000000000000000000000000000000000001011121314151617181920212223', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: [ - // OP.PUSH15, - // '10', - // '11', - // '12', - // '13', - // '14', - // '15', - // '16', - // '17', - // '18', - // '19', - // '20', - // '21', - // '22', - // '23', - // '24', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0000000000000000000000000000000000101112131415161718192021222324', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: [ - // OP.PUSH16, - // '10', - // '11', - // '12', - // '13', - // '14', - // '15', - // '16', - // '17', - // '18', - // '19', - // '20', - // '21', - // '22', - // '23', - // '24', - // '25', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0000000000000000000000000000000010111213141516171819202122232425', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: [ - // OP.PUSH17, - // '10', - // '11', - // '12', - // '13', - // '14', - // '15', - // '16', - // '17', - // '18', - // '19', - // '20', - // '21', - // '22', - // '23', - // '24', - // '25', - // '26', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0000000000000000000000000000001011121314151617181920212223242526', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: [ - // OP.PUSH18, - // '10', - // '11', - // '12', - // '13', - // '14', - // '15', - // '16', - // '17', - // '18', - // '19', - // '20', - // '21', - // '22', - // '23', - // '24', - // '25', - // '26', - // '27', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0000000000000000000000000000101112131415161718192021222324252627', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: [ - // OP.PUSH19, - // '10', - // '11', - // '12', - // '13', - // '14', - // '15', - // '16', - // '17', - // '18', - // '19', - // '20', - // '21', - // '22', - // '23', - // '24', - // '25', - // '26', - // '27', - // '28', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0000000000000000000000000010111213141516171819202122232425262728', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: [ - // OP.PUSH20, - // '10', - // '11', - // '12', - // '13', - // '14', - // '15', - // '16', - // '17', - // '18', - // '19', - // '20', - // '21', - // '22', - // '23', - // '24', - // '25', - // '26', - // '27', - // '28', - // '29', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0000000000000000000000001011121314151617181920212223242526272829', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: [ - // OP.PUSH21, - // '10', - // '11', - // '12', - // '13', - // '14', - // '15', - // '16', - // '17', - // '18', - // '19', - // '20', - // '21', - // '22', - // '23', - // '24', - // '25', - // '26', - // '27', - // '28', - // '29', - // '30', - // '00', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0000000000000000000000101112131415161718192021222324252627282930', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: [ - // OP.PUSH22, - // '10', - // '11', - // '12', - // '13', - // '14', - // '15', - // '16', - // '17', - // '18', - // '19', - // '20', - // '21', - // '22', - // '23', - // '24', - // '25', - // '26', - // '27', - // '28', - // '29', - // '30', - // '31', - // '00', - // '32', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0000000000000000000010111213141516171819202122232425262728293031', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: [ - // OP.PUSH23, - // '10', - // '11', - // '12', - // '13', - // '14', - // '15', - // '16', - // '17', - // '18', - // '19', - // '20', - // '21', - // '22', - // '23', - // '24', - // '25', - // '26', - // '27', - // '28', - // '29', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0000000000000000001011121314151617181920212223242526272829000000', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: [ - // OP.PUSH24, - // '10', - // '11', - // '12', - // '13', - // '14', - // '15', - // '16', - // '17', - // '18', - // '19', - // '20', - // '21', - // '22', - // '23', - // '24', - // '25', - // '26', - // '27', - // '28', - // '29', - // '30', - // '31', - // '32', - // '33', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0000000000000000101112131415161718192021222324252627282930313233', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: [ - // OP.PUSH25, - // '10', - // '11', - // '12', - // '13', - // '14', - // '15', - // '16', - // '17', - // '18', - // '19', - // '20', - // '21', - // '22', - // '23', - // '24', - // '25', - // '26', - // '27', - // '28', - // '29', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0000000000000010111213141516171819202122232425262728290000000000', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: [ - // OP.PUSH26, - // '10', - // '11', - // '12', - // '13', - // '14', - // '15', - // '16', - // '17', - // '18', - // '19', - // '20', - // '21', - // '22', - // '23', - // '24', - // '25', - // '26', - // '27', - // '28', - // '29', - // '30', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0000000000001011121314151617181920212223242526272829300000000000', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: [ - // OP.PUSH27, - // '10', - // '11', - // '12', - // '13', - // '14', - // '15', - // '16', - // '17', - // '18', - // '19', - // '20', - // '21', - // '22', - // '23', - // '24', - // '25', - // '26', - // '27', - // '28', - // '29', - // '31', - // '32', - // '33', - // '34', - // '35', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0000000000101112131415161718192021222324252627282931323334350000', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: [ - // OP.PUSH28, - // '10', - // '11', - // '12', - // '13', - // '14', - // '15', - // '16', - // '17', - // '18', - // '19', - // '20', - // '21', - // '22', - // '23', - // '24', - // '25', - // '26', - // '27', - // '28', - // '29', - // '41', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0000000010111213141516171819202122232425262728294100000000000000', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: [ - // OP.PUSH29, - // '10', - // '11', - // '12', - // '13', - // '14', - // '15', - // '16', - // '17', - // '18', - // '19', - // '20', - // '21', - // '22', - // '23', - // '24', - // '25', - // '26', - // '27', - // '28', - // '29', - // '10', - // '11', - // '12', - // '13', - // '14', - // '15', - // '16', - // '17', - // '18', - // '00', - // '19', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0000001011121314151617181920212223242526272829101112131415161718', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: [ - // OP.PUSH30, - // '10', - // '11', - // '12', - // '13', - // '14', - // '15', - // '16', - // '17', - // '18', - // '19', - // '20', - // '21', - // '22', - // '23', - // '24', - // '25', - // '26', - // '27', - // '28', - // '29', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0000101112131415161718192021222324252627282900000000000000000000', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: [ - // OP.PUSH31, - // '10', - // '11', - // '12', - // '13', - // '14', - // '15', - // '16', - // '17', - // '18', - // '19', - // '20', - // '21', - // '22', - // '23', - // '24', - // '25', - // '26', - // '27', - // '28', - // '29', - // '30', - // '31', - // '32', - // '33', - // '34', - // '35', - // '36', - // '37', - // '38', - // '39', - // '40', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x0010111213141516171819202122232425262728293031323334353637383940', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: [ - // OP.PUSH32, - // '10', - // '11', - // '12', - // '13', - // '14', - // '15', - // '16', - // '17', - // '18', - // '19', - // '20', - // '21', - // '22', - // '23', - // '24', - // '25', - // '26', - // '27', - // '28', - // '29', - // '30', - // '31', - // '32', - // '33', - // '34', - // '35', - // '36', - // '37', - // '38', - // '39', - // '40', - // '41', - // ], - // pc: 0, - // result: { - // stack: [ - // '0x1011121314151617181920212223242526272829303132333435363738394041', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.CALLDATALOAD, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // data: '0x123456', - // result: { - // stack: [ - // '0x3456000000000000000000000000000000000000000000000000000000000000', - // ], - // gasUsed: 3, - // }, - // }, - // { - // description: 'CALLDATALOAD - out of range', - // code: OP.CALLDATALOAD, - // stack: [ - // '0x000000000000000000000000000000000000000000000000000000000000ffff', - // ], - // data: '0x123456', - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000000', - // ], - // gasUsed: 3, - // }, - // }, - // { - // code: OP.CALLDATASIZE, - // data: '0x1234', - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // ], - // gasUsed: 2, - // }, - // }, - // { - // code: OP.MLOAD, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // memory: [ - // '0x0000000000000000000000000000000000000000000000000000000000000066', - // '0x7700000000000000000000000000000000000000000000000000000000000000', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000006677', - // ], - // gasUsed: 3, - // }, - // }, - // { - // description: 'MLOAD - out of gas', - // code: OP.MLOAD, - // gasRemaining: 3, - // stack: [ - // '0x000000000000000000000000000000000000000000000000000000000000ffff', - // ], - // memory: [ - // ], - // result: { - // stack: [ - // ], - // memory: [], - // gasUsed: 3, - // errno: 13, - // pc: 0, - // }, - // }, - // { - // code: OP.MSTORE, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000005567', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // result: { - // memory: [ - // '0x0000000000000000000000000000000000000000000000000000000000000055', - // '0x6700000000000000000000000000000000000000000000000000000000000000', - // ], - // gasUsed: 9, - // }, - // }, - // { - // description: 'MSTORE - out of gas', - // gasRemaining: 3, - // code: OP.MSTORE, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000005567', - // '0x000000000000000000000000000000000000000000000000000000000000ffff', - // ], - // result: { - // stack: [ - // ], - // memory: [ - // ], - // gasUsed: 3, - // errno: 13, - // pc: 0, - // }, - // }, - // { - // code: OP.MSTORE8, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000005567', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // result: { - // memory: [ - // '0x0067000000000000000000000000000000000000000000000000000000000000', - // ], - // gasUsed: 6, - // }, - // }, - // { - // description: 'MSTORE8 - out of gas', - // code: OP.MSTORE8, - // gasRemaining: 3, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000005567', - // '0x00000000000000000000000000000000000000000000000000000000000000ff', - // ], - // result: { - // stack: [], - // memory: [], - // gasUsed: 3, - // errno: 13, - // pc: 0, - // }, - // }, - // { - // code: OP.MSIZE, - // memory: [ - // '0x0000000000000000000000000000000000000000000000000000000000000055', - // '0x0000000000000000000000000000000000000000000000000000000000000067', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000040', - // ], - // gasUsed: 2, - // }, - // }, - // { - // code: OP.CALLDATACOPY, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // data: '0x06397872cdd21945455a7fdc7921e2db7bd8e402607cad66279e899f6ae9b1da', - // result: { - // memory: [ - // '0x0072cdd219000000000000000000000000000000000000000000000000000000', - // ], - // gasUsed: 9, - // }, - // }, - // { - // description: 'CALLDATACOPY - out of gas', - // code: OP.CALLDATACOPY, - // gasRemaining: 8, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // data: '0x06397872cdd21945455a7fdc7921e2db7bd8e402607cad66279e899f6ae9b1da', - // result: { - // stack: [ - // ], - // memory: [ - // ], - // gasUsed: 8, - // errno: 13, - // }, - // }, - // { - // code: [ - // OP.GAS, - // OP.POP, - // OP.CODECOPY, - // ], - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // result: { - // memory: [ - // '0x0050390000000000000000000000000000000000000000000000000000000000', - // ], - // gasUsed: 9, - // }, - // }, - // { - // description: 'CODECOPY - out of gas', - // code: [ - // OP.CODECOPY, - // ], - // gasRemaining: 8, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // result: { - // stack: [ - // ], - // memory: [ - // ], - // gasUsed: 8, - // errno: 13, - // }, - // }, - // { - // code: OP.SSTORE, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // OP.ZERO_HASH, - // ], - // result: { - // errno: 6, - // }, - // }, - // { - // code: OP.SLOAD, - // stack: [ - // OP.ZERO_HASH, - // ], - // result: { - // errno: 6, - // }, - // }, - // { - // code: OP.LOG0, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // ], - // result: { - // errno: 6, - // }, - // }, - // { - // code: OP.LOG1, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000567', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // ], - // result: { - // errno: 6, - // }, - // }, - // { - // code: OP.LOG2, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000123', - // '0x0000000000000000000000000000000000000000000000000000000000000567', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // ], - // result: { - // errno: 6, - // }, - // }, - // { - // code: OP.LOG3, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000987', - // '0x0000000000000000000000000000000000000000000000000000000000000123', - // '0x0000000000000000000000000000000000000000000000000000000000000567', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // ], - // result: { - // errno: 6, - // }, - // }, - // { - // code: OP.LOG4, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000294', - // '0x0000000000000000000000000000000000000000000000000000000000000987', - // '0x0000000000000000000000000000000000000000000000000000000000000123', - // '0x0000000000000000000000000000000000000000000000000000000000000567', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // ], - // result: { - // errno: 6, - // }, - // }, - // { - // code: OP.RETURN, - // stack: [ - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // ], - // result: { - // stack: [], - // pc: 0, - // gasUsed: 0, - // }, - // }, - // { - // description: 'RETURN - out of gas', - // code: OP.RETURN, - // stack: [ - // '0x00000000000000000000000000000000000000000000000000000000000000ff', - // OP.ZERO_HASH, - // ], - // gasRemaining: 2, - // result: { - // stack: [], - // pc: 0, - // gasUsed: 2, - // errno: 13, - // }, - // }, - // { - // code: OP.REVERT, - // stack: [ - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // ], - // result: { - // stack: [], - // errno: 7, - // pc: 0, - // gasUsed: 0, - // }, - // }, - // { - // description: 'REVERT - out of gas', - // gasRemaining: 2, - // code: OP.REVERT, - // stack: [ - // '0x000000000000000000000000000000000000000000000000000000000000ffff', - // OP.ZERO_HASH, - // ], - // result: { - // stack: [], - // memory: [], - // errno: 13, - // pc: 0, - // gasUsed: 2, - // }, - // }, - // { - // code: OP.RETURNDATACOPY, - // stack: [ - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // ], - // result: { - // stack: [], - // pc: 1, - // gasUsed: 3, - // }, - // }, - // { - // description: 'RETURNDATACOPY - out of gas', - // code: OP.RETURNDATACOPY, - // gasRemaining: 3, - // stack: [ - // '0x00000000000000000000000000000000000000000000000000000000000000ff', - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // ], - // result: { - // stack: [ - // ], - // pc: 0, - // gasUsed: 3, - // errno: 13, - // }, - // }, - // { - // code: OP.SHA3, - // stack: [ - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // ], - // result: { - // stack: [ - // '0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470', - // ], - // gasUsed: 30, - // }, - // }, - // { - // description: 'SHA3 - out of gas', - // code: OP.SHA3, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // OP.ZERO_HASH, - // ], - // gasRemaining: 31, - // result: { - // stack: [ - // ], - // gasUsed: 31, - // errno: 13, - // }, - // }, - // { - // code: OP.SHA3, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // OP.ZERO_HASH, - // ], - // memory: [ - // '0x0102030405060708091011121314151617181920212223242526272829303132', - // ], - // result: { - // stack: [ - // '0x70edd8238efca5c35ffe1789e45e4195b783903594b6f9dc86e857ae50703b4c', - // ], - // gasUsed: 36, - // }, - // }, - // { - // code: OP.SHA3, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000021', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // memory: [ - // '0x0102030405060708091011121314151617181920212223242526272829303132', - // '0x0102030405060708091011121314151617181920212223242526272829303132', - // ], - // result: { - // stack: [ - // '0x5e111654ad5f024c13a4332dfe1eb6a750999d2c36b3cc2ba2e5b2a79181c50b', - // ], - // gasUsed: 42, - // }, - // }, - // { - // code: [ - // OP.MSTORE, - // OP.MSTORE, - // OP.MSTORE, - // OP.MSTORE, - // ], - // stack: [ - // '0x000000000000000000000000000000000000000000000703c19694461d800000', - // '0x0000000000000000000000000000000000000000000000000000000000000022', - // '0x00000000030a1ffb899c11400000000000000000000000000000000000000000', - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000004267', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000ffc', - // '0x000000000000000000000000000000000000000000000000000000000000000c', - // ], - // pc: 0, - // result: { - // gasUsed: 21, - // memory: [ - // '0x0000000000000000030a1ffb899c114000000000000000000000000000000000', - // '0x0000000000000000000000000000000000000000000000000703c19694461d80', - // '0x0000000000000000000000000000000000000000000000000000000000000000', - // ], - // }, - // }, - // { - // code: [ - // OP.MSTORE, - // OP.MSTORE, - // OP.MSTORE, - // OP.MSTORE, - // ], - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000021', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000021', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000021', - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000021', - // '0x0000000000000000000000000000000000000000000000000000000000000015', - // ], - // pc: 0, - // result: { - // gasUsed: 18, - // }, - // }, - // { - // code: [ - // OP.MSTORE, - // OP.MSTORE, - // OP.MSTORE, - // OP.MSTORE, - // ], - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000021', - // '0x0000000000000000000000000000000000000000000000000000000000000022', - // '0x0000000000000000000000000000000000000000000000000000000000000021', - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000021', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000021', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // pc: 0, - // result: { - // gasUsed: 21, - // }, - // }, - // { - // code: [ - // OP.MSTORE, - // OP.MSTORE, - // OP.MSTORE, - // OP.MSTORE, - // ], - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000021', - // '0x0000000000000000000000000000000000000000000000000000000000000f3b', - // '0x0000000000000000000000000000000000000000000000000000000000000021', - // '0x00000000000000000000000000000000000000000000000000000000000003ac', - // '0x0000000000000000000000000000000000000000000000000000000000000021', - // '0x0000000000000000000000000000000000000000000000000000000000000158', - // '0x0000000000000000000000000000000000000000000000000000000000000021', - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // ], - // pc: 0, - // result: { - // gasUsed: 410, - // }, - // }, - // { - // code: [ - // OP.MSTORE, - // OP.MSTORE, - // OP.MSTORE, - // OP.MSTORE, - // ], - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000021', - // '0x0000000000000000000000000000000000000000000000000000000000001af3', - // '0x0000000000000000000000000000000000000000000000000000000000000021', - // '0x0000000000000000000000000000000000000000000000000000000000000860', - // '0x0000000000000000000000000000000000000000000000000000000000000021', - // '0x0000000000000000000000000000000000000000000000000000000000000309', - // '0x0000000000000000000000000000000000000000000000000000000000000021', - // '0x00000000000000000000000000000000000000000000000000000000000001f0', - // ], - // pc: 0, - // result: { - // gasUsed: 754, - // }, - // }, - // { - // code: [ - // OP.MSTORE8, - // OP.MSTORE8, - // OP.MSTORE8, - // OP.MSTORE8, - // ], - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000021', - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // '0x0000000000000000000000000000000000000000000000000000000000000021', - // '0x000000000000000000000000000000000000000000000000000000000000001f', - // '0x0000000000000000000000000000000000000000000000000000000000000021', - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000021', - // '0x00000000000000000000000000000000000000000000000000000000000002a0', - // ], - // pc: 0, - // result: { - // gasUsed: 78, - // }, - // }, - // { - // code: [ - // OP.MSTORE8, - // OP.MSTORE8, - // OP.MSTORE8, - // OP.MSTORE8, - // ], - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000021', - // '0x00000000000000000000000000000000000000000000000000000000000003cc', - // '0x0000000000000000000000000000000000000000000000000000000000000021', - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000021', - // '0x000000000000000000000000000000000000000000000000000000000000001f', - // '0x0000000000000000000000000000000000000000000000000000000000000021', - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // ], - // pc: 0, - // result: { - // gasUsed: 106, - // }, - // }, - // { - // code: [ - // OP.GAS, - // OP.GAS, - // OP.CODECOPY, - // OP.CODECOPY, - // ], - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // pc: 2, - // result: { - // gasUsed: 15, - // }, - // }, - // { - // code: OP.SELFDESTRUCT, - // stack: [ - // '0x0000000000000000000000001f572e5295c57f15886f9b263e2f6d2d6c7b5ec6', - // ], - // result: { - // errno: 6, - // }, - // }, - // { - // code: OP.CALL, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000040', - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000001f572e5295c57f15886f9b263e2f6d2d6c7b5ec6', - // '0x0000000000000000000000000000000000000000000000000000000000002710', - // ], - // result: { - // errno: 6, - // }, - // }, - // { - // code: OP.DELEGATECALL, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // '0x0000000000000000000000001f572e5295c57f15886f9b263e2f6d2d6c7b5ec6', - // '0x0000000000000000000000000000000000000000000000000000000000002710', - // ], - // result: { - // errno: 6, - // }, - // }, - // { - // code: OP.CALLCODE, - // stack: [ - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // ], - // result: { - // errno: 6, - // }, - // }, - // { - // description: 'STATICCALL - out of gas', - // gasRemaining: 23, - // code: OP.STATICCALL, - // stack: [ - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000002710', - // ], - // result: { - // stack: [ - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000002710', - // ], - // memory: [], - // gasUsed: 23, - // errno: 13, - // pc: 0, - // }, - // }, - // { - // description: 'STATICCALL - out of gas taking memory costs into account', - // gasRemaining: 703, - // code: OP.STATICCALL, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000fff', - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000002710', - // ], - // result: { - // stack: [], - // memory: [], - // gasUsed: 703, - // errno: 13, - // pc: 0, - // }, - // }, - // { - // description: 'STATICCALL ECRECOVER - not enough gas', - // code: OP.STATICCALL, - // stack: [ - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // ], - // result: { - // stack: [ - // OP.ZERO_HASH, - // ], - // memory: [], - // gasUsed: 716, - // pc: 1, - // errno: 0, - // }, - // }, - // { - // description: 'STATICCALL ECRECOVER without input/output', - // code: OP.STATICCALL, - // stack: [ - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000002710', - // ], - // result: { - // gasUsed: 3700, - // }, - // }, - // { - // description: 'STATICCALL ECRECOVER with input/output', - // code: OP.STATICCALL, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000040', - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000002710', - // ], - // result: { - // gasUsed: 3709, - // }, - // }, - // { - // description: 'STATICCALL SHA256 - not enough gas', - // code: OP.STATICCALL, - // stack: [ - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // ], - // result: { - // stack: [ - // OP.ZERO_HASH, - // ], - // memory: [], - // gasUsed: 716, - // pc: 1, - // errno: 0, - // }, - // }, - // { - // description: 'STATICCALL SHA256 without input/output', - // code: OP.STATICCALL, - // stack: [ - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000002710', - // ], - // result: { - // gasUsed: 760, - // }, - // }, - // { - // description: 'STATICCALL SHA256 with input/output', - // code: OP.STATICCALL, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000040', - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // '0x0000000000000000000000000000000000000000000000000000000000002710', - // ], - // result: { - // gasUsed: 781, - // }, - // }, - // { - // description: 'STATICCALL RIPEMD160 - not enough gas', - // code: OP.STATICCALL, - // stack: [ - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // ], - // result: { - // stack: [ - // OP.ZERO_HASH, - // ], - // memory: [], - // gasUsed: 716, - // pc: 1, - // errno: 0, - // }, - // }, - // { - // description: 'STATICCALL RIPEMD160 without input/output', - // code: OP.STATICCALL, - // stack: [ - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000002710', - // ], - // result: { - // gasUsed: 1300, - // }, - // }, - // { - // description: 'STATICCALL RIPEMD160 with input/output', - // code: OP.STATICCALL, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000040', - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000002710', - // ], - // result: { - // gasUsed: 1429, - // }, - // }, - // { - // description: 'STATICCALL IDENTITY - not enough gas', - // code: OP.STATICCALL, - // stack: [ - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // result: { - // stack: [ - // OP.ZERO_HASH, - // ], - // memory: [], - // gasUsed: 701, - // pc: 1, - // errno: 0, - // }, - // }, - // { - // description: 'STATICCALL IDENTITY without input/output', - // code: OP.STATICCALL, - // stack: [ - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000002710', - // ], - // result: { - // gasUsed: 715, - // }, - // }, - // { - // description: 'STATICCALL IDENTITY with input/output', - // code: OP.STATICCALL, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000040', - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000002710', - // ], - // result: { - // gasUsed: 727, - // }, - // }, - // { - // description: 'STATICCALL, not to a precompile', - // code: OP.STATICCALL, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // '0x0000000000000000000000001f572e5295c57f15886f9b263e2f6d2d6c7b5ec6', - // '0x0000000000000000000000000000000000000000000000000000000000002710', - // ], - // result: { - // stack: [ - // OP.ZERO_HASH, - // ], - // }, - // }, - // { - // description: 'STATICCALL with limited gas', - // code: OP.STATICCALL, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // '0x0000000000000000000000001f572e5295c57f15886f9b263e2f6d2d6c7b5ec6', - // '0x0000000000000000000000000000000000000000000000000000000000002710', - // ], - // gasRemaining: 706, - // result: { - // stack: [ - // OP.ZERO_HASH, - // ], - // }, - // }, - // { - // description: 'CREATE2 - not supported', - // code: OP.CREATE2, - // stack: [ - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // ], - // result: { - // stack: [ - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // ], - // memory: [], - // errno: 6, - // pc: 0, - // }, - // }, - // { - // description: 'CREATE with send value and failed', - // code: OP.CREATE, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000010', - // OP.ZERO_HASH, - // '0x000000000000000000000000000000000000000000000000000000000000007b', - // ], - // result: { - // errno: 6, - // }, - // }, - // { - // description: 'CALLDATACOPY expanding memory', - // code: OP.CALLDATACOPY, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x0000000000000000000000000000000000000000000000000000000000000090', - // ], - // data: '0x06397872cdd21945455a7fdc7921e2db7bd8e402607cad66279e899f6ae9b1da', - // result: { - // gasUsed: 21, - // }, - // }, - // { - // description: 'RETURN - grows memory', - // code: OP.RETURN, - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000004', - // OP.ZERO_HASH, - // ], - // result: { - // gasUsed: 3, - // }, - // }, - // { - // code: OP.STOP, - // result: { - // pc: 0, - // }, - // }, - // { - // code: [ - // OP.EXTCODEHASH, - // ], - // stack: [ - // '0x0002030405060708091011121314151617181920212223242526272829303100', - // ], - // pc: 0, - // result: { - // errno: 6, - // }, - // }, - // { - // code: [ - // OP.EXTCODESIZE, - // ], - // stack: [ - // '0x0002030405060708091011121314151617181920212223242526272829303100', - // ], - // pc: 0, - // result: { - // errno: 6, - // }, - // }, - // { - // code: [ - // OP.EXTCODECOPY, - // ], - // stack: [ - // '0x0002030405060708091011121314151617181920212223242526272829303100', - // '0x0002030405060708091011121314151617181920212223242526272829303100', - // '0x0002030405060708091011121314151617181920212223242526272829303100', - // '0x0002030405060708091011121314151617181920212223242526272829303100', - // ], - // pc: 0, - // result: { - // errno: 6, - // }, - // }, - // { - // description: 'STATICCALL MODEXP - base 3, exponent 65535, modulus 2**255', - // code: OP.STATICCALL, - // memory: [ - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x000000000000000000000000000000000000000000000000000000000000ffff', - // '0x8000000000000000000000000000000000000000000000000000000000000000', - // OP.ZERO_HASH, - // ], - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // '0x00000000000000000000000000000000000000000000000000000000000000c0', - // '0x00000000000000000000000000000000000000000000000000000000000000c0', - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x000000000000000000000000000000000000000000000000000000000000ffff', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // memory: [ - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x000000000000000000000000000000000000000000000000000000000000ffff', - // '0x8000000000000000000000000000000000000000000000000000000000000000', - // '0x3b01b01ac41f2d6e917c6d6a221ce793802469026d9ab7578fa2e79e4da6aaab', - // ], - // gasUsed: 1468, - // }, - // }, - // { - // description: 'STATICCALL MODEXP - base 3, exponent 65535, modulus 2**255 out of gas', - // code: OP.STATICCALL, - // memory: [ - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x000000000000000000000000000000000000000000000000000000000000ffff', - // '0x8000000000000000000000000000000000000000000000000000000000000000', - // OP.ZERO_HASH, - // ], - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // '0x00000000000000000000000000000000000000000000000000000000000000c0', - // '0x00000000000000000000000000000000000000000000000000000000000000c0', - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x000000000000000000000000000000000000000000000000000000000000ffff', - // ], - // gasRemaining: 1200, - // result: { - // stack: [ - // OP.ZERO_HASH, - // ], - // }, - // }, - // { - // description: 'STATICCALL MODEXP (2) - test with modules length of 64', - // code: OP.STATICCALL, - // memory: [ - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // '0x0000000000000000000000000000000000000000000000000000000000000040', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x000000000000000000000000000000000000000000000000000000000000ffff', - // '0x8000000000000000000000000000000000000000000000000000000000000000', - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // ], - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // '0x00000000000000000000000000000000000000000000000000000000000000e0', - // '0x00000000000000000000000000000000000000000000000000000000000000e0', - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000005', - // '0x000000000000000000000000000000000000000000000000000000000000ffff', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // memory: [ - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // '0x0000000000000000000000000000000000000000000000000000000000000040', - // '0x0000000000000000000000000000000000000000000000000000000000000003', - // '0x000000000000000000000000000000000000000000000000000000000000ffff', - // '0x8000000000000000000000000000000000000000000000000000000000000000', - // OP.ZERO_HASH, - // '0x3fcecc35efb6e7db0528b52021556895467b5a5abac19c2ef35ca4fc5add9e09', - // ], - // gasUsed: 3772, - // }, - // }, - // { - // description: 'STATICCALL EC_ADD valid points', - // code: OP.STATICCALL, - // memory: [ - // '0x17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa9', - // '0x01e0559bacb160664764a357af8a9fe70baa9258e0b959273ffc5718c6d4cc7c', - // '0x039730ea8dff1254c0fee9c0ea777d29a9c710b7e616683f194f18c43b43b869', - // '0x073a5ffcc6fc7a28c30723d6e58ce577356982d65b833a5a5c15bf9024b43d98', - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // ], - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000040', - // '0x0000000000000000000000000000000000000000000000000000000000000080', - // '0x0000000000000000000000000000000000000000000000000000000000000080', - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x000000000000000000000000000000000000000000000000000000000000ffff', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // memory: [ - // '0x17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa9', - // '0x01e0559bacb160664764a357af8a9fe70baa9258e0b959273ffc5718c6d4cc7c', - // '0x039730ea8dff1254c0fee9c0ea777d29a9c710b7e616683f194f18c43b43b869', - // '0x073a5ffcc6fc7a28c30723d6e58ce577356982d65b833a5a5c15bf9024b43d98', - // '0x15bf2bb17880144b5d1cd2b1f46eff9d617bffd1ca57c37fb5a49bd84e53cf66', - // '0x049c797f9ce0d17083deb32b5e36f2ea2a212ee036598dd7624c168993d1355f', - // ], - // gasUsed: 1200, - // }, - // }, - // { - // description: 'STATICCALL EC_ADD invalid points', - // code: OP.STATICCALL, - // memory: [ - // '0x17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa9', - // '0x1e0559bacb160664764a357af8a9fe70baa9258e0b959273ffc5718c6d4cc7c0', - // '0x39730ea8dff1254c0fee9c0ea777d29a9c710b7e616683f194f18c43b43b8690', - // '0x073a5ffcc6fc7a28c30723d6e58ce577356982d65b833a5a5c15bf9024b43d98', - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // ], - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000040', - // '0x0000000000000000000000000000000000000000000000000000000000000080', - // '0x0000000000000000000000000000000000000000000000000000000000000080', - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000006', - // '0x00000000000000000000000000000000000000000000000000000000000003e8', - // ], - // result: { - // stack: [ - // OP.ZERO_HASH, - // ], - // gasUsed: 1700, - // }, - // }, - // { - // description: 'STATICCALL EC_MUL valid', - // code: OP.STATICCALL, - // memory: [ - // '0x17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa9', - // '0x01e0559bacb160664764a357af8a9fe70baa9258e0b959273ffc5718c6d4cc7c', - // '0x073a5ffcc6fc7a28c30723d6e58ce577356982d65b833a5a5c15bf9024b43d98', - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // ], - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000040', - // '0x0000000000000000000000000000000000000000000000000000000000000060', - // '0x0000000000000000000000000000000000000000000000000000000000000060', - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x000000000000000000000000000000000000000000000000000000000000ffff', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // memory: [ - // '0x17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa9', - // '0x01e0559bacb160664764a357af8a9fe70baa9258e0b959273ffc5718c6d4cc7c', - // '0x073a5ffcc6fc7a28c30723d6e58ce577356982d65b833a5a5c15bf9024b43d98', - // '0x0e798bc0c484ae573104ce6c79456b69bf2370be86b4db8fda62c1e26a87dbe9', - // '0x109effc4074f2ff70f3fc60590768eca4dfd620eb6c44405f31f39bd7eaad5e1', - // ], - // gasUsed: 40700, - // }, - // }, - // { - // description: 'STATICCALL EC_MUL invalid', - // code: OP.STATICCALL, - // memory: [ - // '0x17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa9', - // '0x1e0559bacb160664764a357af8a9fe70baa9258e0b959273ffc5718c6d4cc7c0', - // '0x073a5ffcc6fc7a28c30723d6e58ce577356982d65b833a5a5c15bf9024b43d98', - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // ], - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000040', - // '0x0000000000000000000000000000000000000000000000000000000000000060', - // '0x0000000000000000000000000000000000000000000000000000000000000060', - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000007', - // '0x000000000000000000000000000000000000000000000000000000000000ffff', - // ], - // result: { - // stack: [ - // OP.ZERO_HASH, - // ], - // gasUsed: 66235, - // }, - // }, - // { - // description: 'STATICCALL EC_PAIRING valid K1', - // code: OP.STATICCALL, - // memory: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // ], - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // '0x00000000000000000000000000000000000000000000000000000000000000c0', - // '0x00000000000000000000000000000000000000000000000000000000000000c0', - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000ffffff', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // memory: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // gasUsed: 180700, - // }, - // }, - // { - // description: 'STATICCALL EC_PAIRING valid K2', - // code: OP.STATICCALL, - // memory: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // ], - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // '0x0000000000000000000000000000000000000000000000000000000000000180', - // '0x0000000000000000000000000000000000000000000000000000000000000180', - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000ffffff', - // ], - // result: { - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // memory: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // ], - // gasUsed: 260700, - // }, - // }, - // { - // description: 'STATICCALL EC_PAIRING invalid', - // code: OP.STATICCALL, - // memory: [ - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // '0x0000000000000000000000000000000000000000000000000000000000000002', - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000001', - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // OP.ZERO_HASH, - // ], - // stack: [ - // '0x0000000000000000000000000000000000000000000000000000000000000020', - // '0x00000000000000000000000000000000000000000000000000000000000000c0', - // '0x00000000000000000000000000000000000000000000000000000000000000c0', - // OP.ZERO_HASH, - // '0x0000000000000000000000000000000000000000000000000000000000000008', - // '0x0000000000000000000000000000000000000000000000000000000000ffffff', - // ], - // result: { - // stack: [ - // OP.ZERO_HASH, - // ], - // gasUsed: 16777915, - // }, - // }, + { + code: OP.ADD, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000005', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000008', + ], + gasUsed: 3, + }, + }, + { + code: OP.MUL, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000005', + ], + result: { + stack: [ + '0x000000000000000000000000000000000000000000000000000000000000000f', + ], + gasUsed: 5, + }, + }, + { + code: OP.SUB, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000005', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000002', + ], + gasUsed: 3, + }, + }, + { + code: OP.DIV, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000006', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000002', + ], + gasUsed: 5, + }, + }, + { + code: OP.SDIV, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000006', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000002', + ], + gasUsed: 5, + }, + }, + { + code: OP.MOD, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000007', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + gasUsed: 5, + }, + }, + { + code: OP.SMOD, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000008', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000002', + ], + gasUsed: 5, + }, + }, + { + code: OP.ADDMOD, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000005', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000003', + ], + gasUsed: 8, + }, + }, + { + code: OP.MULMOD, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000006', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000002', + ], + gasUsed: 8, + }, + }, + { + code: OP.EXP, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000005', + ], + result: { + stack: [ + '0x000000000000000000000000000000000000000000000000000000000000007d', + ], + gasUsed: 60, + }, + }, + { + code: OP.EXP, + stack: [ + '0x000000000000000000000000000000000000000000000000000000000000ffff', + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + result: { + gasUsed: 110, + }, + }, + { + code: OP.EXP, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000ffffff', + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + result: { + gasUsed: 160, + }, + }, + { + code: OP.EXP, + stack: [ + '0x00000000000000000000000000000000000000000000000000000000ffffffff', + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + result: { + gasUsed: 210, + }, + }, + { + code: OP.EXP, + stack: [ + '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + result: { + gasUsed: 1610, + }, + }, + { + code: OP.SIGNEXTEND, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000002', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000003', + ], + gasUsed: 5, + }, + }, + { + code: OP.LT, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000002', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + gasUsed: 3, + }, + }, + { + code: OP.GT, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000002', + ], + result: { + stack: [ + OP.ZERO_HASH, + ], + gasUsed: 3, + }, + }, + { + code: OP.SLT, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000002', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + gasUsed: 3, + }, + }, + { + code: OP.SGT, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000002', + ], + result: { + stack: [ + OP.ZERO_HASH, + ], + gasUsed: 3, + }, + }, + { + code: OP.EQ, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000002', + ], + result: { + stack: [ + OP.ZERO_HASH, + ], + gasUsed: 3, + }, + }, + { + code: OP.ISZERO, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000002', + ], + result: { + stack: [ + OP.ZERO_HASH, + ], + gasUsed: 3, + }, + }, + { + code: OP.AND, + stack: [ + '0x00000000000000000000000000000000000000000000000000000000000000fd', + '0x00000000000000000000000000000000000000000000000000000000000000fc', + ], + result: { + stack: [ + '0x00000000000000000000000000000000000000000000000000000000000000fc', + ], + gasUsed: 3, + }, + }, + { + code: OP.OR, + stack: [ + '0x00000000000000000000000000000000000000000000000000000000000000fd', + '0x00000000000000000000000000000000000000000000000000000000000000fc', + ], + result: { + stack: [ + '0x00000000000000000000000000000000000000000000000000000000000000fd', + ], + gasUsed: 3, + }, + }, + { + code: OP.XOR, + stack: [ + '0x00000000000000000000000000000000000000000000000000000000000000fd', + '0x00000000000000000000000000000000000000000000000000000000000000ff', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000002', + ], + gasUsed: 3, + }, + }, + { + code: OP.NOT, + stack: [ + '0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + gasUsed: 3, + }, + }, + { + code: OP.BYTE, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000002', + ], + result: { + stack: [ + OP.ZERO_HASH, + ], + gasUsed: 3, + }, + }, + { + code: OP.SHL, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000004', + ], + gasUsed: 3, + }, + }, + { + code: OP.SHR, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000001000', + '0x0000000000000000000000000000000000000000000000000000000000000002', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000400', + ], + gasUsed: 3, + }, + }, + { + code: OP.SAR, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000001000', + '0x0000000000000000000000000000000000000000000000000000000000000002', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000400', + ], + gasUsed: 3, + }, + }, + { + code: OP.POP, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000002', + ], + gasUsed: 2, + }, + }, + { + code: OP.DUP1, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000002', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000002', + ], + gasUsed: 3, + }, + }, + { + code: OP.DUP2, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + '0x000000000000000000000000000000000000000000000000000000000000000f', + ], + gasUsed: 3, + }, + }, + { + code: OP.DUP3, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + '0x000000000000000000000000000000000000000000000000000000000000000e', + ], + gasUsed: 3, + }, + }, + { + code: OP.DUP4, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + '0x000000000000000000000000000000000000000000000000000000000000000d', + ], + gasUsed: 3, + }, + }, + { + code: OP.DUP5, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + '0x000000000000000000000000000000000000000000000000000000000000000c', + ], + gasUsed: 3, + }, + }, + { + code: OP.DUP6, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + '0x000000000000000000000000000000000000000000000000000000000000000b', + ], + gasUsed: 3, + }, + }, + { + code: OP.DUP7, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + '0x000000000000000000000000000000000000000000000000000000000000000a', + ], + gasUsed: 3, + }, + }, + { + code: OP.DUP8, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + '0x0000000000000000000000000000000000000000000000000000000000000009', + ], + gasUsed: 3, + }, + }, + { + code: OP.DUP9, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + '0x0000000000000000000000000000000000000000000000000000000000000008', + ], + gasUsed: 3, + }, + }, + { + code: OP.DUP10, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + '0x0000000000000000000000000000000000000000000000000000000000000007', + ], + gasUsed: 3, + }, + }, + { + code: OP.DUP11, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + '0x0000000000000000000000000000000000000000000000000000000000000006', + ], + gasUsed: 3, + }, + }, + { + code: OP.DUP12, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + '0x0000000000000000000000000000000000000000000000000000000000000005', + ], + gasUsed: 3, + }, + }, + { + code: OP.DUP13, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + '0x0000000000000000000000000000000000000000000000000000000000000004', + ], + gasUsed: 3, + }, + }, + { + code: OP.DUP14, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + '0x0000000000000000000000000000000000000000000000000000000000000003', + ], + gasUsed: 3, + }, + }, + { + code: OP.DUP15, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + '0x0000000000000000000000000000000000000000000000000000000000000002', + ], + gasUsed: 3, + }, + }, + { + code: OP.DUP16, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + gasUsed: 3, + }, + }, + { + code: OP.SWAP1, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000002', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + ], + gasUsed: 3, + }, + }, + { + code: OP.SWAP2, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + gasUsed: 3, + }, + }, + { + code: OP.SWAP3, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + gasUsed: 3, + }, + }, + { + code: OP.SWAP4, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + gasUsed: 3, + }, + }, + { + code: OP.SWAP5, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + gasUsed: 3, + }, + }, + { + code: OP.SWAP6, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + gasUsed: 3, + }, + }, + { + code: OP.SWAP7, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + gasUsed: 3, + }, + }, + { + code: OP.SWAP8, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + gasUsed: 3, + }, + }, + { + code: OP.SWAP9, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + ], + result: { + stack: [ + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + gasUsed: 3, + }, + }, + { + code: OP.SWAP10, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + ], + result: { + stack: [ + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + gasUsed: 3, + }, + }, + { + code: OP.SWAP11, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + ], + result: { + stack: [ + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + gasUsed: 3, + }, + }, + { + code: OP.SWAP12, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + ], + result: { + stack: [ + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + gasUsed: 3, + }, + }, + { + code: OP.SWAP13, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + ], + result: { + stack: [ + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + gasUsed: 3, + }, + }, + { + code: OP.SWAP14, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + ], + result: { + stack: [ + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + gasUsed: 3, + }, + }, + { + code: OP.SWAP15, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000010', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + gasUsed: 3, + }, + }, + { + code: OP.SWAP16, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + '0x0000000000000000000000000000000000000000000000000000000000000011', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000011', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000000009', + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x000000000000000000000000000000000000000000000000000000000000000b', + '0x000000000000000000000000000000000000000000000000000000000000000c', + '0x000000000000000000000000000000000000000000000000000000000000000d', + '0x000000000000000000000000000000000000000000000000000000000000000e', + '0x000000000000000000000000000000000000000000000000000000000000000f', + '0x0000000000000000000000000000000000000000000000000000000000000010', + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + gasUsed: 3, + }, + }, + { + code: OP.BALANCE, + stack: [ + '0x0000000000000000000000004ae7b3e204fed41c82d57ecd2242470196d70d02', + ], + result: { + errno: 6, + }, + }, + { + code: OP.ADDRESS, + result: { + stack: [ + '0x0000000000000000000000000f572e5295c57f15886f9b263e2f6d2d6c7b5ec6', + ], + gasUsed: 2, + }, + }, + { + code: OP.ORIGIN, + result: { + stack: [ + '0x000000000000000000000000cd1722f2947def4cf144679da39c4c32bdc35681', + ], + gasUsed: 2, + }, + }, + { + code: OP.CALLER, + result: { + stack: [ + '0x000000000000000000000000cd1722f2947def4cf144679da39c4c32bdc35681', + ], + gasUsed: 2, + }, + }, + { + code: OP.CALLVALUE, + result: { + stack: [ + OP.ZERO_HASH, + ], + gasUsed: 2, + errno: 0, + }, + }, + { + code: OP.GASPRICE, + result: { + errno: 6, + }, + }, + { + code: OP.BLOCKHASH, + stack: [ + OP.ZERO_HASH, + ], + result: { + stack: [ + OP.ZERO_HASH, + ], + gasUsed: 20, + }, + }, + { + code: OP.COINBASE, + result: { + errno: 6, + }, + }, + { + code: OP.TIMESTAMP, + result: { + stack: [ + OP.ZERO_HASH, + ], + gasUsed: 2, + }, + }, + { + code: OP.NUMBER, + result: { + stack: [ + OP.ZERO_HASH, + ], + gasUsed: 2, + }, + }, + { + code: OP.DIFFICULTY, + result: { + errno: 6, + }, + }, + { + code: OP.GASLIMIT, + result: { + errno: 6, + }, + }, + { + code: OP.PC, + result: { + stack: [ + OP.ZERO_HASH, + ], + }, + }, + { + description: 'invalid JUMP', + code: [ + OP.PUSH1, + OP.ADD, + OP.JUMP, + ], + stack: [ + OP.ZERO_HASH, + ], + result: { + stack: [], + pc: 2, + gasUsed: 8, + errno: 5, + }, + }, + { + description: 'valid JUMP', + code: [ + OP.JUMPDEST, + OP.PUSH1, + OP.DIV, + OP.JUMP, + OP.JUMPDEST, + ], + stack: [ + OP.ZERO_HASH, + ], + pc: OP.ERROR_INDEX_OOB, + result: { + stack: [], + pc: 5, + gasUsed: 21, + }, + }, + { + description: 'invalid JUMPI', + code: [ + OP.PUSH1, + OP.ADD, + OP.PUSH1, + OP.STOP, + OP.JUMPI, + ], + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + OP.ZERO_HASH, + ], + result: { + stack: [], + pc: 4, + gasUsed: 10, + errno: 5, + }, + }, + { + description: 'valid JUMPI no-op', + code: [ + OP.PUSH1, + OP.STOP, + OP.PUSH1, + OP.STOP, + OP.JUMPI, + ], + stack: [ + OP.ZERO_HASH, + OP.ZERO_HASH, + ], + result: { + stack: [], + pc: 5, + gasUsed: 10, + }, + }, + { + description: 'valid JUMPI', + code: [ + OP.PUSH1, + '01', + OP.PUSH1, + '05', + OP.JUMPI, + OP.JUMPDEST, + ], + pc: 0, + stack: [ + ], + result: { + stack: [], + pc: 6, + gasUsed: 17, + }, + }, + { + code: OP.RETURNDATASIZE, + result: { + stack: [ + OP.ZERO_HASH, + ], + gasUsed: 2, + }, + }, + { + code: OP.CODESIZE, + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + gasUsed: 2, + }, + }, + { + code: [ + OP.CODESIZE, + OP.GAS, + OP.POP, + ], + pc: 0, + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000003', + ], + gasUsed: 6, + }, + }, + { + code: [ + OP.PUSH1, + '01', + ], + pc: 0, + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + gasUsed: 3, + }, + }, + { + code: [ + OP.PUSH2, + '01', + '02', + ], + pc: 0, + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000102', + ], + gasUsed: 3, + }, + }, + { + code: [ + OP.PUSH3, + '01', + '02', + '03', + ], + pc: 0, + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000010203', + ], + gasUsed: 3, + }, + }, + { + code: [ + OP.PUSH4, + '10', + '11', + '12', + '13', + ], + pc: 0, + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000010111213', + ], + gasUsed: 3, + }, + }, + { + code: [ + OP.PUSH5, + '10', + '11', + '12', + '13', + '14', + ], + pc: 0, + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000001011121314', + ], + gasUsed: 3, + }, + }, + { + code: [ + OP.PUSH6, + '10', + '11', + '12', + '13', + '14', + '15', + ], + pc: 0, + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000101112131415', + ], + gasUsed: 3, + }, + }, + { + code: [ + OP.PUSH7, + '10', + '11', + '12', + '13', + '14', + '15', + '16', + ], + pc: 0, + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000010111213141516', + ], + gasUsed: 3, + }, + }, + { + code: [ + OP.PUSH8, + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '00', + '00', + '17', + '18', + '19', + '20', + ], + pc: 0, + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000001011121314151600', + ], + gasUsed: 3, + }, + }, + { + code: [ + OP.PUSH9, + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '00', + '19', + '20', + ], + pc: 0, + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000101112131415161718', + ], + gasUsed: 3, + }, + }, + { + code: [ + OP.PUSH10, + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '00', + '00', + '00', + '00', + ], + pc: 0, + result: { + stack: [ + '0x0000000000000000000000000000000000000000000010111213141516000000', + ], + gasUsed: 3, + }, + }, + { + code: [ + OP.PUSH11, + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '19', + '20', + ], + pc: 0, + result: { + stack: [ + '0x0000000000000000000000000000000000000000001011121314151617181920', + ], + gasUsed: 3, + }, + }, + { + code: [ + OP.PUSH12, + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '19', + '20', + '21', + ], + pc: 0, + result: { + stack: [ + '0x0000000000000000000000000000000000000000101112131415161718192021', + ], + gasUsed: 3, + }, + }, + { + code: [ + OP.PUSH13, + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '19', + '20', + '21', + '22', + ], + pc: 0, + result: { + stack: [ + '0x0000000000000000000000000000000000000010111213141516171819202122', + ], + gasUsed: 3, + }, + }, + { + code: [ + OP.PUSH14, + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '19', + '20', + '21', + '22', + '23', + ], + pc: 0, + result: { + stack: [ + '0x0000000000000000000000000000000000001011121314151617181920212223', + ], + gasUsed: 3, + }, + }, + { + code: [ + OP.PUSH15, + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '19', + '20', + '21', + '22', + '23', + '24', + ], + pc: 0, + result: { + stack: [ + '0x0000000000000000000000000000000000101112131415161718192021222324', + ], + gasUsed: 3, + }, + }, + { + code: [ + OP.PUSH16, + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '19', + '20', + '21', + '22', + '23', + '24', + '25', + ], + pc: 0, + result: { + stack: [ + '0x0000000000000000000000000000000010111213141516171819202122232425', + ], + gasUsed: 3, + }, + }, + { + code: [ + OP.PUSH17, + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '19', + '20', + '21', + '22', + '23', + '24', + '25', + '26', + ], + pc: 0, + result: { + stack: [ + '0x0000000000000000000000000000001011121314151617181920212223242526', + ], + gasUsed: 3, + }, + }, + { + code: [ + OP.PUSH18, + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '19', + '20', + '21', + '22', + '23', + '24', + '25', + '26', + '27', + ], + pc: 0, + result: { + stack: [ + '0x0000000000000000000000000000101112131415161718192021222324252627', + ], + gasUsed: 3, + }, + }, + { + code: [ + OP.PUSH19, + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '19', + '20', + '21', + '22', + '23', + '24', + '25', + '26', + '27', + '28', + ], + pc: 0, + result: { + stack: [ + '0x0000000000000000000000000010111213141516171819202122232425262728', + ], + gasUsed: 3, + }, + }, + { + code: [ + OP.PUSH20, + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '19', + '20', + '21', + '22', + '23', + '24', + '25', + '26', + '27', + '28', + '29', + ], + pc: 0, + result: { + stack: [ + '0x0000000000000000000000001011121314151617181920212223242526272829', + ], + gasUsed: 3, + }, + }, + { + code: [ + OP.PUSH21, + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '19', + '20', + '21', + '22', + '23', + '24', + '25', + '26', + '27', + '28', + '29', + '30', + '00', + ], + pc: 0, + result: { + stack: [ + '0x0000000000000000000000101112131415161718192021222324252627282930', + ], + gasUsed: 3, + }, + }, + { + code: [ + OP.PUSH22, + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '19', + '20', + '21', + '22', + '23', + '24', + '25', + '26', + '27', + '28', + '29', + '30', + '31', + '00', + '32', + ], + pc: 0, + result: { + stack: [ + '0x0000000000000000000010111213141516171819202122232425262728293031', + ], + gasUsed: 3, + }, + }, + { + code: [ + OP.PUSH23, + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '19', + '20', + '21', + '22', + '23', + '24', + '25', + '26', + '27', + '28', + '29', + ], + pc: 0, + result: { + stack: [ + '0x0000000000000000001011121314151617181920212223242526272829000000', + ], + gasUsed: 3, + }, + }, + { + code: [ + OP.PUSH24, + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '19', + '20', + '21', + '22', + '23', + '24', + '25', + '26', + '27', + '28', + '29', + '30', + '31', + '32', + '33', + ], + pc: 0, + result: { + stack: [ + '0x0000000000000000101112131415161718192021222324252627282930313233', + ], + gasUsed: 3, + }, + }, + { + code: [ + OP.PUSH25, + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '19', + '20', + '21', + '22', + '23', + '24', + '25', + '26', + '27', + '28', + '29', + ], + pc: 0, + result: { + stack: [ + '0x0000000000000010111213141516171819202122232425262728290000000000', + ], + gasUsed: 3, + }, + }, + { + code: [ + OP.PUSH26, + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '19', + '20', + '21', + '22', + '23', + '24', + '25', + '26', + '27', + '28', + '29', + '30', + ], + pc: 0, + result: { + stack: [ + '0x0000000000001011121314151617181920212223242526272829300000000000', + ], + gasUsed: 3, + }, + }, + { + code: [ + OP.PUSH27, + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '19', + '20', + '21', + '22', + '23', + '24', + '25', + '26', + '27', + '28', + '29', + '31', + '32', + '33', + '34', + '35', + ], + pc: 0, + result: { + stack: [ + '0x0000000000101112131415161718192021222324252627282931323334350000', + ], + gasUsed: 3, + }, + }, + { + code: [ + OP.PUSH28, + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '19', + '20', + '21', + '22', + '23', + '24', + '25', + '26', + '27', + '28', + '29', + '41', + ], + pc: 0, + result: { + stack: [ + '0x0000000010111213141516171819202122232425262728294100000000000000', + ], + gasUsed: 3, + }, + }, + { + code: [ + OP.PUSH29, + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '19', + '20', + '21', + '22', + '23', + '24', + '25', + '26', + '27', + '28', + '29', + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '00', + '19', + ], + pc: 0, + result: { + stack: [ + '0x0000001011121314151617181920212223242526272829101112131415161718', + ], + gasUsed: 3, + }, + }, + { + code: [ + OP.PUSH30, + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '19', + '20', + '21', + '22', + '23', + '24', + '25', + '26', + '27', + '28', + '29', + ], + pc: 0, + result: { + stack: [ + '0x0000101112131415161718192021222324252627282900000000000000000000', + ], + gasUsed: 3, + }, + }, + { + code: [ + OP.PUSH31, + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '19', + '20', + '21', + '22', + '23', + '24', + '25', + '26', + '27', + '28', + '29', + '30', + '31', + '32', + '33', + '34', + '35', + '36', + '37', + '38', + '39', + '40', + ], + pc: 0, + result: { + stack: [ + '0x0010111213141516171819202122232425262728293031323334353637383940', + ], + gasUsed: 3, + }, + }, + { + code: [ + OP.PUSH32, + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '19', + '20', + '21', + '22', + '23', + '24', + '25', + '26', + '27', + '28', + '29', + '30', + '31', + '32', + '33', + '34', + '35', + '36', + '37', + '38', + '39', + '40', + '41', + ], + pc: 0, + result: { + stack: [ + '0x1011121314151617181920212223242526272829303132333435363738394041', + ], + gasUsed: 3, + }, + }, + { + code: OP.CALLDATALOAD, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + data: '0x123456', + result: { + stack: [ + '0x3456000000000000000000000000000000000000000000000000000000000000', + ], + gasUsed: 3, + }, + }, + { + description: 'CALLDATALOAD - out of range', + code: OP.CALLDATALOAD, + stack: [ + '0x000000000000000000000000000000000000000000000000000000000000ffff', + ], + data: '0x123456', + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000000', + ], + gasUsed: 3, + }, + }, + { + code: OP.CALLDATASIZE, + data: '0x1234', + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000002', + ], + gasUsed: 2, + }, + }, + { + code: OP.MLOAD, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + memory: [ + '0x0000000000000000000000000000000000000000000000000000000000000066', + '0x7700000000000000000000000000000000000000000000000000000000000000', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000006677', + ], + gasUsed: 3, + }, + }, + { + description: 'MLOAD - out of gas', + code: OP.MLOAD, + gasRemaining: 3, + stack: [ + '0x000000000000000000000000000000000000000000000000000000000000ffff', + ], + memory: [ + ], + result: { + stack: [ + ], + memory: [], + gasUsed: 3, + errno: 13, + pc: 0, + }, + }, + { + code: OP.MSTORE, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000005567', + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + result: { + memory: [ + '0x0000000000000000000000000000000000000000000000000000000000000055', + '0x6700000000000000000000000000000000000000000000000000000000000000', + ], + gasUsed: 9, + }, + }, + { + description: 'MSTORE - out of gas', + gasRemaining: 3, + code: OP.MSTORE, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000005567', + '0x000000000000000000000000000000000000000000000000000000000000ffff', + ], + result: { + stack: [ + ], + memory: [ + ], + gasUsed: 3, + errno: 13, + pc: 0, + }, + }, + { + code: OP.MSTORE8, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000005567', + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + result: { + memory: [ + '0x0067000000000000000000000000000000000000000000000000000000000000', + ], + gasUsed: 6, + }, + }, + { + description: 'MSTORE8 - out of gas', + code: OP.MSTORE8, + gasRemaining: 3, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000005567', + '0x00000000000000000000000000000000000000000000000000000000000000ff', + ], + result: { + stack: [], + memory: [], + gasUsed: 3, + errno: 13, + pc: 0, + }, + }, + { + code: OP.MSIZE, + memory: [ + '0x0000000000000000000000000000000000000000000000000000000000000055', + '0x0000000000000000000000000000000000000000000000000000000000000067', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000040', + ], + gasUsed: 2, + }, + }, + { + code: OP.CALLDATACOPY, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + data: '0x06397872cdd21945455a7fdc7921e2db7bd8e402607cad66279e899f6ae9b1da', + result: { + memory: [ + '0x0072cdd219000000000000000000000000000000000000000000000000000000', + ], + gasUsed: 9, + }, + }, + { + description: 'CALLDATACOPY - out of gas', + code: OP.CALLDATACOPY, + gasRemaining: 8, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + data: '0x06397872cdd21945455a7fdc7921e2db7bd8e402607cad66279e899f6ae9b1da', + result: { + stack: [ + ], + memory: [ + ], + gasUsed: 8, + errno: 13, + }, + }, + { + code: [ + OP.GAS, + OP.POP, + OP.CODECOPY, + ], + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + result: { + memory: [ + '0x0050390000000000000000000000000000000000000000000000000000000000', + ], + gasUsed: 9, + }, + }, + { + description: 'CODECOPY - out of gas', + code: [ + OP.CODECOPY, + ], + gasRemaining: 8, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + result: { + stack: [ + ], + memory: [ + ], + gasUsed: 8, + errno: 13, + }, + }, + { + code: OP.SSTORE, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000005', + OP.ZERO_HASH, + ], + result: { + errno: 6, + }, + }, + { + code: OP.SLOAD, + stack: [ + OP.ZERO_HASH, + ], + result: { + errno: 6, + }, + }, + { + code: OP.LOG0, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000002', + ], + result: { + errno: 6, + }, + }, + { + code: OP.LOG1, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000567', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000002', + ], + result: { + errno: 6, + }, + }, + { + code: OP.LOG2, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000123', + '0x0000000000000000000000000000000000000000000000000000000000000567', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000002', + ], + result: { + errno: 6, + }, + }, + { + code: OP.LOG3, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000987', + '0x0000000000000000000000000000000000000000000000000000000000000123', + '0x0000000000000000000000000000000000000000000000000000000000000567', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000002', + ], + result: { + errno: 6, + }, + }, + { + code: OP.LOG4, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000294', + '0x0000000000000000000000000000000000000000000000000000000000000987', + '0x0000000000000000000000000000000000000000000000000000000000000123', + '0x0000000000000000000000000000000000000000000000000000000000000567', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000002', + ], + result: { + errno: 6, + }, + }, + { + code: OP.RETURN, + stack: [ + OP.ZERO_HASH, + OP.ZERO_HASH, + ], + result: { + stack: [], + pc: 0, + gasUsed: 0, + }, + }, + { + description: 'RETURN - out of gas', + code: OP.RETURN, + stack: [ + '0x00000000000000000000000000000000000000000000000000000000000000ff', + OP.ZERO_HASH, + ], + gasRemaining: 2, + result: { + stack: [], + pc: 0, + gasUsed: 2, + errno: 13, + }, + }, + { + code: OP.REVERT, + stack: [ + OP.ZERO_HASH, + OP.ZERO_HASH, + ], + result: { + stack: [], + errno: 7, + pc: 0, + gasUsed: 0, + }, + }, + { + description: 'REVERT - out of gas', + gasRemaining: 2, + code: OP.REVERT, + stack: [ + '0x000000000000000000000000000000000000000000000000000000000000ffff', + OP.ZERO_HASH, + ], + result: { + stack: [], + memory: [], + errno: 13, + pc: 0, + gasUsed: 2, + }, + }, + { + code: OP.RETURNDATACOPY, + stack: [ + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + ], + result: { + stack: [], + pc: 1, + gasUsed: 3, + }, + }, + { + description: 'RETURNDATACOPY - out of gas', + code: OP.RETURNDATACOPY, + gasRemaining: 3, + stack: [ + '0x00000000000000000000000000000000000000000000000000000000000000ff', + OP.ZERO_HASH, + OP.ZERO_HASH, + ], + result: { + stack: [ + ], + pc: 0, + gasUsed: 3, + errno: 13, + }, + }, + { + code: OP.SHA3, + stack: [ + OP.ZERO_HASH, + OP.ZERO_HASH, + ], + result: { + stack: [ + '0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470', + ], + gasUsed: 30, + }, + }, + { + description: 'SHA3 - out of gas', + code: OP.SHA3, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000010', + OP.ZERO_HASH, + ], + gasRemaining: 31, + result: { + stack: [ + ], + gasUsed: 31, + errno: 13, + }, + }, + { + code: OP.SHA3, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000010', + OP.ZERO_HASH, + ], + memory: [ + '0x0102030405060708091011121314151617181920212223242526272829303132', + ], + result: { + stack: [ + '0x70edd8238efca5c35ffe1789e45e4195b783903594b6f9dc86e857ae50703b4c', + ], + gasUsed: 36, + }, + }, + { + code: OP.SHA3, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000021', + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + memory: [ + '0x0102030405060708091011121314151617181920212223242526272829303132', + '0x0102030405060708091011121314151617181920212223242526272829303132', + ], + result: { + stack: [ + '0x5e111654ad5f024c13a4332dfe1eb6a750999d2c36b3cc2ba2e5b2a79181c50b', + ], + gasUsed: 42, + }, + }, + { + code: [ + OP.MSTORE, + OP.MSTORE, + OP.MSTORE, + OP.MSTORE, + ], + stack: [ + '0x000000000000000000000000000000000000000000000703c19694461d800000', + '0x0000000000000000000000000000000000000000000000000000000000000022', + '0x00000000030a1ffb899c11400000000000000000000000000000000000000000', + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000004267', + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000ffc', + '0x000000000000000000000000000000000000000000000000000000000000000c', + ], + pc: 0, + result: { + gasUsed: 21, + memory: [ + '0x0000000000000000030a1ffb899c114000000000000000000000000000000000', + '0x0000000000000000000000000000000000000000000000000703c19694461d80', + '0x0000000000000000000000000000000000000000000000000000000000000000', + ], + }, + }, + { + code: [ + OP.MSTORE, + OP.MSTORE, + OP.MSTORE, + OP.MSTORE, + ], + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000021', + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000021', + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000021', + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000021', + '0x0000000000000000000000000000000000000000000000000000000000000015', + ], + pc: 0, + result: { + gasUsed: 18, + }, + }, + { + code: [ + OP.MSTORE, + OP.MSTORE, + OP.MSTORE, + OP.MSTORE, + ], + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000021', + '0x0000000000000000000000000000000000000000000000000000000000000022', + '0x0000000000000000000000000000000000000000000000000000000000000021', + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000021', + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000021', + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + pc: 0, + result: { + gasUsed: 21, + }, + }, + { + code: [ + OP.MSTORE, + OP.MSTORE, + OP.MSTORE, + OP.MSTORE, + ], + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000021', + '0x0000000000000000000000000000000000000000000000000000000000000f3b', + '0x0000000000000000000000000000000000000000000000000000000000000021', + '0x00000000000000000000000000000000000000000000000000000000000003ac', + '0x0000000000000000000000000000000000000000000000000000000000000021', + '0x0000000000000000000000000000000000000000000000000000000000000158', + '0x0000000000000000000000000000000000000000000000000000000000000021', + '0x0000000000000000000000000000000000000000000000000000000000000020', + ], + pc: 0, + result: { + gasUsed: 410, + }, + }, + { + code: [ + OP.MSTORE, + OP.MSTORE, + OP.MSTORE, + OP.MSTORE, + ], + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000021', + '0x0000000000000000000000000000000000000000000000000000000000001af3', + '0x0000000000000000000000000000000000000000000000000000000000000021', + '0x0000000000000000000000000000000000000000000000000000000000000860', + '0x0000000000000000000000000000000000000000000000000000000000000021', + '0x0000000000000000000000000000000000000000000000000000000000000309', + '0x0000000000000000000000000000000000000000000000000000000000000021', + '0x00000000000000000000000000000000000000000000000000000000000001f0', + ], + pc: 0, + result: { + gasUsed: 754, + }, + }, + { + code: [ + OP.MSTORE8, + OP.MSTORE8, + OP.MSTORE8, + OP.MSTORE8, + ], + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000021', + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000021', + '0x000000000000000000000000000000000000000000000000000000000000001f', + '0x0000000000000000000000000000000000000000000000000000000000000021', + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000021', + '0x00000000000000000000000000000000000000000000000000000000000002a0', + ], + pc: 0, + result: { + gasUsed: 78, + }, + }, + { + code: [ + OP.MSTORE8, + OP.MSTORE8, + OP.MSTORE8, + OP.MSTORE8, + ], + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000021', + '0x00000000000000000000000000000000000000000000000000000000000003cc', + '0x0000000000000000000000000000000000000000000000000000000000000021', + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000021', + '0x000000000000000000000000000000000000000000000000000000000000001f', + '0x0000000000000000000000000000000000000000000000000000000000000021', + '0x0000000000000000000000000000000000000000000000000000000000000020', + ], + pc: 0, + result: { + gasUsed: 106, + }, + }, + { + code: [ + OP.GAS, + OP.GAS, + OP.CODECOPY, + OP.CODECOPY, + ], + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + pc: 2, + result: { + gasUsed: 15, + }, + }, + { + code: OP.SELFDESTRUCT, + stack: [ + '0x0000000000000000000000001f572e5295c57f15886f9b263e2f6d2d6c7b5ec6', + ], + result: { + errno: 6, + }, + }, + { + code: OP.CALL, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000040', + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000020', + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000001f572e5295c57f15886f9b263e2f6d2d6c7b5ec6', + '0x0000000000000000000000000000000000000000000000000000000000002710', + ], + result: { + errno: 6, + }, + }, + { + code: OP.DELEGATECALL, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000020', + OP.ZERO_HASH, + OP.ZERO_HASH, + '0x0000000000000000000000001f572e5295c57f15886f9b263e2f6d2d6c7b5ec6', + '0x0000000000000000000000000000000000000000000000000000000000002710', + ], + result: { + errno: 6, + }, + }, + { + code: OP.CALLCODE, + stack: [ + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + ], + result: { + errno: 6, + }, + }, + { + description: 'STATICCALL - out of gas', + gasRemaining: 23, + code: OP.STATICCALL, + stack: [ + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000002710', + ], + result: { + stack: [ + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000002710', + ], + memory: [], + gasUsed: 23, + errno: 13, + pc: 0, + }, + }, + { + description: 'STATICCALL - out of gas taking memory costs into account', + gasRemaining: 703, + code: OP.STATICCALL, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000fff', + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000002710', + ], + result: { + stack: [], + memory: [], + gasUsed: 703, + errno: 13, + pc: 0, + }, + }, + { + description: 'STATICCALL ECRECOVER - not enough gas', + code: OP.STATICCALL, + stack: [ + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000010', + ], + result: { + stack: [ + OP.ZERO_HASH, + ], + memory: [], + gasUsed: 716, + pc: 1, + errno: 0, + }, + }, + { + description: 'STATICCALL ECRECOVER without input/output', + code: OP.STATICCALL, + stack: [ + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000002710', + ], + result: { + gasUsed: 3700, + }, + }, + { + description: 'STATICCALL ECRECOVER with input/output', + code: OP.STATICCALL, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000040', + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000020', + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000002710', + ], + result: { + gasUsed: 3709, + }, + }, + { + description: 'STATICCALL SHA256 - not enough gas', + code: OP.STATICCALL, + stack: [ + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000000010', + ], + result: { + stack: [ + OP.ZERO_HASH, + ], + memory: [], + gasUsed: 716, + pc: 1, + errno: 0, + }, + }, + { + description: 'STATICCALL SHA256 without input/output', + code: OP.STATICCALL, + stack: [ + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000002710', + ], + result: { + gasUsed: 760, + }, + }, + { + description: 'STATICCALL SHA256 with input/output', + code: OP.STATICCALL, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000040', + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000020', + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000002', + '0x0000000000000000000000000000000000000000000000000000000000002710', + ], + result: { + gasUsed: 781, + }, + }, + { + description: 'STATICCALL RIPEMD160 - not enough gas', + code: OP.STATICCALL, + stack: [ + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000010', + ], + result: { + stack: [ + OP.ZERO_HASH, + ], + memory: [], + gasUsed: 716, + pc: 1, + errno: 0, + }, + }, + { + description: 'STATICCALL RIPEMD160 without input/output', + code: OP.STATICCALL, + stack: [ + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000002710', + ], + result: { + gasUsed: 1300, + }, + }, + { + description: 'STATICCALL RIPEMD160 with input/output', + code: OP.STATICCALL, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000040', + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000020', + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000002710', + ], + result: { + gasUsed: 1429, + }, + }, + { + description: 'STATICCALL IDENTITY - not enough gas', + code: OP.STATICCALL, + stack: [ + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + result: { + stack: [ + OP.ZERO_HASH, + ], + memory: [], + gasUsed: 701, + pc: 1, + errno: 0, + }, + }, + { + description: 'STATICCALL IDENTITY without input/output', + code: OP.STATICCALL, + stack: [ + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000002710', + ], + result: { + gasUsed: 715, + }, + }, + { + description: 'STATICCALL IDENTITY with input/output', + code: OP.STATICCALL, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000040', + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000020', + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000002710', + ], + result: { + gasUsed: 727, + }, + }, + { + description: 'STATICCALL, not to a precompile', + code: OP.STATICCALL, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000020', + OP.ZERO_HASH, + OP.ZERO_HASH, + '0x0000000000000000000000001f572e5295c57f15886f9b263e2f6d2d6c7b5ec6', + '0x0000000000000000000000000000000000000000000000000000000000002710', + ], + result: { + stack: [ + OP.ZERO_HASH, + ], + }, + }, + { + description: 'STATICCALL with limited gas', + code: OP.STATICCALL, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000020', + OP.ZERO_HASH, + OP.ZERO_HASH, + '0x0000000000000000000000001f572e5295c57f15886f9b263e2f6d2d6c7b5ec6', + '0x0000000000000000000000000000000000000000000000000000000000002710', + ], + gasRemaining: 706, + result: { + stack: [ + OP.ZERO_HASH, + ], + }, + }, + { + description: 'CREATE2 - not supported', + code: OP.CREATE2, + stack: [ + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + ], + result: { + stack: [ + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + ], + memory: [], + errno: 6, + pc: 0, + }, + }, + { + description: 'CREATE with send value and failed', + code: OP.CREATE, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000010', + OP.ZERO_HASH, + '0x000000000000000000000000000000000000000000000000000000000000007b', + ], + result: { + errno: 6, + }, + }, + { + description: 'CALLDATACOPY expanding memory', + code: OP.CALLDATACOPY, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000004', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x0000000000000000000000000000000000000000000000000000000000000090', + ], + data: '0x06397872cdd21945455a7fdc7921e2db7bd8e402607cad66279e899f6ae9b1da', + result: { + gasUsed: 21, + }, + }, + { + description: 'RETURN - grows memory', + code: OP.RETURN, + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000004', + OP.ZERO_HASH, + ], + result: { + gasUsed: 3, + }, + }, + { + code: OP.STOP, + result: { + pc: 0, + }, + }, + { + code: [ + OP.EXTCODEHASH, + ], + stack: [ + '0x0002030405060708091011121314151617181920212223242526272829303100', + ], + pc: 0, + result: { + errno: 6, + }, + }, + { + code: [ + OP.EXTCODESIZE, + ], + stack: [ + '0x0002030405060708091011121314151617181920212223242526272829303100', + ], + pc: 0, + result: { + errno: 6, + }, + }, + { + code: [ + OP.EXTCODECOPY, + ], + stack: [ + '0x0002030405060708091011121314151617181920212223242526272829303100', + '0x0002030405060708091011121314151617181920212223242526272829303100', + '0x0002030405060708091011121314151617181920212223242526272829303100', + '0x0002030405060708091011121314151617181920212223242526272829303100', + ], + pc: 0, + result: { + errno: 6, + }, + }, + { + description: 'STATICCALL MODEXP - base 3, exponent 65535, modulus 2**255', + code: OP.STATICCALL, + memory: [ + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x000000000000000000000000000000000000000000000000000000000000ffff', + '0x8000000000000000000000000000000000000000000000000000000000000000', + OP.ZERO_HASH, + ], + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x00000000000000000000000000000000000000000000000000000000000000c0', + '0x00000000000000000000000000000000000000000000000000000000000000c0', + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x000000000000000000000000000000000000000000000000000000000000ffff', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + memory: [ + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x000000000000000000000000000000000000000000000000000000000000ffff', + '0x8000000000000000000000000000000000000000000000000000000000000000', + '0x3b01b01ac41f2d6e917c6d6a221ce793802469026d9ab7578fa2e79e4da6aaab', + ], + gasUsed: 1468, + }, + }, + { + description: 'STATICCALL MODEXP - base 3, exponent 65535, modulus 2**255 out of gas', + code: OP.STATICCALL, + memory: [ + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x000000000000000000000000000000000000000000000000000000000000ffff', + '0x8000000000000000000000000000000000000000000000000000000000000000', + OP.ZERO_HASH, + ], + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x00000000000000000000000000000000000000000000000000000000000000c0', + '0x00000000000000000000000000000000000000000000000000000000000000c0', + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x000000000000000000000000000000000000000000000000000000000000ffff', + ], + gasRemaining: 1200, + result: { + stack: [ + OP.ZERO_HASH, + ], + }, + }, + { + description: 'STATICCALL MODEXP (2) - test with modules length of 64', + code: OP.STATICCALL, + memory: [ + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000040', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x000000000000000000000000000000000000000000000000000000000000ffff', + '0x8000000000000000000000000000000000000000000000000000000000000000', + OP.ZERO_HASH, + OP.ZERO_HASH, + ], + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x00000000000000000000000000000000000000000000000000000000000000e0', + '0x00000000000000000000000000000000000000000000000000000000000000e0', + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000005', + '0x000000000000000000000000000000000000000000000000000000000000ffff', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + memory: [ + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000040', + '0x0000000000000000000000000000000000000000000000000000000000000003', + '0x000000000000000000000000000000000000000000000000000000000000ffff', + '0x8000000000000000000000000000000000000000000000000000000000000000', + OP.ZERO_HASH, + '0x3fcecc35efb6e7db0528b52021556895467b5a5abac19c2ef35ca4fc5add9e09', + ], + gasUsed: 3772, + }, + }, + { + description: 'STATICCALL EC_ADD valid points', + code: OP.STATICCALL, + memory: [ + '0x17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa9', + '0x01e0559bacb160664764a357af8a9fe70baa9258e0b959273ffc5718c6d4cc7c', + '0x039730ea8dff1254c0fee9c0ea777d29a9c710b7e616683f194f18c43b43b869', + '0x073a5ffcc6fc7a28c30723d6e58ce577356982d65b833a5a5c15bf9024b43d98', + OP.ZERO_HASH, + OP.ZERO_HASH, + ], + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000040', + '0x0000000000000000000000000000000000000000000000000000000000000080', + '0x0000000000000000000000000000000000000000000000000000000000000080', + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x000000000000000000000000000000000000000000000000000000000000ffff', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + memory: [ + '0x17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa9', + '0x01e0559bacb160664764a357af8a9fe70baa9258e0b959273ffc5718c6d4cc7c', + '0x039730ea8dff1254c0fee9c0ea777d29a9c710b7e616683f194f18c43b43b869', + '0x073a5ffcc6fc7a28c30723d6e58ce577356982d65b833a5a5c15bf9024b43d98', + '0x15bf2bb17880144b5d1cd2b1f46eff9d617bffd1ca57c37fb5a49bd84e53cf66', + '0x049c797f9ce0d17083deb32b5e36f2ea2a212ee036598dd7624c168993d1355f', + ], + gasUsed: 1200, + }, + }, + { + description: 'STATICCALL EC_ADD invalid points', + code: OP.STATICCALL, + memory: [ + '0x17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa9', + '0x1e0559bacb160664764a357af8a9fe70baa9258e0b959273ffc5718c6d4cc7c0', + '0x39730ea8dff1254c0fee9c0ea777d29a9c710b7e616683f194f18c43b43b8690', + '0x073a5ffcc6fc7a28c30723d6e58ce577356982d65b833a5a5c15bf9024b43d98', + OP.ZERO_HASH, + OP.ZERO_HASH, + ], + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000040', + '0x0000000000000000000000000000000000000000000000000000000000000080', + '0x0000000000000000000000000000000000000000000000000000000000000080', + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000006', + '0x00000000000000000000000000000000000000000000000000000000000003e8', + ], + result: { + stack: [ + OP.ZERO_HASH, + ], + gasUsed: 1700, + }, + }, + { + description: 'STATICCALL EC_MUL valid', + code: OP.STATICCALL, + memory: [ + '0x17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa9', + '0x01e0559bacb160664764a357af8a9fe70baa9258e0b959273ffc5718c6d4cc7c', + '0x073a5ffcc6fc7a28c30723d6e58ce577356982d65b833a5a5c15bf9024b43d98', + OP.ZERO_HASH, + OP.ZERO_HASH, + ], + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000040', + '0x0000000000000000000000000000000000000000000000000000000000000060', + '0x0000000000000000000000000000000000000000000000000000000000000060', + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x000000000000000000000000000000000000000000000000000000000000ffff', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + memory: [ + '0x17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa9', + '0x01e0559bacb160664764a357af8a9fe70baa9258e0b959273ffc5718c6d4cc7c', + '0x073a5ffcc6fc7a28c30723d6e58ce577356982d65b833a5a5c15bf9024b43d98', + '0x0e798bc0c484ae573104ce6c79456b69bf2370be86b4db8fda62c1e26a87dbe9', + '0x109effc4074f2ff70f3fc60590768eca4dfd620eb6c44405f31f39bd7eaad5e1', + ], + gasUsed: 40700, + }, + }, + { + description: 'STATICCALL EC_MUL invalid', + code: OP.STATICCALL, + memory: [ + '0x17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa9', + '0x1e0559bacb160664764a357af8a9fe70baa9258e0b959273ffc5718c6d4cc7c0', + '0x073a5ffcc6fc7a28c30723d6e58ce577356982d65b833a5a5c15bf9024b43d98', + OP.ZERO_HASH, + OP.ZERO_HASH, + ], + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000040', + '0x0000000000000000000000000000000000000000000000000000000000000060', + '0x0000000000000000000000000000000000000000000000000000000000000060', + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000007', + '0x000000000000000000000000000000000000000000000000000000000000ffff', + ], + result: { + stack: [ + OP.ZERO_HASH, + ], + gasUsed: 66235, + }, + }, + { + description: 'STATICCALL EC_PAIRING valid K1', + code: OP.STATICCALL, + memory: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + ], + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x00000000000000000000000000000000000000000000000000000000000000c0', + '0x00000000000000000000000000000000000000000000000000000000000000c0', + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000ffffff', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + memory: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + gasUsed: 180700, + }, + }, + { + description: 'STATICCALL EC_PAIRING valid K2', + code: OP.STATICCALL, + memory: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + ], + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000180', + '0x0000000000000000000000000000000000000000000000000000000000000180', + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000ffffff', + ], + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + memory: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + gasUsed: 260700, + }, + }, + { + description: 'STATICCALL EC_PAIRING invalid', + code: OP.STATICCALL, + memory: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000001', + OP.ZERO_HASH, + OP.ZERO_HASH, + OP.ZERO_HASH, + ], + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x00000000000000000000000000000000000000000000000000000000000000c0', + '0x00000000000000000000000000000000000000000000000000000000000000c0', + OP.ZERO_HASH, + '0x0000000000000000000000000000000000000000000000000000000000000008', + '0x0000000000000000000000000000000000000000000000000000000000ffffff', + ], + result: { + stack: [ + OP.ZERO_HASH, + ], + gasUsed: 16777915, + }, + }, { description: 'STATICCALL balanceOf - successful read', code: OP.STATICCALL, @@ -4205,24 +4205,20 @@ module.exports = [ ]), } }, - - - // read 0 from token bag - // - // { - // description: 'invalid opcode', - // code: [ - // OP.TIMESTAMP, - // '48', - // OP.GAS, - // ], - // pc: 0, - // result: { - // stack: [ - // OP.ZERO_HASH, - // ], - // gasUsed: 2, - // errno: 4, - // }, - // }, + { + description: 'invalid opcode', + code: [ + OP.TIMESTAMP, + '48', + OP.GAS, + ], + pc: 0, + result: { + stack: [ + OP.ZERO_HASH, + ], + gasUsed: 2, + errno: 4, + }, + }, ]; diff --git a/test/fixtures/runtimeGasUsed.js b/test/fixtures/runtimeGasUsed.js index c92165be..584604fa 100644 --- a/test/fixtures/runtimeGasUsed.js +++ b/test/fixtures/runtimeGasUsed.js @@ -1,8 +1,201 @@ 'use strict'; module.exports = [ - 115032, - 119533, + 90953, + 90987, + 91017, + 91051, + 91083, + 91115, + 91147, + 91874, + 91906, + 91569, + 91779, + 91989, + 92199, + 98079, + 91275, + 92253, + 91337, + 91369, + 91273, + 91433, + 90777, + 91497, + 91529, + 91561, + 92825, + 91625, + 91593, + 91689, + 91721, + 92133, + 92753, + 106953, + 107049, + 107081, + 107049, + 107081, + 107177, + 107209, + 107241, + 107209, + 107305, + 107337, + 107369, + 107401, + 107433, + 107465, + 93725, + 94706, + 95622, + 96603, + 97583, + 98628, + 99545, + 100590, + 101507, + 102552, + 103469, + 104450, + 105495, + 106412, + 107457, + 108438, + 91979, + 90459, + 90523, + 90555, + 90512, + 89850, + 91532, + 90074, + 90960, + 90928, + 90170, + 90202, + 91373, + 91847, + 109001, + 92604, + 91572, + 105211, + 90803, + 90649, + 98294, + 92327, + 92327, + 92327, + 92263, + 92327, + 92327, + 92327, + 93739, + 93739, + 93739, + 92327, + 92327, + 92327, + 92327, + 92327, + 92327, + 92263, + 92327, + 92327, + 92327, + 93739, + 93747, + 92327, + 92335, + 92327, + 92327, + 92335, + 92327, + 93835, + 92327, + 92359, + 92433, + 91880, + 91853, + 90991, + 95209, + 90949, + 94113, + 91730, + 93196, + 91698, + 93770, + 97186, + 94176, + 94983, + 91884, + 92414, + 91499, + 93955, + 95000, + 95980, + 97025, + 98133, + 93288, + 92791, + 93448, + 93000, + 92480, + 91916, + 92233, + 90766, + 95858, + 99164, + 113879, + 111355, + 112252, + 162798, + 200880, + 118529, + 122204, + 102286, + 94227, + 101180, + 99180, + 98465, + 96705, + 102212, + 103885, + 108795, + 125618, + 103979, + 105938, + 122648, + 104005, + 106376, + 123195, + 104031, + 104395, + 121183, + 105628, + 105335, + 95843, + 94927, + 98761, + 93695, + 88150, + 93067, + 92939, + 101256, + 129394, + 127465, + 133362, + 136310, + 4363961650723556, + 172253, + 4363961650722157, + 308434, + 397521, + 4363961650705207, + 115096, + 119597, 119427, 121147, - 134055 + 134055, + 96219 ]; \ No newline at end of file From 63c8899bc3181f35be54387a2a339b0adcd4df87 Mon Sep 17 00:00:00 2001 From: Jan Date: Mon, 6 Jan 2020 14:38:21 +0100 Subject: [PATCH 08/12] Linting... --- contracts/EVMRuntime.sol | 13 +- contracts/EVMTokenBag.slb | 174 ++++++++------- test/contracts/ethereumRuntime.js | 23 +- test/fixtures/runtime.js | 346 +++++++++++++++--------------- test/helpers/tokenBag.js | 54 ++--- utils/EthereumRuntimeAdapter.js | 4 +- utils/constants.js | 4 +- 7 files changed, 302 insertions(+), 316 deletions(-) diff --git a/contracts/EVMRuntime.sol b/contracts/EVMRuntime.sol index 17aa0136..e66cb653 100644 --- a/contracts/EVMRuntime.sol +++ b/contracts/EVMRuntime.sol @@ -20,21 +20,10 @@ contract EVMRuntime is EVMConstants { // bridge has to check approvals // bridge has to convert color to address // we are assuming all token calls cost 0 for now - // gas in test??? // find correct funcSigs - // how to deal with readData failure - // we assume caller is always the sppending condition - // create a tokenBag (or new name) manipulation library function getSig(bytes memory _msgData) internal pure returns (bytes4) { - return bytes4(_msgData[3]) >> 24 | bytes4(_msgData[2]) >> 16 | bytes4(_msgData[1]) >> 8 | bytes4(_msgData[0]); - } - - struct Output { - address owner; - uint valueOrId; - bytes32 data; - address color; + return bytes4(_msgData[3]) >> 24 | bytes4(_msgData[2]) >> 16 | bytes4(_msgData[1]) >> 8 | bytes4(_msgData[0]); } // what we do not track (not complete list) diff --git a/contracts/EVMTokenBag.slb b/contracts/EVMTokenBag.slb index f2361823..70d7eeb3 100644 --- a/contracts/EVMTokenBag.slb +++ b/contracts/EVMTokenBag.slb @@ -4,101 +4,99 @@ pragma experimental ABIEncoderV2; library EVMTokenBag { - struct Output { - address owner; - uint valueOrId; - bytes32 data; - address color; - } + struct Output { + address owner; + uint valueOrId; + bytes32 data; + address color; + } - struct TokenBag { - Output[16] bag; - } - - function balanceOf( - TokenBag memory self, - address color, - address owner - ) internal pure returns (uint value) { - Output memory output; - for (uint i = 0; i < self.bag.length; i++) { - output = self.bag[i]; - if (output.owner == owner && output.color == color) { - value = output.valueOrId; - break; - } + struct TokenBag { + Output[16] bag; } - } - - function readData( - TokenBag memory self, - address color, - uint id - ) internal pure returns (bytes32 data) { - Output memory output; - for (uint i = 0; i < self.bag.length; i++) { - output = self.bag[i]; - if (output.valueOrId == id && output.color == color) { - data = output.data; - break; - } + + function balanceOf( + TokenBag memory self, + address color, + address owner + ) internal pure returns (uint value) { + Output memory output; + for (uint i = 0; i < self.bag.length; i++) { + output = self.bag[i]; + if (output.owner == owner && output.color == color) { + value = output.valueOrId; + break; + } + } } - } - - struct TransferParams { - address color; - address from; - address to; - uint value; - } - - function transfer( - TokenBag memory self, - TransferParams memory params - ) internal pure returns (bool) { - Output memory source; - Output memory dest; - - // find source - for (uint i = 0; i < self.bag.length; i++) { - if (self.bag[i].owner == params.from && self.bag[i].color == params.color) { - source = self.bag[i]; - break; - } + function readData( + TokenBag memory self, + address color, + uint id + ) internal pure returns (bytes32 data) { + Output memory output; + for (uint i = 0; i < self.bag.length; i++) { + output = self.bag[i]; + if (output.valueOrId == id && output.color == color) { + data = output.data; + break; + } + } } - - // sender does not have enough tokens to send - if (source.valueOrId < params.value) return false; - - // find dest and/or empty - uint emptyId = 1337; - for (uint i = 0; i < self.bag.length; i++) { - if (self.bag[i].owner == params.to && self.bag[i].color == params.color) { - dest = self.bag[i]; - break; - } - // check if empty slot - if (self.bag[i].owner == address(0) && emptyId == 1337) { - emptyId = i; - } + + struct TransferParams { + address color; + address from; + address to; + uint value; } - // if no dest and no empty slot, throw - if (dest.owner == address(0) && emptyId == 1337) return false; - - // if no dest, but we found an empty slot, assign empty slot to reciver - if (dest.owner == address(0)) { - self.bag[emptyId].owner = params.to; - self.bag[emptyId].color = params.color; - dest = self.bag[emptyId]; + function transfer( + TokenBag memory self, + TransferParams memory params + ) internal pure returns (bool) { + Output memory source; + Output memory dest; + // find source + for (uint i = 0; i < self.bag.length; i++) { + if (self.bag[i].owner == params.from && self.bag[i].color == params.color) { + source = self.bag[i]; + break; + } + } + + // sender does not have enough tokens to send + if (source.valueOrId < params.value) return false; + + // find dest and/or empty + uint emptyId = 1337; + for (uint i = 0; i < self.bag.length; i++) { + if (self.bag[i].owner == params.to && self.bag[i].color == params.color) { + dest = self.bag[i]; + break; + } + // check if empty slot + if (self.bag[i].owner == address(0) && emptyId == 1337) { + emptyId = i; + } + } + + // if no dest and no empty slot, throw + if (dest.owner == address(0) && emptyId == 1337) return false; + + // if no dest, but we found an empty slot, assign empty slot to reciver + if (dest.owner == address(0)) { + self.bag[emptyId].owner = params.to; + self.bag[emptyId].color = params.color; + dest = self.bag[emptyId]; + } + + // now do the state transition and return success + // OVERFLOWS??????? + source.valueOrId -= params.value; + dest.valueOrId += params.value; + return true; } - // now do the state transition and return success - // OVERFLOWS??????? - source.valueOrId -= params.value; - dest.valueOrId += params.value; - return true; - } - } diff --git a/test/contracts/ethereumRuntime.js b/test/contracts/ethereumRuntime.js index 4a0ff379..f2802c29 100644 --- a/test/contracts/ethereumRuntime.js +++ b/test/contracts/ethereumRuntime.js @@ -5,7 +5,7 @@ const assert = require('assert'); const { getCode, deployContract, deployCode } = require('./../helpers/utils'); -const { assertTokenBagEqual } = require("./../helpers/tokenBag.js"); +const { assertTokenBagEqual } = require('./../helpers/tokenBag.js'); const fixtures = require('./../fixtures/runtime'); const runtimeGasUsed = require('./../fixtures/runtimeGasUsed'); const Runtime = require('./../../utils/EthereumRuntimeAdapter'); @@ -86,23 +86,22 @@ describe('Runtime', function () { it(testName, async () => { const stack = fixture.stack || []; const mem = fixture.memory || []; - const data = fixture.data || '0x'; - const tokenBag = fixture.tokenBag || undefined; + const data = fixture.data || '0x'; + const tokenBag = fixture.tokenBag || undefined; const gasLimit = fixture.gasLimit || BLOCK_GAS_LIMIT; const gasRemaining = typeof fixture.gasRemaining !== 'undefined' ? fixture.gasRemaining : gasLimit; - const codeContract = await deployCode(code); - - const args = { + const codeContract = await deployCode(code); + const args = { code: codeContract.address, data, pc, gasLimit, gasRemaining, stack, - mem, - tokenBag, + mem, + tokenBag, }; - const res = await rt.execute(args); + const res = await rt.execute(args); const gasUsed = (await (await rt.execute(args, true)).wait()).gasUsed.toNumber(); @@ -140,9 +139,9 @@ describe('Runtime', function () { if (fixture.result.memory) { assert.deepEqual(res.mem, fixture.result.memory, 'memory'); } - if (fixture.result.tokenBag) { - assertTokenBagEqual(fixture.result.tokenBag, res.tokenBag); - } + if (fixture.result.tokenBag) { + assertTokenBagEqual(fixture.result.tokenBag, res.tokenBag); + } if (fixture.result.pc !== undefined) { assert.equal(res.pc.toNumber(), fixture.result.pc, 'pc'); } diff --git a/test/fixtures/runtime.js b/test/fixtures/runtime.js index affa21b1..f5ba6ffd 100644 --- a/test/fixtures/runtime.js +++ b/test/fixtures/runtime.js @@ -4026,185 +4026,185 @@ module.exports = [ gasUsed: 16777915, }, }, - { - description: 'STATICCALL balanceOf - successful read', - code: OP.STATICCALL, - memory: [ - '0x70a08231aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb0000000000000000', - ], - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x0000000000000000000000000000000000000000000000000000000000000018', - '0x0000000000000000000000000000000000000000000000000000000000000018', - OP.ZERO_HASH, - '0x000000000000000000000000cccccccccccccccccccccccccccccccccccccccd', - '0x0000000000000000000000000000000000000000000000000000000000ffffff', - ], - tokenBag: padTokenBag([{ - owner: '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb', - valueOrId: 0xdeadbeef, - data: OP.ZERO_HASH, - color: '0xcccccccccccccccccccccccccccccccccccccccd', - }]), - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - memory: [ - '0x70a08231aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb0000000000000000', - '0x0000000000000000000000000000000000000000deadbeef0000000000000000' - ], - } + { + description: 'STATICCALL balanceOf - successful read', + code: OP.STATICCALL, + memory: [ + '0x70a08231aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb0000000000000000', + ], + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000018', + '0x0000000000000000000000000000000000000000000000000000000000000018', + OP.ZERO_HASH, + '0x000000000000000000000000cccccccccccccccccccccccccccccccccccccccd', + '0x0000000000000000000000000000000000000000000000000000000000ffffff', + ], + tokenBag: padTokenBag([{ + owner: '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb', + valueOrId: 0xdeadbeef, + data: OP.ZERO_HASH, + color: '0xcccccccccccccccccccccccccccccccccccccccd', + }]), + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + memory: [ + '0x70a08231aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb0000000000000000', + '0x0000000000000000000000000000000000000000deadbeef0000000000000000', + ], }, - { - description: 'STATICCALL balanceOf - missed color', - code: OP.STATICCALL, - memory: [ - '0x70a08231aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb0000000000000000', - ], - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x0000000000000000000000000000000000000000000000000000000000000018', - '0x0000000000000000000000000000000000000000000000000000000000000018', - OP.ZERO_HASH, - '0x000000000000000000000000cccccccccccccccccccccccccccccccccccccccd', - '0x0000000000000000000000000000000000000000000000000000000000ffffff', - ], - tokenBag: padTokenBag([{ - owner: '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb', - valueOrId: 0xdeadbeef, - data: OP.ZERO_HASH, - color: '0xaccccccccccccccccccccccccccccccccccccccd', - }]), - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - memory: [ - '0x70a08231aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb0000000000000000', - '0x0000000000000000000000000000000000000000000000000000000000000000' - ], - } - }, + }, + { + description: 'STATICCALL balanceOf - missed color', + code: OP.STATICCALL, + memory: [ + '0x70a08231aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb0000000000000000', + ], + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000018', + '0x0000000000000000000000000000000000000000000000000000000000000018', + OP.ZERO_HASH, + '0x000000000000000000000000cccccccccccccccccccccccccccccccccccccccd', + '0x0000000000000000000000000000000000000000000000000000000000ffffff', + ], + tokenBag: padTokenBag([{ + owner: '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb', + valueOrId: 0xdeadbeef, + data: OP.ZERO_HASH, + color: '0xaccccccccccccccccccccccccccccccccccccccd', + }]), + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + memory: [ + '0x70a08231aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb0000000000000000', + '0x0000000000000000000000000000000000000000000000000000000000000000', + ], + }, + }, + { + description: 'STATICCALL balanceOf - missed address', + code: OP.STATICCALL, + memory: [ + '0x70a08231aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb0000000000000000', + ], + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000018', + '0x0000000000000000000000000000000000000000000000000000000000000018', + OP.ZERO_HASH, + '0x000000000000000000000000cccccccccccccccccccccccccccccccccccccccd', + '0x0000000000000000000000000000000000000000000000000000000000ffffff', + ], + tokenBag: padTokenBag([{ + owner: '0xfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb', + valueOrId: 0xdeadbeef, + data: OP.ZERO_HASH, + color: '0xcccccccccccccccccccccccccccccccccccccccd', + }]), + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + memory: [ + '0x70a08231aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb0000000000000000', + '0x0000000000000000000000000000000000000000000000000000000000000000', + ], + }, + }, + { + description: 'STATICCALL readData - successfull read', + code: OP.STATICCALL, + memory: [ + '0x12341234dddddddddddddddddddddddddddddddddddddddddddddddddddddddd', + '0xdddddddd00000000000000000000000000000000000000000000000000000000', + ], + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000024', + '0x0000000000000000000000000000000000000000000000000000000000000024', + OP.ZERO_HASH, + '0x000000000000000000000000cccccccccccccccccccccccccccccccccccccccd', + '0x0000000000000000000000000000000000000000000000000000000000ffffff', + ], + tokenBag: padTokenBag([{ + owner: '0xfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb', + valueOrId: '0xdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd', + data: '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee', + color: '0xcccccccccccccccccccccccccccccccccccccccd', + }]), + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + memory: [ + '0x12341234dddddddddddddddddddddddddddddddddddddddddddddddddddddddd', + '0xddddddddeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee', + '0xeeeeeeee00000000000000000000000000000000000000000000000000000000', + ], + }, + }, + { + description: 'CALL transfer - successfull transfer', + code: OP.CALL, + memory: [ + '0x22334455aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab0000000000000000', + '0x0000000000000000000000000000000000000000000000000000000000000000', + '0xdeadbeef00000000000000000000000000000000000000000000000000000000', + ], + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000044', + '0x0000000000000000000000000000000000000000000000000000000000000044', + OP.ZERO_HASH, + OP.ZERO_HASH, + '0x000000000000000000000000cccccccccccccccccccccccccccccccccccccccd', + '0x0000000000000000000000000000000000000000000000000000000000ffffff', + ], + tokenBag: padTokenBag([ { - description: 'STATICCALL balanceOf - missed address', - code: OP.STATICCALL, - memory: [ - '0x70a08231aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb0000000000000000', - ], - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x0000000000000000000000000000000000000000000000000000000000000018', - '0x0000000000000000000000000000000000000000000000000000000000000018', - OP.ZERO_HASH, - '0x000000000000000000000000cccccccccccccccccccccccccccccccccccccccd', - '0x0000000000000000000000000000000000000000000000000000000000ffffff', - ], - tokenBag: padTokenBag([{ - owner: '0xfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb', - valueOrId: 0xdeadbeef, - data: OP.ZERO_HASH, - color: '0xcccccccccccccccccccccccccccccccccccccccd', - }]), - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - memory: [ - '0x70a08231aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb0000000000000000', - '0x0000000000000000000000000000000000000000000000000000000000000000' - ], - } + owner: '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab', + valueOrId: '0x0000000000000000000000000000000000000000000000000000000000000000', + data: '0x0000000000000000000000000000000000000000000000000000000000000000', + color: '0xcccccccccccccccccccccccccccccccccccccccd', }, { - description: 'STATICCALL readData - successfull read', - code: OP.STATICCALL, - memory: [ - '0x12341234dddddddddddddddddddddddddddddddddddddddddddddddddddddddd', - '0xdddddddd00000000000000000000000000000000000000000000000000000000' - ], - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x0000000000000000000000000000000000000000000000000000000000000024', - '0x0000000000000000000000000000000000000000000000000000000000000024', - OP.ZERO_HASH, - '0x000000000000000000000000cccccccccccccccccccccccccccccccccccccccd', - '0x0000000000000000000000000000000000000000000000000000000000ffffff', - ], - tokenBag: padTokenBag([{ - owner: '0xfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabb', - valueOrId: '0xdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd', - data: '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee', - color: '0xcccccccccccccccccccccccccccccccccccccccd', - }]), - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - memory: [ - '0x12341234dddddddddddddddddddddddddddddddddddddddddddddddddddddddd', - '0xddddddddeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee', - '0xeeeeeeee00000000000000000000000000000000000000000000000000000000' - ], - } + owner: OP.DEFAULT_CALLER, + valueOrId: '0x00000000000000000000000000000000000000000000000000000000deadbeef', + data: '0x0000000000000000000000000000000000000000000000000000000000000000', + color: '0xcccccccccccccccccccccccccccccccccccccccd', }, - { - description: 'CALL transfer - successfull transfer', - code: OP.CALL, - memory: [ - '0x22334455aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab0000000000000000', - '0x0000000000000000000000000000000000000000000000000000000000000000', - '0xdeadbeef00000000000000000000000000000000000000000000000000000000' - ], - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000020', - '0x0000000000000000000000000000000000000000000000000000000000000044', - '0x0000000000000000000000000000000000000000000000000000000000000044', - OP.ZERO_HASH, - OP.ZERO_HASH, - '0x000000000000000000000000cccccccccccccccccccccccccccccccccccccccd', - '0x0000000000000000000000000000000000000000000000000000000000ffffff', - ], - tokenBag: padTokenBag([ - { - owner: '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab', - valueOrId: '0x0000000000000000000000000000000000000000000000000000000000000000', - data: '0x0000000000000000000000000000000000000000000000000000000000000000', - color: '0xcccccccccccccccccccccccccccccccccccccccd', - }, - { - owner: OP.DEFAULT_CALLER, - valueOrId: '0x00000000000000000000000000000000000000000000000000000000deadbeef', - data: '0x0000000000000000000000000000000000000000000000000000000000000000', - color: '0xcccccccccccccccccccccccccccccccccccccccd', - }, - ]), - result: { - stack: [ - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - memory: [ - '0x22334455aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab0000000000000000', - '0x0000000000000000000000000000000000000000000000000000000000000000', - '0xdeadbeef01000000000000000000000000000000000000000000000000000000', - '0x0000000000000000000000000000000000000000000000000000000000000000' - ], - tokenBag: padTokenBag([ - { - owner: '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab', - valueOrId: '0x00000000000000000000000000000000000000000000000000000000deadbeef', - data: '0x0000000000000000000000000000000000000000000000000000000000000000', - color: '0xcccccccccccccccccccccccccccccccccccccccd', - }, - { - owner: OP.DEFAULT_CALLER, - valueOrId: '0x0000000000000000000000000000000000000000000000000000000000000000', - data: '0x0000000000000000000000000000000000000000000000000000000000000000', - color: '0xcccccccccccccccccccccccccccccccccccccccd', - }, - ]), - } + ]), + result: { + stack: [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + ], + memory: [ + '0x22334455aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab0000000000000000', + '0x0000000000000000000000000000000000000000000000000000000000000000', + '0xdeadbeef01000000000000000000000000000000000000000000000000000000', + '0x0000000000000000000000000000000000000000000000000000000000000000', + ], + tokenBag: padTokenBag([ + { + owner: '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab', + valueOrId: '0x00000000000000000000000000000000000000000000000000000000deadbeef', + data: '0x0000000000000000000000000000000000000000000000000000000000000000', + color: '0xcccccccccccccccccccccccccccccccccccccccd', + }, + { + owner: OP.DEFAULT_CALLER, + valueOrId: '0x0000000000000000000000000000000000000000000000000000000000000000', + data: '0x0000000000000000000000000000000000000000000000000000000000000000', + color: '0xcccccccccccccccccccccccccccccccccccccccd', + }, + ]), }, + }, { description: 'invalid opcode', code: [ diff --git a/test/helpers/tokenBag.js b/test/helpers/tokenBag.js index 918e2f4e..ec413153 100644 --- a/test/helpers/tokenBag.js +++ b/test/helpers/tokenBag.js @@ -1,46 +1,46 @@ 'use strict'; -const assert = require("assert"); -const { utils } = require("ethers"); +const assert = require('assert'); +const { utils } = require('ethers'); const { BLOCK_GAS_LIMIT, ZERO_ADDRESS, ZERO_HASH } = require('../../utils/constants'); const TokenBagHelpers = {}; TokenBagHelpers.assertTokenBagEqual = (expected, actual) => { - expected.bag.forEach((expectedOutput, i) => { - const actualOutput = actual.bag[i]; - assert.equal( - expectedOutput.owner.replace('0x', ''), - actualOutput.owner.toLowerCase().replace('0x', '') - ); - assert.equal(expectedOutput.color, actualOutput.color.toLowerCase()); - assert.equal(expectedOutput.data, actualOutput.data); - assert.equal( - expectedOutput.valueOrId, - utils.hexZeroPad(actualOutput.valueOrId.toHexString(), 32) - ); - }); + expected.bag.forEach((expectedOutput, i) => { + const actualOutput = actual.bag[i]; + assert.equal( + expectedOutput.owner.replace('0x', ''), + actualOutput.owner.toLowerCase().replace('0x', '') + ); + assert.equal(expectedOutput.color, actualOutput.color.toLowerCase()); + assert.equal(expectedOutput.data, actualOutput.data); + assert.equal( + expectedOutput.valueOrId, + utils.hexZeroPad(actualOutput.valueOrId.toHexString(), 32) + ); + }); }; TokenBagHelpers.emptyOutput = () => { - return { - owner: ZERO_ADDRESS, - valueOrId: 0x0, - data: ZERO_HASH, - color: ZERO_ADDRESS, - }; + return { + owner: ZERO_ADDRESS, + valueOrId: 0x0, + data: ZERO_HASH, + color: ZERO_ADDRESS, + }; }; TokenBagHelpers.emptyTokenBag = () => { - return { bag: Array.apply(null, Array(16)).map(TokenBagHelpers.emptyOutput)}; + return { bag: Array.apply(null, Array(16)).map(TokenBagHelpers.emptyOutput) }; }; TokenBagHelpers.padTokenBag = (tokenBag) => { - while(tokenBag.length < 16) { - tokenBag.push(TokenBagHelpers.emptyOutput()); - } - return { bag: tokenBag }; -} + while(tokenBag.length < 16) { + tokenBag.push(TokenBagHelpers.emptyOutput()); + } + return { bag: tokenBag }; +}; module.exports = TokenBagHelpers; diff --git a/utils/EthereumRuntimeAdapter.js b/utils/EthereumRuntimeAdapter.js index 921d0291..5f2f4379 100644 --- a/utils/EthereumRuntimeAdapter.js +++ b/utils/EthereumRuntimeAdapter.js @@ -27,7 +27,7 @@ module.exports = class EthereumRuntimeAdapter { } execute ( - { code, data, pc, stepCount, gasRemaining, gasLimit, stack, mem, tokenBag }, + { code, data, pc, stepCount, gasRemaining, gasLimit, stack, mem, tokenBag }, payable ) { return (payable ? this.payableRuntimeContract.execute : this.runtimeContract.execute)( @@ -41,7 +41,7 @@ module.exports = class EthereumRuntimeAdapter { gasLimit: gasLimit || BLOCK_GAS_LIMIT, stack: stack || [], mem: mem || [], - tokenBag: tokenBag || emptyTokenBag(), + tokenBag: tokenBag || emptyTokenBag(), returnData: '0x', } ); diff --git a/utils/constants.js b/utils/constants.js index c93da1dc..8cc8f297 100644 --- a/utils/constants.js +++ b/utils/constants.js @@ -187,6 +187,6 @@ module.exports = { BLOCK_GAS_LIMIT: '0x0fffffffffffff', - ZERO_HASH: '0x0000000000000000000000000000000000000000000000000000000000000000', - ZERO_ADDRESS: "0x0000000000000000000000000000000000000000", + ZERO_HASH: '0x0000000000000000000000000000000000000000000000000000000000000000', + ZERO_ADDRESS: '0x0000000000000000000000000000000000000000', }; From 271ed084ebca4a1ae45972b5881bc67b490f2fb3 Mon Sep 17 00:00:00 2001 From: Jan Date: Mon, 6 Jan 2020 14:46:53 +0100 Subject: [PATCH 09/12] Some more linting ... --- contracts/EVMRuntime.sol | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/contracts/EVMRuntime.sol b/contracts/EVMRuntime.sol index e66cb653..ad9e3398 100644 --- a/contracts/EVMRuntime.sol +++ b/contracts/EVMRuntime.sol @@ -1565,13 +1565,13 @@ contract EVMRuntime is EVMConstants { } struct StackForCall { - uint gas; - address target; - uint value; - uint inOffset; - uint inSize; - uint retOffset; - uint retSize; + uint gas; + address target; + uint value; + uint inOffset; + uint inSize; + uint retOffset; + uint retSize; } function handleCALL(EVM memory state) internal { @@ -1710,7 +1710,7 @@ contract EVMRuntime is EVMConstants { } else if (target == 4) { handlePreC_IDENTITY(retEvm); } else if (target == 5) { - handlePreC_MODEXP(retEvm); + handlePreC_MODEXP(retEvm); } else if (target == 6) { handlePreC_ECADD(retEvm); } else if (target == 7) { From 5aa29773a7862b6ea207218e6202d6b4676848c2 Mon Sep 17 00:00:00 2001 From: Jan Date: Sat, 11 Jan 2020 20:16:31 +0100 Subject: [PATCH 10/12] Fix off-chain stepper. --- test/fixtures/runtime.js | 4 +- test/fixtures/runtimeGasUsed.js | 48 ++++++++--------- test/helpers/tokenBag.js | 78 +++++++++++++++++++++++++--- test/utils/stepper.js | 6 +++ utils/EVMRuntime.js | 92 ++++++++++++++++++++++++++++----- utils/HydratedRuntime.js | 1 + 6 files changed, 185 insertions(+), 44 deletions(-) diff --git a/test/fixtures/runtime.js b/test/fixtures/runtime.js index f5ba6ffd..47d7630f 100644 --- a/test/fixtures/runtime.js +++ b/test/fixtures/runtime.js @@ -4173,7 +4173,7 @@ module.exports = [ color: '0xcccccccccccccccccccccccccccccccccccccccd', }, { - owner: OP.DEFAULT_CALLER, + owner: '0x' + OP.DEFAULT_CALLER, valueOrId: '0x00000000000000000000000000000000000000000000000000000000deadbeef', data: '0x0000000000000000000000000000000000000000000000000000000000000000', color: '0xcccccccccccccccccccccccccccccccccccccccd', @@ -4197,7 +4197,7 @@ module.exports = [ color: '0xcccccccccccccccccccccccccccccccccccccccd', }, { - owner: OP.DEFAULT_CALLER, + owner: '0x' + OP.DEFAULT_CALLER, valueOrId: '0x0000000000000000000000000000000000000000000000000000000000000000', data: '0x0000000000000000000000000000000000000000000000000000000000000000', color: '0xcccccccccccccccccccccccccccccccccccccccd', diff --git a/test/fixtures/runtimeGasUsed.js b/test/fixtures/runtimeGasUsed.js index 584604fa..6df1ec83 100644 --- a/test/fixtures/runtimeGasUsed.js +++ b/test/fixtures/runtimeGasUsed.js @@ -10,7 +10,7 @@ module.exports = [ 91874, 91906, 91569, - 91779, + 91715, 91989, 92199, 98079, @@ -18,28 +18,28 @@ module.exports = [ 92253, 91337, 91369, - 91273, + 91401, 91433, 90777, 91497, 91529, 91561, - 92825, + 92889, 91625, - 91593, + 91657, 91689, 91721, 92133, 92753, - 106953, + 107017, 107049, 107081, - 107049, + 107113, 107081, 107177, 107209, 107241, - 107209, + 107273, 107305, 107337, 107369, @@ -50,16 +50,16 @@ module.exports = [ 94706, 95622, 96603, - 97583, + 97647, 98628, - 99545, + 99609, 100590, 101507, 102552, 103469, 104450, 105495, - 106412, + 106476, 107457, 108438, 91979, @@ -67,12 +67,12 @@ module.exports = [ 90523, 90555, 90512, - 89850, + 89786, 91532, 90074, 90960, - 90928, - 90170, + 90992, + 90106, 90202, 91373, 91847, @@ -86,7 +86,7 @@ module.exports = [ 92327, 92327, 92327, - 92263, + 92327, 92327, 92327, 92327, @@ -99,7 +99,7 @@ module.exports = [ 92327, 92327, 92327, - 92263, + 92327, 92327, 92327, 92327, @@ -113,7 +113,7 @@ module.exports = [ 92327, 93835, 92327, - 92359, + 92423, 92433, 91880, 91853, @@ -127,7 +127,7 @@ module.exports = [ 93770, 97186, 94176, - 94983, + 95047, 91884, 92414, 91499, @@ -140,7 +140,7 @@ module.exports = [ 92791, 93448, 93000, - 92480, + 92416, 91916, 92233, 90766, @@ -155,7 +155,7 @@ module.exports = [ 122204, 102286, 94227, - 101180, + 100279, 99180, 98465, 96705, @@ -165,28 +165,28 @@ module.exports = [ 125618, 103979, 105938, - 122648, + 122584, 104005, 106376, 123195, - 104031, + 103967, 104395, 121183, 105628, 105335, 95843, - 94927, + 94991, 98761, 93695, 88150, 93067, 92939, - 101256, + 101320, 129394, 127465, 133362, 136310, - 4363961650723556, + 4363961650723558, 172253, 4363961650722157, 308434, diff --git a/test/helpers/tokenBag.js b/test/helpers/tokenBag.js index ec413153..2a5a4054 100644 --- a/test/helpers/tokenBag.js +++ b/test/helpers/tokenBag.js @@ -3,6 +3,8 @@ const assert = require('assert'); const { utils } = require('ethers'); +const { BN } = require('ethereumjs-util'); + const { BLOCK_GAS_LIMIT, ZERO_ADDRESS, ZERO_HASH } = require('../../utils/constants'); const TokenBagHelpers = {}; @@ -16,10 +18,17 @@ TokenBagHelpers.assertTokenBagEqual = (expected, actual) => { ); assert.equal(expectedOutput.color, actualOutput.color.toLowerCase()); assert.equal(expectedOutput.data, actualOutput.data); - assert.equal( - expectedOutput.valueOrId, - utils.hexZeroPad(actualOutput.valueOrId.toHexString(), 32) - ); + if (actualOutput.valueOrId.toHexString) { + assert.equal( + expectedOutput.valueOrId, + utils.hexZeroPad(actualOutput.valueOrId.toHexString(), 32) + ); + } else { + assert.equal( + expectedOutput.valueOrId, + actualOutput.valueOrId + ); + } }); }; @@ -33,14 +42,71 @@ TokenBagHelpers.emptyOutput = () => { }; TokenBagHelpers.emptyTokenBag = () => { - return { bag: Array.apply(null, Array(16)).map(TokenBagHelpers.emptyOutput) }; + return promote({ bag: Array.apply(null, Array(16)).map(TokenBagHelpers.emptyOutput) }); }; TokenBagHelpers.padTokenBag = (tokenBag) => { while(tokenBag.length < 16) { tokenBag.push(TokenBagHelpers.emptyOutput()); } - return { bag: tokenBag }; + return promote({ bag: tokenBag }); }; +function promote (tokenBag) { + + const bn = (hex) => { + return new BN(hex.replace('0x', ''), 16); + }; + + function balanceOf (color, address) { + const tokens = this.bag.filter(o => o.color === color && o.owner === address); + return tokens.length === 0 ? 0 : tokens[0].valueOrId; + } + + function readData (color, tokenId) { + const tokens = this.bag.filter(o => o.color === color && o.valueOrId === tokenId); + return tokens.length === 0 ? ZERO_HASH : tokens[0].data; + } + + function transfer (color, from, to, value) { + let source; + + this.bag.forEach(o => { + if (o.color === color && o.owner === from) { + source = o; + } + }); + if (!source) return false; + if (bn(source.valueOrId).lt(bn(value))) return false; + + let dest; + this.bag.forEach(o => { + if (o.color === color && o.owner === to) { + dest = o; + } + }); + + if (!dest) { + this.bag.forEach(o => { + if (!dest && o.owner === ZERO_ADDRESS) { + o.owner = to; + o.color = color; + dest = o; + } + }); + } + + if (!dest) return false; + + source.valueOrId = '0x' + bn(source.valueOrId).sub(bn(value)).toString(16, 64); + dest.valueOrId = '0x' + bn(dest.valueOrId).add(bn(value)).toString(16, 64); + return true; + } + + tokenBag.balanceOf = balanceOf; + tokenBag.readData = readData; + tokenBag.transfer = transfer; + return tokenBag; +} + module.exports = TokenBagHelpers; diff --git a/test/utils/stepper.js b/test/utils/stepper.js index ccfefbbf..759beb1b 100644 --- a/test/utils/stepper.js +++ b/test/utils/stepper.js @@ -3,6 +3,7 @@ const { getCode } = require('./../helpers/utils'); const { Constants, HydratedRuntime } = require('./../../utils/'); const fixtures = require('./../fixtures/runtime'); +const { assertTokenBagEqual } = require('../helpers/tokenBag.js'); const assert = require('assert'); @@ -17,6 +18,7 @@ describe('JS Stepper', function () { const stack = fixture.stack || []; const mem = fixture.memory || ''; const data = fixture.data || ''; + const tokenBag = fixture.tokenBag || false; const gasLimit = fixture.gasLimit || Constants.BLOCK_GAS_LIMIT; const blockGasLimit = fixture.gasLimit || Constants.BLOCK_GAS_LIMIT; const gasRemaining = typeof fixture.gasRemaining !== 'undefined' ? fixture.gasRemaining : gasLimit; @@ -29,6 +31,7 @@ describe('JS Stepper', function () { blockGasLimit, gasRemaining, pc, + tokenBag, }; const steps = await stepper.run(args); const res = steps[steps.length - 1]; @@ -39,6 +42,9 @@ describe('JS Stepper', function () { if (fixture.result.memory) { assert.deepEqual(res.mem, fixture.result.memory, 'mem'); } + if (fixture.result.tokenBag) { + assertTokenBagEqual(res.tokenBag, fixture.result.tokenBag); + } if (fixture.result.gasUsed !== undefined) { assert.equal(gasRemaining - res.gasRemaining, fixture.result.gasUsed, 'gasUsed'); } diff --git a/utils/EVMRuntime.js b/utils/EVMRuntime.js index 43a54658..91dc591b 100644 --- a/utils/EVMRuntime.js +++ b/utils/EVMRuntime.js @@ -6,6 +6,8 @@ const BN = utils.BN; const OP = require('./constants'); const OPCODES = require('./Opcodes'); +const { emptyTokenBag } = require('../test/helpers/tokenBag.js'); + const PRECOMPILED = { '1': require('./precompiled/01-ecrecover.js'), '2': require('./precompiled/02-sha256.js'), @@ -162,6 +164,7 @@ module.exports = class EVMRuntime { stopped: false, returnValue: Buffer.alloc(0), validJumps: {}, + tokenBag: obj.tokenBag || emptyTokenBag(), }; const len = runState.code.length; @@ -213,7 +216,7 @@ module.exports = class EVMRuntime { return runState; } - async run ({ code, data, stack, mem, gasLimit, gasRemaining, pc, stepCount }) { + async run ({ code, data, stack, mem, gasLimit, gasRemaining, pc, stepCount, tokenBag }) { data = data || '0x'; if (Array.isArray(code)) { @@ -235,6 +238,7 @@ module.exports = class EVMRuntime { mem, stack, gasRemaining, + tokenBag, }); stepCount = stepCount | 0; @@ -825,6 +829,44 @@ module.exports = class EVMRuntime { } async handleCALL (runState) { + + const gasLimit = runState.stack.pop(); + const toAddress = runState.stack.pop(); + const value = runState.stack.pop(); + const inOffset = runState.stack.pop(); + const inLength = runState.stack.pop(); + const outOffset = runState.stack.pop(); + const outLength = runState.stack.pop(); + + const data = this.memLoad(runState, inOffset, inLength); + const funcSig = this.getFuncSig(data); + + if (funcSig === '0x22334455') { + this.subMemUsage(runState, outOffset, outLength); + + if (gasLimit.gt(runState.gasLeft)) { + gasLimit = new BN(runState.gasLeft); + } + + const color = '0x' + toAddress.toString(16, 40); + const to = utils.bufferToHex(data.slice(4, 24)); + const from = utils.bufferToHex(runState.caller); + const amount = utils.bufferToHex(data.slice(36, 68)); + + const success = runState.tokenBag.transfer(color, from, to, amount); + + if (success) { + runState.stack.push(new BN(1)); + const returnValue = utils.setLengthRight(utils.toBuffer('0x01'), 32); + this.memStore(runState, outOffset, returnValue, new BN(0), outLength, 32); + runState.returnValue = returnValue; + } else { + runState.returnValue = Buffer.alloc(0); + runState.stack.push(new BN(0)); + return; + } + } + throw new VmError(ERROR.INSTRUCTION_NOT_SUPPORTED); } @@ -837,17 +879,17 @@ module.exports = class EVMRuntime { } async handleSTATICCALL (runState) { - const target = runState.stack[runState.stack.length - 2] || new BN(0xff); - - if (target.gten(0) && target.lten(8)) { - let gasLimit = runState.stack.pop(); - const toAddress = runState.stack.pop(); - const inOffset = runState.stack.pop(); - const inLength = runState.stack.pop(); - const outOffset = runState.stack.pop(); - const outLength = runState.stack.pop(); - const data = this.memLoad(runState, inOffset, inLength); - + let gasLimit = runState.stack.pop(); + const toAddress = runState.stack.pop() || new BN(0xff); + const inOffset = runState.stack.pop(); + const inLength = runState.stack.pop(); + const outOffset = runState.stack.pop(); + const outLength = runState.stack.pop(); + + const data = this.memLoad(runState, inOffset, inLength); + const funcSig = this.getFuncSig(data); + + if (toAddress.gten(0) && toAddress.lten(8)) { this.subMemUsage(runState, outOffset, outLength); if (gasLimit.gt(runState.gasLeft)) { @@ -863,6 +905,25 @@ module.exports = class EVMRuntime { this.subGas(runState, r.gasUsed); this.memStore(runState, outOffset, r.returnValue, new BN(0), outLength, true); return; + } else if (funcSig === '0x70a08231') { + const color = '0x' + toAddress.toString(16, 40); + const addr = utils.bufferToHex(data.slice(4, 24)); + const balance = runState.tokenBag.balanceOf(color, addr); + const returnValue = utils.setLengthLeft(utils.toBuffer(balance), 32); + + this.memStore(runState, outOffset, returnValue, new BN(0), outLength, 32); + runState.stack.push(new BN(1)); + runState.returnValue = returnValue; + return; + } else if (funcSig === '0x12341234') { + const color = '0x' + toAddress.toString(16, 40); + const tokenId = utils.bufferToHex(data.slice(4, 36)); + const returnValue = utils.toBuffer(runState.tokenBag.readData(color, tokenId)); + + this.memStore(runState, outOffset, returnValue, new BN(0), outLength, 32); + runState.stack.push(new BN(1)); + runState.returnValue = returnValue; + return; } // TODO: remove this and throw first, sync behaviour with contracts @@ -986,4 +1047,11 @@ module.exports = class EVMRuntime { return Buffer.from(loaded); } + + getFuncSig (data) { + if (data.length < 3) { + return 0x00000000; + } + return utils.bufferToHex(data.slice(0, 4)); + } }; diff --git a/utils/HydratedRuntime.js b/utils/HydratedRuntime.js index c1c51050..a378bdce 100644 --- a/utils/HydratedRuntime.js +++ b/utils/HydratedRuntime.js @@ -86,6 +86,7 @@ module.exports = class HydratedRuntime extends EVMRuntime { pc: pc, errno: runState.errno, gasRemaining: runState.gasLeft.toNumber(), + tokenBag: runState.tokenBag, }; this.calculateMemProof(runState, step); From d02876c780f99a0530ff63352232ecef70cb9664 Mon Sep 17 00:00:00 2001 From: Jan Date: Mon, 13 Jan 2020 16:53:28 +0100 Subject: [PATCH 11/12] Cosmetics. --- contracts/EVMConstants.sol | 5 ++++ contracts/EVMRuntime.sol | 46 +++++++++++++++--------------- contracts/EVMTokenBag.slb | 26 ++++++++--------- contracts/EthereumRuntime.sol | 2 +- test/fixtures/runtime.js | 8 +++--- test/fixtures/runtimeGasUsed.js | 50 ++++++++++++++++----------------- utils/EVMRuntime.js | 16 +++++------ utils/constants.js | 7 +++++ 8 files changed, 83 insertions(+), 77 deletions(-) diff --git a/contracts/EVMConstants.sol b/contracts/EVMConstants.sol index d9465365..7f84ef80 100644 --- a/contracts/EVMConstants.sol +++ b/contracts/EVMConstants.sol @@ -217,6 +217,11 @@ contract EVMConstants { uint16 constant internal GAS_EC_ADD = 500; uint16 constant internal GAS_EC_MUL = 40000; + // Func sigs + bytes4 constant internal FUNCSIG_TRANSFER = 0xa9059cbb; + bytes4 constant internal FUNCSIG_BALANCEOF = 0x70a08231; + bytes4 constant internal FUNCSIG_READATA = 0x37ebbc03; + // ERRORS uint8 constant internal NO_ERROR = 0; diff --git a/contracts/EVMRuntime.sol b/contracts/EVMRuntime.sol index ad9e3398..593b4871 100644 --- a/contracts/EVMRuntime.sol +++ b/contracts/EVMRuntime.sol @@ -1594,31 +1594,31 @@ contract EVMRuntime is EVMConstants { } state.gas -= gasFee; - bytes memory cd = state.mem.toBytes(stack.inOffset, stack.inSize); + bytes memory cData = state.mem.toBytes(stack.inOffset, stack.inSize); bytes4 funSig; - if (cd.length > 3) { - funSig = getSig(cd); + if (cData.length > 3) { + funSig = getSig(cData); } bool success; bytes memory returnData; - if (funSig == 0x22334455) { + if (funSig == FUNCSIG_TRANSFER) { // transfer address dest; uint amount; assembly { - dest := mload(add(cd,24)) - amount := mload(add(cd, 68)) + dest := mload(add(cData,24)) + amount := mload(add(cData, 68)) } - EVMTokenBag.TransferParams memory params = EVMTokenBag.TransferParams({ - color: stack.target, - from: state.caller, - to: dest, - value: amount - }); - success = state.tokenBag.transfer(params); + + success = state.tokenBag.transfer( + stack.target, + state.caller, + dest, + amount + ); returnData = abi.encodePacked(success); } else { state.errno = ERROR_INSTRUCTION_NOT_SUPPORTED; @@ -1626,7 +1626,7 @@ contract EVMRuntime is EVMConstants { } if (!success) { - state.stack.push(0); + state.stack.push(0); state.returnData = new bytes(0); return; } @@ -1690,13 +1690,13 @@ contract EVMRuntime is EVMConstants { } state.gas -= retEvm.gas; - bytes memory cd = state.mem.toBytes(inOffset, inSize); + bytes memory cData = state.mem.toBytes(inOffset, inSize); bytes4 funSig; - if (cd.length > 3) { - funSig = getSig(cd); + if (cData.length > 3) { + funSig = getSig(cData); } - retEvm.data = cd; + retEvm.data = cData; retEvm.customDataPtr = state.customDataPtr; // we only going to support precompiles @@ -1718,24 +1718,22 @@ contract EVMRuntime is EVMConstants { } else if (target == 8) { handlePreC_ECPAIRING(retEvm); } - } else if (funSig == 0x70a08231) { - // balanceOf + } else if (funSig == FUNCSIG_BALANCEOF) { address addr; // [32 length, 4 funSig, 20 address] // swallow 4 for funSig and 20 for length assembly { - addr := mload(add(cd,24)) + addr := mload(add(cData,24)) } uint value = state.tokenBag.balanceOf(address(target), addr); bytes memory ret = abi.encodePacked(bytes32(value)); retEvm.returnData = ret; - } else if (funSig == 0x12341234) { - // readData + } else if (funSig == FUNCSIG_READATA) { uint tokenId; // 32 length + 4 funcSig = 36 assembly { - tokenId := mload(add(cd,36)) + tokenId := mload(add(cData,36)) } bytes32 data = state.tokenBag.readData(address(target), tokenId); bytes memory ret = abi.encodePacked(data); diff --git a/contracts/EVMTokenBag.slb b/contracts/EVMTokenBag.slb index 70d7eeb3..94c86622 100644 --- a/contracts/EVMTokenBag.slb +++ b/contracts/EVMTokenBag.slb @@ -45,34 +45,30 @@ library EVMTokenBag { } } - struct TransferParams { - address color; - address from; - address to; - uint value; - } - function transfer( TokenBag memory self, - TransferParams memory params + address color, + address from, + address to, + uint value ) internal pure returns (bool) { Output memory source; Output memory dest; // find source for (uint i = 0; i < self.bag.length; i++) { - if (self.bag[i].owner == params.from && self.bag[i].color == params.color) { + if (self.bag[i].owner == from && self.bag[i].color == color) { source = self.bag[i]; break; } } // sender does not have enough tokens to send - if (source.valueOrId < params.value) return false; + if (source.valueOrId < value) return false; // find dest and/or empty uint emptyId = 1337; for (uint i = 0; i < self.bag.length; i++) { - if (self.bag[i].owner == params.to && self.bag[i].color == params.color) { + if (self.bag[i].owner == to && self.bag[i].color == color) { dest = self.bag[i]; break; } @@ -87,15 +83,15 @@ library EVMTokenBag { // if no dest, but we found an empty slot, assign empty slot to reciver if (dest.owner == address(0)) { - self.bag[emptyId].owner = params.to; - self.bag[emptyId].color = params.color; + self.bag[emptyId].owner = to; + self.bag[emptyId].color = color; dest = self.bag[emptyId]; } // now do the state transition and return success // OVERFLOWS??????? - source.valueOrId -= params.value; - dest.valueOrId += params.value; + source.valueOrId -= value; + dest.valueOrId += value; return true; } diff --git a/contracts/EthereumRuntime.sol b/contracts/EthereumRuntime.sol index 42fac3cd..4a2d4526 100644 --- a/contracts/EthereumRuntime.sol +++ b/contracts/EthereumRuntime.sol @@ -56,7 +56,7 @@ contract EthereumRuntime is HydratedRuntime { evm.stack = EVMStack.fromArray(img.stack); evm.mem = EVMMemory.fromArray(img.mem); - evm.tokenBag = img.tokenBag; + evm.tokenBag = img.tokenBag; _run(evm, img.pc, img.stepCount); diff --git a/test/fixtures/runtime.js b/test/fixtures/runtime.js index 47d7630f..9636e740 100644 --- a/test/fixtures/runtime.js +++ b/test/fixtures/runtime.js @@ -4120,7 +4120,7 @@ module.exports = [ description: 'STATICCALL readData - successfull read', code: OP.STATICCALL, memory: [ - '0x12341234dddddddddddddddddddddddddddddddddddddddddddddddddddddddd', + '0x37ebbc03dddddddddddddddddddddddddddddddddddddddddddddddddddddddd', '0xdddddddd00000000000000000000000000000000000000000000000000000000', ], stack: [ @@ -4142,7 +4142,7 @@ module.exports = [ '0x0000000000000000000000000000000000000000000000000000000000000001', ], memory: [ - '0x12341234dddddddddddddddddddddddddddddddddddddddddddddddddddddddd', + '0x37ebbc03dddddddddddddddddddddddddddddddddddddddddddddddddddddddd', '0xddddddddeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee', '0xeeeeeeee00000000000000000000000000000000000000000000000000000000', ], @@ -4152,7 +4152,7 @@ module.exports = [ description: 'CALL transfer - successfull transfer', code: OP.CALL, memory: [ - '0x22334455aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab0000000000000000', + '0xa9059cbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab0000000000000000', '0x0000000000000000000000000000000000000000000000000000000000000000', '0xdeadbeef00000000000000000000000000000000000000000000000000000000', ], @@ -4184,7 +4184,7 @@ module.exports = [ '0x0000000000000000000000000000000000000000000000000000000000000001', ], memory: [ - '0x22334455aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab0000000000000000', + '0xa9059cbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab0000000000000000', '0x0000000000000000000000000000000000000000000000000000000000000000', '0xdeadbeef01000000000000000000000000000000000000000000000000000000', '0x0000000000000000000000000000000000000000000000000000000000000000', diff --git a/test/fixtures/runtimeGasUsed.js b/test/fixtures/runtimeGasUsed.js index 6df1ec83..6cbe3109 100644 --- a/test/fixtures/runtimeGasUsed.js +++ b/test/fixtures/runtimeGasUsed.js @@ -20,7 +20,7 @@ module.exports = [ 91369, 91401, 91433, - 90777, + 90713, 91497, 91529, 91561, @@ -35,7 +35,7 @@ module.exports = [ 107049, 107081, 107113, - 107081, + 107145, 107177, 107209, 107241, @@ -45,7 +45,7 @@ module.exports = [ 107369, 107401, 107433, - 107465, + 107401, 93725, 94706, 95622, @@ -54,8 +54,8 @@ module.exports = [ 98628, 99609, 100590, - 101507, - 102552, + 101571, + 102488, 103469, 104450, 105495, @@ -65,25 +65,25 @@ module.exports = [ 91979, 90459, 90523, - 90555, - 90512, - 89786, + 90491, + 90384, + 89850, 91532, 90074, 90960, 90992, - 90106, + 90170, 90202, 91373, - 91847, + 91783, 109001, 92604, 91572, 105211, 90803, 90649, - 98294, - 92327, + 98230, + 92263, 92327, 92327, 92327, @@ -117,9 +117,9 @@ module.exports = [ 92433, 91880, 91853, - 90991, + 90927, 95209, - 90949, + 90885, 94113, 91730, 93196, @@ -140,10 +140,10 @@ module.exports = [ 92791, 93448, 93000, - 92416, + 92480, 91916, 92233, - 90766, + 90702, 95858, 99164, 113879, @@ -153,24 +153,24 @@ module.exports = [ 200880, 118529, 122204, - 102286, + 102222, 94227, 100279, 99180, 98465, 96705, 102212, - 103885, + 103821, 108795, 125618, 103979, 105938, - 122584, + 122648, 104005, 106376, 123195, - 103967, - 104395, + 104031, + 104331, 121183, 105628, 105335, @@ -181,10 +181,10 @@ module.exports = [ 88150, 93067, 92939, - 101320, + 101256, 129394, 127465, - 133362, + 133298, 136310, 4363961650723558, 172253, @@ -196,6 +196,6 @@ module.exports = [ 119597, 119427, 121147, - 134055, - 96219 + 133476, + 96155 ]; \ No newline at end of file diff --git a/utils/EVMRuntime.js b/utils/EVMRuntime.js index 91dc591b..530eb462 100644 --- a/utils/EVMRuntime.js +++ b/utils/EVMRuntime.js @@ -841,7 +841,7 @@ module.exports = class EVMRuntime { const data = this.memLoad(runState, inOffset, inLength); const funcSig = this.getFuncSig(data); - if (funcSig === '0x22334455') { + if (funcSig === OP.FUNCSIG_TRANSFER) { this.subMemUsage(runState, outOffset, outLength); if (gasLimit.gt(runState.gasLeft)) { @@ -856,13 +856,13 @@ module.exports = class EVMRuntime { const success = runState.tokenBag.transfer(color, from, to, amount); if (success) { - runState.stack.push(new BN(1)); + runState.stack.push(new BN(OP.CALLISH_SUCCESS)); const returnValue = utils.setLengthRight(utils.toBuffer('0x01'), 32); this.memStore(runState, outOffset, returnValue, new BN(0), outLength, 32); runState.returnValue = returnValue; } else { runState.returnValue = Buffer.alloc(0); - runState.stack.push(new BN(0)); + runState.stack.push(new BN(OP.CALLISH_FAIL)); return; } } @@ -905,23 +905,23 @@ module.exports = class EVMRuntime { this.subGas(runState, r.gasUsed); this.memStore(runState, outOffset, r.returnValue, new BN(0), outLength, true); return; - } else if (funcSig === '0x70a08231') { + } else if (funcSig === OP.FUNCSIG_BALANCEOF) { const color = '0x' + toAddress.toString(16, 40); const addr = utils.bufferToHex(data.slice(4, 24)); const balance = runState.tokenBag.balanceOf(color, addr); const returnValue = utils.setLengthLeft(utils.toBuffer(balance), 32); this.memStore(runState, outOffset, returnValue, new BN(0), outLength, 32); - runState.stack.push(new BN(1)); + runState.stack.push(new BN(OP.CALLISH_SUCCESS)); runState.returnValue = returnValue; return; - } else if (funcSig === '0x12341234') { + } else if (funcSig === OP.FUNCSIG_READATA) { const color = '0x' + toAddress.toString(16, 40); const tokenId = utils.bufferToHex(data.slice(4, 36)); const returnValue = utils.toBuffer(runState.tokenBag.readData(color, tokenId)); this.memStore(runState, outOffset, returnValue, new BN(0), outLength, 32); - runState.stack.push(new BN(1)); + runState.stack.push(new BN(OP.CALLISH_SUCCESS)); runState.returnValue = returnValue; return; } @@ -929,7 +929,7 @@ module.exports = class EVMRuntime { // TODO: remove this and throw first, sync behaviour with contracts runState.returnValue = Buffer.alloc(0); runState.stack = runState.stack.slice(0, runState.stack.length - 6); - runState.stack.push(new BN(0)); + runState.stack.push(new BN(OP.CALLISH_FAIL)); throw new VmError(ERROR.INSTRUCTION_NOT_SUPPORTED); } diff --git a/utils/constants.js b/utils/constants.js index 8cc8f297..86e4187b 100644 --- a/utils/constants.js +++ b/utils/constants.js @@ -189,4 +189,11 @@ module.exports = { ZERO_HASH: '0x0000000000000000000000000000000000000000000000000000000000000000', ZERO_ADDRESS: '0x0000000000000000000000000000000000000000', + + FUNCSIG_TRANSFER: '0xa9059cbb', + FUNCSIG_BALANCEOF: '0x70a08231', + FUNCSIG_READATA: '0x37ebbc03', + + CALLISH_SUCCESS: 1, + CALLISH_FAIL: 0, }; From 571ba8fff126d2c3d835f20c152a5adfdf8ef6f2 Mon Sep 17 00:00:00 2001 From: Jan Date: Mon, 13 Jan 2020 17:15:03 +0100 Subject: [PATCH 12/12] Indentation. --- contracts/EVMRuntime.sol | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/contracts/EVMRuntime.sol b/contracts/EVMRuntime.sol index 593b4871..f4c609fd 100644 --- a/contracts/EVMRuntime.sol +++ b/contracts/EVMRuntime.sol @@ -1613,7 +1613,7 @@ contract EVMRuntime is EVMConstants { amount := mload(add(cData, 68)) } - success = state.tokenBag.transfer( + success = state.tokenBag.transfer( stack.target, state.caller, dest, @@ -1622,13 +1622,13 @@ contract EVMRuntime is EVMConstants { returnData = abi.encodePacked(success); } else { state.errno = ERROR_INSTRUCTION_NOT_SUPPORTED; - return; + return; } if (!success) { state.stack.push(0); state.returnData = new bytes(0); - return; + return; } state.stack.push(1); @@ -1691,10 +1691,10 @@ contract EVMRuntime is EVMConstants { state.gas -= retEvm.gas; bytes memory cData = state.mem.toBytes(inOffset, inSize); - bytes4 funSig; - if (cData.length > 3) { - funSig = getSig(cData); - } + bytes4 funSig; + if (cData.length > 3) { + funSig = getSig(cData); + } retEvm.data = cData; retEvm.customDataPtr = state.customDataPtr; @@ -1710,7 +1710,7 @@ contract EVMRuntime is EVMConstants { } else if (target == 4) { handlePreC_IDENTITY(retEvm); } else if (target == 5) { - handlePreC_MODEXP(retEvm); + handlePreC_MODEXP(retEvm); } else if (target == 6) { handlePreC_ECADD(retEvm); } else if (target == 7) { @@ -1723,7 +1723,7 @@ contract EVMRuntime is EVMConstants { // [32 length, 4 funSig, 20 address] // swallow 4 for funSig and 20 for length assembly { - addr := mload(add(cData,24)) + addr := mload(add(cData,24)) } uint value = state.tokenBag.balanceOf(address(target), addr); bytes memory ret = abi.encodePacked(bytes32(value));