4

使用Flashbot转移合约的所有权

 2 years ago
source link: https://mirror.xyz/ericet.eth/_rWf4ZYooUisEoe7KKiuZvQ6Tvmj1TGTzerpOVO2Af0
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

使用Flashbot转移合约的所有权 — Ericet

使用Flashbot转移合约的所有权
August 1st, 2022

今天有个网友联系到我,说他的钱包的私钥泄露了,按照我之前写的文章挽救被黑钱包里面的剩余资产, 顺利把钱包里面的ENS, NFT, 和一些ERC20代币转移到新的钱包

但是那个私钥泄露的钱包创建过一些合约,合约的所有权没有办法转移,所以想让我帮他写个方法把合约的所有权转移到新的地址

看了一下合约,方法不难,就是用ERC20的方式写转移合约所有权的方法

更新了代码,现在支持用Flashbot转移合约的所有权: https://github.com/ericet/ens-claim-flashbot-example

要使用转移合约的所有权,只需把合约里面的这段代码uncomment掉

1d8e6d98b2e260656be25d06013a198.png

1d8e6d98b2e260656be25d06013a198.png

然后tokenAddress改成合约的地址就行了

image.png

image.png


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK