-
Notifications
You must be signed in to change notification settings - Fork 50
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
refactor!: set LSP8 TokenId Type on deployment / initialization #712
Conversation
This file contains 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
Task linked: DEV-3725 Set tokenIdType when deploying LSP8 |
CJ42
force-pushed
the
DEV-3725
branch
5 times, most recently
from
September 19, 2023 11:06
e7cbffa
to
7e349f8
Compare
Changes to gas cost
🧾 Summary (10% most significant diffs)
Full diff report 👇
|
CJ42
force-pushed
the
DEV-3725
branch
2 times, most recently
from
September 26, 2023 08:36
671539f
to
39d8985
Compare
CJ42
force-pushed
the
DEV-3725
branch
2 times, most recently
from
September 26, 2023 09:24
8e6c582
to
a80e619
Compare
YamenMerhi
approved these changes
Sep 27, 2023
b00ste
approved these changes
Sep 27, 2023
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.
Everything besides the comments looks good
contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol
Outdated
Show resolved
Hide resolved
contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol
Outdated
Show resolved
Hide resolved
docs/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.md
Outdated
Show resolved
Hide resolved
This was referenced Nov 30, 2023
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.
What does this PR introduce?
Add parameter on
constructor
/initialize
to set the LSP8 Token Id type when the contract is deployed (for standard contracts) or initialized (for proxy contracts).Restrict the internal
_setData(bytes32,bytes)
function to disallow to edit the data keyLSP8TokenIdType
after the contract has been deployed or initialized.🚀 Feature
Add Typescript and Solidity constants for the different types of LSP8 Token ID Types
uint256
string
bytes32
bytes32
address
♻️ Refactor
Add extra parameter of
uint256 tokenIdType
inconstructor
andinitialize
functions of LSP8 Core, presets and extensions.Add custom
error
namedLSP8TokenIdType
not editable to disallow setting the data keyLSP8TokenIdType
.🧪 Tests
Add tests to ensure data key / value pair for
LSP8TokenIdType
is set when deploying / initializing a LSP8 contract.📄 Documentation
Update auto-generated Natspec docs for LSP8 contracts.
PR Checklist
npm run lint
&&npm run lint:solidity
(solhint)npm run format
(prettier)npm run build
npm run test