6
contract.methods.delegate(delegateValue).send(accounts);提示地址错误? | 登链社...
source link: https://learnblockchain.cn/question/2788
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.
30 contract.methods.delegate(delegateValue).send(accounts);提示地址错误?
这个是我用来调用delegate写变量的句子,提示没有获得调用者的地址吗?
contract,delegateValue,accounts初始化都成功
网页也显示变量delegateValue成功显示,说明delegateValue的数据是正确的
最后提示没有获得地址,大神们,帮帮忙!
其它 1 个回答
Aquaman
3小时前
依然是这个错误,但是可以确定的是accounts
是有调用者的地址的,下面的两图可以说明。不是道是不是调用合约的问题。
onClickDelegate = async () => {
const { accounts, contract,delegateValue} = this.state;
await contract.methods.delegate(delegateValue).send(accounts[0]);
}
![image.png](https://img.learnblockchain.cn/attachments/2021/11/BM3WcK4O619b80d594114.png)
![image.png](https://img.learnblockchain.cn/attachments/2021/11/t7dwLsmh619b80e5af99b.png)
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK