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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

substrate_interface_polkascan-0.2-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file substrate-interface-polkascan-0.2.tar.gz.

File metadata

File hashes

Hashes for substrate-interface-polkascan-0.2.tar.gz
Algorithm Hash digest
SHA256 99968a9fdae18be5476b25912be9f220242fccfac9e91d2548c19e75e1b2942e
MD5 68eef361a06726be7f7616b5599f3024
BLAKE2b-256 80311073930fe0d0dd62a10bf336da87e73d6b12a1a295a719255071777731bf

See more details on using hashes here.

File details

Details for the file substrate_interface_polkascan-0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for substrate_interface_polkascan-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7b354301e98379b8f05f859ba0bd2598c878e460ba44d1b2e9c9605aaa86a869
MD5 34267bf0ead8042a53573d7ba941a9d0
BLAKE2b-256 d546856c86ece744d379d06c70e3a3da358fc0bdbe189698c5c87bb03aa3002b

See more details on using hashes here.

Supported by

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