diff --git a/docs/developers/event-logs/contract-deploy-events.md b/docs/developers/event-logs/contract-deploy-events.md deleted file mode 100644 index dc626a0a6..000000000 --- a/docs/developers/event-logs/contract-deploy-events.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -id: contract-deploy-events -title: Smart Contract Deploy Events ---- - diff --git a/docs/developers/event-logs/contract-deploy-events.mdx b/docs/developers/event-logs/contract-deploy-events.mdx new file mode 100644 index 000000000..3eef4f119 --- /dev/null +++ b/docs/developers/event-logs/contract-deploy-events.mdx @@ -0,0 +1,134 @@ +--- +id: contract-deploy-events +title: Smart Contract Deploy Events +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + +Contract deploy events are generated when a transaction involves either the deployment of a +smart contract or an upgrade to an existing contract. + +### Contract deploy event + +The contract deploy event is generated upon the successful execution of a transaction that includes +the deployment of a smart contract, without encountering any errors. + + + + + +| Field | Value | +|------------|------------------------------------------------------------------------------------------------------------------------| +| identifier | SCDeploy | +| address | the address of the deployed contract | +| topics | `topics[0]` - the address bytes of the deployed contract base64 encoded
`topics[1]` - the address bytes of the deployer of the smart contract base64 encoded
`topics[2]` - the code hash bytes of the deployer smart contract base64 encoded | +| data | empty | + +
+ + +```json +{ + { + "address": "erd1qqqqqqqqqqqqqpgqnnl9nn0kuuckhg24g02hq2745n4jk2hp327qcay4nm", + "identifier": "SCDeploy", + "topics": [ + "AAAAAAAAAAAFAJz+Wc325zFroVVD1XAr1aTrKyrhirw=", + "NRl7AwoM3hEPC0t9RTDy7gdJUSJvKC5dpJwLYaHLirw=", + "bJtNdzjeaYecInf/NpHzSjHJEZ2l6hR/uJh0NkLIe+k=" + ], + "data": null + } +} +``` + + +
+ + +### Contract upgrade event + +The contract upgrade event is generated when a transaction, involving an upgrade, is successfully executed without any errors. + + + + + +| Field | Value | +|------------|------------------------------------------------------------------------------------------------------------------------| +| identifier | SCUpgrade | +| address | the address of the deployed contract | +| topics | `topics[0]` - the address bytes of the upgraded contract base64 encoded
`topics[1]` - the address bytes of the upgrader of the smart contract base64 encoded
`topics[2]` - the code hash bytes of the upgraded smart contract base64 encoded | +| data | empty | + +
+ + +```json +{ + "address": "erd1qqqqqqqqqqqqqpgqnnl9nn0kuuckhg24g02hq2745n4jk2hp327qcay4nm", + "identifier": "SCUpgrade", + "topics": [ + "AAAAAAAAAAAFAJz+Wc325zFroVVD1XAr1aTrKyrhirw=", + "NRl7AwoM3hEPC0t9RTDy7gdJUSJvKC5dpJwLYaHLirw=", + "kUVJtdwvHG2sCTi9l2uneSONUVonWfgHCK69gdB+52o=" + ], +} +``` + + +
+ + +### Change owner event + +The `ChangeOwnerAddress` event is generated upon the successful execution of a transaction that specifically involves +a `ChangeOwnerAddress` built-in function call, and this execution must occur without encountering any errors. + + + + + +| Field | Value | +|------------|------------------------------------------------------------------------------------------------------------------------| +| identifier | ChangeOwnerAddress | +| address | the address of the contract | +| topics | `topics[0]` - the address bytes of the new contract owner base64 encoded | +| data | empty | + + + + +```json +{ + "address": "erd1qqqqqqqqqqqqqpgqnnl9nn0kuuckhg24g02hq2745n4jk2hp327qcay4nm", + "identifier": "ChangeOwnerAddress", + "topics": [ + "UKAg0hORMjk0oT6RalZp1w0Xulvvj0Wa/SSYstBepao=" + ], + "data": null +} +``` + + + diff --git a/docs/developers/event-logs/execution-events.mdx b/docs/developers/event-logs/execution-events.mdx index cc2667a59..8af7299c1 100644 --- a/docs/developers/event-logs/execution-events.mdx +++ b/docs/developers/event-logs/execution-events.mdx @@ -164,3 +164,86 @@ been executed but encountered an error in the process. + +### Transfer value only event + +The `transferValueOnly` event is generated when a transaction involving multiple smart contract calls has been executed, +and during the execution, some EGLD tokens were transferred from one smart contract to another. + + + + + +| Field | Value | +|------------|------------------------------------------------------------------------------------------------------------------------| +| identifier | transferValueOnly | +| address | the destination address | +| topics | `topics[0]` - sender address bytes base64 encoded
`topics[1]` - destination address bytes base64 encoded
`topics[2]` - transferred value bytes base64 encoded | +| data | empty | + +
+ + +```json +{ + "identifier": "transferValueOnly", + "address": "erd1qqqqqqqqqqqqqpgqd77fnev2sthnczp2lnfx0y5jdycynjfhzzgq6p3rax", + "topics": [ + "AAAAAAAAAAAFADz3VNyYTcz4h9Y/rLRPPr0jIp5kL5w=", + "AAAAAAAAAAAFAG+8meWKgu88CCr80meSkmkwSck3EJA=", + "9DzAfFqMRw==" + ] + "data": "", +} +``` + + +
+ + +:::important Important +From the `rc/v1.6.0` release onward, the `transferValueOnly` will undergo a modification once the `ScToScLogEventEnableEpoch` flag is activated as follows: + + + + + +| Field | Value | +|------------|---------------------------------------------------------------------------------------| +| identifier | transferValueOnly | +| address | the sender address | +| topics | `topics[0]` - transferred value bytes base64 encoded
`topics[1]` - destination address bytes base64 encoded | +| data | empty | + +
+ + +```json +{ + "identifier": "transferValueOnly", + "address": "erd1qqqqqqqqqqqqqpgqd77fnev2sthnczp2lnfx0y5jdycynjfhzzgq6p3rax", + "topics": [ + "AQ==", + "rwBuzoNHMQTqkff/VgXEwXQvchSh9GvimeMO4uhwcWk=" + ], + "data": null +} +``` + + +
+ +::: +