# The contract's special interaction type event

# Brief introduction to contract event

The contract can emit emit events, and the thrown events are recorded on the blockchain. When the nodes on the blockchain network synchronize to these events, they can trigger some scripts according to the local configuration. The parameters in emit correspond to several global variables when the local callback script is executed, truncated (whether the parameters thrown by emit are truncated), param (parameters in string format thrown by emit), contract_id (the contract where emit triggers the code ID), event_type (event type in string format).

# Method of triggering contract event

You can use the syntax of the emit keyword to trigger a contract event, and each time an emit statement is executed, a contract event of this type of event is triggered

The syntax is:

emit EventName(EventArg)

such as:

emit hello("glua")  -- hello is the event name thrown by emit, "glua" is the parameter
EventName Supports up to 49 bytes long string, EventArg supports up to 1024 bytes, super long truncation