sui_getEvents - Sui
Example code for the sui_getEvents JSON-RPC method. Complete guide on how to use sui_getEvents JSON-RPC in GetBlock Web3 documentation.
Parameters
Parameter
Type
Required
Description
Request Example
curl -X POST https://go.getblock.io/<ACCESS-TOKEN>/ \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": "getblock.io",
"method": "sui_getEvents",
"params": ["11a72GCQ5hGNpWGh2QhQkkusTEGS6EDqifJqxr7nSYX"]
}'const axios = require('axios');
const payload = {
jsonrpc: '2.0',
id: 'getblock.io',
method: 'sui_getEvents',
params: ['11a72GCQ5hGNpWGh2QhQkkusTEGS6EDqifJqxr7nSYX']
};
axios.post('https://go.getblock.io/<ACCESS-TOKEN>/', payload)
.then(response => console.log(response.data));import requests
payload = {
"jsonrpc": "2.0",
"id": "getblock.io",
"method": "sui_getEvents",
"params": ["11a72GCQ5hGNpWGh2QhQkkusTEGS6EDqifJqxr7nSYX"]
}
response = requests.post("https://go.getblock.io/<ACCESS-TOKEN>/", json=payload)
print(response.json())Response Example
{
"jsonrpc": "2.0",
"result": [
{
"id": {
"txDigest": "11a72GCQ5hGNpWGh2QhQkkusTEGS6EDqifJqxr7nSYX",
"eventSeq": "0"
},
"packageId": "0xc54ab30a3d9adc07c1429c4d6bbecaf9457c9af77a91f631760853934d383634",
"transactionModule": "test_module",
"sender": "0xbcf7c32655009a61f1de0eae420a2e4ae1bb772ab2dd5d5a7dfa949c0ef06908",
"type": "0x9::test::TestEvent",
"parsedJson": {
"test": "example value"
}
}
],
"id": "getblock.io"
}Response Parameters
Parameter
Type
Description
Use Cases
Error Handling
Error Code
Description
SDK Integration
Last updated
Was this helpful?