-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' into ccalls
- Loading branch information
Showing
14 changed files
with
2,841 additions
and
2,724 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
id: contract-call-events | ||
title: Smart Contract Call Events | ||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
id: contract-deploy-events | ||
title: Smart Contract Deploy Events | ||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,231 @@ | ||
--- | ||
id: esdt-events | ||
title: ESDT Operations Events | ||
--- | ||
|
||
import Tabs from '@theme/Tabs'; | ||
import TabItem from '@theme/TabItem'; | ||
|
||
|
||
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. | ||
<Tabs | ||
defaultValue="Structure" | ||
values={[ | ||
{label: 'Structure', value: 'Structure'}, | ||
{label: 'Example', value: 'Example'}, | ||
]} | ||
> | ||
<TabItem value="Structure"> | ||
|
||
| Field | Value | | ||
|------------|------------------------------------------------------------------------------------------------------------------------| | ||
| identifier | ESDTTransfer | | ||
| address | the sender of the token | | ||
| topics | `topics[0]` - token identifier base64 encoded <br/>`topics[1]` - empty <br/> `topics[2]` - value bytes base64 encoded <br/> `topics[3]` - receiver address address bytes base64 encoded | | ||
| data | empty | | ||
|
||
</TabItem> | ||
<TabItem value="Example"> | ||
|
||
```json | ||
{ | ||
"identifier": "ESDTTransfer", | ||
"address": "erd1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzllls8a5w6u", | ||
"topics": [ | ||
"VVRLLWI5NzQ4MA==", | ||
"", | ||
"AzsuPJ/QgDzoAAAA", | ||
"0+diI4/UjUcgbmchGtML1QwheMY68dnsww9vhRPJUWg=" | ||
], | ||
"data": null | ||
} | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> | ||
|
||
|
||
### 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`. | ||
|
||
<Tabs | ||
defaultValue="Structure" | ||
values={[ | ||
{label: 'Structure', value: 'Structure'}, | ||
{label: 'Example', value: 'Example'}, | ||
]} | ||
> | ||
<TabItem value="Structure"> | ||
|
||
| Field | Value | | ||
|------------|------------------------------------------------------------------------------------------------------------------------------| | ||
| identifier | ESDTNFTCreate | | ||
| address | the creator of the token | | ||
| topics | `topics[0]` - token identifier base64 encoded <br/>`topics[1]` - token nonce bytes base64 encoded <br/> `topics[2]` - value bytes base64 encoded <br/> `topics[3]` - ESDigitalToken structure marshalled with gogo proto serializer | | ||
| data | empty | | ||
|
||
</TabItem> | ||
<TabItem value="Example"> | ||
|
||
```json | ||
{ | ||
"identifier": "ESDTNFTCreate", | ||
"address": "erd1qqqqqqqqqqqqqpgq0tajepcazernwt74820t8ef7t28vjfgukp2sw239f3", | ||
"topics": [ | ||
"TFlaLTBmM2MxMQ==", | ||
"AQ==", | ||
"AQ==", | ||
"CAESAgABIvwBCAESBWx5cmFaGiAJ7NX5x1oDr20FnI7bUkyNRhecngUl6Jlvjjzlcu0BuSD0Ayo7YmFma3JlaWNqbXVwMndna21qaXR0a2dpbzZydXlpb3h6cHpraHZ6b3Jvand5eHU0Y2RiNnQycHRhaGkyQmlwZnM6Ly9iYWZrcmVpY2ptdXAyd2drbWppdHRrZ2lvNnJ1eWlveHpwemtodnpvcm9qd3l4dTRjZGI2dDJwdGFoaTpLbWV0YWRhdGE6YmFma3JlaWNqbXVwMndna21qaXR0a2dpbzZydXlpb3h6cHpraHZ6b3Jvand5eHU0Y2RiNnQycHRhaGkvbHlyYVp9" | ||
], | ||
"data": null | ||
} | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> | ||
|
||
### 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. | ||
|
||
<Tabs | ||
defaultValue="Structure" | ||
values={[ | ||
{label: 'Structure', value: 'Structure'}, | ||
{label: 'Example', value: 'Example'}, | ||
]} | ||
> | ||
<TabItem value="Structure"> | ||
|
||
| Field | Value | | ||
|------------|------------------------------------------------------------------------------------------------------------------------------| | ||
| identifier | ESDTNFTTransfer | | ||
| address | the sender of the token | | ||
| topics | `topics[0]` - token identifier base64 encoded <br/>`topics[1]` - token nonce bytes base64 encoded <br/> `topics[2]` - value bytes base64 encoded <br/> `topics[3]` - receiver address bytes base64 encoded | | ||
| data | empty | | ||
|
||
</TabItem> | ||
<TabItem value="Example"> | ||
|
||
```json | ||
{ | ||
"identifier": "ESDTNFTTransfer", | ||
"address": "erd1qqqqqqqqqqqqqpgq0tajepcazernwt74820t8ef7t28vjfgukp2sw239f3", | ||
"topics": [ | ||
"WE1FWC1mZGEzNTU=", | ||
"Aw==", | ||
"LUrGxb4/2VjTAA==", | ||
"0+diI4/UjUcgbmchGtML1QwheMY68dnsww9vhRPJUWg=" | ||
], | ||
"data": null | ||
} | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> | ||
|
||
|
||
### Multi token transfer | ||
|
||
The `MultiESDTNFTTransfer` event is generated when one or multiple tokens are transferred using the built-in | ||
function `MultiESDTNFTTransfer`. | ||
|
||
|
||
<Tabs | ||
defaultValue="Structure" | ||
values={[ | ||
{label: 'Structure', value: 'Structure'}, | ||
{label: 'Example', value: 'Example'}, | ||
]} | ||
> | ||
<TabItem value="Structure"> | ||
|
||
| Field | Value | | ||
|------------|---------------------------------------------------------------------------------------------------------------------------------| | ||
| identifier | MultiESDTNFTTransfer | | ||
| address | the sender of the token | | ||
| topics | `topics[0]` - token identifier <br/>`topics[1]` - token nonce base64 encoded (can be empty in case of fungible token) <br/> `topics[2]` - value bytes base64 encoded <br/> `topics[3]` - receiver address bytes base64 encoded | | ||
| data | empty | | ||
|
||
</TabItem> | ||
<TabItem value="Example"> | ||
|
||
```json | ||
{ | ||
"identifier": "MultiESDTNFTTransfer", | ||
"address": "erd1qqqqqqqqqqqqqpgq0tajepcazernwt74820t8ef7t28vjfgukp2sw239f3", | ||
"topics": [ | ||
"WE1FWC1mZGEzNTU=", | ||
"Aw==", | ||
"LUrGxb4/2VjTAA==", | ||
"0+diI4/UjUcgbmchGtML1QwheMY68dnsww9vhRPJUWg=" | ||
], | ||
"data": null | ||
} | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> | ||
|
||
:::note | ||
For a multi-token transfer operation, multiple `MultiESDTNFTTransfer` events will be generated, one for each token being transferred. | ||
::: | ||
|
||
:::important Important | ||
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: | ||
|
||
<Tabs | ||
defaultValue="Structure" | ||
values={[ | ||
{label: 'Structure', value: 'Structure'}, | ||
{label: 'Example', value: 'Example'}, | ||
]} | ||
> | ||
<TabItem value="Structure"> | ||
|
||
| Field | Value | | ||
|------------|---------------------------------------------------------------------------------------| | ||
| identifier | MultiESDTNFTTransfer | | ||
| address | the sender of the token | | ||
| topics | `PAIRS OF` <br/> < <br/>`topics[i]` - token identifier <br/>`topics[i+1]` - token nonce base64 encoded (can be empty in case of fungible token)<br/> `topics[i+2]` - value bytes base64 <br/>> <br/> `topics[n-1]` - receiver address | | ||
| data | empty | | ||
|
||
</TabItem> | ||
<TabItem value="Example"> | ||
|
||
```json | ||
{ | ||
"identifier": "MultiESDTNFTTransfer", | ||
"address": "erd1j467tvyyr2dtxdz3lsgqaeez5umjsdn8fajexqlu7eum5wx2u0aqkca23a", | ||
"topics": [ | ||
"MzlINk8tNDc5NmI4", | ||
"Aw==", | ||
"AQ==", | ||
"UFFTMFItZDlmOTlk", | ||
"", | ||
"AQ==", | ||
"StPRLp5kwnctf4If2CUhKr6Vux8WN3k3i5chL/y93UQ=" | ||
], | ||
"data": null | ||
} | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> | ||
|
||
|
||
::: | ||
|
||
|
||
|
Oops, something went wrong.