A small example package
Project description
Forge-python-sdk
Forge-python-sdk is sdk for Forge.
Installation
pip install forge-python-sdk
Usage
First get your Forge running on local with Forge Cli
Find the config your forge is using by forge config
Set FORGE_CONFIG
as your environment variable, pointing to the config your forge is running on.
Simple RPC examples
Get Chain Info
from forge.rpc import rpc
rpc.get_chain_info()
info {
id: "fea5f258f30cd184d3c38af42d99e03325f6c875"
network: "forge"
moniker: "forge-local"
consensus_version: "0.30.2"
synced: true
app_hash: "\345\031\313\021\226\301\360\030\254\360\206+/\200\217\275/\r`\021\026\243\342g1\256\335\340\246lr\213"
block_hash: "E\262~\222\3318 \325\337\016\013\321\342\271\347\346\000\264uC\225nc\354\275n\020~\372x#e"
block_height: 99833
block_time {
seconds: 1554851683
}
address: "zyt5PXcpLoEdYsJrnf7bEAuCFBEM5d7Jg3FP"
voting_power: 10
total_txs: 264
version: "0.21.3"
data_version: "1.5"
forge_apps_version {
key: "Event-Chain"
value: "0.1.0"
}
supported_txs: "fg:t:update_asset"
supported_txs: "fg:t:transfer"
supported_txs: "fg:t:sys_upgrade"
supported_txs: "fg:t:stake"
supported_txs: "fg:t:exchange"
supported_txs: "fg:t:declare_file"
supported_txs: "fg:t:declare"
supported_txs: "fg:t:consensus_upgrade"
supported_txs: "fg:t:create_asset"
supported_txs: "fg:t:consume_asset"
supported_txs: "fg:t:poke"
supported_txs: "fg:t:account_migrate"
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
forge-python-sdk-0.18.25.tar.gz
(71.8 kB
view hashes)
Built Distribution
Close
Hashes for forge_python_sdk-0.18.25-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fc6f698639f3e9650683a89c24ff2d4b02cae7a8538869e6b24b0ffab5a3244 |
|
MD5 | ce6ff0be5ac75d46f8b6e6fc8d7eef57 |
|
BLAKE2b-256 | e8eec23669a11d0350db9d763d9d0491fcf5f53419607a341c5ee3883955fbaf |