0

I'm interested in looking at the code in instances of the Parity Multisig wallet attacks, but the contracts have self-destructed. How can I get ahold of the exact bytecode that was executed in a given transaction once the contract has self-destructed?

2

For the source code, you can check Parity's repo. To get the bytecode, do something like:

const Web3 = require("web3");
const web3 = new Web3(new Web3.providers.HttpProvider("https://mainnet.infura.io/"));
const deadContractAddress = "0x863DF6BFa4469f3ead0bE8f9F2AAE51c91A907b4";
const blockAtDestruct = 4501969;
const blockBeforeDestruct = blockAtDestruct - 1;

web3.eth.getCode(
    deadContractAddress,
    blockBeforeDestruct,
    console.log);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.