区块链小问题:the called function should be payable if you send value and the value you send should be less"/>
区块链小问题:the called function should be payable if you send value and the value you send should be less
记初学区块链时遇到的小问题
错误反馈
the called function should be payable if you send value and the value you send should be less than your current balance
第一次采用的是这种转账的方式
操作为:
1.输入转账的编号(之前有存不同编号不同的价格但转账的接受地址都是一样的)
2.在value处填转账的金额
3.点击buy,转账成功
第二次我想在输入编号的同时输入金额,然后直接购买,就不用使用到msg.value了
结果出现了如下的问题,也就是开头一段英文写的问题
我将value换算成ether也还是不行
address(uint160(adminAddress)).transfer(value*10e18 wei);
最后,希望看到这篇博文的大佬能够告诉我如何解决这个问题
.
问题已解决,是传入的value的值超过了存储账户所拥有的,所以报错不可payable和should be less。
更多推荐
区块链小问题:the called function should be payable if you send value and the value you
发布评论