Hello,
I'm trying to use call(abi.encode()) in this method:
function deposit(uint _amount) public {
address(0xf5eA38B6b9644224dA1aECbC1219e8543c0689b2).call(abi.encode("deposit(uint)",_amount));
}
If I try to call a method from 0xf5eA38B6b9644224dA1aECbC1219e8543c0689b2 that has no argument everything is fine, but when I call, as in this case, a method with 1 or more argument I get an execution reverted
I tried with abi.encodeWithSignature and nothing changed, I don't really know what I'm doing wrong
Here it is the bsc scan of the failure:
Here it is the bsc scan of the success (methods with no argument):
and here it is the contract directly used by the front end and not called with remix:
0xfd4158766f25761fa5dddb0683c677085a04ea6db05e03794be375a8243d7128 (I can put only 2 links so this is the tx hash)
How do I call a contract with arguments?