From 486c784407f0bed972b3fd43059e04bdf5b2671b Mon Sep 17 00:00:00 2001 From: Akosh Farkash Date: Fri, 27 Jan 2023 16:58:02 +0000 Subject: [PATCH] EVM-IT: Test that the Cocoon can turn into a Butterfly --- .../{Bufferfly.abi => Butterfly.abi} | 0 .../{Bufferfly.hex => Butterfly.hex} | 2 +- .../{Bufferfly.json => Butterfly.json} | 8 ++--- .../evm/artifacts/SelfDestruct.sol/Cocoon.abi | 2 +- .../evm/artifacts/SelfDestruct.sol/Cocoon.hex | 2 +- .../artifacts/SelfDestruct.sol/Cocoon.json | 12 +++---- .../SelfDestruct.sol/SelfDestructChain.hex | 2 +- .../SelfDestruct.sol/SelfDestructChain.json | 4 +-- .../SelfDestructOnCreate.json | 2 +- .../tests/evm/cache/solidity-files-cache.json | 8 ++--- .../tests/evm/contracts/SelfDestruct.sol | 4 +-- .../tests/evm/features/SelfDestruct.feature | 15 +++++---- .../{bufferfly.rs => butterfly.rs} | 26 +++++++-------- .../tests/evm/src/self_destruct/cocoon.rs | 32 ++++++++++--------- .../tests/evm/src/self_destruct/mod.rs | 4 +-- .../integration/tests/fevm_features/main.rs | 2 +- .../tests/fevm_features/self_destruct.rs | 24 +++++++++++++- 17 files changed, 88 insertions(+), 61 deletions(-) rename testing/integration/tests/evm/artifacts/SelfDestruct.sol/{Bufferfly.abi => Butterfly.abi} (100%) rename testing/integration/tests/evm/artifacts/SelfDestruct.sol/{Bufferfly.hex => Butterfly.hex} (88%) rename testing/integration/tests/evm/artifacts/SelfDestruct.sol/{Bufferfly.json => Butterfly.json} (84%) rename testing/integration/tests/evm/src/self_destruct/{bufferfly.rs => butterfly.rs} (83%) diff --git a/testing/integration/tests/evm/artifacts/SelfDestruct.sol/Bufferfly.abi b/testing/integration/tests/evm/artifacts/SelfDestruct.sol/Butterfly.abi similarity index 100% rename from testing/integration/tests/evm/artifacts/SelfDestruct.sol/Bufferfly.abi rename to testing/integration/tests/evm/artifacts/SelfDestruct.sol/Butterfly.abi diff --git a/testing/integration/tests/evm/artifacts/SelfDestruct.sol/Bufferfly.hex b/testing/integration/tests/evm/artifacts/SelfDestruct.sol/Butterfly.hex similarity index 88% rename from testing/integration/tests/evm/artifacts/SelfDestruct.sol/Bufferfly.hex rename to testing/integration/tests/evm/artifacts/SelfDestruct.sol/Butterfly.hex index ab7d4ccb2..81ceed785 100644 --- a/testing/integration/tests/evm/artifacts/SelfDestruct.sol/Bufferfly.hex +++ b/testing/integration/tests/evm/artifacts/SelfDestruct.sol/Butterfly.hex @@ -1 +1 @@ -608060405261017c806100136000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80637284e41614610030575b600080fd5b61003861004e565b60405161004591906100c4565b60405180910390f35b60606040518060400160405280600981526020017f427574746572666c790000000000000000000000000000000000000000000000815250905090565b6000610096826100e6565b6100a081856100f1565b93506100b0818560208601610102565b6100b981610135565b840191505092915050565b600060208201905081810360008301526100de818461008b565b905092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610120578082015181840152602081019050610105565b8381111561012f576000848401525b50505050565b6000601f19601f830116905091905056fea2646970667358221220abb97d216d3b68b991147e92aba558970393b8d4a8badd3cf664b5fb749f740464736f6c63430008020033 +608060405261017c806100136000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80637284e41614610030575b600080fd5b61003861004e565b60405161004591906100c4565b60405180910390f35b60606040518060400160405280600981526020017f427574746572666c790000000000000000000000000000000000000000000000815250905090565b6000610096826100e6565b6100a081856100f1565b93506100b0818560208601610102565b6100b981610135565b840191505092915050565b600060208201905081810360008301526100de818461008b565b905092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610120578082015181840152602081019050610105565b8381111561012f576000848401525b50505050565b6000601f19601f830116905091905056fea2646970667358221220aea86fa1e54776795ed89018acff21e1d18ba7145fce7c2e74c4f8a4ee2e52d064736f6c63430008020033 diff --git a/testing/integration/tests/evm/artifacts/SelfDestruct.sol/Bufferfly.json b/testing/integration/tests/evm/artifacts/SelfDestruct.sol/Butterfly.json similarity index 84% rename from testing/integration/tests/evm/artifacts/SelfDestruct.sol/Bufferfly.json rename to testing/integration/tests/evm/artifacts/SelfDestruct.sol/Butterfly.json index 05cdfa427..1be93c00a 100644 --- a/testing/integration/tests/evm/artifacts/SelfDestruct.sol/Bufferfly.json +++ b/testing/integration/tests/evm/artifacts/SelfDestruct.sol/Butterfly.json @@ -20,13 +20,13 @@ } ], "bytecode": { - "object": "0x608060405261017c806100136000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80637284e41614610030575b600080fd5b61003861004e565b60405161004591906100c4565b60405180910390f35b60606040518060400160405280600981526020017f427574746572666c790000000000000000000000000000000000000000000000815250905090565b6000610096826100e6565b6100a081856100f1565b93506100b0818560208601610102565b6100b981610135565b840191505092915050565b600060208201905081810360008301526100de818461008b565b905092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610120578082015181840152602081019050610105565b8381111561012f576000848401525b50505050565b6000601f19601f830116905091905056fea2646970667358221220abb97d216d3b68b991147e92aba558970393b8d4a8badd3cf664b5fb749f740464736f6c63430008020033", - "sourceMap": "2353:153:0:-:0;;;;;;;;;", + "object": "0x608060405261017c806100136000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80637284e41614610030575b600080fd5b61003861004e565b60405161004591906100c4565b60405180910390f35b60606040518060400160405280600981526020017f427574746572666c790000000000000000000000000000000000000000000000815250905090565b6000610096826100e6565b6100a081856100f1565b93506100b0818560208601610102565b6100b981610135565b840191505092915050565b600060208201905081810360008301526100de818461008b565b905092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610120578082015181840152602081019050610105565b8381111561012f576000848401525b50505050565b6000601f19601f830116905091905056fea2646970667358221220aea86fa1e54776795ed89018acff21e1d18ba7145fce7c2e74c4f8a4ee2e52d064736f6c63430008020033", + "sourceMap": "2357:153:0:-:0;;;;;;;;;", "linkReferences": {} }, "deployedBytecode": { - "object": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80637284e41614610030575b600080fd5b61003861004e565b60405161004591906100c4565b60405180910390f35b60606040518060400160405280600981526020017f427574746572666c790000000000000000000000000000000000000000000000815250905090565b6000610096826100e6565b6100a081856100f1565b93506100b0818560208601610102565b6100b981610135565b840191505092915050565b600060208201905081810360008301526100de818461008b565b905092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610120578082015181840152602081019050610105565b8381111561012f576000848401525b50505050565b6000601f19601f830116905091905056fea2646970667358221220abb97d216d3b68b991147e92aba558970393b8d4a8badd3cf664b5fb749f740464736f6c63430008020033", - "sourceMap": "2353:153:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2408:96;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;2454:13;2479:18;;;;;;;;;;;;;;;;;;;2408:96;:::o;7:364:1:-;;123:39;156:5;123:39;:::i;:::-;178:71;242:6;237:3;178:71;:::i;:::-;171:78;;258:52;303:6;298:3;291:4;284:5;280:16;258:52;:::i;:::-;335:29;357:6;335:29;:::i;:::-;330:3;326:39;319:46;;99:272;;;;;:::o;377:313::-;;528:2;517:9;513:18;505:26;;577:9;571:4;567:20;563:1;552:9;548:17;541:47;605:78;678:4;669:6;605:78;:::i;:::-;597:86;;495:195;;;;:::o;696:99::-;;782:5;776:12;766:22;;755:40;;;:::o;801:169::-;;919:6;914:3;907:19;959:4;954:3;950:14;935:29;;897:73;;;;:::o;976:307::-;1044:1;1054:113;1068:6;1065:1;1062:13;1054:113;;;1153:1;1148:3;1144:11;1138:18;1134:1;1129:3;1125:11;1118:39;1090:2;1087:1;1083:10;1078:15;;1054:113;;;1185:6;1182:1;1179:13;1176:2;;;1265:1;1256:6;1251:3;1247:16;1240:27;1176:2;1025:258;;;;:::o;1289:102::-;;1381:2;1377:7;1372:2;1365:5;1361:14;1357:28;1347:38;;1337:54;;;:::o", + "object": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80637284e41614610030575b600080fd5b61003861004e565b60405161004591906100c4565b60405180910390f35b60606040518060400160405280600981526020017f427574746572666c790000000000000000000000000000000000000000000000815250905090565b6000610096826100e6565b6100a081856100f1565b93506100b0818560208601610102565b6100b981610135565b840191505092915050565b600060208201905081810360008301526100de818461008b565b905092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610120578082015181840152602081019050610105565b8381111561012f576000848401525b50505050565b6000601f19601f830116905091905056fea2646970667358221220aea86fa1e54776795ed89018acff21e1d18ba7145fce7c2e74c4f8a4ee2e52d064736f6c63430008020033", + "sourceMap": "2357:153:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2412:96;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;2458:13;2483:18;;;;;;;;;;;;;;;;;;;2412:96;:::o;7:364:1:-;;123:39;156:5;123:39;:::i;:::-;178:71;242:6;237:3;178:71;:::i;:::-;171:78;;258:52;303:6;298:3;291:4;284:5;280:16;258:52;:::i;:::-;335:29;357:6;335:29;:::i;:::-;330:3;326:39;319:46;;99:272;;;;;:::o;377:313::-;;528:2;517:9;513:18;505:26;;577:9;571:4;567:20;563:1;552:9;548:17;541:47;605:78;678:4;669:6;605:78;:::i;:::-;597:86;;495:195;;;;:::o;696:99::-;;782:5;776:12;766:22;;755:40;;;:::o;801:169::-;;919:6;914:3;907:19;959:4;954:3;950:14;935:29;;897:73;;;;:::o;976:307::-;1044:1;1054:113;1068:6;1065:1;1062:13;1054:113;;;1153:1;1148:3;1144:11;1138:18;1134:1;1129:3;1125:11;1118:39;1090:2;1087:1;1083:10;1078:15;;1054:113;;;1185:6;1182:1;1179:13;1176:2;;;1265:1;1256:6;1251:3;1247:16;1240:27;1176:2;1025:258;;;;:::o;1289:102::-;;1381:2;1377:7;1372:2;1365:5;1361:14;1357:28;1347:38;;1337:54;;;:::o", "linkReferences": {} }, "methodIdentifiers": { diff --git a/testing/integration/tests/evm/artifacts/SelfDestruct.sol/Cocoon.abi b/testing/integration/tests/evm/artifacts/SelfDestruct.sol/Cocoon.abi index 2a162c0b0..38d033f8d 100644 --- a/testing/integration/tests/evm/artifacts/SelfDestruct.sol/Cocoon.abi +++ b/testing/integration/tests/evm/artifacts/SelfDestruct.sol/Cocoon.abi @@ -1 +1 @@ -[{"inputs":[],"stateMutability":"payable","type":"constructor"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"die","outputs":[],"stateMutability":"nonpayable","type":"function"}] +[{"inputs":[],"stateMutability":"payable","type":"constructor"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"destroy","outputs":[],"stateMutability":"nonpayable","type":"function"}] diff --git a/testing/integration/tests/evm/artifacts/SelfDestruct.sol/Cocoon.hex b/testing/integration/tests/evm/artifacts/SelfDestruct.sol/Cocoon.hex index adc75615d..cade408f3 100644 --- a/testing/integration/tests/evm/artifacts/SelfDestruct.sol/Cocoon.hex +++ b/testing/integration/tests/evm/artifacts/SelfDestruct.sol/Cocoon.hex @@ -1 +1 @@ -60806040526101aa806100136000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806335f469941461003b5780637284e41614610045575b600080fd5b610043610063565b005b61004d61007c565b60405161005a91906100f2565b60405180910390f35b3073ffffffffffffffffffffffffffffffffffffffff16ff5b60606040518060400160405280600681526020017f436f636f6f6e0000000000000000000000000000000000000000000000000000815250905090565b60006100c482610114565b6100ce818561011f565b93506100de818560208601610130565b6100e781610163565b840191505092915050565b6000602082019050818103600083015261010c81846100b9565b905092915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561014e578082015181840152602081019050610133565b8381111561015d576000848401525b50505050565b6000601f19601f830116905091905056fea264697066735822122076e7e9e1875fe772cc2ae89036e2ae6af68ae0a797d968c7ca204ea028ca3c7764736f6c63430008020033 +60806040526101aa806100136000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80637284e4161461003b57806383197ef014610059575b600080fd5b610043610063565b60405161005091906100f2565b60405180910390f35b6100616100a0565b005b60606040518060400160405280600681526020017f436f636f6f6e0000000000000000000000000000000000000000000000000000815250905090565b3073ffffffffffffffffffffffffffffffffffffffff16ff5b60006100c482610114565b6100ce818561011f565b93506100de818560208601610130565b6100e781610163565b840191505092915050565b6000602082019050818103600083015261010c81846100b9565b905092915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561014e578082015181840152602081019050610133565b8381111561015d576000848401525b50505050565b6000601f19601f830116905091905056fea26469706673582212209099ee6536697cdd3698f1b58bb7a266b3d66155c2fd4ffc9d035563dc94ef2b64736f6c63430008020033 diff --git a/testing/integration/tests/evm/artifacts/SelfDestruct.sol/Cocoon.json b/testing/integration/tests/evm/artifacts/SelfDestruct.sol/Cocoon.json index f56f7734f..f15da3ab5 100644 --- a/testing/integration/tests/evm/artifacts/SelfDestruct.sol/Cocoon.json +++ b/testing/integration/tests/evm/artifacts/SelfDestruct.sol/Cocoon.json @@ -20,25 +20,25 @@ }, { "inputs": [], - "name": "die", + "name": "destroy", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "bytecode": { - "object": "0x60806040526101aa806100136000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806335f469941461003b5780637284e41614610045575b600080fd5b610043610063565b005b61004d61007c565b60405161005a91906100f2565b60405180910390f35b3073ffffffffffffffffffffffffffffffffffffffff16ff5b60606040518060400160405280600681526020017f436f636f6f6e0000000000000000000000000000000000000000000000000000815250905090565b60006100c482610114565b6100ce818561011f565b93506100de818560208601610130565b6100e781610163565b840191505092915050565b6000602082019050818103600083015261010c81846100b9565b905092915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561014e578082015181840152602081019050610133565b8381111561015d576000848401525b50505050565b6000601f19601f830116905091905056fea264697066735822122076e7e9e1875fe772cc2ae89036e2ae6af68ae0a797d968c7ca204ea028ca3c7764736f6c63430008020033", - "sourceMap": "2023:328:0:-:0;;;;;;;;;", + "object": "0x60806040526101aa806100136000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80637284e4161461003b57806383197ef014610059575b600080fd5b610043610063565b60405161005091906100f2565b60405180910390f35b6100616100a0565b005b60606040518060400160405280600681526020017f436f636f6f6e0000000000000000000000000000000000000000000000000000815250905090565b3073ffffffffffffffffffffffffffffffffffffffff16ff5b60006100c482610114565b6100ce818561011f565b93506100de818560208601610130565b6100e781610163565b840191505092915050565b6000602082019050818103600083015261010c81846100b9565b905092915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561014e578082015181840152602081019050610133565b8381111561015d576000848401525b50505050565b6000601f19601f830116905091905056fea26469706673582212209099ee6536697cdd3698f1b58bb7a266b3d66155c2fd4ffc9d035563dc94ef2b64736f6c63430008020033", + "sourceMap": "2023:332:0:-:0;;;;;;;;;", "linkReferences": {} }, "deployedBytecode": { - "object": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c806335f469941461003b5780637284e41614610045575b600080fd5b610043610063565b005b61004d61007c565b60405161005a91906100f2565b60405180910390f35b3073ffffffffffffffffffffffffffffffffffffffff16ff5b60606040518060400160405280600681526020017f436f636f6f6e0000000000000000000000000000000000000000000000000000815250905090565b60006100c482610114565b6100ce818561011f565b93506100de818560208601610130565b6100e781610163565b840191505092915050565b6000602082019050818103600083015261010c81846100b9565b905092915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561014e578082015181840152602081019050610133565b8381111561015d576000848401525b50505050565b6000601f19601f830116905091905056fea264697066735822122076e7e9e1875fe772cc2ae89036e2ae6af68ae0a797d968c7ca204ea028ca3c7764736f6c63430008020033", - "sourceMap": "2023:328:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2274:75;;;:::i;:::-;;2075:93;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2274:75;2335:4;2306:36;;;2075:93;2121:13;2146:15;;;;;;;;;;;;;;;;;;;2075:93;:::o;7:364:1:-;;123:39;156:5;123:39;:::i;:::-;178:71;242:6;237:3;178:71;:::i;:::-;171:78;;258:52;303:6;298:3;291:4;284:5;280:16;258:52;:::i;:::-;335:29;357:6;335:29;:::i;:::-;330:3;326:39;319:46;;99:272;;;;;:::o;377:313::-;;528:2;517:9;513:18;505:26;;577:9;571:4;567:20;563:1;552:9;548:17;541:47;605:78;678:4;669:6;605:78;:::i;:::-;597:86;;495:195;;;;:::o;696:99::-;;782:5;776:12;766:22;;755:40;;;:::o;801:169::-;;919:6;914:3;907:19;959:4;954:3;950:14;935:29;;897:73;;;;:::o;976:307::-;1044:1;1054:113;1068:6;1065:1;1062:13;1054:113;;;1153:1;1148:3;1144:11;1138:18;1134:1;1129:3;1125:11;1118:39;1090:2;1087:1;1083:10;1078:15;;1054:113;;;1185:6;1182:1;1179:13;1176:2;;;1265:1;1256:6;1251:3;1247:16;1240:27;1176:2;1025:258;;;;:::o;1289:102::-;;1381:2;1377:7;1372:2;1365:5;1361:14;1357:28;1347:38;;1337:54;;;:::o", + "object": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80637284e4161461003b57806383197ef014610059575b600080fd5b610043610063565b60405161005091906100f2565b60405180910390f35b6100616100a0565b005b60606040518060400160405280600681526020017f436f636f6f6e0000000000000000000000000000000000000000000000000000815250905090565b3073ffffffffffffffffffffffffffffffffffffffff16ff5b60006100c482610114565b6100ce818561011f565b93506100de818560208601610130565b6100e781610163565b840191505092915050565b6000602082019050818103600083015261010c81846100b9565b905092915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561014e578082015181840152602081019050610133565b8381111561015d576000848401525b50505050565b6000601f19601f830116905091905056fea26469706673582212209099ee6536697cdd3698f1b58bb7a266b3d66155c2fd4ffc9d035563dc94ef2b64736f6c63430008020033", + "sourceMap": "2023:332:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2075:93;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2274:79;;;:::i;:::-;;2075:93;2121:13;2146:15;;;;;;;;;;;;;;;;;;;2075:93;:::o;2274:79::-;2339:4;2310:36;;;7:364:1;;123:39;156:5;123:39;:::i;:::-;178:71;242:6;237:3;178:71;:::i;:::-;171:78;;258:52;303:6;298:3;291:4;284:5;280:16;258:52;:::i;:::-;335:29;357:6;335:29;:::i;:::-;330:3;326:39;319:46;;99:272;;;;;:::o;377:313::-;;528:2;517:9;513:18;505:26;;577:9;571:4;567:20;563:1;552:9;548:17;541:47;605:78;678:4;669:6;605:78;:::i;:::-;597:86;;495:195;;;;:::o;696:99::-;;782:5;776:12;766:22;;755:40;;;:::o;801:169::-;;919:6;914:3;907:19;959:4;954:3;950:14;935:29;;897:73;;;;:::o;976:307::-;1044:1;1054:113;1068:6;1065:1;1062:13;1054:113;;;1153:1;1148:3;1144:11;1138:18;1134:1;1129:3;1125:11;1118:39;1090:2;1087:1;1083:10;1078:15;;1054:113;;;1185:6;1182:1;1179:13;1176:2;;;1265:1;1256:6;1251:3;1247:16;1240:27;1176:2;1025:258;;;;:::o;1289:102::-;;1381:2;1377:7;1372:2;1365:5;1361:14;1357:28;1347:38;;1337:54;;;:::o", "linkReferences": {} }, "methodIdentifiers": { "description()": "7284e416", - "die()": "35f46994" + "destroy()": "83197ef0" }, "id": 0 } \ No newline at end of file diff --git a/testing/integration/tests/evm/artifacts/SelfDestruct.sol/SelfDestructChain.hex b/testing/integration/tests/evm/artifacts/SelfDestruct.sol/SelfDestructChain.hex index 94011d3b4..01c17c2ba 100644 --- a/testing/integration/tests/evm/artifacts/SelfDestruct.sol/SelfDestructChain.hex +++ b/testing/integration/tests/evm/artifacts/SelfDestruct.sol/SelfDestructChain.hex @@ -1 +1 @@ -6080604052610578806100136000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80639240b9db14610030575b600080fd5b61004a6004803603810190610045919061027c565b61004c565b005b828290508163ffffffff1610156101c657600083838363ffffffff1681811061009e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906100b39190610253565b73ffffffffffffffffffffffffffffffffffffffff1684846001856100d89190610436565b6040516024016100ea939291906103af565b6040516020818303038152906040527f9240b9db000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516101749190610398565b6000604051808303816000865af19150503d80600081146101b1576040519150601f19603f3d011682016040523d82523d6000602084013e6101b6565b606091505b50509050806101c457600080fd5b505b3373ffffffffffffffffffffffffffffffffffffffff16ff5b6000813590506101ee81610514565b92915050565b60008083601f84011261020657600080fd5b8235905067ffffffffffffffff81111561021f57600080fd5b60208301915083602082028301111561023757600080fd5b9250929050565b60008135905061024d8161052b565b92915050565b60006020828403121561026557600080fd5b6000610273848285016101df565b91505092915050565b60008060006040848603121561029157600080fd5b600084013567ffffffffffffffff8111156102ab57600080fd5b6102b7868287016101f4565b935093505060206102ca8682870161023e565b9150509250925092565b60006102e083836102ec565b60208301905092915050565b6102f581610470565b82525050565b60006103078385610403565b9350610312826103e1565b8060005b8581101561034b57610328828461041f565b61033288826102d4565b975061033d836103f6565b925050600181019050610316565b5085925050509392505050565b6000610363826103eb565b61036d8185610414565b935061037d8185602086016104b2565b80840191505092915050565b610392816104a2565b82525050565b60006103a48284610358565b915081905092915050565b600060408201905081810360008301526103ca8185876102fb565b90506103d96020830184610389565b949350505050565b6000819050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b600061042e60208401846101df565b905092915050565b6000610441826104a2565b915061044c836104a2565b92508263ffffffff03821115610465576104646104e5565b5b828201905092915050565b600061047b82610482565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600063ffffffff82169050919050565b60005b838110156104d05780820151818401526020810190506104b5565b838111156104df576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b61051d81610470565b811461052857600080fd5b50565b610534816104a2565b811461053f57600080fd5b5056fea26469706673582212207ef78d3e6049ff4632a7612d158628165f44254787912ec01ade38cb8ba561b564736f6c63430008020033 +6080604052610578806100136000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80639240b9db14610030575b600080fd5b61004a6004803603810190610045919061027c565b61004c565b005b828290508163ffffffff1610156101c657600083838363ffffffff1681811061009e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906100b39190610253565b73ffffffffffffffffffffffffffffffffffffffff1684846001856100d89190610436565b6040516024016100ea939291906103af565b6040516020818303038152906040527f9240b9db000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516101749190610398565b6000604051808303816000865af19150503d80600081146101b1576040519150601f19603f3d011682016040523d82523d6000602084013e6101b6565b606091505b50509050806101c457600080fd5b505b3373ffffffffffffffffffffffffffffffffffffffff16ff5b6000813590506101ee81610514565b92915050565b60008083601f84011261020657600080fd5b8235905067ffffffffffffffff81111561021f57600080fd5b60208301915083602082028301111561023757600080fd5b9250929050565b60008135905061024d8161052b565b92915050565b60006020828403121561026557600080fd5b6000610273848285016101df565b91505092915050565b60008060006040848603121561029157600080fd5b600084013567ffffffffffffffff8111156102ab57600080fd5b6102b7868287016101f4565b935093505060206102ca8682870161023e565b9150509250925092565b60006102e083836102ec565b60208301905092915050565b6102f581610470565b82525050565b60006103078385610403565b9350610312826103e1565b8060005b8581101561034b57610328828461041f565b61033288826102d4565b975061033d836103f6565b925050600181019050610316565b5085925050509392505050565b6000610363826103eb565b61036d8185610414565b935061037d8185602086016104b2565b80840191505092915050565b610392816104a2565b82525050565b60006103a48284610358565b915081905092915050565b600060408201905081810360008301526103ca8185876102fb565b90506103d96020830184610389565b949350505050565b6000819050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b600061042e60208401846101df565b905092915050565b6000610441826104a2565b915061044c836104a2565b92508263ffffffff03821115610465576104646104e5565b5b828201905092915050565b600061047b82610482565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600063ffffffff82169050919050565b60005b838110156104d05780820151818401526020810190506104b5565b838111156104df576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b61051d81610470565b811461052857600080fd5b50565b610534816104a2565b811461053f57600080fd5b5056fea2646970667358221220c1a04380227774e590f2b41a60d9466f2884eebe1ca83c30c5f4a2981b1b359864736f6c63430008020033 diff --git a/testing/integration/tests/evm/artifacts/SelfDestruct.sol/SelfDestructChain.json b/testing/integration/tests/evm/artifacts/SelfDestruct.sol/SelfDestructChain.json index 9711ae9de..13fdc541f 100644 --- a/testing/integration/tests/evm/artifacts/SelfDestruct.sol/SelfDestructChain.json +++ b/testing/integration/tests/evm/artifacts/SelfDestruct.sol/SelfDestructChain.json @@ -25,12 +25,12 @@ } ], "bytecode": { - "object": "0x6080604052610578806100136000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80639240b9db14610030575b600080fd5b61004a6004803603810190610045919061027c565b61004c565b005b828290508163ffffffff1610156101c657600083838363ffffffff1681811061009e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906100b39190610253565b73ffffffffffffffffffffffffffffffffffffffff1684846001856100d89190610436565b6040516024016100ea939291906103af565b6040516020818303038152906040527f9240b9db000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516101749190610398565b6000604051808303816000865af19150503d80600081146101b1576040519150601f19603f3d011682016040523d82523d6000602084013e6101b6565b606091505b50509050806101c457600080fd5b505b3373ffffffffffffffffffffffffffffffffffffffff16ff5b6000813590506101ee81610514565b92915050565b60008083601f84011261020657600080fd5b8235905067ffffffffffffffff81111561021f57600080fd5b60208301915083602082028301111561023757600080fd5b9250929050565b60008135905061024d8161052b565b92915050565b60006020828403121561026557600080fd5b6000610273848285016101df565b91505092915050565b60008060006040848603121561029157600080fd5b600084013567ffffffffffffffff8111156102ab57600080fd5b6102b7868287016101f4565b935093505060206102ca8682870161023e565b9150509250925092565b60006102e083836102ec565b60208301905092915050565b6102f581610470565b82525050565b60006103078385610403565b9350610312826103e1565b8060005b8581101561034b57610328828461041f565b61033288826102d4565b975061033d836103f6565b925050600181019050610316565b5085925050509392505050565b6000610363826103eb565b61036d8185610414565b935061037d8185602086016104b2565b80840191505092915050565b610392816104a2565b82525050565b60006103a48284610358565b915081905092915050565b600060408201905081810360008301526103ca8185876102fb565b90506103d96020830184610389565b949350505050565b6000819050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b600061042e60208401846101df565b905092915050565b6000610441826104a2565b915061044c836104a2565b92508263ffffffff03821115610465576104646104e5565b5b828201905092915050565b600061047b82610482565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600063ffffffff82169050919050565b60005b838110156104d05780820151818401526020810190506104b5565b838111156104df576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b61051d81610470565b811461052857600080fd5b50565b610534816104a2565b811461053f57600080fd5b5056fea26469706673582212207ef78d3e6049ff4632a7612d158628165f44254787912ec01ade38cb8ba561b564736f6c63430008020033", + "object": "0x6080604052610578806100136000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80639240b9db14610030575b600080fd5b61004a6004803603810190610045919061027c565b61004c565b005b828290508163ffffffff1610156101c657600083838363ffffffff1681811061009e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906100b39190610253565b73ffffffffffffffffffffffffffffffffffffffff1684846001856100d89190610436565b6040516024016100ea939291906103af565b6040516020818303038152906040527f9240b9db000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516101749190610398565b6000604051808303816000865af19150503d80600081146101b1576040519150601f19603f3d011682016040523d82523d6000602084013e6101b6565b606091505b50509050806101c457600080fd5b505b3373ffffffffffffffffffffffffffffffffffffffff16ff5b6000813590506101ee81610514565b92915050565b60008083601f84011261020657600080fd5b8235905067ffffffffffffffff81111561021f57600080fd5b60208301915083602082028301111561023757600080fd5b9250929050565b60008135905061024d8161052b565b92915050565b60006020828403121561026557600080fd5b6000610273848285016101df565b91505092915050565b60008060006040848603121561029157600080fd5b600084013567ffffffffffffffff8111156102ab57600080fd5b6102b7868287016101f4565b935093505060206102ca8682870161023e565b9150509250925092565b60006102e083836102ec565b60208301905092915050565b6102f581610470565b82525050565b60006103078385610403565b9350610312826103e1565b8060005b8581101561034b57610328828461041f565b61033288826102d4565b975061033d836103f6565b925050600181019050610316565b5085925050509392505050565b6000610363826103eb565b61036d8185610414565b935061037d8185602086016104b2565b80840191505092915050565b610392816104a2565b82525050565b60006103a48284610358565b915081905092915050565b600060408201905081810360008301526103ca8185876102fb565b90506103d96020830184610389565b949350505050565b6000819050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b600061042e60208401846101df565b905092915050565b6000610441826104a2565b915061044c836104a2565b92508263ffffffff03821115610465576104646104e5565b5b828201905092915050565b600061047b82610482565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600063ffffffff82169050919050565b60005b838110156104d05780820151818401526020810190506104b5565b838111156104df576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b61051d81610470565b811461052857600080fd5b50565b610534816104a2565b811461053f57600080fd5b5056fea2646970667358221220c1a04380227774e590f2b41a60d9466f2884eebe1ca83c30c5f4a2981b1b359864736f6c63430008020033", "sourceMap": "696:1072:0:-:0;;;;;;;;;", "linkReferences": {} }, "deployedBytecode": { - "object": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80639240b9db14610030575b600080fd5b61004a6004803603810190610045919061027c565b61004c565b005b828290508163ffffffff1610156101c657600083838363ffffffff1681811061009e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906100b39190610253565b73ffffffffffffffffffffffffffffffffffffffff1684846001856100d89190610436565b6040516024016100ea939291906103af565b6040516020818303038152906040527f9240b9db000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516101749190610398565b6000604051808303816000865af19150503d80600081146101b1576040519150601f19603f3d011682016040523d82523d6000602084013e6101b6565b606091505b50509050806101c457600080fd5b505b3373ffffffffffffffffffffffffffffffffffffffff16ff5b6000813590506101ee81610514565b92915050565b60008083601f84011261020657600080fd5b8235905067ffffffffffffffff81111561021f57600080fd5b60208301915083602082028301111561023757600080fd5b9250929050565b60008135905061024d8161052b565b92915050565b60006020828403121561026557600080fd5b6000610273848285016101df565b91505092915050565b60008060006040848603121561029157600080fd5b600084013567ffffffffffffffff8111156102ab57600080fd5b6102b7868287016101f4565b935093505060206102ca8682870161023e565b9150509250925092565b60006102e083836102ec565b60208301905092915050565b6102f581610470565b82525050565b60006103078385610403565b9350610312826103e1565b8060005b8581101561034b57610328828461041f565b61033288826102d4565b975061033d836103f6565b925050600181019050610316565b5085925050509392505050565b6000610363826103eb565b61036d8185610414565b935061037d8185602086016104b2565b80840191505092915050565b610392816104a2565b82525050565b60006103a48284610358565b915081905092915050565b600060408201905081810360008301526103ca8185876102fb565b90506103d96020830184610389565b949350505050565b6000819050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b600061042e60208401846101df565b905092915050565b6000610441826104a2565b915061044c836104a2565b92508263ffffffff03821115610465576104646104e5565b5b828201905092915050565b600061047b82610482565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600063ffffffff82169050919050565b60005b838110156104d05780820151818401526020810190506104b5565b838111156104df576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b61051d81610470565b811461052857600080fd5b50565b610534816104a2565b811461053f57600080fd5b5056fea26469706673582212207ef78d3e6049ff4632a7612d158628165f44254787912ec01ade38cb8ba561b564736f6c63430008020033", + "object": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80639240b9db14610030575b600080fd5b61004a6004803603810190610045919061027c565b61004c565b005b828290508163ffffffff1610156101c657600083838363ffffffff1681811061009e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906100b39190610253565b73ffffffffffffffffffffffffffffffffffffffff1684846001856100d89190610436565b6040516024016100ea939291906103af565b6040516020818303038152906040527f9240b9db000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516101749190610398565b6000604051808303816000865af19150503d80600081146101b1576040519150601f19603f3d011682016040523d82523d6000602084013e6101b6565b606091505b50509050806101c457600080fd5b505b3373ffffffffffffffffffffffffffffffffffffffff16ff5b6000813590506101ee81610514565b92915050565b60008083601f84011261020657600080fd5b8235905067ffffffffffffffff81111561021f57600080fd5b60208301915083602082028301111561023757600080fd5b9250929050565b60008135905061024d8161052b565b92915050565b60006020828403121561026557600080fd5b6000610273848285016101df565b91505092915050565b60008060006040848603121561029157600080fd5b600084013567ffffffffffffffff8111156102ab57600080fd5b6102b7868287016101f4565b935093505060206102ca8682870161023e565b9150509250925092565b60006102e083836102ec565b60208301905092915050565b6102f581610470565b82525050565b60006103078385610403565b9350610312826103e1565b8060005b8581101561034b57610328828461041f565b61033288826102d4565b975061033d836103f6565b925050600181019050610316565b5085925050509392505050565b6000610363826103eb565b61036d8185610414565b935061037d8185602086016104b2565b80840191505092915050565b610392816104a2565b82525050565b60006103a48284610358565b915081905092915050565b600060408201905081810360008301526103ca8185876102fb565b90506103d96020830184610389565b949350505050565b6000819050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b600061042e60208401846101df565b905092915050565b6000610441826104a2565b915061044c836104a2565b92508263ffffffff03821115610465576104646104e5565b5b828201905092915050565b600061047b82610482565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600063ffffffff82169050919050565b60005b838110156104d05780820151818401526020810190506104b5565b838111156104df576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b61051d81610470565b811461052857600080fd5b50565b610534816104a2565b811461053f57600080fd5b5056fea2646970667358221220c1a04380227774e590f2b41a60d9466f2884eebe1ca83c30c5f4a2981b1b359864736f6c63430008020033", "sourceMap": "696:1072:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1127:639;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;1405:10;;:17;;1391:11;:31;;;1387:330;;;1439:12;1457:10;;1468:11;1457:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:28;;1597:10;;1643:1;1629:11;:15;;;;:::i;:::-;1503:159;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1457:219;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1438:238;;;1698:7;1690:16;;;;;;1387:330;;1747:10;1726:33;;;7:139:1;;91:6;78:20;69:29;;107:33;134:5;107:33;:::i;:::-;59:87;;;;:::o;169:367::-;;;302:3;295:4;287:6;283:17;279:27;269:2;;320:1;317;310:12;269:2;356:6;343:20;333:30;;386:18;378:6;375:30;372:2;;;418:1;415;408:12;372:2;455:4;447:6;443:17;431:29;;509:3;501:4;493:6;489:17;479:8;475:32;472:41;469:2;;;526:1;523;516:12;469:2;259:277;;;;;:::o;542:137::-;;625:6;612:20;603:29;;641:32;667:5;641:32;:::i;:::-;593:86;;;;:::o;685:262::-;;793:2;781:9;772:7;768:23;764:32;761:2;;;809:1;806;799:12;761:2;852:1;877:53;922:7;913:6;902:9;898:22;877:53;:::i;:::-;867:63;;823:117;751:196;;;;:::o;953:568::-;;;;1112:2;1100:9;1091:7;1087:23;1083:32;1080:2;;;1128:1;1125;1118:12;1080:2;1199:1;1188:9;1184:17;1171:31;1229:18;1221:6;1218:30;1215:2;;;1261:1;1258;1251:12;1215:2;1297:80;1369:7;1360:6;1349:9;1345:22;1297:80;:::i;:::-;1279:98;;;;1142:245;1426:2;1452:52;1496:7;1487:6;1476:9;1472:22;1452:52;:::i;:::-;1442:62;;1397:117;1070:451;;;;;:::o;1527:179::-;;1617:46;1659:3;1651:6;1617:46;:::i;:::-;1695:4;1690:3;1686:14;1672:28;;1607:99;;;;:::o;1712:108::-;1789:24;1807:5;1789:24;:::i;:::-;1784:3;1777:37;1767:53;;:::o;1856:699::-;;2008:86;2087:6;2082:3;2008:86;:::i;:::-;2001:93;;2118:58;2170:5;2118:58;:::i;:::-;2199:7;2230:1;2215:315;2240:6;2237:1;2234:13;2215:315;;;2310:42;2345:6;2336:7;2310:42;:::i;:::-;2372:63;2431:3;2416:13;2372:63;:::i;:::-;2365:70;;2458:62;2513:6;2458:62;:::i;:::-;2448:72;;2275:255;2262:1;2259;2255:9;2250:14;;2215:315;;;2219:14;2546:3;2539:10;;1990:565;;;;;;;:::o;2561:373::-;;2693:38;2725:5;2693:38;:::i;:::-;2747:88;2828:6;2823:3;2747:88;:::i;:::-;2740:95;;2844:52;2889:6;2884:3;2877:4;2870:5;2866:16;2844:52;:::i;:::-;2921:6;2916:3;2912:16;2905:23;;2669:265;;;;;:::o;2940:115::-;3025:23;3042:5;3025:23;:::i;:::-;3020:3;3013:36;3003:52;;:::o;3061:271::-;;3213:93;3302:3;3293:6;3213:93;:::i;:::-;3206:100;;3323:3;3316:10;;3195:137;;;;:::o;3338:499::-;;3555:2;3544:9;3540:18;3532:26;;3604:9;3598:4;3594:20;3590:1;3579:9;3575:17;3568:47;3632:118;3745:4;3736:6;3728;3632:118;:::i;:::-;3624:126;;3760:70;3826:2;3815:9;3811:18;3802:6;3760:70;:::i;:::-;3522:315;;;;;;:::o;3843:102::-;;3935:3;3927:11;;3917:28;;;:::o;3951:98::-;;4036:5;4030:12;4020:22;;4009:40;;;:::o;4055:115::-;;4159:4;4154:3;4150:14;4142:22;;4132:38;;;:::o;4176:184::-;;4309:6;4304:3;4297:19;4349:4;4344:3;4340:14;4325:29;;4287:73;;;;:::o;4366:147::-;;4504:3;4489:18;;4479:34;;;;:::o;4519:122::-;;4596:39;4631:2;4626:3;4622:12;4617:3;4596:39;:::i;:::-;4587:48;;4577:64;;;;:::o;4647:246::-;;4705:19;4722:1;4705:19;:::i;:::-;4700:24;;4738:19;4755:1;4738:19;:::i;:::-;4733:24;;4835:1;4823:10;4819:18;4816:1;4813:25;4810:2;;;4841:18;;:::i;:::-;4810:2;4885:1;4882;4878:9;4871:16;;4690:203;;;;:::o;4899:96::-;;4965:24;4983:5;4965:24;:::i;:::-;4954:35;;4944:51;;;:::o;5001:126::-;;5078:42;5071:5;5067:54;5056:65;;5046:81;;;:::o;5133:93::-;;5209:10;5202:5;5198:22;5187:33;;5177:49;;;:::o;5232:307::-;5300:1;5310:113;5324:6;5321:1;5318:13;5310:113;;;5409:1;5404:3;5400:11;5394:18;5390:1;5385:3;5381:11;5374:39;5346:2;5343:1;5339:10;5334:15;;5310:113;;;5441:6;5438:1;5435:13;5432:2;;;5521:1;5512:6;5507:3;5503:16;5496:27;5432:2;5281:258;;;;:::o;5545:180::-;5593:77;5590:1;5583:88;5690:4;5687:1;5680:15;5714:4;5711:1;5704:15;5731:122;5804:24;5822:5;5804:24;:::i;:::-;5797:5;5794:35;5784:2;;5843:1;5840;5833:12;5784:2;5774:79;:::o;5859:120::-;5931:23;5948:5;5931:23;:::i;:::-;5924:5;5921:34;5911:2;;5969:1;5966;5959:12;5911:2;5901:78;:::o", "linkReferences": {} }, diff --git a/testing/integration/tests/evm/artifacts/SelfDestruct.sol/SelfDestructOnCreate.json b/testing/integration/tests/evm/artifacts/SelfDestruct.sol/SelfDestructOnCreate.json index 0b7c85aab..fdf2deb29 100644 --- a/testing/integration/tests/evm/artifacts/SelfDestruct.sol/SelfDestructOnCreate.json +++ b/testing/integration/tests/evm/artifacts/SelfDestruct.sol/SelfDestructOnCreate.json @@ -18,7 +18,7 @@ "linkReferences": {} }, "deployedBytecode": { - "object": "0x6080604052600080fdfea2646970667358221220ebab0eceb7e951b4d2d011885f34a8831df8217859d2009bb5cdb46af1134e6a64736f6c63430008020033", + "object": "0x6080604052600080fdfea264697066735822122018e6db06e6d4090f2103d2b14be48dd0d2345f905622952803c30dd9aaf50e4664736f6c63430008020033", "sourceMap": "57:450:0:-:0;;;;;", "linkReferences": {} }, diff --git a/testing/integration/tests/evm/cache/solidity-files-cache.json b/testing/integration/tests/evm/cache/solidity-files-cache.json index 4f4cb70c8..f0ec9cd34 100644 --- a/testing/integration/tests/evm/cache/solidity-files-cache.json +++ b/testing/integration/tests/evm/cache/solidity-files-cache.json @@ -117,8 +117,8 @@ } }, "contracts/SelfDestruct.sol": { - "lastModificationDate": 1674836794430, - "contentHash": "cdf8fd50958bcef6741e1e915c48b138", + "lastModificationDate": 1674838565319, + "contentHash": "7a29e85b9ed56c1ee0f8199e2aa860eb", "sourceName": "contracts/SelfDestruct.sol", "solcConfig": { "settings": { @@ -143,8 +143,8 @@ "imports": [], "versionRequirement": "^0.8.0", "artifacts": { - "Bufferfly": { - "0.8.2+commit.661d1103.Linux.gcc": "SelfDestruct.sol/Bufferfly.json" + "Butterfly": { + "0.8.2+commit.661d1103.Linux.gcc": "SelfDestruct.sol/Butterfly.json" }, "Cocoon": { "0.8.2+commit.661d1103.Linux.gcc": "SelfDestruct.sol/Cocoon.json" diff --git a/testing/integration/tests/evm/contracts/SelfDestruct.sol b/testing/integration/tests/evm/contracts/SelfDestruct.sol index 1ada5e0b6..3b5fbd450 100644 --- a/testing/integration/tests/evm/contracts/SelfDestruct.sol +++ b/testing/integration/tests/evm/contracts/SelfDestruct.sol @@ -66,12 +66,12 @@ contract Cocoon { /// Self destruct so it can be resurrected as a Butterfly. /// Keep the money, if possible. - function die() public { + function destroy() public { selfdestruct(payable(address(this))); } } -contract Bufferfly { +contract Butterfly { constructor() payable {} function description() external pure returns (string memory) { diff --git a/testing/integration/tests/evm/features/SelfDestruct.feature b/testing/integration/tests/evm/features/SelfDestruct.feature index 45c832e3b..9a664fb76 100644 --- a/testing/integration/tests/evm/features/SelfDestruct.feature +++ b/testing/integration/tests/evm/features/SelfDestruct.feature @@ -41,7 +41,6 @@ Feature: SelfDestruct And the balance of contract 1 is 0 atto - @wip Scenario: SELFDESTRUCT + CREATE2. If possible, test this scenario: https://0age.medium.com/the-promise-and-the-peril-of-metamorphic-contracts-9eb8b8413c5e Given 1 random account When the code of transient contract Metamorphic / TransientContract is loaded @@ -50,8 +49,12 @@ Feature: SelfDestruct And account 1 calls deployMetamorphicContractWithConstructor on contract 1 with the code of Cocoon Then contract 2 describes itself as "Cocoon" And the balance of contract 2 is 100 atto -# When contract 2 is told to self destruct -# And account 1 calls deployMetamorphicContractWithConstructor on contract 1 with the code of Butterfly -# And contract 2 describes itself as "Butterfly" -# # Cocoon is expected to have refunded to its own address, which carries over to the new incarnation. -# And the balance of contract 2 is 100 atto + When contract 2 is told to self destruct + # Cocoon is expected to have refunded to its own address... + Then the balance of contract 2 is 100 atto + When account 1 calls deployMetamorphicContractWithConstructor on contract 1 with the code of Butterfly + Then contract 2 describes itself as "Butterfly" + # ... which carries over to the new incarnation. + And the balance of contract 2 is 100 atto + # The same contract has been loaded + And the balance of contract 3 is 100 atto diff --git a/testing/integration/tests/evm/src/self_destruct/bufferfly.rs b/testing/integration/tests/evm/src/self_destruct/butterfly.rs similarity index 83% rename from testing/integration/tests/evm/src/self_destruct/bufferfly.rs rename to testing/integration/tests/evm/src/self_destruct/butterfly.rs index b962d301a..36a905310 100644 --- a/testing/integration/tests/evm/src/self_destruct/bufferfly.rs +++ b/testing/integration/tests/evm/src/self_destruct/butterfly.rs @@ -1,11 +1,11 @@ -pub use bufferfly::*; +pub use butterfly::*; #[allow(clippy::too_many_arguments, non_camel_case_types)] -pub mod bufferfly { +pub mod butterfly { #![allow(clippy::enum_variant_names)] #![allow(dead_code)] #![allow(clippy::type_complexity)] #![allow(unused_imports)] - #[doc = "Bufferfly was auto-generated with ethers-rs Abigen. More information at: https://github.com/gakonst/ethers-rs"] + #[doc = "Butterfly was auto-generated with ethers-rs Abigen. More information at: https://github.com/gakonst/ethers-rs"] use std::sync::Arc; use ethers::contract::builders::{ContractCall, Event}; @@ -15,30 +15,30 @@ pub mod bufferfly { use ethers::providers::Middleware; # [rustfmt :: skip] const __ABI : & str = "[{\"inputs\":[],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"description\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}]\n" ; #[doc = r" The parsed JSON-ABI of the contract."] - pub static BUFFERFLY_ABI: ethers::contract::Lazy = + pub static BUTTERFLY_ABI: ethers::contract::Lazy = ethers::contract::Lazy::new(|| { ethers::core::utils::__serde_json::from_str(__ABI).expect("invalid abi") }); - pub struct Bufferfly(ethers::contract::Contract); - impl Clone for Bufferfly { + pub struct Butterfly(ethers::contract::Contract); + impl Clone for Butterfly { fn clone(&self) -> Self { - Bufferfly(self.0.clone()) + Butterfly(self.0.clone()) } } - impl std::ops::Deref for Bufferfly { + impl std::ops::Deref for Butterfly { type Target = ethers::contract::Contract; fn deref(&self) -> &Self::Target { &self.0 } } - impl std::fmt::Debug for Bufferfly { + impl std::fmt::Debug for Butterfly { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - f.debug_tuple(stringify!(Bufferfly)) + f.debug_tuple(stringify!(Butterfly)) .field(&self.address()) .finish() } } - impl Bufferfly { + impl Butterfly { #[doc = r" Creates a new contract instance with the specified `ethers`"] #[doc = r" client at the given `Address`. The contract derefs to a `ethers::Contract`"] #[doc = r" object"] @@ -46,7 +46,7 @@ pub mod bufferfly { address: T, client: ::std::sync::Arc, ) -> Self { - ethers::contract::Contract::new(address.into(), BUFFERFLY_ABI.clone(), client).into() + ethers::contract::Contract::new(address.into(), BUTTERFLY_ABI.clone(), client).into() } #[doc = "Calls the contract's `description` (0x7284e416) function"] pub fn description(&self) -> ethers::contract::builders::ContractCall { @@ -55,7 +55,7 @@ pub mod bufferfly { .expect("method not found (this should never happen)") } } - impl From> for Bufferfly { + impl From> for Butterfly { fn from(contract: ethers::contract::Contract) -> Self { Self(contract) } diff --git a/testing/integration/tests/evm/src/self_destruct/cocoon.rs b/testing/integration/tests/evm/src/self_destruct/cocoon.rs index 6e51b379f..283ca8ab1 100644 --- a/testing/integration/tests/evm/src/self_destruct/cocoon.rs +++ b/testing/integration/tests/evm/src/self_destruct/cocoon.rs @@ -13,7 +13,7 @@ pub mod cocoon { use ethers::core::abi::{Abi, Detokenize, InvalidOutputType, Token, Tokenizable}; use ethers::core::types::*; use ethers::providers::Middleware; - # [rustfmt :: skip] const __ABI : & str = "[{\"inputs\":[],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"description\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"die\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]\n" ; + # [rustfmt :: skip] const __ABI : & str = "[{\"inputs\":[],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"description\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destroy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]\n" ; #[doc = r" The parsed JSON-ABI of the contract."] pub static COCOON_ABI: ethers::contract::Lazy = ethers::contract::Lazy::new(|| { @@ -54,10 +54,10 @@ pub mod cocoon { .method_hash([114, 132, 228, 22], ()) .expect("method not found (this should never happen)") } - #[doc = "Calls the contract's `die` (0x35f46994) function"] - pub fn die(&self) -> ethers::contract::builders::ContractCall { + #[doc = "Calls the contract's `destroy` (0x83197ef0) function"] + pub fn destroy(&self) -> ethers::contract::builders::ContractCall { self.0 - .method_hash([53, 244, 105, 148], ()) + .method_hash([131, 25, 126, 240], ()) .expect("method not found (this should never happen)") } } @@ -78,7 +78,7 @@ pub mod cocoon { )] #[ethcall(name = "description", abi = "description()")] pub struct DescriptionCall; - #[doc = "Container type for all input parameters for the `die` function with signature `die()` and selector `[53, 244, 105, 148]`"] + #[doc = "Container type for all input parameters for the `destroy` function with signature `destroy()` and selector `[131, 25, 126, 240]`"] #[derive( Clone, Debug, @@ -88,12 +88,12 @@ pub mod cocoon { ethers :: contract :: EthDisplay, Default, )] - #[ethcall(name = "die", abi = "die()")] - pub struct DieCall; + #[ethcall(name = "destroy", abi = "destroy()")] + pub struct DestroyCall; #[derive(Debug, Clone, PartialEq, Eq, ethers :: contract :: EthAbiType)] pub enum CocoonCalls { Description(DescriptionCall), - Die(DieCall), + Destroy(DestroyCall), } impl ethers::core::abi::AbiDecode for CocoonCalls { fn decode( @@ -104,8 +104,10 @@ pub mod cocoon { { return Ok(CocoonCalls::Description(decoded)); } - if let Ok(decoded) = ::decode(data.as_ref()) { - return Ok(CocoonCalls::Die(decoded)); + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(CocoonCalls::Destroy(decoded)); } Err(ethers::core::abi::Error::InvalidData.into()) } @@ -114,7 +116,7 @@ pub mod cocoon { fn encode(self) -> Vec { match self { CocoonCalls::Description(element) => element.encode(), - CocoonCalls::Die(element) => element.encode(), + CocoonCalls::Destroy(element) => element.encode(), } } } @@ -122,7 +124,7 @@ pub mod cocoon { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { match self { CocoonCalls::Description(element) => element.fmt(f), - CocoonCalls::Die(element) => element.fmt(f), + CocoonCalls::Destroy(element) => element.fmt(f), } } } @@ -131,9 +133,9 @@ pub mod cocoon { CocoonCalls::Description(var) } } - impl ::std::convert::From for CocoonCalls { - fn from(var: DieCall) -> Self { - CocoonCalls::Die(var) + impl ::std::convert::From for CocoonCalls { + fn from(var: DestroyCall) -> Self { + CocoonCalls::Destroy(var) } } #[doc = "Container type for all return fields from the `description` function with signature `description()` and selector `[114, 132, 228, 22]`"] diff --git a/testing/integration/tests/evm/src/self_destruct/mod.rs b/testing/integration/tests/evm/src/self_destruct/mod.rs index 357c7e74c..aafd8294e 100644 --- a/testing/integration/tests/evm/src/self_destruct/mod.rs +++ b/testing/integration/tests/evm/src/self_destruct/mod.rs @@ -1,10 +1,10 @@ -mod bufferfly; +mod butterfly; mod cocoon; mod metamorphic_interface; mod self_destruct_chain; mod self_destruct_on_create; -pub use bufferfly::Bufferfly; +pub use butterfly::Butterfly; pub use cocoon::Cocoon; pub use metamorphic_interface::MetamorphicInterface; pub use self_destruct_chain::SelfDestructChain; diff --git a/testing/integration/tests/fevm_features/main.rs b/testing/integration/tests/fevm_features/main.rs index e67fc1106..c8534d193 100644 --- a/testing/integration/tests/fevm_features/main.rs +++ b/testing/integration/tests/fevm_features/main.rs @@ -44,7 +44,7 @@ lazy_static! { "SelfDestruct" / "SelfDestructOnCreate", "SelfDestruct" / "SelfDestructChain", "SelfDestruct" / "Cocoon", - "SelfDestruct" / "Bufferfly", + "SelfDestruct" / "Butterfly", "Metamorphic" / "MetamorphicContractFactory", "Metamorphic" / "TransientContract" } diff --git a/testing/integration/tests/fevm_features/self_destruct.rs b/testing/integration/tests/fevm_features/self_destruct.rs index bfa0e9a37..da61f6c98 100644 --- a/testing/integration/tests/fevm_features/self_destruct.rs +++ b/testing/integration/tests/fevm_features/self_destruct.rs @@ -28,6 +28,11 @@ mod metamorphic_interface { crate::contract_constructors!(MetamorphicInterface); } +mod cocoon { + use evm_contracts::self_destruct::Cocoon; + crate::contract_constructors!(Cocoon); +} + #[derive(World, Debug)] pub struct SelfDestructWorld { pub tester: ContractTester, @@ -56,7 +61,12 @@ fn set_beneficiary(world: &mut SelfDestructWorld, beneficiary: Hex160) { } #[when(expr = "{acct} calls destroy on {cntr} with addresses:")] -fn destroy(world: &mut SelfDestructWorld, acct: AccountNumber, cntr: ContractNumber, step: &Step) { +fn chain_destruct( + world: &mut SelfDestructWorld, + acct: AccountNumber, + cntr: ContractNumber, + step: &Step, +) { let (contract, contract_addr) = world .tester .contract(cntr, self_destruct_chain::new_with_actor_id); @@ -151,3 +161,15 @@ fn check_description(world: &mut SelfDestructWorld, cntr: ContractNumber, descr: assert_eq!(self_descr, descr); } + +#[when(expr = "{cntr} is told to self destruct")] +fn self_destruct(world: &mut SelfDestructWorld, cntr: ContractNumber) { + let (contract, contract_addr) = world.tester.contract(cntr, cocoon::new_with_actor_id); + + let call = contract.destroy(); + + let _ = world + .tester + .call_contract(AccountNumber(0), contract_addr, call) + .expect("self destruct should work"); +}