Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement new EVM chains #296

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,16 @@ dynamic = [ "version" ]
dependencies = [
"aiodns==3.2",
"aiohttp==3.10.6",
"aleph-message>=0.4.9",
"aleph-sdk-python>=1.1,<2",
"base58==2.1.1", # Needed now as default with _load_account changement
"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
"py-sr25519-bindings==0.2", # Needed for DOT signatures
"pygments==2.18",
"pynacl==1.5", # Needed now as default with _load_account changement
"pynacl==1.5", # Needed now as default with _load_account changement
"python-magic==0.4.27",
"rich==13.8.1",
"setuptools>=65.5",
"substrate-interface==1.7.11", # Needed for DOT signatures
"textual==0.73",
"typer==0.12.5",
]
Expand Down
13 changes: 10 additions & 3 deletions src/aleph_client/commands/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
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 +153,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 +302,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 @@
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]

Check warning on line 167 in src/aleph_client/commands/instance/__init__.py

View check run for this annotation

Codecov / codecov/patch

src/aleph_client/commands/instance/__init__.py#L167

Added line #L167 was not covered by tests
super_token_chains = get_chains_with_super_token()

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