|
| 1 | +from bittensor.core.subtensor import Subtensor |
| 2 | +from bittensor.utils.balance import tao |
| 3 | +from bittensor_wallet.wallet import Wallet |
| 4 | + |
| 5 | +COLDKEY = "5G4T9VnZfUDD2vD3MdKsgmbSAsKQq5rtZ73JtQuFA8SRfW14" |
| 6 | +HOTKEY = "5GQenM6A7sWGxgmPPAorKGnFQsBWczXDhGhZjkbZq3Wr9wtX" |
| 7 | +HOTKEY_NETUIDS = [0, 4, 6] |
| 8 | + |
| 9 | +DEVNET = "wss://dev.chain.opentensor.ai:443" |
| 10 | +wallet = Wallet(path="~/.bittensor/wallets", name="alice") |
| 11 | + |
| 12 | + |
| 13 | +subtensor = Subtensor(network="test") |
| 14 | + |
| 15 | + |
| 16 | +def main(): |
| 17 | + # print(subtensor.get_hyperparameter("LastUpdate", 1)) |
| 18 | + # print(subtensor.get_hyperparameter("MinDifficulty", 1)) # does not exist |
| 19 | + # print(subtensor.all_subnets()) |
| 20 | + # print(subtensor.blocks_since_last_update(1, 1)) |
| 21 | + # print(subtensor.bonds(1)) # looking into |
| 22 | + # print(subtensor.commit_reveal_enabled(1)) |
| 23 | + # print(subtensor.difficulty(1)) |
| 24 | + # print(subtensor.does_hotkey_exist(HOTKEY)) |
| 25 | + # print(subtensor.get_all_subnets_info()) |
| 26 | + # print(subtensor.get_balance(COLDKEY)) |
| 27 | + # print(subtensor.get_balances(COLDKEY)) |
| 28 | + |
| 29 | + # print(current_block := subtensor.get_current_block()) |
| 30 | + |
| 31 | + # print(subtensor._get_block_hash(current_block)) |
| 32 | + # print(subtensor.get_block_hash(current_block)) |
| 33 | + # print(subtensor.get_children(HOTKEY, 1)) # maybe not working |
| 34 | + # print(subtensor.get_metagraph_info(1)) |
| 35 | + # print(subtensor.subnet(1)) |
| 36 | + # print(subtensor.get_all_metagraphs_info()) |
| 37 | + # print(subtensor.get_netuids_for_hotkey(HOTKEY)) |
| 38 | + # print(subtensor.get_neuron_certificate()) # untested |
| 39 | + # print(subtensor.get_neuron_for_pubkey_and_subnet(HOTKEY, HOTKEY_NETUIDS[1])) |
| 40 | + # print(subtensor.get_stake(COLDKEY, HOTKEY, HOTKEY_NETUIDS[1])) |
| 41 | + # print(subtensor.get_stake_for_coldkey_and_hotkey(COLDKEY, HOTKEY, HOTKEY_NETUIDS)) |
| 42 | + # print(subtensor.get_stake_for_coldkey(COLDKEY)) |
| 43 | + # print(type(subtensor.get_subnet_burn_cost())) |
| 44 | + |
| 45 | + # print(subtensor.get_subnet_hyperparameters(111)) |
| 46 | + # print(subtensor.get_subnets(block=current_block-20)) |
| 47 | + # print(subtensor.get_total_stake_for_hotkey(HOTKEY)) |
| 48 | + # print(subtensor.get_total_subnets()) |
| 49 | + # print(subtensor.get_transfer_fee(wallet=wallet, dest=COLDKEY, value=tao(1.0))) |
| 50 | + # print(subtensor.get_uid_for_hotkey_on_subnet(HOTKEY, HOTKEY_NETUIDS[1])) |
| 51 | + # print(subtensor.immunity_period(HOTKEY_NETUIDS[1])) |
| 52 | + # print(subtensor.is_hotkey_delegate(COLDKEY)) |
| 53 | + # print(subtensor.is_hotkey_registered(HOTKEY, HOTKEY_NETUIDS[1])) |
| 54 | + # print(subtensor.is_hotkey_registered_any(HOTKEY)) |
| 55 | + # print(subtensor.is_hotkey_registered_on_subnet(HOTKEY, HOTKEY_NETUIDS[1])) |
| 56 | + # print(subtensor.last_drand_round()) |
| 57 | + # print(subtensor.max_weight_limit(HOTKEY_NETUIDS[1])) |
| 58 | + # print(subtensor.metagraph(HOTKEY_NETUIDS[1], lite=True)) |
| 59 | + # print(subtensor.metagraph(HOTKEY_NETUIDS[1], lite=False)) |
| 60 | + # print(subtensor.min_allowed_weights(HOTKEY_NETUIDS[1])) |
| 61 | + # print(subtensor.neuron_for_uid(1, HOTKEY_NETUIDS[1])) |
| 62 | + # print(subtensor.neurons(HOTKEY_NETUIDS[1])) |
| 63 | + # print(subtensor.neurons_lite(HOTKEY_NETUIDS[1])) |
| 64 | + # print(subtensor.query_identity(HOTKEY)) |
| 65 | + # print(subtensor.recycle(HOTKEY_NETUIDS[1])) |
| 66 | + # print(subtensor.subnet_exists(2)) |
| 67 | + # print(subtensor.subnet_exists(200)) |
| 68 | + # print(subtensor.subnetwork_n(HOTKEY_NETUIDS[1])) |
| 69 | + # print(subtensor.tempo(HOTKEY_NETUIDS[1])) |
| 70 | + # print(subtensor.tx_rate_limit()) |
| 71 | + # print(subtensor.wait_for_block()) |
| 72 | + # print(subtensor.wait_for_block(current_block+5)) |
| 73 | + # for subnet in subtensor.get_subnets(): |
| 74 | + # print(subtensor.weights(subnet)) |
| 75 | + # print(subtensor.weights_rate_limit(HOTKEY_NETUIDS[1])) |
| 76 | + print(block := subtensor.block) |
| 77 | + # for uid in range(0, 7): |
| 78 | + # print(subtensor.get_commitment(2, uid, block=block)) |
| 79 | + # print(subtensor.get_current_weight_commit_info(1)) |
| 80 | + # print(subtensor.get_delegate_by_hotkey(HOTKEY)) |
| 81 | + # print(subtensor.get_delegate_identities()) |
| 82 | + # print(subtensor.get_delegate_take("5GP7c3fFazW9GXK8Up3qgu2DJBk8inu4aK9TZy3RuoSWVCMi", block=block)) |
| 83 | + # print(subtensor.get_delegated(COLDKEY, block=block)) |
| 84 | + # print(subtensor.get_delegates(block=block)) |
| 85 | + # print(subtensor.get_existential_deposit(block=block)) |
| 86 | + # print(subtensor.get_hotkey_owner("5DcpkDYwWHgtkhLhKFCMqTQeU1ggRKjQEoLCf1e3X47VxZzw")) |
| 87 | + # print(subtensor.get_minimum_required_stake()) |
| 88 | + |
| 89 | + |
| 90 | +if __name__ == "__main__": |
| 91 | + main() |
0 commit comments