-
Notifications
You must be signed in to change notification settings - Fork 105
Add tokenId support to ERC1155 signature generation #902
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
Add tokenId support to ERC1155 signature generation #902
Conversation
WalkthroughThe changes introduce support for an optional Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Server
participant SignatureGenV4
participant SignatureGenV5
Client->>Server: POST /erc1155/signature-generate (with optional tokenId)
alt v5 SDK flow
Server->>SignatureGenV5: Generate signature (include tokenId if provided)
SignatureGenV5-->>Server: Signature response (with tokenId)
else v4 SDK flow
Server->>SignatureGenV4: Validate and generate signature (include tokenId if provided)
SignatureGenV4-->>Server: Signature response (with tokenId)
end
Server-->>Client: Response (includes tokenId if present)
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🧰 Additional context used🧬 Code Graph Analysis (1)src/server/routes/contract/extensions/erc1155/read/signature-generate.ts (1)
🔇 Additional comments (6)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|

Changes
How this PR will be tested
Output
(Example: Screenshot/GIF for UI changes, cURL output for API changes)
PR-Codex overview
This PR introduces a new optional
tokenIdfield to the NFT schema and related functionality in theerc1155SignatureGeneratemethod, allowing for the specification of a token ID during the signature generation process.Detailed summary
tokenIdas an optional field to the schema insrc/server/schemas/nft/index.ts.erc1155SignatureGeneratefunction to accepttokenIdin its arguments.tokenIdin the payload.tokenIdwhen generating the signature.Summary by CodeRabbit
New Features
API Changes