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

feat(SPGNFT): add ERC-7572 contract-level metadata support #95

Merged
merged 3 commits into from
Oct 14, 2024

Conversation

sebsadface
Copy link
Member

Description

This PR introduces ERC-7572 contract-level metadata support to SPGNFT and updates the existing contract-level metadata in IStoryNFT and BaseStoryNFT to comply with the ERC-7572 standard.

Key Changes

  • Added IERC7572; both IStoryNFT and SPGNFT now inherit from IERC7572.
  • Introduced a new _contractURI field in SPGNFTStorage, along with corresponding getter (contractURI) and setter (setContractURI) functions in SPGNFT.
  • setContractURI in BaseStoryNFT now emits ContractURIUpdated event defined in IERC7572
  • Minor cleanups:
    • Removed redundant inheritance in ISPGNFT.
    • Updated setter functions in SPGNFT to be external rather than public.

Test Plan

  • Added tests for the setContractURI function in SPGNFT.
  • Added assertions for contractURI in SPGNFT initialization and RegistrationWorkflows tests for CreateCollection.
    All new and existing tests pass locally.

Related Issue

Notes

This PR include interface changes to SPGNFT and createCollection function in RegistrationWorkflows

@sebsadface sebsadface merged commit 3fc6ef1 into storyprotocol:main Oct 14, 2024
3 checks passed
@sebsadface sebsadface deleted the contract-uri-support branch October 16, 2024 04:25
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.

Add support for contractURI in SPGNFT
2 participants