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