7

receive() external payable { } 函数体内写赋值转账就报错

 3 years ago
source link: https://learnblockchain.cn/question/2629
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
receive() external payable { } 函数体内写赋值转账就报错

receive() external payable { } 函数体内写赋值转账就报错

image.png
官方文档在TestPayable合约里对receive() external payable { x = 2; y = msg.value; }里面x,y赋值,运行转账就报错,如果改成receive() external payable { }转账就成功了,这个是为什么啊?


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK