Fallback functions are safety "default" functions defined within a smart contract, called when no other valid function can handle the request. The original definition from Ethereum's Solidity docs:

Fallback Function

A contract can have exactly one unnamed function. This function cannot have arguments and cannot return anything. It is executed on a call to the contract if none of the other functions match the given function identifier (or if no data was supplied at all).

Furthermore, this function is executed whenever the contract receives plain Ether (without data). Additionally, in order to receive Ether, the fallback function must be marked payable. If no such function exists, the contract cannot receive Ether through regular transactions.

For TRON smart contracts, fallback functions _cannot_ be triggered when receiving plain TRX. The proposal discussing support has been rejected: https://github.com/tronprotocol/TIPs/issues/11.

TRON supports normal fallback flow when an invalid function is called on a contract:



In the above example, contract _Test_ has a fallback function that increments _x_ on each invalid function call. _Caller_ demonstrates how to call a non-existing function, incrementing _x_ on each call, when _testAddress_ is passed in as _Test_'s deployed address.