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: add erc-1155 support for zora nfts #3711

Merged
merged 1 commit into from Sep 5, 2023
Merged

feat: add erc-1155 support for zora nfts #3711

merged 1 commit into from Sep 5, 2023

Conversation

bigint
Copy link
Member

@bigint bigint commented Sep 5, 2023

What does this PR do?

🤖 Generated by Copilot at ec59aae

Added support for minting ERC-1155 NFTs using the Zora protocol and the fixed price sale strategy. Updated the UI and the contract interfaces to handle different NFT standards. Exported the ZoraCreator1155Impl contract from the @lenster/abis package.

Related issues

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Enhancement (non-breaking small changes to existing functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Explanation of the changes

🤖 Generated by Copilot at ec59aae

  • Enable minting button for both ERC-721 and ERC-1155 NFTs in the Nft component (link)
  • Add a new section to display the NFT type (ERC-721 or ERC-1155) with an icon and a text in the Metadata component (link, link)
  • Import and export the ZoraCreator1155Impl contract from @lenster/abis to interact with the ERC-1155 NFTs created by the Zora protocol (link, link)
  • Define the FIXED_PRICE_SALE_STRATEGY constant as the address of the contract that implements the fixed price sale logic for the ERC-1155 NFTs (link)
  • Rename the erc721Address variable to nftAddress to reflect the generic NFT address that could be either ERC-721 or ERC-1155 in the MintAction component (link)
  • Define the abi and args variables based on the nft.contractStandard property to use the appropriate contract interface and arguments for the minting function in the MintAction component (link)
  • Encode the recipient address as a bytes parameter for the ERC-1155 minting function using the encodeAbiParameters function from viem in the MintAction component (link)
  • Update the usePrepareContractWrite hook to use the nftAddress, abi, and args variables instead of the hardcoded values for the ERC-721 minting function in the MintAction component (link)
  • Import the PuzzleIcon component from @heroicons/react/outline to display the NFT type icon in the Metadata component (link)
  • Render a conditional text based on the nft.contractStandard property to show the NFT type in the Metadata component (link)
  • Import the parseAbiParameters function from viem to decode the ABI parameters for the ERC-1155 minting function in the MintAction component (link)

Emoji

🖼️🧩🚀

@vercel
Copy link

vercel bot commented Sep 5, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
prerender ✅ Ready (Inspect) Visit Preview Sep 5, 2023 2:38pm
web ✅ Ready (Inspect) Visit Preview Sep 5, 2023 2:38pm

@bigint bigint merged commit d9e4ad9 into main Sep 5, 2023
6 of 9 checks passed
@bigint bigint deleted the 1155 branch September 5, 2023 14:35
@vercel vercel bot temporarily deployed to Preview – prerender September 5, 2023 14:38 Inactive
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.

None yet

1 participant