-
Notifications
You must be signed in to change notification settings - Fork 838
Testdata: Signers #4167
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?
Testdata: Signers #4167
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
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 refactors test code to use centralized signer constants from @ethereumjs/testdata instead of hardcoded private keys and addresses scattered throughout the test suite. This improves maintainability and consistency.
- Introduces a new
signers.tsfile in@ethereumjs/testdatathat exports 8 predefined signers (SIGNER_A through SIGNER_H) - Replaces inline private key and address definitions across test files with references to these constants
- Removes unused imports and simplifies test code by eliminating duplicate signer definitions
Reviewed Changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/testdata/src/signers.ts | Defines 8 signer constants with address, privateKey, and publicKey |
| packages/testdata/src/index.ts | Exports the new signers module |
| packages/vm/test/api/*.ts | Replace inline signer definitions with SIGNER_A/B/G constants |
| packages/evm/test/*.ts | Update to use SIGNER_G from testdata |
| packages/client/test/**/*.ts | Replace inline signers with SIGNER_A/B/H constants |
| packages/blockchain/test/clique.spec.ts | Replace inline A-F signers with SIGNER_A-F |
| packages/block/test/clique.spec.ts | Replace inline signer A with SIGNER_A |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Seems i can't add my own labels 🤔 |
b14c26a to
1f9eb26
Compare
|
That's already a nice one! 🙂 What do you mean with "add my own labels"? |
|
Ah, I had removed you from the committers GitHub team, have readded you (respectively sent an invite to rejoin). |
1f9eb26 to
3ab7adb
Compare


This PR adds a set of
Signerobjects in thetestdatapackage to be exported for use in tests throughout the monorepo.Signeris a valid set ofprivateKey,publicKey, andaddress.These imports can replace commonly repeated patterns such as:
This replaces most instances of signer data usage in tests throughout the monorepo. Remaining hardcoded signer data used in tests involve specific addresses from genesis files or other test setups.