Skip to content

PolkascanExtension

This extension enables indexes provided by Polkascan Explorer API.

Maintained by Polkascan Foundation.

Installation

1
pip install substrate-interface-polkascan

Initialization

1
2
3
4
5
6
from substrateinterface import SubstrateInterface 
from substrateinterface_polkascan.extensions import PolkascanExtension

substrate = SubstrateInterface(url="ws://127.0.0.1:9944")

substrate.register_extension(PolkascanExtension(url='http://127.0.0.1:8000/graphql/'))

Implemented extension calls

Filter events

1
events = substrate.extensions.filter_events(pallet_name="Balances", event_name="Transfer", page_size=25)

Filter extrinsics

1
2
3
4
extrinsics = substrate.extensions.filter_extrinsics(
    ss58_address="12L9MSmxHY8YvtZKpA7Vpvac2pwf4wrT3gd2Tx78sCctoXSE",
    pallet_name="Balances", call_name="transfer_keep_alive", page_size=25
)