Skip to main content

A minimal Python API for LayerZero Scan

Project description

LayerZero-Scan

A minimal Python Wrapper for the LayerZero Scan API.


Installation

pip install git+https://github.com/kamilgg/layerzero-scan

Tests

In bash test that everything looks OK before proceeding:

bash run_tests.sh

Usage

In python create a client:

# For mainnet
from layerzero import LayerZero
client = LayerZero()

# For testnet
from layerzero import LayerZeroTestnet, Chains
client = LayerZeroTestnet()  # Testnet
client = LayerZeroTestnet(Chains.TESTNET)  # Also testnet
client = LayerZeroTestnet(Chains.SANDBOX)  # Sandbox

Then you can call all available methods, e.g.:

latest_messages = client.get_latest_messages()

latest_messages.count

> 63747514

tx_hash = "0xdbb9456feb829f67c2d26df00ba1f6f383463a0a7dc6ebc5d48c025800ed901b"
message = client.get_message_by_hash(tx_hash)

message.src_ua_nonce

> 1866644

message.status

> DELIVERED

By kamgg.eth

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

layerzero-scan-1.0.0.tar.gz (6.2 kB view hashes)

Uploaded Source

Built Distribution

layerzero_scan-1.0.0-py3-none-any.whl (8.7 kB view hashes)

Uploaded Python 3

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