

receive() external payable { } 函数体内写赋值转账就报错
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.

receive() external payable { } 函数体内写赋值转账就报错
官方文档在TestPayable合约里对receive() external payable { x = 2; y = msg.value; }里面x,y赋值,运行转账就报错,如果改成receive() external payable { }转账就成功了,这个是为什么啊?
Recommend
-
12
为什么 Golang 函数赋值会产生内存分配? 2020-06-30 2020-11-24go 7.2k 13 分钟这几天在重构某段代码后,做了一次性能测试,火焰图中发现了一个十分...
-
19
Error: Can not send value to non-payable contract method or constructor Error: Can not send value to non-payable contract method or constructor ...
-
9
为什么在 JS 函数 / 类中以属性赋值形式无法覆写 Symbol.hasInstance ?本例默认使用最小环境,且 Symbol.hasInstance 没有被以任何形式事先进行覆写,仍是初始 [native code]。 覆写失败意味着 …
-
11
send 报错Error: Can not send value to non-payable contract method or constructor 是我前端的原因还是后端的原因 ...
-
6
Automated accounts payable platform Tipalti raises $270M Tipalti's officeImage Credit: Tipalti
-
5
智能合约 调用 payable 函数 请教一...
-
9
Nadia Casagrande April 5, 2022 1 minute read ...
-
10
Automated Accounts Payable Gives Biotech Company New EfficiencyAdopting a system from Tipalti freed up manhours and other resources as biotech company ImaginAB scaled up and adapted to pandemic woes.
-
4
Anca Lisnic December 22, 2022 1 minute read ...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK