-
Notifications
You must be signed in to change notification settings - Fork 0
Add transaction with precompiled test #33
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: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
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 pull request adds a transaction testing infrastructure for testing precompiled contract functionality (specifically ecrecover) using Hardhat and Foundry. The implementation includes deployment and execution scripts that demonstrate how to interact with the ecrecover precompile on the local Ethereum network.
Changes:
- Added Hardhat/Foundry project structure with deployment and execution scripts
- Created App.sol contract with ecrecover wrapper function
- Added Makefile targets for deploying and executing test transactions
- Updated port.sh script to generate Hardhat configuration with dynamic port
Reviewed changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| tx/contracts/App.sol | Implements ecrecover wrapper contract for signature recovery testing |
| tx/scripts/deploy.js | Deployment script that deploys App contract and saves address to JSON |
| tx/scripts/exec.js | Execution script that signs a message and calls recover function |
| tx/package.json | NPM package configuration with Hardhat dependencies |
| tx/hardhat.config.template | Hardhat configuration template with network and compiler settings |
| tx/foundry.toml | Foundry configuration for contract compilation |
| scripts/port.sh | Updated to generate hardhat.config.js from template with L2 port |
| Makefile | Added test-deploy-tx and test-tx targets for transaction testing |
| .gitignore | Added Node.js and Hardhat-related ignore patterns |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tx/package.json
Outdated
| "hardhat": "^2.22.17", | ||
| "hardhat-contract-sizer": "^2.10.0" | ||
| } | ||
| } No newline at end of file |
Copilot
AI
Jan 21, 2026
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.
Missing blank line at the end of the file. Consider adding a trailing newline for consistency with standard file formatting conventions.
tx/package.json
Outdated
| "scripts": { | ||
| "test": "echo \"Error: no test specified\" && exit 1" | ||
| }, | ||
| "license": "TBD", |
Copilot
AI
Jan 21, 2026
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 license field is set to "TBD" (To Be Determined). This should be updated to specify the actual license for the code, or use "UNLICENSED" if the code is not intended to be licensed for public use.
| "license": "TBD", | |
| "license": "UNLICENSED", |
| }, | ||
| } | ||
| } | ||
| } |
Copilot
AI
Jan 21, 2026
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.
Missing blank line at the end of the file. Consider adding a trailing newline for consistency with standard file formatting conventions.
Makefile
Outdated
| # Downgrade the crate that does not exist in op-rs, which was unnecessarily upgraded by cargo update. | ||
| cargo build | ||
|
|
||
| PHONY: test-deploy-tx |
Copilot
AI
Jan 21, 2026
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.
Missing dot before PHONY declaration. Should be ".PHONY:" instead of "PHONY:". This is consistent with other target declarations in the file (e.g., lines 3, 16, 20, 29, etc.).
No description provided.