ESDT Operations Events
ESDT Operations Events are generated in response to interactions with an ESDT token. These events help keep track of actions like creating new tokens, transferring tokens between addresses, burning tokens, etc.
Fungible token transfer
The ESDTTransfer
event is emitted when a fungible token undergoes a transfer operation via the ESDTTransfer
built-in function.
- Structure
- Example
Field | Value |
---|---|
identifier | ESDTTransfer |
address | the sender of the token |
topics | topics[0] - token identifier base64 encoded topics[1] - empty topics[2] - value bytes base64 encoded topics[3] - receiver address address bytes base64 encoded |
data | empty |
{
"identifier": "ESDTTransfer",
"address": "erd1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzllls8a5w6u",
"topics": [
"VVRLLWI5NzQ4MA==",
"",
"AzsuPJ/QgDzoAAAA",
"0+diI4/UjUcgbmchGtML1QwheMY68dnsww9vhRPJUWg="
],
"data": null
}
Semi-fungible, non-fungible or meta-esdt token creation
The ESDTNFTCreate
event is generated when a new token is created using the built-in function ESDTNFTCreate
.
- Structure
- Example
Field | Value |
---|---|
identifier | ESDTNFTCreate |
address | the creator of the token |
topics | topics[0] - token identifier base64 encoded topics[1] - token nonce bytes base64 encoded topics[2] - value bytes base64 encoded topics[3] - ESDigitalToken structure marshalled with gogo proto serializer |
data | empty |
{
"identifier": "ESDTNFTCreate",
"address": "erd1qqqqqqqqqqqqqpgq0tajepcazernwt74820t8ef7t28vjfgukp2sw239f3",
"topics": [
"TFlaLTBmM2MxMQ==",
"AQ==",
"AQ==",
"CAESAgABIvwBCAESBWx5cmFaGiAJ7NX5x1oDr20FnI7bUkyNRhecngUl6Jlvjjzlcu0BuSD0Ayo7YmFma3JlaWNqbXVwMndna21qaXR0a2dpbzZydXlpb3h6cHpraHZ6b3Jvand5eHU0Y2RiNnQycHRhaGkyQmlwZnM6Ly9iYWZrcmVpY2ptdXAyd2drbWppdHRrZ2lvNnJ1eWlveHpwemtodnpvcm9qd3l4dTRjZGI2dDJwdGFoaTpLbWV0YWRhdGE6YmFma3JlaWNqbXVwMndna21qaXR0a2dpbzZydXlpb3h6cHpraHZ6b3Jvand5eHU0Y2RiNnQycHRhaGkvbHlyYVp9"
],
"data": null
}
Semi-fungible, non-fungible or meta-esdt token transfer
The ESDTNFTTransfer
event is generated when a token, which can be semi-fungible, non-fungible, or meta-esdt,
is moved through the ESDTNFTTransfer
built-in function.
- Structure
- Example
Field | Value |
---|---|
identifier | ESDTNFTTransfer |
address | the sender of the token |
topics | topics[0] - token identifier base64 encoded topics[1] - token nonce bytes base64 encoded topics[2] - value bytes base64 encoded topics[3] - receiver address bytes base64 encoded |
data | empty |
{
"identifier": "ESDTNFTTransfer",
"address": "erd1qqqqqqqqqqqqqpgq0tajepcazernwt74820t8ef7t28vjfgukp2sw239f3",
"topics": [
"WE1FWC1mZGEzNTU=",
"Aw==",
"LUrGxb4/2VjTAA==",
"0+diI4/UjUcgbmchGtML1QwheMY68dnsww9vhRPJUWg="
],
"data": null
}
Multi token transfer
The MultiESDTNFTTransfer
event is generated when one or multiple tokens are transferred using the built-in
function MultiESDTNFTTransfer
.
- Structure
- Example
Field | Value |
---|---|
identifier | MultiESDTNFTTransfer |
address | the sender of the token |
topics | topics[0] - token identifier topics[1] - token nonce base64 encoded (can be empty in case of fungible token) topics[2] - value bytes base64 encoded topics[3] - receiver address bytes base64 encoded |
data | empty |
{
"identifier": "MultiESDTNFTTransfer",
"address": "erd1qqqqqqqqqqqqqpgq0tajepcazernwt74820t8ef7t28vjfgukp2sw239f3",
"topics": [
"WE1FWC1mZGEzNTU=",
"Aw==",
"LUrGxb4/2VjTAA==",
"0+diI4/UjUcgbmchGtML1QwheMY68dnsww9vhRPJUWg="
],
"data": null
}
For a multi-token transfer operation, multiple MultiESDTNFTTransfer
events will be generated, one for each token being transferred.
Starting from release rc/v1.6.0
, the MultiESDTNFTTransfer
will be changed when the flag ScToScLogEventEnableEpoch
will be enabled.
Instead of generating multiple events with the same identifier, only one event will be generated for the entire multi-token transfer operation. The event will follow the new format outlined below:
- Structure
- Example
Field | Value |
---|---|
identifier | MultiESDTNFTTransfer |
address | the sender of the token |
topics | PAIRS OF < topics[i] - token identifier topics[i+1] - token nonce base64 encoded (can be empty in case of fungible token)topics[i+2] - value bytes base64 > topics[n-1] - receiver address |
data | empty |
{
"identifier": "MultiESDTNFTTransfer",
"address": "erd1j467tvyyr2dtxdz3lsgqaeez5umjsdn8fajexqlu7eum5wx2u0aqkca23a",
"topics": [
"MzlINk8tNDc5NmI4",
"Aw==",
"AQ==",
"UFFTMFItZDlmOTlk",
"",
"AQ==",
"StPRLp5kwnctf4If2CUhKr6Vux8WN3k3i5chL/y93UQ="
],
"data": null
}