opentensor / btcli

Bittensor command line tool
https://docs.bittensor.com/btcli
13 stars 4 forks source link

Change network option to a list so that it can be correctly parsed if multiple options are given #165

Closed thewhaleking closed 1 month ago

thewhaleking commented 1 month ago

Allows for using something like btcli w faucet --subtensor.chain_endpoint ws://127.0.0.1:9945 --subtensor.network local and it will correctly interpret it as indicating ws://127.0.0.1:9945.

This isn't the ideal solution for https://github.com/opentensor/btcli/issues/160, but it is one option.

Now:

bhimes@Benjamins-MacBook-Pro /Users/bhimes/Git/btcli                                                                  feat/thewhaleking/fix-multiple-network-options
⚡ btcli w balance --subtensor.network local --subtensor.chain_endpoint ws://127.0.0.1:9945

Unable to connect to the chain: Network: custom, Chain: ws://127.0.0.1:9945
(venv) 
bhimes@Benjamins-MacBook-Pro /Users/bhimes/Git/btcli                                                                  feat/thewhaleking/fix-multiple-network-options
⚡ btcli w balance --subtensor.network local --subtensor.chain_endpoint ws://127.0.0.1:9945 --network local

Unable to connect to the chain: Network: custom, Chain: ws://127.0.0.1:9945
(venv) 
bhimes@Benjamins-MacBook-Pro /Users/bhimes/Git/btcli                                                                  feat/thewhaleking/fix-multiple-network-options
⚡ btcli w balance --subtensor.chain_endpoint ws://127.0.0.1:9945 --network local 

Unable to connect to the chain: Network: custom, Chain: ws://127.0.0.1:9945
(venv) 
bhimes@Benjamins-MacBook-Pro /Users/bhimes/Git/btcli                                                                  feat/thewhaleking/fix-multiple-network-options
⚡ btcli w balance --network local 

[12:08:38] Warning: Verify your local subtensor is running on port 9944.                                                                        subtensor_interface.py:78
Unable to connect to the chain: Network: local, Chain: ws://127.0.0.1:9444
(venv) 
bhimes@Benjamins-MacBook-Pro /Users/bhimes/Git/btcli                                                                  feat/thewhaleking/fix-multiple-network-options
⚡ btcli w balance