diff --git a/packages/core-db/package.json b/packages/core-db/package.json index fea194fc595a..fb20c95e2593 100644 --- a/packages/core-db/package.json +++ b/packages/core-db/package.json @@ -1,6 +1,6 @@ { "name": "@eth-optimism/core-db", - "version": "0.0.1-alpha.12", + "version": "0.0.1-alpha.13", "description": "Optimism DB Utils", "main": "build/index.js", "files": [ @@ -29,7 +29,7 @@ "url": "https://github.com/ethereum-optimism/optimism-monorepo.git" }, "dependencies": { - "@eth-optimism/core-utils": "0.0.1-alpha.12", + "@eth-optimism/core-utils": "^0.0.1-alpha.13", "abstract-leveldown": "^6.2.2", "async-lock": "^1.2.2", "chai": "^4.2.0", diff --git a/packages/core-utils/package.json b/packages/core-utils/package.json index 45318259b85d..6a0c2d4855b3 100644 --- a/packages/core-utils/package.json +++ b/packages/core-utils/package.json @@ -1,6 +1,6 @@ { "name": "@eth-optimism/core-utils", - "version": "0.0.1-alpha.12", + "version": "0.0.1-alpha.13", "description": "Optimism Core Utils", "main": "build/index.js", "files": [ diff --git a/packages/docs/package.json b/packages/docs/package.json index e1e7a068eca4..9d9e3c7e5ea6 100644 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -1,7 +1,7 @@ { "name": "@eth-optimism/docs", "private": true, - "version": "0.0.1-alpha.12", + "version": "0.0.1-alpha.13", "description": "Optimism docs", "author": "Optimism", "license": "MIT", diff --git a/packages/optimistic-game-semantics/package.json b/packages/optimistic-game-semantics/package.json index 57233e75991c..8d929c686943 100644 --- a/packages/optimistic-game-semantics/package.json +++ b/packages/optimistic-game-semantics/package.json @@ -1,6 +1,6 @@ { "name": "@eth-optimism/optimistic-game-semantics", - "version": "0.0.1-alpha.12", + "version": "0.0.1-alpha.13", "description": "Optimism Optimistic Game Semantics", "main": "build/index.js", "files": [ @@ -29,8 +29,8 @@ "url": "https://github.com/ethereum-optimism/optimism-monorepo.git" }, "dependencies": { - "@eth-optimism/core-db": "0.0.1-alpha.12", - "@eth-optimism/core-utils": "0.0.1-alpha.12", + "@eth-optimism/core-db": "^0.0.1-alpha.13", + "@eth-optimism/core-utils": "^0.0.1-alpha.13", "chai": "^4.2.0", "chai-as-promised": "^7.1.1", "debug": "^4.1.1", diff --git a/packages/ovm-truffle-provider-wrapper/package.json b/packages/ovm-truffle-provider-wrapper/package.json index 0119c947bf61..f5bf5bc95d22 100644 --- a/packages/ovm-truffle-provider-wrapper/package.json +++ b/packages/ovm-truffle-provider-wrapper/package.json @@ -1,6 +1,6 @@ { "name": "@eth-optimism/ovm-truffle-provider-wrapper", - "version": "0.0.1-alpha.12", + "version": "0.0.1-alpha.13", "description": "Optimism Truffle Provider Wrapper", "main": "build/index.js", "files": [ @@ -28,7 +28,7 @@ "url": "https://github.com/ethereum-optimism/optimism-monorepo.git" }, "dependencies": { - "@eth-optimism/rollup-full-node": "0.0.1-alpha.12" + "@eth-optimism/rollup-full-node": "^0.0.1-alpha.13" }, "devDependencies": { "@types/node": "^12.0.7", diff --git a/packages/ovm/package.json b/packages/ovm/package.json index b8397d2ee8a0..1cce2b4a2102 100644 --- a/packages/ovm/package.json +++ b/packages/ovm/package.json @@ -1,6 +1,6 @@ { "name": "@eth-optimism/ovm", - "version": "0.0.1-alpha.12", + "version": "0.0.1-alpha.13", "description": "An optimistic execution-compatible EVM", "main": "build/index.js", "files": [ @@ -50,9 +50,9 @@ "typescript": "^3.3.3333" }, "dependencies": { - "@eth-optimism/core-db": "0.0.1-alpha.12", - "@eth-optimism/core-utils": "0.0.1-alpha.12", - "@eth-optimism/rollup-core": "0.0.1-alpha.12", + "@eth-optimism/core-db": "^0.0.1-alpha.13", + "@eth-optimism/core-utils": "^0.0.1-alpha.13", + "@eth-optimism/rollup-core": "^0.0.1-alpha.13", "@types/sinon-chai": "^3.2.2", "chai": "^4.2.0", "ethereum-waffle": "2.1.0", diff --git a/packages/ovm/src/contracts/ExecutionManager.sol b/packages/ovm/src/contracts/ExecutionManager.sol index 65e6ae868886..31c24e6bde0f 100644 --- a/packages/ovm/src/contracts/ExecutionManager.sol +++ b/packages/ovm/src/contracts/ExecutionManager.sol @@ -248,6 +248,7 @@ contract ExecutionManager is FullStateManager { mstore8(add(_callBytes, 3), methodId) } + bool isCall = executionContext.ovmTxOrigin == ZERO_ADDRESS; bool success = false; address addr = address(this); assembly { @@ -258,6 +259,9 @@ contract ExecutionManager is FullStateManager { if eq(success, 1) { return(result, size) } + if eq(isCall, 1) { + revert(result, size) + } } if (!success) { diff --git a/packages/ovm/src/contracts/testing-contracts/DummyContract.sol b/packages/ovm/src/contracts/testing-contracts/DummyContract.sol index 6cb4ea0aab0b..9681cd2fe029 100644 --- a/packages/ovm/src/contracts/testing-contracts/DummyContract.sol +++ b/packages/ovm/src/contracts/testing-contracts/DummyContract.sol @@ -13,4 +13,12 @@ contract DummyContract { success = testInt != 0; output = testBytes; } + + function dummyRevert() public { + revert("This is a test revert"); + } + + function dummyFailingRequire() public { + require(false, "This is a test revert"); + } } diff --git a/packages/ovm/test/contracts/execution-manager.executeCall.spec.ts b/packages/ovm/test/contracts/execution-manager.executeCall.spec.ts index d4673f935cf2..246c3a7010c4 100644 --- a/packages/ovm/test/contracts/execution-manager.executeCall.spec.ts +++ b/packages/ovm/test/contracts/execution-manager.executeCall.spec.ts @@ -17,6 +17,7 @@ import { manuallyDeployOvmContract, getUnsignedTransactionCalldata, DEFAULT_ETHNODE_GAS_LIMIT, + ZERO_UINT, } from '../helpers' import { GAS_LIMIT, CHAIN_ID, OPCODE_WHITELIST_MASK } from '../../src/app' @@ -28,8 +29,8 @@ const log = getLogger('execution-manager-calls', true) * TESTS * *********/ -const methodId: string = ethereumjsAbi - .methodID('executeCall', []) +const unsignedCallMethodId: string = ethereumjsAbi + .methodID('executeUnsignedEOACall', []) .toString('hex') describe('Execution Manager -- Call opcodes', () => { @@ -217,5 +218,85 @@ describe('Execution Manager -- Call opcodes', () => { ) await provider.waitForTransaction(tx.hash) }) + + it('reverts when it makes a call that reverts', async () => { + // Generate our tx internalCalldata + const internalCalldata = getUnsignedTransactionCalldata( + dummyContract, + 'dummyRevert', + [] + ) + + const calldata = getUnsignedTransactionCalldata( + executionManager, + 'executeUnsignedEOACall', + [ + ZERO_UINT, + ZERO_UINT, + dummyContractAddress, + internalCalldata, + wallet.address, + ] + ) + const nonce = await wallet.getTransactionCount() + + let failed = false + try { + await wallet.provider.call({ + nonce, + gasLimit: GAS_LIMIT, + gasPrice: 0, + to: executionManager.address, + value: 0, + data: calldata, + chainId: CHAIN_ID, + }) + } catch (e) { + log.debug(JSON.stringify(e) + ' ' + e.stack) + failed = true + } + + failed.should.equal(true, `This call should have reverted!`) + }) + + it('reverts when it makes a call that fails a require', async () => { + // Generate our tx internalCalldata + const internalCalldata = getUnsignedTransactionCalldata( + dummyContract, + 'dummyFailingRequire', + [] + ) + + const calldata = getUnsignedTransactionCalldata( + executionManager, + 'executeUnsignedEOACall', + [ + ZERO_UINT, + ZERO_UINT, + dummyContractAddress, + internalCalldata, + wallet.address, + ] + ) + const nonce = await wallet.getTransactionCount() + + let failed = false + try { + await wallet.provider.call({ + nonce, + gasLimit: GAS_LIMIT, + gasPrice: 0, + to: executionManager.address, + value: 0, + data: calldata, + chainId: CHAIN_ID, + }) + } catch (e) { + log.debug(JSON.stringify(e) + ' ' + e.stack) + failed = true + } + + failed.should.equal(true, `This call should have reverted!`) + }) }) }) diff --git a/packages/ovm/test/helpers.ts b/packages/ovm/test/helpers.ts index af0c75bd3f72..8c689de5b92b 100644 --- a/packages/ovm/test/helpers.ts +++ b/packages/ovm/test/helpers.ts @@ -12,7 +12,6 @@ import { bufToHexString, bufferUtils, } from '@eth-optimism/core-utils' -import * as ethereumjsAbi from 'ethereumjs-abi' import { Contract, ContractFactory, Wallet, ethers } from 'ethers' import { Provider, @@ -21,6 +20,7 @@ import { Log, } from 'ethers/providers' import { Transaction } from 'ethers/utils' +import * as ethereumjsAbi from 'ethereumjs-abi' /* Contract Imports */ import { @@ -31,6 +31,8 @@ import { type Signature = [string, string, string] +export const ZERO_UINT = '00'.repeat(32) + export const DEFAULT_ETHNODE_GAS_LIMIT = 9_000_000 export const gasLimit = 6_700_000 const log = getLogger('helpers', true) diff --git a/packages/rollup-contracts/package.json b/packages/rollup-contracts/package.json index ef3cf759f041..66872465c803 100644 --- a/packages/rollup-contracts/package.json +++ b/packages/rollup-contracts/package.json @@ -1,6 +1,6 @@ { "name": "@eth-optimism/rollup-contracts", - "version": "0.0.1-alpha.12", + "version": "0.0.1-alpha.13", "description": "Optimistic Rollup smart contracts", "main": "build/index.js", "files": [ @@ -43,9 +43,9 @@ "typescript": "^3.3.3333" }, "dependencies": { - "@eth-optimism/core-db": "0.0.1-alpha.12", - "@eth-optimism/core-utils": "0.0.1-alpha.12", - "@eth-optimism/rollup-core": "0.0.1-alpha.12", + "@eth-optimism/core-db": "^0.0.1-alpha.13", + "@eth-optimism/core-utils": "^0.0.1-alpha.13", + "@eth-optimism/rollup-core": "^0.0.1-alpha.13", "@types/sinon-chai": "^3.2.2", "chai": "^4.2.0", "ethereum-waffle": "2.1.0", diff --git a/packages/rollup-core/package.json b/packages/rollup-core/package.json index 96c118c055d4..b76225424f90 100644 --- a/packages/rollup-core/package.json +++ b/packages/rollup-core/package.json @@ -1,6 +1,6 @@ { "name": "@eth-optimism/rollup-core", - "version": "0.0.1-alpha.12", + "version": "0.0.1-alpha.13", "description": "[Optimism] Optimistic Rollup Core Library", "main": "build/index.js", "files": [ @@ -29,8 +29,8 @@ "url": "https://github.com/ethereum-optimism/optimism-monorepo.git" }, "dependencies": { - "@eth-optimism/core-db": "0.0.1-alpha.12", - "@eth-optimism/core-utils": "0.0.1-alpha.12", + "@eth-optimism/core-db": "^0.0.1-alpha.13", + "@eth-optimism/core-utils": "^0.0.1-alpha.13", "async-lock": "^1.2.2", "ethers": "^4.0.39" }, diff --git a/packages/rollup-dev-tools/derp.txt b/packages/rollup-dev-tools/derp.txt new file mode 100644 index 000000000000..1cee0087956d --- /dev/null +++ b/packages/rollup-dev-tools/derp.txt @@ -0,0 +1,1363 @@ +yarn run v1.19.2 +$ mocha --require ts-node/register 'test/**/*.spec.ts' --timeout 5000 --exit + + + Transpile + handles unreachable code +[PC 0000000000] PUSH1: 0x80 (no tag) +[PC 0000000002] PUSH1: 0x40 (no tag) +[PC 0000000004] MSTORE (no tag) +[PC 0000000005] CALLVALUE (no tag) +[PC 0000000006] DUP1 (no tag) +[PC 0000000007] ISZERO (no tag) +[PC 0000000008] PUSH2: 0x0010 (no tag) +[PC 000000000b] SWAP1 (no tag) +[PC 000000000c] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d57 (no tag) +[PC 000000002d] JUMPI (no tag) +[PC 000000002e] POP (no tag) +[PC 000000002f] PUSH1: 0x00 (no tag) +[PC 0000000031] DUP1 (no tag) +[PC 0000000032] REVERT (no tag) +[PC 0000000033] JUMPDEST (no tag) +[PC 0000000034] POP (no tag) +[PC 0000000035] PUSH1: 0x04 (no tag) +[PC 0000000037] CALLDATASIZE (no tag) +[PC 0000000038] LT (no tag) +[PC 0000000039] PUSH2: 0x004c (no tag) +[PC 000000003c] SWAP1 (no tag) +[PC 000000003d] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d57 (no tag) +[PC 000000005e] JUMPI (no tag) +[PC 000000005f] POP (no tag) +[PC 0000000060] PUSH1: 0x00 (no tag) +[PC 0000000062] CALLDATALOAD (no tag) +[PC 0000000063] PUSH1: 0xe0 (no tag) +[PC 0000000065] SHR (no tag) +[PC 0000000066] DUP1 (no tag) +[PC 0000000067] PUSH4: 0x1627540c (no tag) +[PC 000000006c] EQ (no tag) +[PC 000000006d] PUSH2: 0x0051 (no tag) +[PC 0000000070] SWAP1 (no tag) +[PC 0000000071] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d57 (no tag) +[PC 0000000092] JUMPI (no tag) +[PC 0000000093] POP (no tag) +[PC 0000000094] DUP1 (no tag) +[PC 0000000095] PUSH4: 0x53a47bb7 (no tag) +[PC 000000009a] EQ (no tag) +[PC 000000009b] PUSH2: 0x0095 (no tag) +[PC 000000009e] SWAP1 (no tag) +[PC 000000009f] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d57 (no tag) +[PC 00000000c0] JUMPI (no tag) +[PC 00000000c1] POP (no tag) +[PC 00000000c2] DUP1 (no tag) +[PC 00000000c3] PUSH4: 0x79ba5097 (no tag) +[PC 00000000c8] EQ (no tag) +[PC 00000000c9] PUSH2: 0x00df (no tag) +[PC 00000000cc] SWAP1 (no tag) +[PC 00000000cd] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d57 (no tag) +[PC 00000000ee] JUMPI (no tag) +[PC 00000000ef] POP (no tag) +[PC 00000000f0] DUP1 (no tag) +[PC 00000000f1] PUSH4: 0x8da5cb5b (no tag) +[PC 00000000f6] EQ (no tag) +[PC 00000000f7] PUSH2: 0x00e9 (no tag) +[PC 00000000fa] SWAP1 (no tag) +[PC 00000000fb] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d57 (no tag) +[PC 000000011c] JUMPI (no tag) +[PC 000000011d] POP (no tag) +[PC 000000011e] JUMPDEST (no tag) +[PC 000000011f] PUSH1: 0x00 (no tag) +[PC 0000000121] DUP1 (no tag) +[PC 0000000122] REVERT (no tag) +[PC 0000000123] JUMPDEST (no tag) +[PC 0000000124] PUSH2: 0x0093 (no tag) +[PC 0000000127] PUSH1: 0x04 (no tag) +[PC 0000000129] DUP1 (no tag) +[PC 000000012a] CALLDATASIZE (no tag) +[PC 000000012b] SUB (no tag) +[PC 000000012c] PUSH1: 0x20 (no tag) +[PC 000000012e] DUP2 (no tag) +[PC 000000012f] LT (no tag) +[PC 0000000130] ISZERO (no tag) +[PC 0000000131] PUSH2: 0x0067 (no tag) +[PC 0000000134] SWAP1 (no tag) +[PC 0000000135] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d57 (no tag) +[PC 0000000156] JUMPI (no tag) +[PC 0000000157] POP (no tag) +[PC 0000000158] PUSH1: 0x00 (no tag) +[PC 000000015a] DUP1 (no tag) +[PC 000000015b] REVERT (no tag) +[PC 000000015c] JUMPDEST (no tag) +[PC 000000015d] DUP2 (no tag) +[PC 000000015e] ADD (no tag) +[PC 000000015f] SWAP1 (no tag) +[PC 0000000160] DUP1 (no tag) +[PC 0000000161] DUP1 (no tag) +[PC 0000000162] CALLDATALOAD (no tag) +[PC 0000000163] PUSH20: 0xffffffffffffffffffffffffffffffffffffffff (no tag) +[PC 0000000178] AND (no tag) +[PC 0000000179] SWAP1 (no tag) +[PC 000000017a] PUSH1: 0x20 (no tag) +[PC 000000017c] ADD (no tag) +[PC 000000017d] SWAP1 (no tag) +[PC 000000017e] SWAP3 (no tag) +[PC 000000017f] SWAP2 (no tag) +[PC 0000000180] SWAP1 (no tag) +[PC 0000000181] POP (no tag) +[PC 0000000182] POP (no tag) +[PC 0000000183] POP (no tag) +[PC 0000000184] PUSH2: 0x0133 (no tag) +[PC 0000000187] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d57 (no tag) +[PC 00000001a8] JUMP (no tag) +[PC 00000001a9] JUMPDEST (no tag) +[PC 00000001aa] STOP (no tag) +[PC 00000001ab] JUMPDEST (no tag) +[PC 00000001ac] PUSH2: 0x009d (no tag) +[PC 00000001af] PUSH2: 0x027f (no tag) +[PC 00000001b2] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d57 (no tag) +[PC 00000001d3] JUMP (no tag) +[PC 00000001d4] JUMPDEST (no tag) +[PC 00000001d5] PUSH1: 0x40 (no tag) +[PC 00000001d7] MLOAD (no tag) +[PC 00000001d8] DUP1 (no tag) +[PC 00000001d9] DUP3 (no tag) +[PC 00000001da] PUSH20: 0xffffffffffffffffffffffffffffffffffffffff (no tag) +[PC 00000001ef] AND (no tag) +[PC 00000001f0] PUSH20: 0xffffffffffffffffffffffffffffffffffffffff (no tag) +[PC 0000000205] AND (no tag) +[PC 0000000206] DUP2 (no tag) +[PC 0000000207] MSTORE (no tag) +[PC 0000000208] PUSH1: 0x20 (no tag) +[PC 000000020a] ADD (no tag) +[PC 000000020b] SWAP2 (no tag) +[PC 000000020c] POP (no tag) +[PC 000000020d] POP (no tag) +[PC 000000020e] PUSH1: 0x40 (no tag) +[PC 0000000210] MLOAD (no tag) +[PC 0000000211] DUP1 (no tag) +[PC 0000000212] SWAP2 (no tag) +[PC 0000000213] SUB (no tag) +[PC 0000000214] SWAP1 (no tag) +[PC 0000000215] RETURN (no tag) +[PC 0000000216] JUMPDEST (no tag) +[PC 0000000217] PUSH2: 0x00e7 (no tag) +[PC 000000021a] PUSH2: 0x02a5 (no tag) +[PC 000000021d] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d57 (no tag) +[PC 000000023e] JUMP (no tag) +[PC 000000023f] JUMPDEST (no tag) +[PC 0000000240] STOP (no tag) +[PC 0000000241] JUMPDEST (no tag) +[PC 0000000242] PUSH2: 0x00f1 (no tag) +[PC 0000000245] PUSH2: 0x0425 (no tag) +[PC 0000000248] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d57 (no tag) +[PC 0000000269] JUMP (no tag) +[PC 000000026a] JUMPDEST (no tag) +[PC 000000026b] PUSH1: 0x40 (no tag) +[PC 000000026d] MLOAD (no tag) +[PC 000000026e] DUP1 (no tag) +[PC 000000026f] DUP3 (no tag) +[PC 0000000270] PUSH20: 0xffffffffffffffffffffffffffffffffffffffff (no tag) +[PC 0000000285] AND (no tag) +[PC 0000000286] PUSH20: 0xffffffffffffffffffffffffffffffffffffffff (no tag) +[PC 000000029b] AND (no tag) +[PC 000000029c] DUP2 (no tag) +[PC 000000029d] MSTORE (no tag) +[PC 000000029e] PUSH1: 0x20 (no tag) +[PC 00000002a0] ADD (no tag) +[PC 00000002a1] SWAP2 (no tag) +[PC 00000002a2] POP (no tag) +[PC 00000002a3] POP (no tag) +[PC 00000002a4] PUSH1: 0x40 (no tag) +[PC 00000002a6] MLOAD (no tag) +[PC 00000002a7] DUP1 (no tag) +[PC 00000002a8] SWAP2 (no tag) +[PC 00000002a9] SUB (no tag) +[PC 00000002aa] SWAP1 (no tag) +[PC 00000002ab] RETURN (no tag) +[PC 00000002ac] JUMPDEST (no tag) +[PC 00000002ad] PUSH1: 0x00 (no tag) +[PC 00000002af] DUP1 (no tag) +[PC 00000002b0] SWAP1 (no tag) +[PC 00000002b1] PUSH1: 0x00 (no tag) +[PC 00000002b3] DUP1 (no tag) +[PC 00000002b4] PUSH1: 0x40 (no tag) +[PC 00000002b6] ADD (no tag) +[PC 00000002b7] MLOAD (no tag) +[PC 00000002b8] SWAP1 (no tag) +[PC 00000002b9] DUP1 (no tag) +[PC 00000002ba] PUSH1: 0x20 (no tag) +[PC 00000002bc] ADD (no tag) +[PC 00000002bd] MLOAD (no tag) +[PC 00000002be] SWAP1 (no tag) +[PC 00000002bf] DUP1 (no tag) +[PC 00000002c0] PUSH1: 0x00 (no tag) +[PC 00000002c2] ADD (no tag) +[PC 00000002c3] MLOAD (no tag) +[PC 00000002c4] SWAP1 (no tag) +[PC 00000002c5] POP (no tag) +[PC 00000002c6] DUP4 (no tag) +[PC 00000002c7] PUSH4: 0x20966208 (no tag) +[PC 00000002cc] PUSH1: 0x00 (no tag) +[PC 00000002ce] MSTORE (no tag) +[PC 00000002cf] PUSH1: 0x20 (no tag) +[PC 00000002d1] MSTORE (no tag) +[PC 00000002d2] PUSH1: 0x20 (no tag) +[PC 00000002d4] PUSH1: 0x40 (no tag) +[PC 00000002d6] PUSH1: 0x24 (no tag) +[PC 00000002d8] PUSH1: 0x1c (no tag) +[PC 00000002da] PUSH1: 0x00 (no tag) +[PC 00000002dc] PUSH20: 0xa193e42526f1fea8c99af609dceabf30c1c29faa (no tag) +[PC 00000002f1] PUSH32: 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff (no tag) +[PC 0000000312] CALL (no tag) +[PC 0000000313] POP (no tag) +[PC 0000000314] PUSH1: 0x40 (no tag) +[PC 0000000316] MLOAD (no tag) +[PC 0000000317] DUP4 (no tag) +[PC 0000000318] DUP4 (no tag) +[PC 0000000319] DUP4 (no tag) +[PC 000000031a] PUSH1: 0x00 (no tag) +[PC 000000031c] SWAP1 (no tag) +[PC 000000031d] DUP2 (no tag) +[PC 000000031e] PUSH1: 0x00 (no tag) +[PC 0000000320] ADD (no tag) +[PC 0000000321] MSTORE (no tag) +[PC 0000000322] SWAP1 (no tag) +[PC 0000000323] DUP2 (no tag) +[PC 0000000324] PUSH1: 0x20 (no tag) +[PC 0000000326] ADD (no tag) +[PC 0000000327] MSTORE (no tag) +[PC 0000000328] SWAP1 (no tag) +[PC 0000000329] DUP2 (no tag) +[PC 000000032a] PUSH1: 0x40 (no tag) +[PC 000000032c] ADD (no tag) +[PC 000000032d] MSTORE (no tag) +[PC 000000032e] POP (no tag) +[PC 000000032f] SWAP4 (no tag) +[PC 0000000330] POP (no tag) +[PC 0000000331] POP (no tag) +[PC 0000000332] POP (no tag) +[PC 0000000333] POP (no tag) +[PC 0000000334] SWAP1 (no tag) +[PC 0000000335] PUSH2: 0x0100 (no tag) +[PC 0000000338] EXP (no tag) +[PC 0000000339] SWAP1 (no tag) +[PC 000000033a] DIV (no tag) +[PC 000000033b] PUSH20: 0xffffffffffffffffffffffffffffffffffffffff (no tag) +[PC 0000000350] AND (no tag) +[PC 0000000351] PUSH20: 0xffffffffffffffffffffffffffffffffffffffff (no tag) +[PC 0000000366] AND (no tag) +[PC 0000000367] PUSH1: 0x00 (no tag) +[PC 0000000369] DUP1 (no tag) +[PC 000000036a] PUSH1: 0x20 (no tag) +[PC 000000036c] ADD (no tag) +[PC 000000036d] MLOAD (no tag) +[PC 000000036e] SWAP1 (no tag) +[PC 000000036f] DUP1 (no tag) +[PC 0000000370] PUSH1: 0x00 (no tag) +[PC 0000000372] ADD (no tag) +[PC 0000000373] MLOAD (no tag) +[PC 0000000374] SWAP1 (no tag) +[PC 0000000375] POP (no tag) +[PC 0000000376] PUSH4: 0x73509064 (no tag) +[PC 000000037b] PUSH1: 0x00 (no tag) +[PC 000000037d] MSTORE (no tag) +[PC 000000037e] PUSH1: 0x20 (no tag) +[PC 0000000380] PUSH1: 0x20 (no tag) +[PC 0000000382] PUSH1: 0x04 (no tag) +[PC 0000000384] PUSH1: 0x1c (no tag) +[PC 0000000386] PUSH1: 0x00 (no tag) +[PC 0000000388] PUSH20: 0xa193e42526f1fea8c99af609dceabf30c1c29faa (no tag) +[PC 000000039d] PUSH32: 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff (no tag) +[PC 00000003be] CALL (no tag) +[PC 00000003bf] POP (no tag) +[PC 00000003c0] PUSH1: 0x20 (no tag) +[PC 00000003c2] MLOAD (no tag) +[PC 00000003c3] DUP3 (no tag) +[PC 00000003c4] DUP3 (no tag) +[PC 00000003c5] PUSH1: 0x00 (no tag) +[PC 00000003c7] SWAP1 (no tag) +[PC 00000003c8] DUP2 (no tag) +[PC 00000003c9] PUSH1: 0x00 (no tag) +[PC 00000003cb] ADD (no tag) +[PC 00000003cc] MSTORE (no tag) +[PC 00000003cd] SWAP1 (no tag) +[PC 00000003ce] DUP2 (no tag) +[PC 00000003cf] PUSH1: 0x20 (no tag) +[PC 00000003d1] ADD (no tag) +[PC 00000003d2] MSTORE (no tag) +[PC 00000003d3] POP (no tag) +[PC 00000003d4] SWAP2 (no tag) +[PC 00000003d5] POP (no tag) +[PC 00000003d6] POP (no tag) +[PC 00000003d7] PUSH20: 0xffffffffffffffffffffffffffffffffffffffff (no tag) +[PC 00000003ec] AND (no tag) +[PC 00000003ed] EQ (no tag) +[PC 00000003ee] PUSH2: 0x01d8 (no tag) +[PC 00000003f1] SWAP1 (no tag) +[PC 00000003f2] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d57 (no tag) +[PC 0000000413] JUMPI (no tag) +[PC 0000000414] POP (no tag) +[PC 0000000415] PUSH1: 0x40 (no tag) +[PC 0000000417] MLOAD (no tag) +[PC 0000000418] PUSH32: 0x08c379a000000000000000000000000000000000000000000000000000000000 (no tag) +[PC 0000000439] DUP2 (no tag) +[PC 000000043a] MSTORE (no tag) +[PC 000000043b] PUSH1: 0x04 (no tag) +[PC 000000043d] ADD (no tag) +[PC 000000043e] DUP1 (no tag) +[PC 000000043f] DUP1 (no tag) +[PC 0000000440] PUSH1: 0x20 (no tag) +[PC 0000000442] ADD (no tag) +[PC 0000000443] DUP3 (no tag) +[PC 0000000444] DUP2 (no tag) +[PC 0000000445] SUB (no tag) +[PC 0000000446] DUP3 (no tag) +[PC 0000000447] MSTORE (no tag) +[PC 0000000448] PUSH1: 0x24 (no tag) +[PC 000000044a] DUP2 (no tag) +[PC 000000044b] MSTORE (no tag) +[PC 000000044c] PUSH1: 0x20 (no tag) +[PC 000000044e] ADD (no tag) +[PC 000000044f] DUP1 (no tag) +[PC 0000000450] PUSH3: 0x000d2f (no tag) +[PC 0000000454] PUSH1: 0x24 (no tag) +[PC 0000000456] SWAP2 (no tag) +[PC 0000000457] CODECOPY (no tag) +[PC 0000000458] PUSH1: 0x40 (no tag) +[PC 000000045a] ADD (no tag) +[PC 000000045b] SWAP2 (no tag) +[PC 000000045c] POP (no tag) +[PC 000000045d] POP (no tag) +[PC 000000045e] PUSH1: 0x40 (no tag) +[PC 0000000460] MLOAD (no tag) +[PC 0000000461] DUP1 (no tag) +[PC 0000000462] SWAP2 (no tag) +[PC 0000000463] SUB (no tag) +[PC 0000000464] SWAP1 (no tag) +[PC 0000000465] REVERT (no tag) +[PC 0000000466] JUMPDEST (no tag) +[PC 0000000467] DUP1 (no tag) +[PC 0000000468] PUSH1: 0x01 (no tag) +[PC 000000046a] PUSH1: 0x00 (no tag) +[PC 000000046c] PUSH2: 0x0100 (no tag) +[PC 000000046f] EXP (no tag) +[PC 0000000470] DUP2 (no tag) +[PC 0000000471] PUSH1: 0x00 (no tag) +[PC 0000000473] DUP1 (no tag) +[PC 0000000474] PUSH1: 0x40 (no tag) +[PC 0000000476] ADD (no tag) +[PC 0000000477] MLOAD (no tag) +[PC 0000000478] SWAP1 (no tag) +[PC 0000000479] DUP1 (no tag) +[PC 000000047a] PUSH1: 0x20 (no tag) +[PC 000000047c] ADD (no tag) +[PC 000000047d] MLOAD (no tag) +[PC 000000047e] SWAP1 (no tag) +[PC 000000047f] DUP1 (no tag) +[PC 0000000480] PUSH1: 0x00 (no tag) +[PC 0000000482] ADD (no tag) +[PC 0000000483] MLOAD (no tag) +[PC 0000000484] SWAP1 (no tag) +[PC 0000000485] POP (no tag) +[PC 0000000486] DUP4 (no tag) +[PC 0000000487] PUSH4: 0x20966208 (no tag) +[PC 000000048c] PUSH1: 0x00 (no tag) +[PC 000000048e] MSTORE (no tag) +[PC 000000048f] PUSH1: 0x20 (no tag) +[PC 0000000491] MSTORE (no tag) +[PC 0000000492] PUSH1: 0x20 (no tag) +[PC 0000000494] PUSH1: 0x40 (no tag) +[PC 0000000496] PUSH1: 0x24 (no tag) +[PC 0000000498] PUSH1: 0x1c (no tag) +[PC 000000049a] PUSH1: 0x00 (no tag) +[PC 000000049c] PUSH20: 0xa193e42526f1fea8c99af609dceabf30c1c29faa (no tag) +[PC 00000004b1] PUSH32: 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff (no tag) +[PC 00000004d2] CALL (no tag) +[PC 00000004d3] POP (no tag) +[PC 00000004d4] PUSH1: 0x40 (no tag) +[PC 00000004d6] MLOAD (no tag) +[PC 00000004d7] DUP4 (no tag) +[PC 00000004d8] DUP4 (no tag) +[PC 00000004d9] DUP4 (no tag) +[PC 00000004da] PUSH1: 0x00 (no tag) +[PC 00000004dc] SWAP1 (no tag) +[PC 00000004dd] DUP2 (no tag) +[PC 00000004de] PUSH1: 0x00 (no tag) +[PC 00000004e0] ADD (no tag) +[PC 00000004e1] MSTORE (no tag) +[PC 00000004e2] SWAP1 (no tag) +[PC 00000004e3] DUP2 (no tag) +[PC 00000004e4] PUSH1: 0x20 (no tag) +[PC 00000004e6] ADD (no tag) +[PC 00000004e7] MSTORE (no tag) +[PC 00000004e8] SWAP1 (no tag) +[PC 00000004e9] DUP2 (no tag) +[PC 00000004ea] PUSH1: 0x40 (no tag) +[PC 00000004ec] ADD (no tag) +[PC 00000004ed] MSTORE (no tag) +[PC 00000004ee] POP (no tag) +[PC 00000004ef] SWAP4 (no tag) +[PC 00000004f0] POP (no tag) +[PC 00000004f1] POP (no tag) +[PC 00000004f2] POP (no tag) +[PC 00000004f3] POP (no tag) +[PC 00000004f4] DUP2 (no tag) +[PC 00000004f5] PUSH20: 0xffffffffffffffffffffffffffffffffffffffff (no tag) +[PC 000000050a] MUL (no tag) +[PC 000000050b] NOT (no tag) +[PC 000000050c] AND (no tag) +[PC 000000050d] SWAP1 (no tag) +[PC 000000050e] DUP4 (no tag) +[PC 000000050f] PUSH20: 0xffffffffffffffffffffffffffffffffffffffff (no tag) +[PC 0000000524] AND (no tag) +[PC 0000000525] MUL (no tag) +[PC 0000000526] OR (no tag) +[PC 0000000527] SWAP1 (no tag) +[PC 0000000528] PUSH1: 0x00 (no tag) +[PC 000000052a] DUP1 (no tag) +[PC 000000052b] PUSH1: 0x60 (no tag) +[PC 000000052d] ADD (no tag) +[PC 000000052e] MLOAD (no tag) +[PC 000000052f] SWAP1 (no tag) +[PC 0000000530] DUP1 (no tag) +[PC 0000000531] PUSH1: 0x40 (no tag) +[PC 0000000533] ADD (no tag) +[PC 0000000534] MLOAD (no tag) +[PC 0000000535] SWAP1 (no tag) +[PC 0000000536] DUP1 (no tag) +[PC 0000000537] PUSH1: 0x20 (no tag) +[PC 0000000539] ADD (no tag) +[PC 000000053a] MLOAD (no tag) +[PC 000000053b] SWAP1 (no tag) +[PC 000000053c] DUP1 (no tag) +[PC 000000053d] PUSH1: 0x00 (no tag) +[PC 000000053f] ADD (no tag) +[PC 0000000540] MLOAD (no tag) +[PC 0000000541] SWAP1 (no tag) +[PC 0000000542] POP (no tag) +[PC 0000000543] DUP6 (no tag) +[PC 0000000544] DUP6 (no tag) +[PC 0000000545] PUSH4: 0x28dcb2a0 (no tag) +[PC 000000054a] PUSH1: 0x00 (no tag) +[PC 000000054c] MSTORE (no tag) +[PC 000000054d] PUSH1: 0x20 (no tag) +[PC 000000054f] MSTORE (no tag) +[PC 0000000550] PUSH1: 0x40 (no tag) +[PC 0000000552] MSTORE (no tag) +[PC 0000000553] PUSH1: 0x20 (no tag) +[PC 0000000555] PUSH1: 0x60 (no tag) +[PC 0000000557] PUSH1: 0x44 (no tag) +[PC 0000000559] PUSH1: 0x1c (no tag) +[PC 000000055b] PUSH1: 0x00 (no tag) +[PC 000000055d] PUSH20: 0xa193e42526f1fea8c99af609dceabf30c1c29faa (no tag) +[PC 0000000572] PUSH32: 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff (no tag) +[PC 0000000593] CALL (no tag) +[PC 0000000594] POP (no tag) +[PC 0000000595] PUSH1: 0x60 (no tag) +[PC 0000000597] MLOAD (no tag) +[PC 0000000598] DUP5 (no tag) +[PC 0000000599] DUP5 (no tag) +[PC 000000059a] DUP5 (no tag) +[PC 000000059b] DUP5 (no tag) +[PC 000000059c] PUSH1: 0x00 (no tag) +[PC 000000059e] SWAP1 (no tag) +[PC 000000059f] DUP2 (no tag) +[PC 00000005a0] PUSH1: 0x00 (no tag) +[PC 00000005a2] ADD (no tag) +[PC 00000005a3] MSTORE (no tag) +[PC 00000005a4] SWAP1 (no tag) +[PC 00000005a5] DUP2 (no tag) +[PC 00000005a6] PUSH1: 0x20 (no tag) +[PC 00000005a8] ADD (no tag) +[PC 00000005a9] MSTORE (no tag) +[PC 00000005aa] SWAP1 (no tag) +[PC 00000005ab] DUP2 (no tag) +[PC 00000005ac] PUSH1: 0x40 (no tag) +[PC 00000005ae] ADD (no tag) +[PC 00000005af] MSTORE (no tag) +[PC 00000005b0] SWAP1 (no tag) +[PC 00000005b1] DUP2 (no tag) +[PC 00000005b2] PUSH1: 0x60 (no tag) +[PC 00000005b4] ADD (no tag) +[PC 00000005b5] MSTORE (no tag) +[PC 00000005b6] POP (no tag) +[PC 00000005b7] SWAP6 (no tag) +[PC 00000005b8] POP (no tag) +[PC 00000005b9] POP (no tag) +[PC 00000005ba] POP (no tag) +[PC 00000005bb] POP (no tag) +[PC 00000005bc] POP (no tag) +[PC 00000005bd] POP (no tag) +[PC 00000005be] POP (no tag) +[PC 00000005bf] POP (no tag) +[PC 00000005c0] PUSH32: 0x906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce22 (no tag) +[PC 00000005e1] DUP2 (no tag) +[PC 00000005e2] PUSH1: 0x40 (no tag) +[PC 00000005e4] MLOAD (no tag) +[PC 00000005e5] DUP1 (no tag) +[PC 00000005e6] DUP3 (no tag) +[PC 00000005e7] PUSH20: 0xffffffffffffffffffffffffffffffffffffffff (no tag) +[PC 00000005fc] AND (no tag) +[PC 00000005fd] PUSH20: 0xffffffffffffffffffffffffffffffffffffffff (no tag) +[PC 0000000612] AND (no tag) +[PC 0000000613] DUP2 (no tag) +[PC 0000000614] MSTORE (no tag) +[PC 0000000615] PUSH1: 0x20 (no tag) +[PC 0000000617] ADD (no tag) +[PC 0000000618] SWAP2 (no tag) +[PC 0000000619] POP (no tag) +[PC 000000061a] POP (no tag) +[PC 000000061b] PUSH1: 0x40 (no tag) +[PC 000000061d] MLOAD (no tag) +[PC 000000061e] DUP1 (no tag) +[PC 000000061f] SWAP2 (no tag) +[PC 0000000620] SUB (no tag) +[PC 0000000621] SWAP1 (no tag) +[PC 0000000622] LOG1 (no tag) +[PC 0000000623] POP (no tag) +[PC 0000000624] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d57 (no tag) +[PC 0000000645] JUMP (no tag) +[PC 0000000646] JUMPDEST (no tag) +[PC 0000000647] PUSH1: 0x01 (no tag) +[PC 0000000649] PUSH1: 0x00 (no tag) +[PC 000000064b] SWAP1 (no tag) +[PC 000000064c] PUSH1: 0x00 (no tag) +[PC 000000064e] DUP1 (no tag) +[PC 000000064f] PUSH1: 0x40 (no tag) +[PC 0000000651] ADD (no tag) +[PC 0000000652] MLOAD (no tag) +[PC 0000000653] SWAP1 (no tag) +[PC 0000000654] DUP1 (no tag) +[PC 0000000655] PUSH1: 0x20 (no tag) +[PC 0000000657] ADD (no tag) +[PC 0000000658] MLOAD (no tag) +[PC 0000000659] SWAP1 (no tag) +[PC 000000065a] DUP1 (no tag) +[PC 000000065b] PUSH1: 0x00 (no tag) +[PC 000000065d] ADD (no tag) +[PC 000000065e] MLOAD (no tag) +[PC 000000065f] SWAP1 (no tag) +[PC 0000000660] POP (no tag) +[PC 0000000661] DUP4 (no tag) +[PC 0000000662] PUSH4: 0x20966208 (no tag) +[PC 0000000667] PUSH1: 0x00 (no tag) +[PC 0000000669] MSTORE (no tag) +[PC 000000066a] PUSH1: 0x20 (no tag) +[PC 000000066c] MSTORE (no tag) +[PC 000000066d] PUSH1: 0x20 (no tag) +[PC 000000066f] PUSH1: 0x40 (no tag) +[PC 0000000671] PUSH1: 0x24 (no tag) +[PC 0000000673] PUSH1: 0x1c (no tag) +[PC 0000000675] PUSH1: 0x00 (no tag) +[PC 0000000677] PUSH20: 0xa193e42526f1fea8c99af609dceabf30c1c29faa (no tag) +[PC 000000068c] PUSH32: 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff (no tag) +[PC 00000006ad] CALL (no tag) +[PC 00000006ae] POP (no tag) +[PC 00000006af] PUSH1: 0x40 (no tag) +[PC 00000006b1] MLOAD (no tag) +[PC 00000006b2] DUP4 (no tag) +[PC 00000006b3] DUP4 (no tag) +[PC 00000006b4] DUP4 (no tag) +[PC 00000006b5] PUSH1: 0x00 (no tag) +[PC 00000006b7] SWAP1 (no tag) +[PC 00000006b8] DUP2 (no tag) +[PC 00000006b9] PUSH1: 0x00 (no tag) +[PC 00000006bb] ADD (no tag) +[PC 00000006bc] MSTORE (no tag) +[PC 00000006bd] SWAP1 (no tag) +[PC 00000006be] DUP2 (no tag) +[PC 00000006bf] PUSH1: 0x20 (no tag) +[PC 00000006c1] ADD (no tag) +[PC 00000006c2] MSTORE (no tag) +[PC 00000006c3] SWAP1 (no tag) +[PC 00000006c4] DUP2 (no tag) +[PC 00000006c5] PUSH1: 0x40 (no tag) +[PC 00000006c7] ADD (no tag) +[PC 00000006c8] MSTORE (no tag) +[PC 00000006c9] POP (no tag) +[PC 00000006ca] SWAP4 (no tag) +[PC 00000006cb] POP (no tag) +[PC 00000006cc] POP (no tag) +[PC 00000006cd] POP (no tag) +[PC 00000006ce] POP (no tag) +[PC 00000006cf] SWAP1 (no tag) +[PC 00000006d0] PUSH2: 0x0100 (no tag) +[PC 00000006d3] EXP (no tag) +[PC 00000006d4] SWAP1 (no tag) +[PC 00000006d5] DIV (no tag) +[PC 00000006d6] PUSH20: 0xffffffffffffffffffffffffffffffffffffffff (no tag) +[PC 00000006eb] AND (no tag) +[PC 00000006ec] DUP2 (no tag) +[PC 00000006ed] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d57 (no tag) +[PC 000000070e] JUMP (no tag) +[PC 000000070f] JUMPDEST (no tag) +[PC 0000000710] PUSH32: 0xb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c (no tag) +[PC 0000000731] PUSH1: 0x00 (no tag) +[PC 0000000733] DUP1 (no tag) +[PC 0000000734] SWAP1 (no tag) +[PC 0000000735] PUSH1: 0x00 (no tag) +[PC 0000000737] DUP1 (no tag) +[PC 0000000738] PUSH1: 0x40 (no tag) +[PC 000000073a] ADD (no tag) +[PC 000000073b] MLOAD (no tag) +[PC 000000073c] SWAP1 (no tag) +[PC 000000073d] DUP1 (no tag) +[PC 000000073e] PUSH1: 0x20 (no tag) +[PC 0000000740] ADD (no tag) +[PC 0000000741] MLOAD (no tag) +[PC 0000000742] SWAP1 (no tag) +[PC 0000000743] DUP1 (no tag) +[PC 0000000744] PUSH1: 0x00 (no tag) +[PC 0000000746] ADD (no tag) +[PC 0000000747] MLOAD (no tag) +[PC 0000000748] SWAP1 (no tag) +[PC 0000000749] POP (no tag) +[PC 000000074a] DUP4 (no tag) +[PC 000000074b] PUSH4: 0x20966208 (no tag) +[PC 0000000750] PUSH1: 0x00 (no tag) +[PC 0000000752] MSTORE (no tag) +[PC 0000000753] PUSH1: 0x20 (no tag) +[PC 0000000755] MSTORE (no tag) +[PC 0000000756] PUSH1: 0x20 (no tag) +[PC 0000000758] PUSH1: 0x40 (no tag) +[PC 000000075a] PUSH1: 0x24 (no tag) +[PC 000000075c] PUSH1: 0x1c (no tag) +[PC 000000075e] PUSH1: 0x00 (no tag) +[PC 0000000760] PUSH20: 0xa193e42526f1fea8c99af609dceabf30c1c29faa (no tag) +[PC 0000000775] PUSH32: 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff (no tag) +[PC 0000000796] CALL (no tag) +[PC 0000000797] POP (no tag) +[PC 0000000798] PUSH1: 0x40 (no tag) +[PC 000000079a] MLOAD (no tag) +[PC 000000079b] DUP4 (no tag) +[PC 000000079c] DUP4 (no tag) +[PC 000000079d] DUP4 (no tag) +[PC 000000079e] PUSH1: 0x00 (no tag) +[PC 00000007a0] SWAP1 (no tag) +[PC 00000007a1] DUP2 (no tag) +[PC 00000007a2] PUSH1: 0x00 (no tag) +[PC 00000007a4] ADD (no tag) +[PC 00000007a5] MSTORE (no tag) +[PC 00000007a6] SWAP1 (no tag) +[PC 00000007a7] DUP2 (no tag) +[PC 00000007a8] PUSH1: 0x20 (no tag) +[PC 00000007aa] ADD (no tag) +[PC 00000007ab] MSTORE (no tag) +[PC 00000007ac] SWAP1 (no tag) +[PC 00000007ad] DUP2 (no tag) +[PC 00000007ae] PUSH1: 0x40 (no tag) +[PC 00000007b0] ADD (no tag) +[PC 00000007b1] MSTORE (no tag) +[PC 00000007b2] POP (no tag) +[PC 00000007b3] SWAP4 (no tag) +[PC 00000007b4] POP (no tag) +[PC 00000007b5] POP (no tag) +[PC 00000007b6] POP (no tag) +[PC 00000007b7] POP (no tag) +[PC 00000007b8] SWAP1 (no tag) +[PC 00000007b9] PUSH2: 0x0100 (no tag) +[PC 00000007bc] EXP (no tag) +[PC 00000007bd] SWAP1 (no tag) +[PC 00000007be] DIV (no tag) +[PC 00000007bf] PUSH20: 0xffffffffffffffffffffffffffffffffffffffff (no tag) +[PC 00000007d4] AND (no tag) +[PC 00000007d5] PUSH1: 0x01 (no tag) +[PC 00000007d7] PUSH1: 0x00 (no tag) +[PC 00000007d9] SWAP1 (no tag) +[PC 00000007da] PUSH1: 0x00 (no tag) +[PC 00000007dc] DUP1 (no tag) +[PC 00000007dd] PUSH1: 0x40 (no tag) +[PC 00000007df] ADD (no tag) +[PC 00000007e0] MLOAD (no tag) +[PC 00000007e1] SWAP1 (no tag) +[PC 00000007e2] DUP1 (no tag) +[PC 00000007e3] PUSH1: 0x20 (no tag) +[PC 00000007e5] ADD (no tag) +[PC 00000007e6] MLOAD (no tag) +[PC 00000007e7] SWAP1 (no tag) +[PC 00000007e8] DUP1 (no tag) +[PC 00000007e9] PUSH1: 0x00 (no tag) +[PC 00000007eb] ADD (no tag) +[PC 00000007ec] MLOAD (no tag) +[PC 00000007ed] SWAP1 (no tag) +[PC 00000007ee] POP (no tag) +[PC 00000007ef] DUP4 (no tag) +[PC 00000007f0] PUSH4: 0x20966208 (no tag) +[PC 00000007f5] PUSH1: 0x00 (no tag) +[PC 00000007f7] MSTORE (no tag) +[PC 00000007f8] PUSH1: 0x20 (no tag) +[PC 00000007fa] MSTORE (no tag) +[PC 00000007fb] PUSH1: 0x20 (no tag) +[PC 00000007fd] PUSH1: 0x40 (no tag) +[PC 00000007ff] PUSH1: 0x24 (no tag) +[PC 0000000801] PUSH1: 0x1c (no tag) +[PC 0000000803] PUSH1: 0x00 (no tag) +[PC 0000000805] PUSH20: 0xa193e42526f1fea8c99af609dceabf30c1c29faa (no tag) +[PC 000000081a] PUSH32: 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff (no tag) +[PC 000000083b] CALL (no tag) +[PC 000000083c] POP (no tag) +[PC 000000083d] PUSH1: 0x40 (no tag) +[PC 000000083f] MLOAD (no tag) +[PC 0000000840] DUP4 (no tag) +[PC 0000000841] DUP4 (no tag) +[PC 0000000842] DUP4 (no tag) +[PC 0000000843] PUSH1: 0x00 (no tag) +[PC 0000000845] SWAP1 (no tag) +[PC 0000000846] DUP2 (no tag) +[PC 0000000847] PUSH1: 0x00 (no tag) +[PC 0000000849] ADD (no tag) +[PC 000000084a] MSTORE (no tag) +[PC 000000084b] SWAP1 (no tag) +[PC 000000084c] DUP2 (no tag) +[PC 000000084d] PUSH1: 0x20 (no tag) +[PC 000000084f] ADD (no tag) +[PC 0000000850] MSTORE (no tag) +[PC 0000000851] SWAP1 (no tag) +[PC 0000000852] DUP2 (no tag) +[PC 0000000853] PUSH1: 0x40 (no tag) +[PC 0000000855] ADD (no tag) +[PC 0000000856] MSTORE (no tag) +[PC 0000000857] POP (no tag) +[PC 0000000858] SWAP4 (no tag) +[PC 0000000859] POP (no tag) +[PC 000000085a] POP (no tag) +[PC 000000085b] POP (no tag) +[PC 000000085c] POP (no tag) +[PC 000000085d] SWAP1 (no tag) +[PC 000000085e] PUSH2: 0x0100 (no tag) +[PC 0000000861] EXP (no tag) +[PC 0000000862] SWAP1 (no tag) +[PC 0000000863] DIV (no tag) +[PC 0000000864] PUSH20: 0xffffffffffffffffffffffffffffffffffffffff (no tag) +[PC 0000000879] AND (no tag) +[PC 000000087a] PUSH1: 0x40 (no tag) +[PC 000000087c] MLOAD (no tag) +[PC 000000087d] DUP1 (no tag) +[PC 000000087e] DUP4 (no tag) +[PC 000000087f] PUSH20: 0xffffffffffffffffffffffffffffffffffffffff (no tag) +[PC 0000000894] AND (no tag) +[PC 0000000895] PUSH20: 0xffffffffffffffffffffffffffffffffffffffff (no tag) +[PC 00000008aa] AND (no tag) +[PC 00000008ab] DUP2 (no tag) +[PC 00000008ac] MSTORE (no tag) +[PC 00000008ad] PUSH1: 0x20 (no tag) +[PC 00000008af] ADD (no tag) +[PC 00000008b0] DUP3 (no tag) +[PC 00000008b1] PUSH20: 0xffffffffffffffffffffffffffffffffffffffff (no tag) +[PC 00000008c6] AND (no tag) +[PC 00000008c7] PUSH20: 0xffffffffffffffffffffffffffffffffffffffff (no tag) +[PC 00000008dc] AND (no tag) +[PC 00000008dd] DUP2 (no tag) +[PC 00000008de] MSTORE (no tag) +[PC 00000008df] PUSH1: 0x20 (no tag) +[PC 00000008e1] ADD (no tag) +[PC 00000008e2] SWAP3 (no tag) +[PC 00000008e3] POP (no tag) +[PC 00000008e4] POP (no tag) +[PC 00000008e5] POP (no tag) +[PC 00000008e6] PUSH1: 0x40 (no tag) +[PC 00000008e8] MLOAD (no tag) +[PC 00000008e9] DUP1 (no tag) +[PC 00000008ea] SWAP2 (no tag) +[PC 00000008eb] SUB (no tag) +[PC 00000008ec] SWAP1 (no tag) +[PC 00000008ed] LOG1 (no tag) +[PC 00000008ee] PUSH1: 0x01 (no tag) +[PC 00000008f0] PUSH1: 0x00 (no tag) +[PC 00000008f2] SWAP1 (no tag) +[PC 00000008f3] PUSH1: 0x00 (no tag) +[PC 00000008f5] DUP1 (no tag) +[PC 00000008f6] PUSH1: 0x40 (no tag) +[PC 00000008f8] ADD (no tag) +[PC 00000008f9] MLOAD (no tag) +[PC 00000008fa] SWAP1 (no tag) +[PC 00000008fb] DUP1 (no tag) +[PC 00000008fc] PUSH1: 0x20 (no tag) +[PC 00000008fe] ADD (no tag) +[PC 00000008ff] MLOAD (no tag) +[PC 0000000900] SWAP1 (no tag) +[PC 0000000901] DUP1 (no tag) +[PC 0000000902] PUSH1: 0x00 (no tag) +[PC 0000000904] ADD (no tag) +[PC 0000000905] MLOAD (no tag) +[PC 0000000906] SWAP1 (no tag) +[PC 0000000907] POP (no tag) +[PC 0000000908] DUP4 (no tag) +[PC 0000000909] PUSH4: 0x20966208 (no tag) +[PC 000000090e] PUSH1: 0x00 (no tag) +[PC 0000000910] MSTORE (no tag) +[PC 0000000911] PUSH1: 0x20 (no tag) +[PC 0000000913] MSTORE (no tag) +[PC 0000000914] PUSH1: 0x20 (no tag) +[PC 0000000916] PUSH1: 0x40 (no tag) +[PC 0000000918] PUSH1: 0x24 (no tag) +[PC 000000091a] PUSH1: 0x1c (no tag) +[PC 000000091c] PUSH1: 0x00 (no tag) +[PC 000000091e] PUSH20: 0xa193e42526f1fea8c99af609dceabf30c1c29faa (no tag) +[PC 0000000933] PUSH32: 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff (no tag) +[PC 0000000954] CALL (no tag) +[PC 0000000955] POP (no tag) +[PC 0000000956] PUSH1: 0x40 (no tag) +[PC 0000000958] MLOAD (no tag) +[PC 0000000959] DUP4 (no tag) +[PC 000000095a] DUP4 (no tag) +[PC 000000095b] DUP4 (no tag) +[PC 000000095c] PUSH1: 0x00 (no tag) +[PC 000000095e] SWAP1 (no tag) +[PC 000000095f] DUP2 (no tag) +[PC 0000000960] PUSH1: 0x00 (no tag) +[PC 0000000962] ADD (no tag) +[PC 0000000963] MSTORE (no tag) +[PC 0000000964] SWAP1 (no tag) +[PC 0000000965] DUP2 (no tag) +[PC 0000000966] PUSH1: 0x20 (no tag) +[PC 0000000968] ADD (no tag) +[PC 0000000969] MSTORE (no tag) +[PC 000000096a] SWAP1 (no tag) +[PC 000000096b] DUP2 (no tag) +[PC 000000096c] PUSH1: 0x40 (no tag) +[PC 000000096e] ADD (no tag) +[PC 000000096f] MSTORE (no tag) +[PC 0000000970] POP (no tag) +[PC 0000000971] SWAP4 (no tag) +[PC 0000000972] POP (no tag) +[PC 0000000973] POP (no tag) +[PC 0000000974] POP (no tag) +[PC 0000000975] POP (no tag) +[PC 0000000976] SWAP1 (no tag) +[PC 0000000977] PUSH2: 0x0100 (no tag) +[PC 000000097a] EXP (no tag) +[PC 000000097b] SWAP1 (no tag) +[PC 000000097c] DIV (no tag) +[PC 000000097d] PUSH20: 0xffffffffffffffffffffffffffffffffffffffff (no tag) +[PC 0000000992] AND (no tag) +[PC 0000000993] PUSH1: 0x00 (no tag) +[PC 0000000995] DUP1 (no tag) +[PC 0000000996] PUSH2: 0x0100 (no tag) +[PC 0000000999] EXP (no tag) +[PC 000000099a] DUP2 (no tag) +[PC 000000099b] PUSH1: 0x00 (no tag) +[PC 000000099d] DUP1 (no tag) +[PC 000000099e] PUSH1: 0x40 (no tag) +[PC 00000009a0] ADD (no tag) +[PC 00000009a1] MLOAD (no tag) +[PC 00000009a2] SWAP1 (no tag) +[PC 00000009a3] DUP1 (no tag) +[PC 00000009a4] PUSH1: 0x20 (no tag) +[PC 00000009a6] ADD (no tag) +[PC 00000009a7] MLOAD (no tag) +[PC 00000009a8] SWAP1 (no tag) +[PC 00000009a9] DUP1 (no tag) +[PC 00000009aa] PUSH1: 0x00 (no tag) +[PC 00000009ac] ADD (no tag) +[PC 00000009ad] MLOAD (no tag) +[PC 00000009ae] SWAP1 (no tag) +[PC 00000009af] POP (no tag) +[PC 00000009b0] DUP4 (no tag) +[PC 00000009b1] PUSH4: 0x20966208 (no tag) +[PC 00000009b6] PUSH1: 0x00 (no tag) +[PC 00000009b8] MSTORE (no tag) +[PC 00000009b9] PUSH1: 0x20 (no tag) +[PC 00000009bb] MSTORE (no tag) +[PC 00000009bc] PUSH1: 0x20 (no tag) +[PC 00000009be] PUSH1: 0x40 (no tag) +[PC 00000009c0] PUSH1: 0x24 (no tag) +[PC 00000009c2] PUSH1: 0x1c (no tag) +[PC 00000009c4] PUSH1: 0x00 (no tag) +[PC 00000009c6] PUSH20: 0xa193e42526f1fea8c99af609dceabf30c1c29faa (no tag) +[PC 00000009db] PUSH32: 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff (no tag) +[PC 00000009fc] CALL (no tag) +[PC 00000009fd] POP (no tag) +[PC 00000009fe] PUSH1: 0x40 (no tag) +[PC 0000000a00] MLOAD (no tag) +[PC 0000000a01] DUP4 (no tag) +[PC 0000000a02] DUP4 (no tag) +[PC 0000000a03] DUP4 (no tag) +[PC 0000000a04] PUSH1: 0x00 (no tag) +[PC 0000000a06] SWAP1 (no tag) +[PC 0000000a07] DUP2 (no tag) +[PC 0000000a08] PUSH1: 0x00 (no tag) +[PC 0000000a0a] ADD (no tag) +[PC 0000000a0b] MSTORE (no tag) +[PC 0000000a0c] SWAP1 (no tag) +[PC 0000000a0d] DUP2 (no tag) +[PC 0000000a0e] PUSH1: 0x20 (no tag) +[PC 0000000a10] ADD (no tag) +[PC 0000000a11] MSTORE (no tag) +[PC 0000000a12] SWAP1 (no tag) +[PC 0000000a13] DUP2 (no tag) +[PC 0000000a14] PUSH1: 0x40 (no tag) +[PC 0000000a16] ADD (no tag) +[PC 0000000a17] MSTORE (no tag) +[PC 0000000a18] POP (no tag) +[PC 0000000a19] SWAP4 (no tag) +[PC 0000000a1a] POP (no tag) +[PC 0000000a1b] POP (no tag) +[PC 0000000a1c] POP (no tag) +[PC 0000000a1d] POP (no tag) +[PC 0000000a1e] DUP2 (no tag) +[PC 0000000a1f] PUSH20: 0xffffffffffffffffffffffffffffffffffffffff (no tag) +[PC 0000000a34] MUL (no tag) +[PC 0000000a35] NOT (no tag) +[PC 0000000a36] AND (no tag) +[PC 0000000a37] SWAP1 (no tag) +[PC 0000000a38] DUP4 (no tag) +[PC 0000000a39] PUSH20: 0xffffffffffffffffffffffffffffffffffffffff (no tag) +[PC 0000000a4e] AND (no tag) +[PC 0000000a4f] MUL (no tag) +[PC 0000000a50] OR (no tag) +[PC 0000000a51] SWAP1 (no tag) +[PC 0000000a52] PUSH1: 0x00 (no tag) +[PC 0000000a54] DUP1 (no tag) +[PC 0000000a55] PUSH1: 0x60 (no tag) +[PC 0000000a57] ADD (no tag) +[PC 0000000a58] MLOAD (no tag) +[PC 0000000a59] SWAP1 (no tag) +[PC 0000000a5a] DUP1 (no tag) +[PC 0000000a5b] PUSH1: 0x40 (no tag) +[PC 0000000a5d] ADD (no tag) +[PC 0000000a5e] MLOAD (no tag) +[PC 0000000a5f] SWAP1 (no tag) +[PC 0000000a60] DUP1 (no tag) +[PC 0000000a61] PUSH1: 0x20 (no tag) +[PC 0000000a63] ADD (no tag) +[PC 0000000a64] MLOAD (no tag) +[PC 0000000a65] SWAP1 (no tag) +[PC 0000000a66] DUP1 (no tag) +[PC 0000000a67] PUSH1: 0x00 (no tag) +[PC 0000000a69] ADD (no tag) +[PC 0000000a6a] MLOAD (no tag) +[PC 0000000a6b] SWAP1 (no tag) +[PC 0000000a6c] POP (no tag) +[PC 0000000a6d] DUP6 (no tag) +[PC 0000000a6e] DUP6 (no tag) +[PC 0000000a6f] PUSH4: 0x28dcb2a0 (no tag) +[PC 0000000a74] PUSH1: 0x00 (no tag) +[PC 0000000a76] MSTORE (no tag) +[PC 0000000a77] PUSH1: 0x20 (no tag) +[PC 0000000a79] MSTORE (no tag) +[PC 0000000a7a] PUSH1: 0x40 (no tag) +[PC 0000000a7c] MSTORE (no tag) +[PC 0000000a7d] PUSH1: 0x20 (no tag) +[PC 0000000a7f] PUSH1: 0x60 (no tag) +[PC 0000000a81] PUSH1: 0x44 (no tag) +[PC 0000000a83] PUSH1: 0x1c (no tag) +[PC 0000000a85] PUSH1: 0x00 (no tag) +[PC 0000000a87] PUSH20: 0xa193e42526f1fea8c99af609dceabf30c1c29faa (no tag) +[PC 0000000a9c] PUSH32: 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff (no tag) +[PC 0000000abd] CALL (no tag) +[PC 0000000abe] POP (no tag) +[PC 0000000abf] PUSH1: 0x60 (no tag) +[PC 0000000ac1] MLOAD (no tag) +[PC 0000000ac2] DUP5 (no tag) +[PC 0000000ac3] DUP5 (no tag) +[PC 0000000ac4] DUP5 (no tag) +[PC 0000000ac5] DUP5 (no tag) +[PC 0000000ac6] PUSH1: 0x00 (no tag) +[PC 0000000ac8] SWAP1 (no tag) +[PC 0000000ac9] DUP2 (no tag) +[PC 0000000aca] PUSH1: 0x00 (no tag) +[PC 0000000acc] ADD (no tag) +[PC 0000000acd] MSTORE (no tag) +[PC 0000000ace] SWAP1 (no tag) +[PC 0000000acf] DUP2 (no tag) +[PC 0000000ad0] PUSH1: 0x20 (no tag) +[PC 0000000ad2] ADD (no tag) +[PC 0000000ad3] MSTORE (no tag) +[PC 0000000ad4] SWAP1 (no tag) +[PC 0000000ad5] DUP2 (no tag) +[PC 0000000ad6] PUSH1: 0x40 (no tag) +[PC 0000000ad8] ADD (no tag) +[PC 0000000ad9] MSTORE (no tag) +[PC 0000000ada] SWAP1 (no tag) +[PC 0000000adb] DUP2 (no tag) +[PC 0000000adc] PUSH1: 0x60 (no tag) +[PC 0000000ade] ADD (no tag) +[PC 0000000adf] MSTORE (no tag) +[PC 0000000ae0] POP (no tag) +[PC 0000000ae1] SWAP6 (no tag) +[PC 0000000ae2] POP (no tag) +[PC 0000000ae3] POP (no tag) +[PC 0000000ae4] POP (no tag) +[PC 0000000ae5] POP (no tag) +[PC 0000000ae6] POP (no tag) +[PC 0000000ae7] POP (no tag) +[PC 0000000ae8] POP (no tag) +[PC 0000000ae9] POP (no tag) +[PC 0000000aea] PUSH1: 0x00 (no tag) +[PC 0000000aec] PUSH1: 0x01 (no tag) +[PC 0000000aee] PUSH1: 0x00 (no tag) +[PC 0000000af0] PUSH2: 0x0100 (no tag) +[PC 0000000af3] EXP (no tag) +[PC 0000000af4] DUP2 (no tag) +[PC 0000000af5] PUSH1: 0x00 (no tag) +[PC 0000000af7] DUP1 (no tag) +[PC 0000000af8] PUSH1: 0x40 (no tag) +[PC 0000000afa] ADD (no tag) +[PC 0000000afb] MLOAD (no tag) +[PC 0000000afc] SWAP1 (no tag) +[PC 0000000afd] DUP1 (no tag) +[PC 0000000afe] PUSH1: 0x20 (no tag) +[PC 0000000b00] ADD (no tag) +[PC 0000000b01] MLOAD (no tag) +[PC 0000000b02] SWAP1 (no tag) +[PC 0000000b03] DUP1 (no tag) +[PC 0000000b04] PUSH1: 0x00 (no tag) +[PC 0000000b06] ADD (no tag) +[PC 0000000b07] MLOAD (no tag) +[PC 0000000b08] SWAP1 (no tag) +[PC 0000000b09] POP (no tag) +[PC 0000000b0a] DUP4 (no tag) +[PC 0000000b0b] PUSH4: 0x20966208 (no tag) +[PC 0000000b10] PUSH1: 0x00 (no tag) +[PC 0000000b12] MSTORE (no tag) +[PC 0000000b13] PUSH1: 0x20 (no tag) +[PC 0000000b15] MSTORE (no tag) +[PC 0000000b16] PUSH1: 0x20 (no tag) +[PC 0000000b18] PUSH1: 0x40 (no tag) +[PC 0000000b1a] PUSH1: 0x24 (no tag) +[PC 0000000b1c] PUSH1: 0x1c (no tag) +[PC 0000000b1e] PUSH1: 0x00 (no tag) +[PC 0000000b20] PUSH20: 0xa193e42526f1fea8c99af609dceabf30c1c29faa (no tag) +[PC 0000000b35] PUSH32: 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff (no tag) +[PC 0000000b56] CALL (no tag) +[PC 0000000b57] POP (no tag) +[PC 0000000b58] PUSH1: 0x40 (no tag) +[PC 0000000b5a] MLOAD (no tag) +[PC 0000000b5b] DUP4 (no tag) +[PC 0000000b5c] DUP4 (no tag) +[PC 0000000b5d] DUP4 (no tag) +[PC 0000000b5e] PUSH1: 0x00 (no tag) +[PC 0000000b60] SWAP1 (no tag) +[PC 0000000b61] DUP2 (no tag) +[PC 0000000b62] PUSH1: 0x00 (no tag) +[PC 0000000b64] ADD (no tag) +[PC 0000000b65] MSTORE (no tag) +[PC 0000000b66] SWAP1 (no tag) +[PC 0000000b67] DUP2 (no tag) +[PC 0000000b68] PUSH1: 0x20 (no tag) +[PC 0000000b6a] ADD (no tag) +[PC 0000000b6b] MSTORE (no tag) +[PC 0000000b6c] SWAP1 (no tag) +[PC 0000000b6d] DUP2 (no tag) +[PC 0000000b6e] PUSH1: 0x40 (no tag) +[PC 0000000b70] ADD (no tag) +[PC 0000000b71] MSTORE (no tag) +[PC 0000000b72] POP (no tag) +[PC 0000000b73] SWAP4 (no tag) +[PC 0000000b74] POP (no tag) +[PC 0000000b75] POP (no tag) +[PC 0000000b76] POP (no tag) +[PC 0000000b77] POP (no tag) +[PC 0000000b78] DUP2 (no tag) +[PC 0000000b79] PUSH20: 0xffffffffffffffffffffffffffffffffffffffff (no tag) +[PC 0000000b8e] MUL (no tag) +[PC 0000000b8f] NOT (no tag) +[PC 0000000b90] AND (no tag) +[PC 0000000b91] SWAP1 (no tag) +[PC 0000000b92] DUP4 (no tag) +[PC 0000000b93] PUSH20: 0xffffffffffffffffffffffffffffffffffffffff (no tag) +[PC 0000000ba8] AND (no tag) +[PC 0000000ba9] MUL (no tag) +[PC 0000000baa] OR (no tag) +[PC 0000000bab] SWAP1 (no tag) +[PC 0000000bac] PUSH1: 0x00 (no tag) +[PC 0000000bae] DUP1 (no tag) +[PC 0000000baf] PUSH1: 0x60 (no tag) +[PC 0000000bb1] ADD (no tag) +[PC 0000000bb2] MLOAD (no tag) +[PC 0000000bb3] SWAP1 (no tag) +[PC 0000000bb4] DUP1 (no tag) +[PC 0000000bb5] PUSH1: 0x40 (no tag) +[PC 0000000bb7] ADD (no tag) +[PC 0000000bb8] MLOAD (no tag) +[PC 0000000bb9] SWAP1 (no tag) +[PC 0000000bba] DUP1 (no tag) +[PC 0000000bbb] PUSH1: 0x20 (no tag) +[PC 0000000bbd] ADD (no tag) +[PC 0000000bbe] MLOAD (no tag) +[PC 0000000bbf] SWAP1 (no tag) +[PC 0000000bc0] DUP1 (no tag) +[PC 0000000bc1] PUSH1: 0x00 (no tag) +[PC 0000000bc3] ADD (no tag) +[PC 0000000bc4] MLOAD (no tag) +[PC 0000000bc5] SWAP1 (no tag) +[PC 0000000bc6] POP (no tag) +[PC 0000000bc7] DUP6 (no tag) +[PC 0000000bc8] DUP6 (no tag) +[PC 0000000bc9] PUSH4: 0x28dcb2a0 (no tag) +[PC 0000000bce] PUSH1: 0x00 (no tag) +[PC 0000000bd0] MSTORE (no tag) +[PC 0000000bd1] PUSH1: 0x20 (no tag) +[PC 0000000bd3] MSTORE (no tag) +[PC 0000000bd4] PUSH1: 0x40 (no tag) +[PC 0000000bd6] MSTORE (no tag) +[PC 0000000bd7] PUSH1: 0x20 (no tag) +[PC 0000000bd9] PUSH1: 0x60 (no tag) +[PC 0000000bdb] PUSH1: 0x44 (no tag) +[PC 0000000bdd] PUSH1: 0x1c (no tag) +[PC 0000000bdf] PUSH1: 0x00 (no tag) +[PC 0000000be1] PUSH20: 0xa193e42526f1fea8c99af609dceabf30c1c29faa (no tag) +[PC 0000000bf6] PUSH32: 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff (no tag) +[PC 0000000c17] CALL (no tag) +[PC 0000000c18] POP (no tag) +[PC 0000000c19] PUSH1: 0x60 (no tag) +[PC 0000000c1b] MLOAD (no tag) +[PC 0000000c1c] DUP5 (no tag) +[PC 0000000c1d] DUP5 (no tag) +[PC 0000000c1e] DUP5 (no tag) +[PC 0000000c1f] DUP5 (no tag) +[PC 0000000c20] PUSH1: 0x00 (no tag) +[PC 0000000c22] SWAP1 (no tag) +[PC 0000000c23] DUP2 (no tag) +[PC 0000000c24] PUSH1: 0x00 (no tag) +[PC 0000000c26] ADD (no tag) +[PC 0000000c27] MSTORE (no tag) +[PC 0000000c28] SWAP1 (no tag) +[PC 0000000c29] DUP2 (no tag) +[PC 0000000c2a] PUSH1: 0x20 (no tag) +[PC 0000000c2c] ADD (no tag) +[PC 0000000c2d] MSTORE (no tag) +[PC 0000000c2e] SWAP1 (no tag) +[PC 0000000c2f] DUP2 (no tag) +[PC 0000000c30] PUSH1: 0x40 (no tag) +[PC 0000000c32] ADD (no tag) +[PC 0000000c33] MSTORE (no tag) +[PC 0000000c34] SWAP1 (no tag) +[PC 0000000c35] DUP2 (no tag) +[PC 0000000c36] PUSH1: 0x60 (no tag) +[PC 0000000c38] ADD (no tag) +[PC 0000000c39] MSTORE (no tag) +[PC 0000000c3a] POP (no tag) +[PC 0000000c3b] SWAP6 (no tag) +[PC 0000000c3c] POP (no tag) +[PC 0000000c3d] POP (no tag) +[PC 0000000c3e] POP (no tag) +[PC 0000000c3f] POP (no tag) +[PC 0000000c40] POP (no tag) +[PC 0000000c41] POP (no tag) +[PC 0000000c42] POP (no tag) +[PC 0000000c43] POP (no tag) +[PC 0000000c44] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d57 (no tag) +[PC 0000000c65] JUMP (no tag) +[PC 0000000c66] JUMPDEST (no tag) +[PC 0000000c67] PUSH1: 0x00 (no tag) +[PC 0000000c69] DUP1 (no tag) +[PC 0000000c6a] SWAP1 (no tag) +[PC 0000000c6b] PUSH1: 0x00 (no tag) +[PC 0000000c6d] DUP1 (no tag) +[PC 0000000c6e] PUSH1: 0x40 (no tag) +[PC 0000000c70] ADD (no tag) +[PC 0000000c71] MLOAD (no tag) +[PC 0000000c72] SWAP1 (no tag) +[PC 0000000c73] DUP1 (no tag) +[PC 0000000c74] PUSH1: 0x20 (no tag) +[PC 0000000c76] ADD (no tag) +[PC 0000000c77] MLOAD (no tag) +[PC 0000000c78] SWAP1 (no tag) +[PC 0000000c79] DUP1 (no tag) +[PC 0000000c7a] PUSH1: 0x00 (no tag) +[PC 0000000c7c] ADD (no tag) +[PC 0000000c7d] MLOAD (no tag) +[PC 0000000c7e] SWAP1 (no tag) +[PC 0000000c7f] POP (no tag) +[PC 0000000c80] DUP4 (no tag) +[PC 0000000c81] PUSH4: 0x20966208 (no tag) +[PC 0000000c86] PUSH1: 0x00 (no tag) +[PC 0000000c88] MSTORE (no tag) +[PC 0000000c89] PUSH1: 0x20 (no tag) +[PC 0000000c8b] MSTORE (no tag) +[PC 0000000c8c] PUSH1: 0x20 (no tag) +[PC 0000000c8e] PUSH1: 0x40 (no tag) +[PC 0000000c90] PUSH1: 0x24 (no tag) +[PC 0000000c92] PUSH1: 0x1c (no tag) +[PC 0000000c94] PUSH1: 0x00 (no tag) +[PC 0000000c96] PUSH20: 0xa193e42526f1fea8c99af609dceabf30c1c29faa (no tag) +[PC 0000000cab] PUSH32: 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff (no tag) +[PC 0000000ccc] CALL (no tag) +[PC 0000000ccd] POP (no tag) +[PC 0000000cce] PUSH1: 0x40 (no tag) +[PC 0000000cd0] MLOAD (no tag) +[PC 0000000cd1] DUP4 (no tag) +[PC 0000000cd2] DUP4 (no tag) +[PC 0000000cd3] DUP4 (no tag) +[PC 0000000cd4] PUSH1: 0x00 (no tag) +[PC 0000000cd6] SWAP1 (no tag) +[PC 0000000cd7] DUP2 (no tag) +[PC 0000000cd8] PUSH1: 0x00 (no tag) +[PC 0000000cda] ADD (no tag) +[PC 0000000cdb] MSTORE (no tag) +[PC 0000000cdc] SWAP1 (no tag) +[PC 0000000cdd] DUP2 (no tag) +[PC 0000000cde] PUSH1: 0x20 (no tag) +[PC 0000000ce0] ADD (no tag) +[PC 0000000ce1] MSTORE (no tag) +[PC 0000000ce2] SWAP1 (no tag) +[PC 0000000ce3] DUP2 (no tag) +[PC 0000000ce4] PUSH1: 0x40 (no tag) +[PC 0000000ce6] ADD (no tag) +[PC 0000000ce7] MSTORE (no tag) +[PC 0000000ce8] POP (no tag) +[PC 0000000ce9] SWAP4 (no tag) +[PC 0000000cea] POP (no tag) +[PC 0000000ceb] POP (no tag) +[PC 0000000cec] POP (no tag) +[PC 0000000ced] POP (no tag) +[PC 0000000cee] SWAP1 (no tag) +[PC 0000000cef] PUSH2: 0x0100 (no tag) +[PC 0000000cf2] EXP (no tag) +[PC 0000000cf3] SWAP1 (no tag) +[PC 0000000cf4] DIV (no tag) +[PC 0000000cf5] PUSH20: 0xffffffffffffffffffffffffffffffffffffffff (no tag) +[PC 0000000d0a] AND (no tag) +[PC 0000000d0b] DUP2 (no tag) +[PC 0000000d0c] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d57 (no tag) +[PC 0000000d2d] JUMP (no tag) +[PC 0000000d2e] INVALID (no tag) +[PC 0000000d2f] UNRECOGNIZED (0x4f) (no tag) +[PC 0000000d30] PUSH15: 0x6c792074686520636f6e7472616374 (no tag) +[PC 0000000d40] SHA3 (no tag) +[PC 0000000d41] PUSH16: 0x776e6572206d617920706572666f726d (no tag) +[PC 0000000d52] SHA3 (no tag) +[PC 0000000d53] JUMPDEST (no tag) +[PC 0000000d54] SWAP1 (no tag) +[PC 0000000d55] POP (no tag) +[PC 0000000d56] JUMP (no tag) +[PC 0000000d57] JUMPDEST (no tag) +[PC 0000000d58] DUP1 (no tag) +[PC 0000000d59] PUSH1: 0x10 (no tag) +[PC 0000000d5b] EQ (no tag) +[PC 0000000d5c] PUSH1: 0x33 (no tag) +[PC 0000000d5e] SWAP1 (no tag) +[PC 0000000d5f] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d53 (no tag) +[PC 0000000d80] JUMPI (no tag) +[PC 0000000d81] POP (no tag) +[PC 0000000d82] DUP1 (no tag) +[PC 0000000d83] PUSH1: 0x4c (no tag) +[PC 0000000d85] EQ (no tag) +[PC 0000000d86] PUSH2: 0x011e (no tag) +[PC 0000000d89] SWAP1 (no tag) +[PC 0000000d8a] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d53 (no tag) +[PC 0000000dab] JUMPI (no tag) +[PC 0000000dac] POP (no tag) +[PC 0000000dad] DUP1 (no tag) +[PC 0000000dae] PUSH1: 0x51 (no tag) +[PC 0000000db0] EQ (no tag) +[PC 0000000db1] PUSH2: 0x0123 (no tag) +[PC 0000000db4] SWAP1 (no tag) +[PC 0000000db5] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d53 (no tag) +[PC 0000000dd6] JUMPI (no tag) +[PC 0000000dd7] POP (no tag) +[PC 0000000dd8] DUP1 (no tag) +[PC 0000000dd9] PUSH1: 0x67 (no tag) +[PC 0000000ddb] EQ (no tag) +[PC 0000000ddc] PUSH2: 0x015c (no tag) +[PC 0000000ddf] SWAP1 (no tag) +[PC 0000000de0] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d53 (no tag) +[PC 0000000e01] JUMPI (no tag) +[PC 0000000e02] POP (no tag) +[PC 0000000e03] DUP1 (no tag) +[PC 0000000e04] PUSH1: 0x93 (no tag) +[PC 0000000e06] EQ (no tag) +[PC 0000000e07] PUSH2: 0x01a9 (no tag) +[PC 0000000e0a] SWAP1 (no tag) +[PC 0000000e0b] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d53 (no tag) +[PC 0000000e2c] JUMPI (no tag) +[PC 0000000e2d] POP (no tag) +[PC 0000000e2e] DUP1 (no tag) +[PC 0000000e2f] PUSH1: 0x95 (no tag) +[PC 0000000e31] EQ (no tag) +[PC 0000000e32] PUSH2: 0x01ab (no tag) +[PC 0000000e35] SWAP1 (no tag) +[PC 0000000e36] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d53 (no tag) +[PC 0000000e57] JUMPI (no tag) +[PC 0000000e58] POP (no tag) +[PC 0000000e59] DUP1 (no tag) +[PC 0000000e5a] PUSH1: 0x9d (no tag) +[PC 0000000e5c] EQ (no tag) +[PC 0000000e5d] PUSH2: 0x01d4 (no tag) +[PC 0000000e60] SWAP1 (no tag) +[PC 0000000e61] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d53 (no tag) +[PC 0000000e82] JUMPI (no tag) +[PC 0000000e83] POP (no tag) +[PC 0000000e84] DUP1 (no tag) +[PC 0000000e85] PUSH1: 0xdf (no tag) +[PC 0000000e87] EQ (no tag) +[PC 0000000e88] PUSH2: 0x0216 (no tag) +[PC 0000000e8b] SWAP1 (no tag) +[PC 0000000e8c] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d53 (no tag) +[PC 0000000ead] JUMPI (no tag) +[PC 0000000eae] POP (no tag) +[PC 0000000eaf] DUP1 (no tag) +[PC 0000000eb0] PUSH1: 0xe7 (no tag) +[PC 0000000eb2] EQ (no tag) +[PC 0000000eb3] PUSH2: 0x023f (no tag) +[PC 0000000eb6] SWAP1 (no tag) +[PC 0000000eb7] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d53 (no tag) +[PC 0000000ed8] JUMPI (no tag) +[PC 0000000ed9] POP (no tag) +[PC 0000000eda] DUP1 (no tag) +[PC 0000000edb] PUSH1: 0xe9 (no tag) +[PC 0000000edd] EQ (no tag) +[PC 0000000ede] PUSH2: 0x0241 (no tag) +[PC 0000000ee1] SWAP1 (no tag) +[PC 0000000ee2] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d53 (no tag) +[PC 0000000f03] JUMPI (no tag) +[PC 0000000f04] POP (no tag) +[PC 0000000f05] DUP1 (no tag) +[PC 0000000f06] PUSH1: 0xf1 (no tag) +[PC 0000000f08] EQ (no tag) +[PC 0000000f09] PUSH2: 0x026a (no tag) +[PC 0000000f0c] SWAP1 (no tag) +[PC 0000000f0d] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d53 (no tag) +[PC 0000000f2e] JUMPI (no tag) +[PC 0000000f2f] POP (no tag) +[PC 0000000f30] DUP1 (no tag) +[PC 0000000f31] PUSH2: 0x0133 (no tag) +[PC 0000000f34] EQ (no tag) +[PC 0000000f35] PUSH2: 0x02ac (no tag) +[PC 0000000f38] SWAP1 (no tag) +[PC 0000000f39] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d53 (no tag) +[PC 0000000f5a] JUMPI (no tag) +[PC 0000000f5b] POP (no tag) +[PC 0000000f5c] DUP1 (no tag) +[PC 0000000f5d] PUSH2: 0x01d8 (no tag) +[PC 0000000f60] EQ (no tag) +[PC 0000000f61] PUSH2: 0x0466 (no tag) +[PC 0000000f64] SWAP1 (no tag) +[PC 0000000f65] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d53 (no tag) +[PC 0000000f86] JUMPI (no tag) +[PC 0000000f87] POP (no tag) +[PC 0000000f88] DUP1 (no tag) +[PC 0000000f89] PUSH2: 0x027f (no tag) +[PC 0000000f8c] EQ (no tag) +[PC 0000000f8d] PUSH2: 0x0646 (no tag) +[PC 0000000f90] SWAP1 (no tag) +[PC 0000000f91] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d53 (no tag) +[PC 0000000fb2] JUMPI (no tag) +[PC 0000000fb3] POP (no tag) +[PC 0000000fb4] DUP1 (no tag) +[PC 0000000fb5] PUSH2: 0x02a5 (no tag) +[PC 0000000fb8] EQ (no tag) +[PC 0000000fb9] PUSH2: 0x070f (no tag) +[PC 0000000fbc] SWAP1 (no tag) +[PC 0000000fbd] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d53 (no tag) +[PC 0000000fde] JUMPI (no tag) +[PC 0000000fdf] POP (no tag) +[PC 0000000fe0] DUP1 (no tag) +[PC 0000000fe1] PUSH2: 0x0425 (no tag) +[PC 0000000fe4] EQ (no tag) +[PC 0000000fe5] PUSH2: 0x0c66 (no tag) +[PC 0000000fe8] SWAP1 (no tag) +[PC 0000000fe9] PUSH32: 0x0000000000000000000000000000000000000000000000000000000000000d53 (no tag) +[PC 000000100a] JUMPI (no tag) +[PC 000000100b] POP (no tag) +[PC 000000100c] REVERT (no tag) +Caller function ID: 0x7350906428328f5a93a816c8a4edfdd3f7fc6f42dcc0047277f4ad117903c498 +OVM SLOAD function ID: 0x209662085cbcede7b696b32aa1acd3bdb6425400d83b70b8bc97e642d2cc1fba +OVM SSTORE function ID: 0x28dcb2a0c728f1925fa89760794e0f2815b0aa45b26f2f1f63a021d5ec2c4891 + ✓ derps hard + + + 1 passing (24ms) + +Done in 8.71s. diff --git a/packages/rollup-dev-tools/package.json b/packages/rollup-dev-tools/package.json index d4444c8b4480..0e2d721f52ae 100644 --- a/packages/rollup-dev-tools/package.json +++ b/packages/rollup-dev-tools/package.json @@ -1,6 +1,6 @@ { "name": "@eth-optimism/rollup-dev-tools", - "version": "0.0.1-alpha.12", + "version": "0.0.1-alpha.13", "description": "[Optimism] Optimistic Rollup Dev Tools Library", "main": "build/index.js", "files": [ @@ -33,8 +33,8 @@ "url": "https://github.com/ethereum-optimism/optimism-monorepo.git" }, "dependencies": { - "@eth-optimism/core-utils": "0.0.1-alpha.12", - "@eth-optimism/rollup-core": "0.0.1-alpha.12", + "@eth-optimism/core-utils": "^0.0.1-alpha.13", + "@eth-optimism/rollup-core": "^0.0.1-alpha.13", "async-lock": "^1.2.2", "bn.js": "^5.1.1", "dotenv": "^8.2.0", diff --git a/packages/rollup-dev-tools/src/tools/transpiler/transpiler.ts b/packages/rollup-dev-tools/src/tools/transpiler/transpiler.ts index da91f0d0abfa..70a98c626a53 100644 --- a/packages/rollup-dev-tools/src/tools/transpiler/transpiler.ts +++ b/packages/rollup-dev-tools/src/tools/transpiler/transpiler.ts @@ -12,8 +12,8 @@ import { import { getLogger, bufToHexString, - add0x, bufferUtils, + add0x, } from '@eth-optimism/core-utils' import BigNum = require('bn.js') @@ -26,14 +26,11 @@ import { TranspilationResult, TranspilationError, TranspilationErrors, - JumpReplacementResult, - SuccessfulTranspilation, ErroredTranspilation, TaggedTranspilationResult, + JumpReplacementResult, } from '../../types/transpiler' import { accountForJumps } from './jump-replacement' -import { createError } from './util' -import { format } from 'path' const log = getLogger('transpiler-impl') @@ -166,6 +163,13 @@ export class TranspilerImpl implements Transpiler { errors ) + // problem is after here? + log.debug( + `final transpiled deployed bytecode: \n${formatBytecode( + finalTranspiledDeployedBytecode + )}` + ) + // **** DETECT AND TAG USES OF CODECOPY IN CONSTRUCTOR BYTECODE AND TRANSPILE **** let taggedOriginalConstructorInitLogic: EVMBytecode @@ -394,11 +398,11 @@ export class TranspilerImpl implements Transpiler { // Finds and tags the PUSHN's which are detected to be associated with CODECOPYing constructor params during CREATE/CREATE2. // Tags based on the pattern: - // PUSH2: 0x01cf // should be initcode.length + deployedbytecode.length + // PUSH2 // should be initcode.length + deployedbytecode.length // CODESIZE // SUB // subtract however big the code is from the amount pushed above to get the length of constructor input // DUP1 - // PUSH2: 0x01cf // should also be initcode.length + deployedbytecode.length + // PUSH2 // should also be initcode.length + deployedbytecode.length // DUP4 // CODECOPY // See https://github.com/ethereum-optimism/optimistic-rollup/wiki/CODECOPYs for more details. @@ -734,7 +738,11 @@ export class TranspilerImpl implements Transpiler { )}.${messageExtension}` log.debug(message) errors.push( - createError(pc, TranspilationErrors.UNSUPPORTED_OPCODE, message) + TranspilerImpl.createError( + pc, + TranspilationErrors.UNSUPPORTED_OPCODE, + message + ) ) return false } @@ -759,7 +767,11 @@ export class TranspilerImpl implements Transpiler { const message: string = `Opcode [${opcode.name}] is not on the whitelist.` log.debug(message) errors.push( - createError(pc, TranspilationErrors.OPCODE_NOT_WHITELISTED, message) + TranspilerImpl.createError( + pc, + TranspilationErrors.OPCODE_NOT_WHITELISTED, + message + ) ) return false } diff --git a/packages/rollup-dev-tools/test/transpiler/constructor-transpilation.spec.ts b/packages/rollup-dev-tools/test/transpiler/constructor-transpilation.spec.ts index d3bad97f246d..8d98e746013d 100644 --- a/packages/rollup-dev-tools/test/transpiler/constructor-transpilation.spec.ts +++ b/packages/rollup-dev-tools/test/transpiler/constructor-transpilation.spec.ts @@ -55,7 +55,7 @@ import { transpileAndDeployInitcode, stripAuxData } from '../helpers' const abi = new ethers.utils.AbiCoder() const log = getLogger(`constructor-transpilation`) -describe('Solitity contracts with constructors that take inputs should be correctly deployed', () => { +describe.only('Solitity contracts with constructors that take inputs should be correctly deployed', () => { let evmUtil: EvmIntrospectionUtil const mockReplacer: OpcodeReplacer = { replaceIfNecessary(opcodeAndBytes: EVMOpcodeAndBytes): EVMBytecode { diff --git a/packages/rollup-full-node/package.json b/packages/rollup-full-node/package.json index edfcedfc8f5a..b9cf970ea4f3 100644 --- a/packages/rollup-full-node/package.json +++ b/packages/rollup-full-node/package.json @@ -1,6 +1,6 @@ { "name": "@eth-optimism/rollup-full-node", - "version": "0.0.1-alpha.12", + "version": "0.0.1-alpha.13", "description": "[Optimism] Optimistic Rollup Full Node Library", "main": "build/index.js", "files": [ @@ -34,10 +34,10 @@ "url": "https://github.com/ethereum-optimism/optimism-monorepo.git" }, "dependencies": { - "@eth-optimism/core-db": "0.0.1-alpha.12", - "@eth-optimism/core-utils": "0.0.1-alpha.12", - "@eth-optimism/ovm": "0.0.1-alpha.12", - "@eth-optimism/rollup-core": "0.0.1-alpha.12", + "@eth-optimism/core-db": "^0.0.1-alpha.13", + "@eth-optimism/core-utils": "^0.0.1-alpha.13", + "@eth-optimism/ovm": "^0.0.1-alpha.13", + "@eth-optimism/rollup-core": "^0.0.1-alpha.13", "async-lock": "^1.2.2", "axios": "^0.19.0", "cors": "^2.8.5", @@ -47,7 +47,7 @@ "fastpriorityqueue": "^0.6.3" }, "devDependencies": { - "@eth-optimism/solc-transpiler": "^0.0.1-alpha.12", + "@eth-optimism/solc-transpiler": "^0.0.1-alpha.13", "@types/abstract-leveldown": "^5.0.1", "@types/chai": "^4.1.7", "@types/mocha": "^5.2.7", diff --git a/packages/solc-transpiler/package.json b/packages/solc-transpiler/package.json index a21639a0bb8f..f3b239bc40c3 100644 --- a/packages/solc-transpiler/package.json +++ b/packages/solc-transpiler/package.json @@ -1,6 +1,6 @@ { "name": "@eth-optimism/solc-transpiler", - "version": "0.0.1-alpha.12", + "version": "0.0.1-alpha.13", "description": "Optimism Transpiler Solc Compiler Wrapper", "main": "build/index.js", "files": [ @@ -29,14 +29,13 @@ "url": "https://github.com/ethereum-optimism/optimism-monorepo.git" }, "dependencies": { - "@eth-optimism/core-utils": "0.0.1-alpha.12", - "@eth-optimism/rollup-dev-tools": "0.0.1-alpha.12", + "@eth-optimism/core-utils": "^0.0.1-alpha.13", + "@eth-optimism/rollup-dev-tools": "^0.0.1-alpha.13", "ethers": "^4.0.45", "require-from-string": "^2.0.2", "solc": "^0.5.12" }, "devDependencies": { - "@eth-optimism/rollup-full-node": "^0.0.1-alpha.9", "@types/chai": "^4.1.7", "@types/mocha": "^5.2.7", "@types/node": "^12.0.7", diff --git a/packages/solc-transpiler/src/compiler.ts b/packages/solc-transpiler/src/compiler.ts index c77c0dfb2811..101cec3afd9f 100644 --- a/packages/solc-transpiler/src/compiler.ts +++ b/packages/solc-transpiler/src/compiler.ts @@ -20,8 +20,6 @@ import { import * as solc from 'solc' import { execSync } from 'child_process' import * as requireFromString from 'require-from-string' -import { link } from 'fs' -import { formatBytecode, bufferToBytecode } from '../../rollup-core/build' import { ethers } from 'ethers' const log: Logger = getLogger('solc-transpiler') diff --git a/packages/solc-transpiler/test/libraries.spec.ts b/packages/solc-transpiler/test/libraries.spec.ts index 7584bb67cf6a..e5ff184b1849 100644 --- a/packages/solc-transpiler/test/libraries.spec.ts +++ b/packages/solc-transpiler/test/libraries.spec.ts @@ -1,34 +1,13 @@ import './setup' /* External Imports */ -import { - OpcodeReplacerImpl, - OpcodeWhitelistImpl, - SuccessfulTranspilation, - TranspilationResult, - Transpiler, - TranspilerImpl, -} from '@eth-optimism/rollup-dev-tools' -import { - bufToHexString, - hexStrToBuf, - remove0x, - ZERO_ADDRESS, - getLogger, -} from '@eth-optimism/core-utils' -import { - createMockProvider, - getWallets, - deployContract, -} from '@eth-optimism/rollup-full-node' -import { link } from 'ethereum-waffle' +import { getLogger } from '@eth-optimism/core-utils' import * as path from 'path' import * as fs from 'fs' /* Internal Imports */ import { compile } from '../src' -import { formatBytecode, bufferToBytecode } from '../../rollup-core/build' const log = getLogger('library-use-compilation') @@ -45,97 +24,61 @@ const simpleUnsafeMathPath = path.resolve( './contracts/library/SimpleUnsafeMath.sol' ) -describe('Library usage tests', () => { - let config - before(() => { - config = { - language: 'Solidity', - sources: { - 'SafeMathUser.sol': { - content: fs.readFileSync(safeMathUserPath, 'utf8'), - }, - 'SimpleSafeMath.sol': { - content: fs.readFileSync(simpleSafeMathPath, 'utf8'), - }, - 'SimpleUnsafeMath.sol': { - content: fs.readFileSync(simpleUnsafeMathPath, 'utf8'), - }, - }, - settings: { - outputSelection: { - '*': { - '*': ['*'], - }, - }, - executionManagerAddress: '0xA193E42526F1FEA8C99AF609dcEabf30C1c29fAA', +const config = { + language: 'Solidity', + sources: { + 'SafeMathUser.sol': { + content: fs.readFileSync(safeMathUserPath, 'utf8'), + }, + 'SimpleSafeMath.sol': { + content: fs.readFileSync(simpleSafeMathPath, 'utf8'), + }, + 'SimpleUnsafeMath.sol': { + content: fs.readFileSync(simpleUnsafeMathPath, 'utf8'), + }, + }, + settings: { + outputSelection: { + '*': { + '*': ['*'], }, - } - }) - - let provider - let wallet - let deployedLibUser - beforeEach(async function() { - this.timeout(20000) - // NOTE: if we run this test in isolation on default port, it works, but in multi-package tests it fails. - // Hypothesis for why this is: multi-package tests are run in parallel, so we need to use a separate port per package. - provider = await createMockProvider(9998) - const wallets = getWallets(provider) - wallet = wallets[0] + }, + executionManagerAddress: '0xA193E42526F1FEA8C99AF609dcEabf30C1c29fAA', + }, +} +describe('Library usage tests', () => { + it('should compile with libraries', async () => { const wrappedSolcResult = compile(JSON.stringify(config)) const wrappedSolcJson = JSON.parse(wrappedSolcResult) - const simpleSafeMathJSON = - wrappedSolcJson['contracts']['SimpleSafeMath.sol']['SimpleSafeMath'] - const simpleUnsafeMathJSON = - wrappedSolcJson['contracts']['SimpleUnsafeMath.sol']['SimpleUnsafeMath'] - const libUserJSON = - wrappedSolcJson['contracts']['SafeMathUser.sol']['SafeMathUser'] - // Deploy and link safe math - const deployedSafeMath = await deployContract( - wallet, - simpleSafeMathJSON, - [], - [] - ) - log.debug(`deployed SimpleSafeMath to: ${deployedSafeMath.address}`) - link( - libUserJSON, - 'SimpleSafeMath.sol:SimpleSafeMath', - deployedSafeMath.address + wrappedSolcJson.contracts.should.not.equal( + undefined, + 'No compiled contracts found!' ) - // Deoloy and link unsafe math - const deployedUnsafeMath = await deployContract( - wallet, - simpleUnsafeMathJSON, - [], - [] + wrappedSolcJson.contracts['SimpleSafeMath.sol'].should.not.equal( + undefined, + 'SimpleSafeMath file not found!' ) - log.debug(`deployed UnsafeMath to: ${deployedUnsafeMath.address}`) - log.debug(`before second link: ${JSON.stringify(libUserJSON)}`) - link( - libUserJSON, - 'SimpleUnsafeMath.sol:SimpleUnsafeMath', - deployedUnsafeMath.address - ) - - // Deploy library user - deployedLibUser = await deployContract(wallet, libUserJSON, [], []) - log.debug(`deployed library user to: ${deployedLibUser.address}`) - }) - afterEach(async () => { - await provider.closeOVM() - }) + wrappedSolcJson.contracts['SimpleSafeMath.sol'][ + 'SimpleSafeMath' + ].should.not.equal(undefined, 'SimpleSafeMath contract not found!') - it('should allow us to transpile, link, and query contract methods which use a single library', async () => { - const returnedUsingLib = await deployedLibUser.useLib() - returnedUsingLib._hex.should.equal('0x05') - }) + wrappedSolcJson.contracts['SimpleUnsafeMath.sol'].should.not.equal( + undefined, + 'SimpleUnsafeMath file not found!' + ) + wrappedSolcJson.contracts['SimpleUnsafeMath.sol'][ + 'SimpleUnsafeMath' + ].should.not.equal(undefined, 'SimpleUnsafeMath contract not found!') - it('should allow us to transpile, link, and query contract methods which use a multiple libraries', async () => { - const returnedUsingLib = await deployedLibUser.use2Libs() - returnedUsingLib._hex.should.equal('0x06') - }) + wrappedSolcJson.contracts['SafeMathUser.sol'].should.not.equal( + undefined, + 'SafeMathUser file not found!' + ) + wrappedSolcJson.contracts['SafeMathUser.sol'][ + 'SafeMathUser' + ].should.not.equal(undefined, 'SafeMathUser contract not found!') + }).timeout(10_000) })