Log
A log is used to store arguments and data in a transaction receipt on the blockchain. Within the Aion Virtual Machine, a log can have 0 to 4 topics and at least one data field.
You can view further documentation into Blockchain.log() on the AVM API website.
Example Contract
You can use this contract as template.
Example Receipt
Here is a sample receipt for the example contract deployment.
In the logs section, we can see that:
- The first topic is
0x4a617661436f6e74726163744465706c6f796d656e7400000000000000000000
which is the hex data for stringJavaContractDeployment
. - The second topic is
0xa048630fff033d214b36879e62231cc77d81f45d348f6590d268b9b8cabb88a9
which is the account deployed the contract. - The
data
is0x31353537383932343130
which is the time when block is forged.