OpenZeppelin / OpenZeppelin/compact-contracts
dev: rename CFT _creditEpochs to match what it counts
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 55
- Forks
- 29
- Avg merge
- 5d 7h
- Merged PRs (30d)
- 25
Description
In ConfidentialFungibleToken, the credit nonce lives in _creditEpochs. "Epoch" named the memo-prune generation the old nonce was derived from; #819 severed that link, so the field is now a plain per-account credit counter and the name describes a concept the code no longer has.
Naming only, but the field surfaces in public state as CFT__creditEpochs, so a rename is cheapest while the release is still alpha.
Rename to _creditNonces (or _creditCounters) and update the module header, the _credit comments, and the mock's export list. Deferred out of #819 to avoid conflicts with the open H and M audit PRs; land it after those merge.
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
Start in the ConfidentialFungibleToken module and inspect the _creditEpochs declaration, module header, and _credit comments. Check the mock's export list for CFT__creditEpochs and search for remaining references before choosing between _creditNonces and _creditCounters. Done means the selected name is consistent across the module, comments, public state, and mock export.
Written by the indexing model from the issue text.
Assessment
- Domain
- blockchain
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 75/100