Web3:B站chainlink可能Lesson6我遇到的问题汇总。

6-4
//记不住这个之前提到过没,反正这个方法没了
simpleStorage.deployed() 
//现在是这样的
simpleStorage.waitForDeployment()

地址,这个之前提过

 const address = await simpleStorage.getAddress()
 console.log("SimpleStorage deployed to:", address);
6-6

@nomiclabs/hardhat-etherscan无了
网址:https://hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-verify#hardhat-etherscan

npm install --save-dev @nomicfoundation/hardhat-verify

不过我看package.json,现在配置hardhat的时候好像就自动装了

6-7

verify()函数一直不调用,因为network.chaid一直返回undefined,后来发现

 await simpleStorage.deploymentTransaction().wait(6);

这个鬼东西不能wait(1),可能只等一个块时间太短了,在那之前connection就断开了。

然后在调用的过程中好像又断开了,解决不了,不管了先。
不过github代码仓库的代码倒是能正常运行,我比较不出来我问题在哪。

  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值