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: nft mint open action #4679

Merged
merged 229 commits into from May 16, 2024
Merged

feat: nft mint open action #4679

merged 229 commits into from May 16, 2024

Conversation

defispartan
Copy link
Collaborator

@defispartan defispartan commented Feb 23, 2024

What does this PR do?

This PR integrates the Decent.xyz cross-chain open action module and NFT open action library to automatically attach an open action module to publications containing URLs for supported NFT collections, and allow these NFTs to be minted/purchased directly within the social feed through cross-chain transactions.

Automatically attach cross-chain NFT open action to Publications with supported NFT links:

  • When clicking "POST" on a Publication, extract and check all embedded URLs to see if mapping to open action calldata exists using detectAndReturnCalldata function from NFT Open Action library
  • If match is found, automatically attach decent.xyz cross-chain open action module to Publication.

If Publication appears in feed with cross-chain NFT open action module:

  • Use actionDataFromPost function in NFT Open Action Library to
    fetch action calldata from Decent API for bridge + exchange routing and platform context (types shown below)
  • Render UI for token approvals (max approval to Permit2 contract, signature approval with exact amount to cross-chain open action contract)
  • Render UI elements to execute action

Testing

Action is only configured to work on Polygon mainnet (due to inconsistencies with testnet NFT contracts and Amoy bridging).

Examples from supported collections to test embedding and executing the action are listed below:

Related issues

HEY-7

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

This PR replaces the existing NFT embed displays. Instead of linking to an external site, it will allow minting Zora NFTs (and other supported collections) directly within the feed.

Copy link

vercel bot commented Feb 23, 2024

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

Name Status Preview Updated (UTC)
og ✅ Ready (Inspect) Visit Preview May 16, 2024 4:19pm
web ✅ Ready (Inspect) Visit Preview May 16, 2024 4:19pm

@defispartan defispartan mentioned this pull request Feb 23, 2024
12 tasks
@bigint
Copy link
Member

bigint commented May 14, 2024

Screenshot 2024-05-14 at 7 50 26 PM

Let's make it look same like this.

Screenshot 2024-05-14 at 7 50 50 PM

@bigint
Copy link
Member

bigint commented May 14, 2024

Screenshot 2024-05-14 at 7 51 49 PM

12s for response is too bad IMO

@bigint
Copy link
Member

bigint commented May 14, 2024

Screen.Recording.2024-05-14.at.7.52.21.PM.mov

Still on clicking outside takes to the post page

@bigint
Copy link
Member

bigint commented May 14, 2024

Screen.Recording.2024-05-14.at.7.54.16.PM.mov

Seeing CLS issue, I can't continuously click on plus because the layout got shifted also it showing wrong message on shimmer while clicking plus

@bigint
Copy link
Member

bigint commented May 14, 2024

Screenshot 2024-05-14 at 8 12 01 PM

Let's use normal medium buttons

@bigint
Copy link
Member

bigint commented May 14, 2024

Do i need to approve everytime before collecting?

Aka for collecting need to do 3 signs?

@bigint
Copy link
Member

bigint commented May 14, 2024

image

seems like opensea is not supported

@bigint bigint merged commit bcff88f into main May 16, 2024
6 of 8 checks passed
@bigint bigint deleted the feat/nft-mint-open-action branch May 16, 2024 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants