Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V6创建interface语法有变;删掉不必要代码L70 #175

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

MacroWang001
Copy link

Ethers第23讲《抢跑交易》,L7代码是错的(或者多余):

console.log(编号${aimTokenId.add(1)}的NFT的持有者是:${await contractFM.ownerOf(aimTokenId.add(1))}) // tx.from被wallet.address抢跑,mint了下一个nft

理论上,抢跑交易成功后,aimTokenId.add(1)还没有被mint, 不存在onwer, 所以contractFM.ownerOf(aimTokenId.add(1))是一个空值,测试了很多次都会报错,建议删掉,不影响整段代码逻辑。

@MacroWang001
Copy link
Author

删掉之后重新跑一遍代码,是成功的

@MacroWang001 MacroWang001 changed the title 删掉不必要代码L70 V6创建interface语法有变;删掉不必要代码L70 Jul 29, 2024
@MacroWang001
Copy link
Author

V6 版本创建interface对象的语法: const iface = new ethers.Interface(contractABI)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant