Let's say you call a function at another contract in Solidity:


It would then match it using the function signature to run the function in contractB. If there's not match, it would run the fallback function.

But if neither exists? What happens? Does it throw an error, or would you just expend the cost of the CALL?


The call will simply return immediately. There will be no code executed, but any value sent with the transaction will remain with the recipient contract. In fact, it will be as if you just sent ether to the contract (note that the value of the transaction can be 0). All extra data (including the ABI) will be ignored.

  • To clarifiy, you will still pay the cost of the CALL? Feb 17 '16 at 13:34
  • Yes, but it will be pretty nominal. The same amount of gas as just sending ETH Feb 17 '16 at 14:02

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.