Skip to main content

py-substrate-interface extension to utilize Polkascan API indexes

Project description

Python Substrate Interface: Polkascan Extension

Latest Version Supported Python versions License

Description

This extension enables Substrate Interface to use indexes provided by the Polkascan Explorer API

Installation

pip install substrate-interface-polkascan

Initialization

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/'))

Usage

Filter events

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

Filter extrinsics

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

License

https://github.com/polkascan/py-substrate-interface-extension-polkascan/blob/master/LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

substrate-interface-polkascan-0.2.tar.gz (10.3 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page