Skip to content

Commit

Permalink
Feature: Implement new EVM chains.
Browse files Browse the repository at this point in the history
  • Loading branch information
nesitor committed Oct 31, 2024
1 parent b3d00dc commit 85fe97f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ dynamic = [ "version" ]
dependencies = [
"aiodns==3.2",
"aiohttp==3.10.6",
"aleph-message>=0.4.9",
"aleph-sdk-python>=1.1,<2",
"aleph-message @ git+https://github.com/aleph-im/aleph-message.git@andres-feature-add_new_evm_chains",
"aleph-sdk-python @ git+https://github.com/aleph-im/aleph-sdk-python@andres-feature-implement_new_evm_chains",
"base58==2.1.1", # Needed now as default with _load_account changement
"pygments==2.18",
"pynacl==1.5", # Needed now as default with _load_account changement
Expand All @@ -43,6 +43,8 @@ dependencies = [
"setuptools>=65.5",
"textual==0.73",
"typer==0.12.5",
"py-sr25519-bindings==0.2.0", # Needed for DOT signatures
"substrate-interface==1.7.11", # Needed for DOT signatures
]
optional-dependencies.cosmos = [ "cosmospy==6" ]
optional-dependencies.docs = [ "sphinxcontrib-plantuml==0.27" ]
Expand Down
9 changes: 6 additions & 3 deletions src/aleph_client/commands/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
save_main_configuration,
settings,
)
from aleph.sdk.evm_utils import get_chains_with_holding, get_chains_with_super_token
from aleph.sdk.evm_utils import get_chains_with_holding, get_chains_with_super_token, get_compatible_chains
from aleph.sdk.utils import bytes_from_hex
from aleph_message.models import Chain
from rich.console import Console
Expand Down Expand Up @@ -149,11 +149,14 @@ def display_active_chain():
if config and config.chain:
active_chain = config.chain

hold_chains = get_chains_with_holding() + ["SOL"]
compatible_chains = get_compatible_chains()
hold_chains = get_chains_with_holding() + [Chain.SOL.value]
payg_chains = get_chains_with_super_token()

chain = f"[bold green]{active_chain}[/bold green]" if active_chain else "[red]Not Selected[/red]"
active_chain_compatibility, compatibility = [], ""
if active_chain in compatible_chains:
active_chain_compatibility.append("SIGN")
if active_chain in hold_chains:
active_chain_compatibility.append("HOLD")
if active_chain in payg_chains:
Expand Down Expand Up @@ -295,7 +298,7 @@ async def list_accounts():
if key_file.stem != "default":
table.add_row(key_file.stem, str(key_file), "[bold red]-[/bold red]")

hold_chains = get_chains_with_holding() + ["SOL"]
hold_chains = get_chains_with_holding() + [Chain.SOL.value]
payg_chains = get_chains_with_super_token()

active_address = None
Expand Down
2 changes: 1 addition & 1 deletion src/aleph_client/commands/instance/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ async def create(
raise ValueError(f"Invalid payment-type: {payment_type}")

is_stream = payment_type != PaymentType.hold
hold_chains = get_chains_with_holding() + [Chain.SOL]
hold_chains = get_chains_with_holding() + [Chain.SOL.value]
super_token_chains = get_chains_with_super_token()

# Checks if payment-chain is compatible with PAYG
Expand Down

0 comments on commit 85fe97f

Please sign in to comment.