# 使用Flashbot转移合约的所有权 **Published by:** [Ericet](https://paragraph.com/@ericet/) **Published on:** 2022-08-01 **URL:** https://paragraph.com/@ericet/flashbot ## Content 今天有个网友联系到我,说他的钱包的私钥泄露了,按照我之前写的文章挽救被黑钱包里面的剩余资产, 顺利把钱包里面的ENS, NFT, 和一些ERC20代币转移到新的钱包 但是那个私钥泄露的钱包创建过一些合约,合约的所有权没有办法转移,所以想让我帮他写个方法把合约的所有权转移到新的地址 看了一下合约,方法不难,就是用ERC20的方式写转移合约所有权的方法 更新了代码,现在支持用Flashbot转移合约的所有权: https://github.com/ericet/ens-claim-flashbot-example 要使用转移合约的所有权,只需把合约里面的这段代码uncomment掉1d8e6d98b2e260656be25d06013a198.png然后tokenAddress改成合约的地址就行了image.png ## Publication Information - [Ericet](https://paragraph.com/@ericet/): Publication homepage - [All Posts](https://paragraph.com/@ericet/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@ericet): Subscribe to updates - [Twitter](https://twitter.com/ericet369): Follow on Twitter