以太网挑战-LV22 DEX-津贴批准问题
我试图完成非常容易的以太味挑战的DEX水平。 为了使用互换,我首先需要批准令牌津贴,但是我不明白为什么当我调用批准功能时会被卡住,而无需给我任何签署交易的可能性。
I'm trying to complete the Dex level of ethernaut challenge which is quite easy.
In order to use swap I need firstly to approve token allowance, but I don't understand why when I call the approve function metamask get stucked without giving me any possibility of signing the transaction.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我相信MetAmask试图显示两条ERC20代币批准消息
尝试为每个令牌分别批准您的令牌金额
I believe there is something with metamask trying to display two ERC20 token approval messages
Try approving your token amount separately for each token
您可以通过使用Just import = https://github.com/openzeppelin/openzeppelin-contracts/blob/master/master/master/contracts/token/token/ererc20/erc20.sol创建文件来解决此问题。然后使用“部署部分”下的“地址”输入加载合同,然后使用Remix中的批准功能批准您的合同实例。 href =“ https://www.youtube.com/watch? /a>
You can work around this by creating a file in Remix with just Import=https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol" and then load the contract addresses using the "At Address" input under the deploy section. You can then approve the tokens with your contract instance using the approve function in Remix. Please take a look at this video if you need more help: https://www.youtube.com/watch?v=5ZLgOUCmgb8&ab_channel=SuperJackdrummer