-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
kind/enhancementNew feature or requestNew feature or request
Description
Confirmation
- My issue isn't already found on the issue tracker.
- I have read the Subscan API documentation (if it seemed to be an API bug).
Affected Network(s)
Polkadot
Steps to reproduce
- For Polkadot Network on page https://support.subscan.io/api-4193075
- Try the API with
event_index=19750801-2 - Check the parameter
data.params.valuein API response fordata.params.type=AccountId. - The address in the parameter is
daca1f54b717110efd2c4ddba6a4a2af7794a66a38bac564e2eb93a627bfec1awhich is not in hex format whereas in many events, it is inhexformat0xdaca1f54b717110efd2c4ddba6a4a2af7794a66a38bac564e2eb93a627bfec1a.
Expected output
- For Polkadot Network on page https://support.subscan.io/api-4193075
- Try the API with
event_index=19750801-2 - Check the parameter
data.params.valuein API response fordata.params.type=AccountId. - The address in the parameter should be in
hexformat with prefix0x, i.e.0xdaca1f54b717110efd2c4ddba6a4a2af7794a66a38bac564e2eb93a627bfec1a.
Actual output
API: https://polkadot.api.subscan.io/api/scan/event
Headers: x-api-key = 4d0c8ba32dde4a06bda83d52af49120f
API Request:
{
"event_index": "19750801-2"
}
API Response
{
"code": 0,
"message": "Success",
"generated_at": 1763372527,
"data": {
"id": 1975080100002,
"event_index": "19750801-0",
"block_num": 19750801,
"extrinsic_idx": 0,
"module_id": "balances",
"event_id": "Deposit",
"params": [
{
"type": "AccountId",
"type_name": "AccountId",
"value": "daca1f54b717110efd2c4ddba6a4a2af7794a66a38bac564e2eb93a627bfec1a",
"name": "who"
},
{
"type": "U128",
"type_name": "Balance",
"value": "103828431262",
"name": "amount"
}
],
"extrinsic_hash": "0x85b286a7af4cc29164b25797975dd1cf1c5dbb952d0c982530a9e11dcab1ac53",
"event_idx": 2,
"finalized": true,
"extrinsic_module": "",
"phase": 2,
"es_params": null,
"params_raw": ""
}
}
Additional factoids or references
For event_index = 19729967-2. The response is correct as follows:
{
"code": 0,
"message": "Success",
"generated_at": 1763373703,
"data": {
"id": 1972996700002,
"event_index": "19729967-0",
"block_num": 19729967,
"extrinsic_idx": 0,
"module_id": "balances",
"event_id": "Deposit",
"params": [
{
"type": "[U8; 32]",
"type_name": "AccountId",
"value": "0xdaca1f54b717110efd2c4ddba6a4a2af7794a66a38bac564e2eb93a627bfec1a",
"name": "who"
},
{
"type": "U128",
"type_name": "Balance",
"value": "116028071262",
"name": "amount"
}
],
"extrinsic_hash": "0x216c0b5db89cd662d28d56b526efa134283ce394483340dc18247b2c1092f415",
"event_idx": 2,
"finalized": true,
"extrinsic_module": "",
"phase": 2,
"es_params": null,
"params_raw": ""
}
}
Metadata
Metadata
Assignees
Labels
kind/enhancementNew feature or requestNew feature or request