Skip to content

Some deposit events for event index have non-hex formatted address for AccountId type_name #159

@pratts

Description

@pratts

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

  1. For Polkadot Network on page https://support.subscan.io/api-4193075
  2. Try the API with event_index=19750801-2
  3. Check the parameter data.params.value in API response for data.params.type=AccountId.
  4. The address in the parameter is daca1f54b717110efd2c4ddba6a4a2af7794a66a38bac564e2eb93a627bfec1a which is not in hex format whereas in many events, it is in hex format 0xdaca1f54b717110efd2c4ddba6a4a2af7794a66a38bac564e2eb93a627bfec1a.

Expected output

  1. For Polkadot Network on page https://support.subscan.io/api-4193075
  2. Try the API with event_index=19750801-2
  3. Check the parameter data.params.value in API response for data.params.type=AccountId.
  4. The address in the parameter should be in hex format with prefix 0x, 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

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions