Skip to content
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!: upgrade @lukso/lsp-smart-contracts to v0.14.0 #247

Merged
merged 6 commits into from
Dec 19, 2023

Conversation

CJ42
Copy link
Member

@CJ42 CJ42 commented Dec 13, 2023

What kind of change does this PR introduce (bug fix, feature, docs update, ...)?

Package dependency upgrade

  • Upgrade dependency for lsp-smart-contracts to v0.14.0
  • awaiting for a release: upgrade @erc725/erc725.js to new version v0.22.0.
  • ⚠️ BREAKING CHANGE: add new parameter tokenType on deployment of Digital Assets LSP7/8, related to the new LSP4 deployment parameter.
  • ⚠️ BREAKING CHANGE: rename LSP8 deployment parameter tokenIdType to tokenIdFormat

@CJ42
Copy link
Member Author

CJ42 commented Dec 13, 2023

@CallumGrindle @richtera @Hugoo
We need a new version of erc725.js to be able to merge this PR.

So that it also encode the LSP3 / LSP4 metadata of Universal Profile / Digital Assets as a VerifiedURL. See these occurences in the code:

const encodedLSP4Metadata = erc725EncodeData(lsp4MetadataForEncoding, 'LSP4Metadata');

const encodedDataResult = erc725EncodeData(lsp3ProfileDataForEncoding, 'LSP3Profile');

@CJ42 CJ42 marked this pull request as draft December 13, 2023 18:17
@Hugoo
Copy link
Contributor

Hugoo commented Dec 13, 2023

Thanks for clear PR description

@CJ42 CJ42 marked this pull request as ready for review December 18, 2023 08:54
@CJ42
Copy link
Member Author

CJ42 commented Dec 19, 2023

@Hugoo this is ready for review

@@ -120,6 +120,11 @@ async function deployLSP7DigitalAsset(
) {
const controllerAddress = await signer.getAddress();

const lsp4TokenType =
typeof digitalAssetDeploymentOptions.tokenType === 'string'
? LSP4_TOKEN_TYPES[digitalAssetDeploymentOptions.tokenType]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure the value of

digitalAssetDeploymentOptions.tokenType

Will always be included in that array? Can thus lead to errors? Is the value of that variable verified?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure the value of

digitalAssetDeploymentOptions.tokenType

Will always be included in that array? Can thus lead to errors? Is the value of that variable verified?

I guess yes because of the typing. It must be the type of the key names being either "TOKEN", or "NFT" or "COLLECTION"

image

const { name, symbol, isNFT } = digitalAssetDeploymentOptions;
const { name, symbol, tokenType, isNFT } = digitalAssetDeploymentOptions;

const lsp4TokenType = typeof tokenType === 'string' ? LSP4_TOKEN_TYPES[tokenType] : tokenType;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here I think it is safer to verify this value.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same reply as above

@@ -30,7 +32,8 @@
"0.11.1": "0x9b1eF52DdEc3b8414FbE359ed7826334729ab97E",
"0.12.0-rc.0": "0xA20454137b47440C71fE4DD203D25D69F0b34535",
"0.12.0": "0x4555ed733f58Da8Cc6A2Fd6A050874192Ac97985",
"0.12.1": "0xA5467dfe7019bF2C7C5F7A707711B9d4cAD118c8"
"0.12.1": "0xA5467dfe7019bF2C7C5F7A707711B9d4cAD118c8",
"0.14.0": "0x7870C5B8BC9572A8001C3f96f7ff59961B23500D"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How/where to verify these contracts values?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How/where to verify these contracts values?

These are the addresses of the latest contracts verified deployed + verified by the CI of the @lukso/lsp-smart-contracts repo on testnet

https://github.com/lukso-network/lsp-smart-contracts/actions/runs/7113905576

@Hugoo Hugoo changed the title refactor: upgrade @lukso/lsp-smart-contracts to v0.14.0 refactor!: upgrade @lukso/lsp-smart-contracts to v0.14.0 Dec 19, 2023
@Hugoo Hugoo merged commit 58edb58 into develop Dec 19, 2023
1 check passed
@Hugoo Hugoo deleted the refactor/sc-v0.14.0 branch December 19, 2023 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants