Skip to content

Commit

Permalink
- update contract address
Browse files Browse the repository at this point in the history
- add graph verse/contract for space-pussy network
- update delegate info to new cybernet version
- update requirements
  • Loading branch information
Snedashkovsky committed May 29, 2024
1 parent 84e45e6 commit 7bfbb4d
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 9 deletions.
19 changes: 17 additions & 2 deletions cybertensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def __init__(
__boot_symbol__: str = "PUSSY"
__giga_boot_symbol__: str = "GPUSSY"

__networks__ = ["local", "bostrom", "space-pussy"]
__networks__ = ["local", "bostrom", "space-pussy", "space-pussy-graph"]

__default_network__ = "space-pussy"

Expand Down Expand Up @@ -158,7 +158,22 @@ def __init__(
giga_token_symbol="GPUSSY",
network_explorer="https://cyb.ai",
address_prefix="pussy",
contract_address="pussy1ddwq8rxgdsm27pvpxqdy2ep9enuen6t2yhrqujvj9qwl4dtukx0s8hpka9",
contract_address="pussy1guj27rm0uj2mhwnnsr8j7cz6uvsz2d759kpalgqs60jahfzwgjcs4l28cw",
)

__space_pussy_graph_network__ = NetworkConfigCwTensor(
chain_id="space-pussy",
url="grpc+https://grpc.space-pussy.cybernode.ai:1443",
fee_minimum_gas_price=0.01,
fee_denomination="pussy",
staking_denomination="pussy",
faucet_url="",
token="pussy",
token_symbol="PUSSY",
giga_token_symbol="GPUSSY",
network_explorer="https://cyb.ai",
address_prefix="pussy",
contract_address="pussy1j9qku20ssfjdzgl3y5hl0vfxzsjwzwn7d7us2t2n4ejgc6pesqcqhnxsz0",
)

__contract_path__ = None
Expand Down
6 changes: 3 additions & 3 deletions cybertensor/chain_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ class DelegateInfo:
int
] # List of subnets that the delegate is allowed to validate on
registrations: List[int] # List of subnets that the delegate is registered on
return_per_1000: Balance # Return per 1000 gboot of the delegate over a day
return_per_giga: Balance # Return per 1 gboot of the delegate over a day
total_daily_return: Balance # Total daily return of the delegate

@classmethod
Expand All @@ -469,8 +469,8 @@ def fix_decoded_values(cls, decoded: Any) -> "DelegateInfo":
),
validator_permits=decoded["validator_permits"],
registrations=decoded["registrations"],
return_per_1000=Balance.from_boot(decoded["return_per_1000"]),
total_daily_return=Balance.from_boot(decoded["total_daily_return"]),
return_per_giga=Balance.from_boot(int(decoded["return_per_giga"]["amount"])),
total_daily_return=Balance.from_boot(int(decoded["total_daily_return"]["amount"])),
)

@classmethod
Expand Down
7 changes: 6 additions & 1 deletion cybertensor/cwtensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def determine_chain_endpoint_and_network(
"""
if network is None:
return None, None
if network in ["local", "bostrom", "space-pussy"]:
if network in ["local", "bostrom", "space-pussy", "space-pussy-graph"]:
if network == "bostrom":
return (
network,
Expand All @@ -195,6 +195,11 @@ def determine_chain_endpoint_and_network(
network,
cybertensor.__space_pussy_network__,
)
elif network == "space-pussy-graph":
return (
network,
cybertensor.__space_pussy_graph_network__,
)
elif network == "local":
return (
network,
Expand Down
2 changes: 1 addition & 1 deletion cybertensor/mock/cwtensor_mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -1322,7 +1322,7 @@ def get_delegate_by_hotkey(
if self.neuron_has_validator_permit(uid=uid, netuid=subnet, block=block)
],
registrations=[subnet for subnet, _ in registered_subnets],
return_per_1000=Balance.from_gboot(1234567), # Doesn't matter for mock?
return_per_giga=Balance.from_gboot(1234567), # Doesn't matter for mock?
total_daily_return=Balance.from_gboot(1234567), # Doesn't matter for mock?
)

Expand Down
3 changes: 1 addition & 2 deletions requirements/prod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ rich
setuptools<=65.6.3
shtab==1.6.5
termcolor
torch==1.13.1+cpu
torchvision==0.14.1+cpu
torch==1.13.1
tqdm
uvicorn==0.22.0
wheel
Expand Down

0 comments on commit 7bfbb4d

Please sign in to comment.