0
点赞
收藏
分享

微信扫一扫

通过selfdestruct发送eth到不可接收合约

林塬 2022-02-22 阅读 40
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;
    }
}
举报

相关推荐

0 条评论