-
Notifications
You must be signed in to change notification settings - Fork 24
Nonce as uint256
#739
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
Nonce as uint256
#739
Conversation
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 updates the nonce handling in UserOperation and PackedUserOperation to support uint256 values by converting them to strings internally. It also changes the @nucypher/nucypher-core dependency from an npm package version to a local linked directory for development purposes.
- Introduces
getUint256Stringhelper function to convert nonce values from bigint/number to string - Updates test assertions to compare nonce values as strings
- Refactors tests to use helper functions (
toCoreUserOperation,toCorePackedUserOperation) instead of direct constructors
Reviewed Changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Updates dependency resolution to use local link for @nucypher/nucypher-core |
| packages/test-utils/package.json | Changes dependency to local path ../../../nucypher-core/nucypher-core-wasm-bundler |
| packages/taco/package.json | Changes dependency to local path ../../../nucypher-core/nucypher-core-wasm-bundler |
| packages/shared/package.json | Changes dependency to local path ../../../nucypher-core/nucypher-core-wasm-bundler |
| packages/pre/package.json | Changes dependency to local path ../../../nucypher-core/nucypher-core-wasm-bundler |
| package.json | Changes dependency to link:../nucypher-core/nucypher-core-wasm-bundler |
| packages/shared/src/types.ts | Adds getUint256String function and updates nonce handling to use string representation |
| packages/shared/test/porter.test.ts | Removes unused imports and refactors to use helper functions for creating UserOperation objects |
| packages/taco/test/taco-sign.test.ts | Updates nonce comparison logic to compare string representations |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… regarding nonce value being provided as uint256 string.
…ide nonce as a string. Update tests to account for nonce being returned as a string.
8947e9d to
108eebb
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## signing-epic #739 +/- ##
===============================================
Coverage ? 90.13%
===============================================
Files ? 97
Lines ? 8453
Branches ? 296
===============================================
Hits ? 7619
Misses ? 831
Partials ? 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
NOTE: Before merging: update version of
nucypher-coreused - a new dev release will be neededType of PR:
Required reviews:
What this does:
Depends on nucypher/nucypher-core#126
Issues fixed/closed:
Why it's needed:
Notes for reviewers: