Pivot the life

Personal Growth. Blockchain. Digital Tech

Understanding Receive function and Fallback function in Solidity

Solidity supports two types of callback functions, namely receive() and fallback(), primarily used for the following scenarios: Receiving $ETH and handling function calls that do not exist in the contract.

Understanding call, staticcall and delegatecall in Solidity

call, staticcall, and delegatecall are all low-level ways to call functions in another contract. They all allow adjusting the gas limit (compared to transfer and send, which have a fixed limit of 2300 gas) and do not throw exceptions when a call error occurs; instead, they return false.