Skip to main content
1 of 4

What happens if you call a non-existent function of another contract that has no fallback function in Solidity?

Let's say you write in Solidity:

contractB.doFunction()

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?