Skip to content

Commit

Permalink
SDK (AsyncSubtensor) Part 1 (#2374)
Browse files Browse the repository at this point in the history
* create the copy of `bittensor/core/subtensor.py` with async suffix.

* add async_substrate_interface.py

* update `bittensor.utils.format_error_message` to be compatible with async_subtensor

* update `bittensor.core.chain_data`

* update `bittensor.core.async_subtensor.py` from btcli

* add DelegatesDetails for async_subtensor

* add validate_chain_endpoint for async_subtensor

* update async_substrate_interface.py by Optional where acceptable and doesn't brake logic

* improve settings for async_subtensor.py

* fix format errors

* fix annotations

* add  async_subtensor.py with adaptation to SDK (all methods checked and work well)

* update settings.py to be compatible with async_extrinsics

* add async_transfer extrinsic

* add async_registration extrinsic

* add async_root extrinsics

* ruff

* Update bittensor/core/extrinsics/async_transfer.py

Co-authored-by: Benjamin Himes <[email protected]>

* fix comments review

* avoid non-direct import within inner code (fix circular import)

* del unused code

* del prometheus.py

* solving conflict

* ruff

---------

Co-authored-by: Benjamin Himes <[email protected]>
  • Loading branch information
roman-opentensor and thewhaleking authored Nov 4, 2024
1 parent ffbc2d3 commit 835dfdb
Show file tree
Hide file tree
Showing 27 changed files with 6,255 additions and 69 deletions.
1,222 changes: 1,222 additions & 0 deletions bittensor/core/async_subtensor.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bittensor/core/chain_data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
from .stake_info import StakeInfo
from .subnet_hyperparameters import SubnetHyperparameters
from .subnet_info import SubnetInfo
from .utils import custom_rpc_type_registry
from .utils import custom_rpc_type_registry, decode_account_id, process_stake_data

ProposalCallData = GenericCall
Loading

0 comments on commit 835dfdb

Please sign in to comment.