1

I tried to call function from first contract:

someClass.tokenFallback(msg.sender, _value)

tokenFallback contains with realiztion in second contract:

function tokenFallback(address _from, uint _value, bytes _data)

I got transaction revert. I tried to call function tokenFallback with 2 arguments on second contract:

function tokenFallback(address _from, uint _value)

I got normal transaction and transfer. How to call functions that have different numbers of argument? Is it realy?

  • Non-supplied arguments are defaulted to "zero" (or the equivalent for their types). I'm pretty sure that in later versions of web3, this is no longer feasible (i.e., wb3 throws an error). – goodvibration Jul 11 '18 at 8:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.