【发布时间】:2023-03-27 08:48:01
【问题描述】:
我正在尝试使用这种方法:
function test(uint amount) public {
address(0xf5eA38B6b9644224dA1aECbC1219e8543c0689b2).call(abi.encodeWithSignature("deposit(uint)",amount));
}
但是交易被还原了,这是因为金额没有以某种方式进行哈希处理,我真的不知道该怎么做,我应该如何处理金额?这些是交易:
-失败的使用方法:https://bscscan.com/tx/0x7fdd50cee23295ea866baa8961a2105c58162e77125df852a4fc5bf0fad2f507
这是输入数据:
函数:测试(uint256 tAmount)***
方法ID:0x29e99f07 [0]:000000000000000000000000000000000000000000000000000000000000000001
-直接从站点调用合约而不是在另一个智能合约中使用调用的成功者:https://bscscan.com/tx/0xfd4158766f25761fa5dddb0683c677085a04ea6db05e03794be375a8243d7128
这是输入数据:
函数:存款(uint256 _amount) ***
方法ID:0xb6b55f25 [0]:0000000000000000000000000000000000000000000000000005427aedb41a400
我需要以某种方式计算金额吗?
【问题讨论】:
标签: call blockchain ethereum solidity binance