Hooks
The basic role of hook functions is to perform some predefined actions by capturing some specific events or state changes. They can be triggered automatically during the life cycle of a smart contract, thus allowing developers to define predefined behaviours in the smart contract. For example, specific hook functions can be triggered when certain operations occur to automatically perform tasks such as checking and updating operations, permissions and states. In bonding contract, the hook functions are beforeTransferHook, afterTransferHook, beforeMintHook, afterMintHook, beforeBurnHook, afterBurnHook, these functions basically run through all the process of token These functions basically run through all the processes of the token transfer, which makes the contract have better scalability and meet the project’s special project needs.