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

CollectionData with minimal props, name and symbol, all others are optional. #73

Merged
merged 2 commits into from
Nov 21, 2023

Conversation

taitruong
Copy link
Collaborator

@taitruong taitruong commented Nov 21, 2023

Parsing CollectionData is now more lenient/less restrictive. Incoming class data is checked whether it has name and symbol, which is then used for instantiated, escrowed nft contract.
Custom contracts may attach additional props - like sg-ics721 with collection info to class data. ics721 is properly parsing it and only check for name and symbol.

@taitruong taitruong force-pushed the fix_collection_data branch 2 times, most recently from ba74d33 to 5ec9c46 Compare November 21, 2023 01:52
@@ -927,6 +927,7 @@ fn test_do_instantiate_and_mint() {
assert_eq!(base_owner, owner);
}
// test case: instantiate cw721 with CustomClassData (without owner, name, and symbol)
// as a result instantiated collection on target chain will use class id for name and symbol
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the test, in case custom data is passed to target chain (e.g. SgCollectionData). So target chain wont have name and symbol.

@shanev shanev self-requested a review November 21, 2023 03:20
@humanalgorithm humanalgorithm self-requested a review November 21, 2023 07:16
@taitruong taitruong changed the title sg-ics721 must send default collection data, otherwise name and symbol cannot be unwrapped. CollectionData with minimal props, name and symbol, all others are optional. Nov 21, 2023
@taitruong taitruong added this pull request to the merge queue Nov 21, 2023
Merged via the queue into public-awesome:main with commit 60f63c0 Nov 21, 2023
1 check passed
@taitruong taitruong deleted the fix_collection_data branch December 10, 2023 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants