getapplicationlog method
Returns the contract event information based on the specified txid. The contract event information is stored under the ApplicationLogs directory.
Parameter Description
txid: Transaction ID
trigger type: Optional. It has the following options:
OnPersist
PostPersist
Application
Verification
System: OnPersist | PostPersist
All: OnPersist | PostPersist | Verification | Application
It defaults to All. You can specify a trigger type.
Example
Request body:
This transaction transfers 100 GAS from NgaiKFjurmNmiRzDRQGs44yzByXuSkdGPF to NikhQp1aAD1YFCiwknhM5LQQebj4464bCJ.
Response body 1:
Response description:
txid: Transaction ID.
trigger: Triggers.
vmstate: VM execution state. HALT represents success, and FAULT represents failure.
gasconsumed: The transaction fee, which means the GAS consumed in the transaction execution.
notifications: The notification sent by the smart contract. If no notifications is returned it indicates the transfer is not successful. See the Note below.
contract: The contract sending the notification. Here is GasToken.
eventname: Event name of the notification.
state: Notification content, where ByteString is Base64-encoded wallet address and can be converted at https://neo.org/converter/index.
[!Note]
This example shows the log of a successful token transfer, however, in case of a failed transfer or NeoVM exception, the outcomes can be:
Failed transfer: no Transfer notification event is returned, execution ends in a
HALT
state with a stack value ofFalse
.NeoVM exception: a Transfer notification event may or may not be returned, but execution ends in a
FAULT
state.