docs: Add Type ID generation and data encoding to LSP1 Notification Type IDs#1333
Open
docs: Add Type ID generation and data encoding to LSP1 Notification Type IDs#1333
Conversation
- Add 'How Type IDs are generated' section explaining keccak256(name) - Add 'TypeID generation' row to each type ID table - Add 'Data encoding' section for each type ID showing abi.encode params - Note LSP26 uses abi.encodePacked (20 bytes) vs abi.encode (32 bytes) - Rename page title and sidebar: 'Universal Receiver Type IDs' -> 'LSP1 Notification Type IDs' Follow-up to PR #1332 based on review from @CJ42.
Contributor
Deployed with Cloudflare Pages ☁️ 🚀 🆗 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #1332 based on review feedback from @CJ42.
Changes
Type ID generation explanation
keccak256("TypeName")TypeID generationrow to every type ID table showing the keccak256 callData encoding documentation
For each type ID, added a
Data encodingsection showing the exactabi.encodeparameters from the source contracts:(previousOwner, newOwner)for ownership transfers(operator, from, to, amount, data)for sender/recipient;(tokenOwner, allowance, operatorNotificationData)for operatorbytes32 tokenIdinstead ofuint256 amount; operator includesbool authorizedflagabi.encodePacked(address)(20 bytes) — noted as different from standardabi.encodeRenamed page
All data encoding was verified against the lsp-smart-contracts source code.