I am trying to understand the arguments of the built-in Solidity's (or EVM's: I am not sure) call function. I know it has 4 arguments. I am trying to understand the call function at: Syntax Error in Program
The implicit call method in the above link is:
a.blah.value(ValueToSend)(2, 3);
I am telling the 4 argumens, kindly let me correct if I am wrong:
- Amount of gas: calculated by the EVM system using some formula?
- Destination address: a.blah
- Ether= Value to send
- input/output: input = 2 & 3: output=?
Is the following the explicit version of above call but it would invoke the fallback function instead of blah(...), is this correct?:
a.call.value(ValueToSend)(2,3)?
Some body please guide me.
Zulfi
a.blah.value(ValueToSend)(2, 3)is interpreted as call functionblahfrom contractawith parameters 2, 3 and sendValueToSendwei. On the other handa.call.value(ValueToSend)(2,3)is a syntax error on solidity 0.5 because it only accepts bytes as parameter to call. – Ismael Jun 21 '19 at 16:21