Replace precompiled ledger app binary with CI build and fork speculos-client with support for 2.4.0 starknet app#147
Replace precompiled ledger app binary with CI build and fork speculos-client with support for 2.4.0 starknet app#147MKowalski8 wants to merge 17 commits into
speculos-client with support for 2.4.0 starknet app#147Conversation
5348be5 to
63c9a85
Compare
63c9a85 to
4756455
Compare
There was a problem hiding this comment.
For reference https://github.com/xJonathanLEI/speculos-client
fcf3569 to
4524ecc
Compare
speculos-client with support for 2.4.0 starknet app
| git clone --depth 1 --branch nanox_2.7.0_2.4.0_sdk_v26.0.2 \ | ||
| https://github.com/LedgerHQ/app-starknet /tmp/app-starknet | ||
| cd /tmp/app-starknet/starknet | ||
| cargo +${RUST_NIGHTLY} ledger build nanox |
There was a problem hiding this comment.
Where is RUST_NIGHTLY set and why is it used here?
There was a problem hiding this comment.
It's set in the ledger-app-builder Dockerfile. And to run ledger build we need nightly version, because from what I've checked it uses -Z build-std which needs nightly.
There was a problem hiding this comment.
Maybe add a comment that it's defined there?
| if line.contains("launcher: using default app name & version") | ||
| || line.contains("[*] Env app version:") |
There was a problem hiding this comment.
It seems quite fragile, if output changes it will hang forever. Can we add some kind of a timeout here?
There was a problem hiding this comment.
Actually I've encountered this, but didn't want to make to much changes here. But yeah, it's a good idea, will do.
There was a problem hiding this comment.
I changed the logic a little bit, added some extra checks and better error handling as well
bb6f02c to
dc7c13c
Compare
ff2b8ba to
0468ddb
Compare
6f297a8 to
a8f536c
Compare
a8f536c to
48b74b7
Compare
a8ee712 to
eab06b0
Compare
7dd6202 to
a164636
Compare
| git clone --depth 1 --branch nanox_2.7.0_2.4.0_sdk_v26.0.2 \ | ||
| https://github.com/LedgerHQ/app-starknet /tmp/app-starknet | ||
| cd /tmp/app-starknet/starknet | ||
| cargo +${RUST_NIGHTLY} ledger build nanox |
There was a problem hiding this comment.
Maybe add a comment that it's defined there?
| pub async fn set_automation(client: &SpeculosClient, rules: &[AutomationRule<'static>]) { | ||
| client.automation(rules).await.unwrap(); | ||
| if rules.iter().any(|r| r == &ENABLE_BLIND_SIGN) { | ||
| client.click_button(Button::Right).await.unwrap(); |
There was a problem hiding this comment.
Would it be possible to return Result here instead of panic?
There was a problem hiding this comment.
Let's add some doc comments in this file. Not to every single struct or method, but at least to the most important ones
Towards foundry-rs/starknet-foundry#4221
Introduced changes
utilswith support for2.4.0ledger app with speculosChecklist
CHANGELOG.md