-
Notifications
You must be signed in to change notification settings - Fork 17
π· (cs-tester) [DSDK-953]: Add erc7730 nightly job #1187
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: develop
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
bbd1096 to
e9e75e0
Compare
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.
Pull request overview
This PR adds a nightly GitHub Actions workflow to test ERC7730-compatible dapps using the clear-signing-tester's raw-file command. The changes include extensive test data for multiple DeFi protocols, improvements to error handling in the clear-signing-tester, and a new automated testing infrastructure.
Key changes:
- New GitHub Actions workflow for nightly ERC7730 testing across multiple devices and protocols
- Added test data files for 13+ protocols including 1inch, Aave, Lido, Uniswap, and others
- Enhanced error state handling with blind signing acknowledgement capability
- Reorganized test resources into core and erc7730 subdirectories
Reviewed changes
Copilot reviewed 45 out of 50 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/erc7730_nightly.yml |
New workflow for nightly ERC7730 testing with matrix strategy for devices and providers |
apps/clear-signing-tester/src/infrastructure/state-handlers/ErrorStateHandler.ts |
Added blind signing acknowledgement fallback in error handling |
apps/clear-signing-tester/src/infrastructure/services/DefaultScreenAnalyzer.ts |
Implemented canAcknowledgeBlindSigning() method |
apps/clear-signing-tester/src/domain/services/ScreenAnalyzer.ts |
Added interface method for blind signing acknowledgement |
apps/clear-signing-tester/package.json |
Updated test scripts and added new test:erc7730 command |
apps/clear-signing-tester/src/infrastructure/adapters/evm/EthersTransactionCrafter.ts |
Added debug logging for transaction data |
packages/device-management-kit/src/internal/discovery/use-case/ConnectUseCase.ts |
Simplified error logging by removing detailed error data |
apps/clear-signing-tester/src/infrastructure/adapters/speculos/SpeculosScreenReader.ts |
Simplified error logging in screen reading |
apps/clear-signing-tester/ressources/erc7730/* |
Added comprehensive test data files for 13 protocols across multiple chains |
apps/clear-signing-tester/ressources/core/* |
Moved and added core test data files |
apps/clear-signing-tester/scripts/*.sh |
New utility scripts for fetching transaction data |
apps/clear-signing-tester/scripts/test-full.mjs |
Removed file (test organization changed) |
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| exclude: | ||
| - include_provider: | ||
| provider: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.provider != '' && github.event.inputs.provider || 'NONE' }} |
Copilot
AI
Dec 12, 2025
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.
The matrix configuration has a potential issue. The exclude section attempts to exclude providers based on workflow dispatch input, but the logic uses a comparison that will exclude providers that don't match the input value. However, when no provider is specified (empty string), the comparison will match 'NONE' which won't exclude anything. Additionally, the matrix key include_provider should likely be flattened to use provider and chain directly as matrix dimensions for clearer configuration.
| "test:raw:complete": "pnpm cli raw-file ./ressources/core/raw-complete.json", | ||
| "test:raw:multisig": "pnpm cli raw-file ./ressources/core/raw-multisig.json", | ||
| "test:typed-data:multisig": "pnpm cli typed-data-file ./ressources/core/typed-data-multisig.json", | ||
| "test:erc7730": "f() { p=$1; shift; c=''; if [ -n \"$1\" ] && [ \"${1#-}\" = \"$1\" ]; then c=\".$1\"; shift; fi; pnpm cli raw-file \"ressources/erc7730/$p/raw-$p$c.json\" \"$@\"; }; f" |
Copilot
AI
Dec 12, 2025
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.
The shell function in the test:erc7730 script is complex and difficult to understand. The logic for handling the optional chain parameter using shell parameter expansion makes it harder to maintain. Consider simplifying this or adding a comment explaining the parameter handling logic.
| "test:erc7730": "f() { p=$1; shift; c=''; if [ -n \"$1\" ] && [ \"${1#-}\" = \"$1\" ]; then c=\".$1\"; shift; fi; pnpm cli raw-file \"ressources/erc7730/$p/raw-$p$c.json\" \"$@\"; }; f" | |
| "test:erc7730": "# This function handles an optional 'chain' parameter: if the first argument after 'p' is not an option (does not start with '-'), it is treated as the chain and appended to the filename. Remaining arguments are passed to the CLI.\nf() { p=$1; shift; c=''; if [ -n \"$1\" ] && [ \"${1#-}\" = \"$1\" ]; then c=\".$1\"; shift; fi; pnpm cli raw-file \"ressources/erc7730/$p/raw-$p$c.json\" \"$@\"; }; f" |
| */ | ||
| async canAcknowledgeBlindSigning(): Promise<boolean> { | ||
| const data = await this.readScreenContent(); | ||
| const acknowledgeTexts = ["reject"]; |
Copilot
AI
Dec 12, 2025
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.
The acknowledgeTexts array only contains "reject", which seems incorrect for detecting blind signing acknowledgement. This appears to be looking for rejection text rather than acknowledgement text. This will cause the function to return true when it finds "reject" on screen, which is likely not the intended behavior for acknowledging blind signing.
π Description
Add nightly job to test erc7730 compatible dapps with cs-teser raw-file command
β Context
β Checklist
Pull Requests must pass CI checks and undergo code review. Set the PR as Draft if it is not yet ready for review.
π§ Checklist for the PR Reviewers