-
Notifications
You must be signed in to change notification settings - Fork 15
Implement Ledger support #402
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
base: master
Are you sure you want to change the base?
Conversation
Solution: Implement Ledger use on CLI to allow using them. Do it importing a specific branch of the SDK.
…nother issue fetching instances from scheduler.
dfd8a03 to
b994c79
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #402 +/- ##
==========================================
+ Coverage 61.07% 61.25% +0.18%
==========================================
Files 20 20
Lines 3712 3962 +250
Branches 533 581 +48
==========================================
+ Hits 2267 2427 +160
- Misses 1168 1262 +94
+ Partials 277 273 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@1yam how do you use this? I tried |
Update broken doc links and references to old brand names (aleph.im, twentysix.cloud) to aleph.cloud
…older are created
…older are created
…prefetch crn list
… into andres-feature-implement_ledger
| setup_logging(debug) | ||
|
|
||
| account: AccountFromPrivateKey = _load_account(private_key, private_key_file) | ||
| account: AccountTypes = load_account(private_key, private_key_file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above the chain param
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the chain args is used to specify a chain where u want to grant permissions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, and maybe we want to give permissions for Solana wallets.
| setup_logging(debug) | ||
|
|
||
| account: AccountFromPrivateKey = _load_account(private_key, private_key_file) | ||
| account: AccountTypes = load_account(private_key, private_key_file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above the chain param
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the chain args is used to specify a chain where u want to grant permissions
nesitor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, I think that ALWAYS we need to take into account the chain parameter as we support non-EVM chains like Solana.
| settings_link = ( | ||
| f"{sanitize_url(settings.API_HOST)}" | ||
| "/api/v0/aggregates/0xFba561a84A537fCaa567bb7A2257e7142701ae2A.json?keys=settings" | ||
| f"{sanitize_url(settings.API_HOST)}/api/v0/aggregates/0xFba561a84A537fCaa567bb7A2257e7142701ae2A.json?keys=settings" | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: I think that will be better to put that URL on Settings class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can let it for now, gonna get removed soon, i started to move that to a custom Services
on sdk side, but didn't got time to finish it yet:
| raise typer.Exit(code=1) from e | ||
| else: | ||
| # Normal flow - show available accounts and let user choose | ||
| accounts = LedgerETHAccount.get_accounts() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we need to allow also the user to specify how many accounts to get
| derivation_path: Annotated[ | ||
| Optional[str], typer.Option(help="Derivation path for ledger (e.g. \"44'/60'/0'/0/0\")") | ||
| ] = None, | ||
| no: Annotated[bool, typer.Option("--no", help="Non-interactive mode. Only apply provided options.")] = False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: I think this param's name can be a bit confusing, maybe something like --non-it or something more explicit.
| setup_logging(debug) | ||
|
|
||
| account: AccountFromPrivateKey = _load_account(private_key, private_key_file) | ||
| account: AccountTypes = load_account(private_key, private_key_file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but if we allow to use Solana instance on holding tier, and a user wants to add forwarded ports for example, this chain param will be needed.
| setup_logging(debug) | ||
|
|
||
| account: AccountFromPrivateKey = _load_account(private_key, private_key_file) | ||
| account: AccountTypes = load_account(private_key, private_key_file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, and maybe we want to give permissions for Solana wallets.
| setup_logging(debug) | ||
|
|
||
| account: AccountFromPrivateKey = _load_account(private_key, private_key_file) | ||
| account: AccountTypes = load_account(private_key, private_key_file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For FORGET messages we will need to use also the chain argument to forget Solana messages for example.
Problem: Ledger wallet users cannot use Aleph to send transactions.
Solution: Implement Ledger use on CLI to allow using them. Do it importing a specific branch of the SDK.
Self proofreading checklist