getapplicationlog

Returns the contract event information based on the specified txid.

Parameters

Object Name

Required

Type

Detail

Transaction ID

String

Hash of a transaction

Trigger Type

String

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.

Result

The contract event information:

KeyTypeDetail
txidStringTransaction ID
triggerStringTriggers
vmstateStringVM execution state. "HALT" represents success, and "FAULT" represents failure.
gasconsumedStringThe transaction fee, which means the GAS consumed in the transaction execution.
notificationsArrayThe notifications array sent by the smart contract. If no notifications is returned it indicates the transfer is not successful.
contractStringThe contract sending the notification.
eventnameStringEvent name of the notification.
stateObjectNotification content, where ByteString is Base64-encoded wallet address and can be converted at https://neo.org/converter/index.

Example

Request

curl <your-endpoint> \
   -X POST \
   -H "Content-Type: application/json" \
   -d '{"jsonrpc": "2.0","id": 1,"method": "getapplicationlog","params": ["0xba071262d267fe372f2fff7917cb54a37257e90ad22ff49d67373fd8b0fa566e"]}'

Return

可点击key和value值进行编辑
{
    "jsonrpc":"2.0",
    "id":1,
    "result":{
        "blockhash":"0xba071262d267fe372f2fff7917cb54a37257e90ad22ff49d67373fd8b0fa566e",
        "executions":[
            {
                "trigger":"OnPersist",
                "vmstate":"HALT",
                "gasconsumed":"0",
                "stack":[

                ],
                "notifications":[
                    {
                        "contract":"0xd2a4cff31913016155e38e474a2c06d08be276cf",
                        "eventname":"Transfer",
                        "state":{
                            "type":"Array",
                            "value":[
                                {
                                    "type":"ByteString",
                                    "value":"ZTSRpb82RzIpgZciZRim5I6jsgc="
                                },
                                {
                                    "type":"Any"
                                },
                                {
                                    "type":"Integer",
                                    "value":"1120527"
                                }
                            ]
                        }
                    },
                    {
                        "contract":"0xd2a4cff31913016155e38e474a2c06d08be276cf",
                        "eventname":"Transfer",
                        "state":{
                            "type":"Array",
                            "value":[
                                {
                                    "type":"ByteString",
                                    "value":"BSC43gQtpfeiLl/n07qtHpb2NWg="
                                },
                                {
                                    "type":"Any"
                                },
                                {
                                    "type":"Integer",
                                    "value":"1121037"
                                }
                            ]
                        }
                    },
                    {
                        "contract":"0xd2a4cff31913016155e38e474a2c06d08be276cf",
                        "eventname":"Transfer",
                        "state":{
                            "type":"Array",
                            "value":[
                                {
                                    "type":"Any"
                                },
                                {
                                    "type":"ByteString",
                                    "value":"UDiCgEgZdLrr634iF9YNyKdJeLo="
                                },
                                {
                                    "type":"Integer",
                                    "value":"246014"
                                }
                            ]
                        }
                    }
                ]
            },
            {
                "trigger":"PostPersist",
                "vmstate":"HALT",
                "gasconsumed":"0",
                "stack":[

                ],
                "notifications":[
                    {
                        "contract":"0xd2a4cff31913016155e38e474a2c06d08be276cf",
                        "eventname":"Transfer",
                        "state":{
                            "type":"Array",
                            "value":[
                                {
                                    "type":"Any"
                                },
                                {
                                    "type":"ByteString",
                                    "value":"60Mnt8lISzr52LyvIEidbK6888w="
                                },
                                {
                                    "type":"Integer",
                                    "value":"50000000"
                                }
                            ]
                        }
                    }
                ]
            }
        ]
    }
}
Language
Click Try It! to start a request and see the response here!