5.4.4.14 Smart Contract Event Query API

Use this API to query the list of monitored smart contract events that have been registered.

1. Interface address:

https://PCNGatewayAddress/api/fiscobocs/v1 /event/query

2. Call method: POST

3. Signature algorithm: required and refer to Section 5.4.4.1

4. Call parameters

No. Field name Field Type Required Remarks
1 Header header Map Y
2 Body body Map N
3 Signature Value mac String Y
header
1 user unique ID userCode String Y
2 DApp unique ID appCode String Y

Example:

{"header":{"userCode":"USER0001202006042321579692440","appCode":"app0001202006042323057101002","tId":""},"mac":"MEUCIQC2NTuUlsxQSWPpZwwhJK9zXEMaeYZC04Ar0P5Twyp5AQIgFvZrskasuLiYfOGxd1F9TCetWHIfENg8BCiYfNS1xGk=" }

5. Response parameters

No. Field name Field Type Required Remarks
1 Header header Map Y
2 Body body Map Y
3 Signature Value mac String Y
Header
1 Response ID code int Y 0: Query successful -1: Query failed
2 Response Message msg String Y
body
1 Block generation event blockEvent []blockEvent Y Null when the code is not 0
2 Contract event contractEvent []contractEvent Y
blockEvent
No. Field name Field Type Required Remarks
1 block generation event eventId string Y Null when the code is not 0
2 App code appcode String Y
3 User code userCode String Y
4 Notification URL notifyUrl String Y
5 Attachment parameters attachArgs String N
6 Create time createTime String Y UTC time
contractEvent
No. Field name Field Type Required Remarks
1 block generation event eventId string Y
2 App code appcode String Y
3 User code userCode String Y
4 Notification URL notifyUrl String Y
5 Attachment parameters attachArgs String N
6 Create time createTime String Y UTC time
7 Contract address contractAddress String Y

Example:

{
  "header": {
    "code": 0,
    "msg": "Transaction succssful"
  },
  "mac": "MEUCIQCQ/RjmlVkLKZw6jcLKBPh1BwK4EIQE001vUAKPVq1HTgIgXUQ7Bn+y8D8xQxYUwtZOoh/bpteAPCUtKXZeAiN7cMU=",
  "body": {
    "blockEvent": [
      {
        "eventId": "ba537419953e4e219ceb0fe26ad5e125",
        "appCode": "app0001202006042323057101002",
        "userCode": "USER0001202006042321579692440",
        "notifyUrl": "http://127.0.0.1:18080",
        "attachArgs": "abc=123",
        "createTime": "0001-01-01 00:00:00.000 +0000 UTC"
      }
    ],
"contractEvent": [
  {
        "eventId": "ba537419953e4e219ceb0fe26ad5e126",
        "appCode": "app0001202006042323057101002",
        "userCode": "USER0001202006042321579692440",
        "notifyUrl": "http://127.0.0.1:18080",
        "attachArgs": "abc=123",
        "createTime": "0001-01-01 00:00:00.000 +0000 UTC",
       “contractAddress”:” 0x866aefc204b8f8fdc3e45b908fd43d76667d7f76”
      }
]
  }
}
© 2019-2020 Red Date (Hong Kong) Technology Limited. all right reserved,powered by GitbookFile Modify: 2021-04-26 17:33:55

results matching ""

    No results matching ""

    results matching ""

      No results matching ""