contract unpayable{
function getBalance() public view returns (uint) {
return address(this).balance;
}
}
contract Attack{
function attack(address to)external payable{
selfdestruct(payable(to));
}
function getBalance() public view returns (uint) {
return address(this).balance;
}
}
通过selfdestruct发送eth到不可接收合约
最新推荐文章于 2022-09-23 09:55:15 发布