-
Notifications
You must be signed in to change notification settings - Fork 23
refactor: viem in session key and endorsements #571
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: hugomrdias/payments
Are you sure you want to change the base?
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
synapse-dev | 38436fc | Commit Preview URL Branch Preview URL |
Jan 27 2026, 01:00 PM |
packages/synapse-core/src/chains.ts
Outdated
| abi: typeof Abis.pdp | ||
| } | ||
| endorsements: { | ||
| providerIdSet: { |
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.
This probably isn't what we want to do, as @wjmelements pointed out previously this is a generic utility contract that just happens to be applied to the endorsements use-case at the particular address its deployed at. We could potentially deploy an identical contract impl to a new address and use it for the approved providers list. So I'd vote for keeping it as "endorsements" or even more verbose, something like "endorsedProvidersSet".
- Introduced a new `authorizationExpiry` function to retrieve the expiration timestamp for session key permissions, improving session management capabilities. - Updated session key actions to utilize the new `authorizationExpiry` function, enhancing clarity and reducing redundancy in code. - Renamed `sessionAddress` to `sessionKeyAddress` for consistency across session key-related functions. - Added comprehensive tests for the `authorizationExpiry` functionality, ensuring reliability and correctness in various scenarios. - Updated documentation to reflect changes in session key handling and improve overall clarity.
…handling - Refactored the Synapse class to utilize a connector client for the EndorsementsService, enhancing integration with the new client architecture. - Simplified the EndorsementsService constructor to accept a client instead of a provider and endorsements address, improving flexibility. - Updated the SessionKey class to align with the new client structure, enhancing session key management and functionality. - Revised tests to accommodate changes in session key creation and validation, ensuring consistency and reliability in the testing framework.
- Modified the endorsements retrieval in the endorse command to use providerIdSet for improved contract integration. - Updated the payment command to retrieve the address using getClient instead of getSigner, enhancing clarity in client interactions.
- Updated the endorse command to retrieve endorsements from the correct contract structure. - Refactored chain definitions to replace providerIdSet with endorsements for improved clarity. - Adjusted constants in the JSON-RPC mock to align with the new endorsements structure. - Modified the EndorsementsService to utilize the updated endorsements address and ABI.
- Updated the Filecoin Calibration Filscan contract addresses in the generated ABI file to reflect the correct values. - Ensured consistency across documentation by aligning the contract references with the updated addresses.
- Upgraded the viem library version in the pnpm workspace configuration to ensure compatibility with the latest features and improvements.
0f7de8e to
38436fc
Compare
No description provided.