OpenZeppelin / OpenZeppelin/compact-contracts
dev: share one label-to-secret fixture across token tests
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 55
- Forks
- 29
- Avg merge
- 5d 7h
- Merged PRs (30d)
- 25
Description
Six test files under contracts/src/token/test/ each define their own label-to-secret helper (secretKey('ALICE') and variants) while labelledSecret in contracts/test-utils/concurrency/parties.ts already does the same thing. The copies drift in padding and size handling, and a party identity computed in one suite cannot be reused in another.
Move labelledSecret to contracts/test-utils/fixtures/ and import it from every token suite in place of the local copies.
Raised in #743 review: https://github.com/OpenZeppelin/compact-contracts/pull/743#discussion_r3874658752
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read labelledSecret in contracts/test-utils/concurrency/parties.ts and inspect the six token test files under contracts/src/token/test/. Move the helper to contracts/test-utils/fixtures/ and replace each local secretKey helper with the shared import. Done means all token suites use the shared fixture without changing their tests' behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- testing-qa
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100