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: zora erc20 minter #42

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

feat: zora erc20 minter #42

wants to merge 7 commits into from

Conversation

defispartan
Copy link
Collaborator

Add support for Zora ERC20Minter (paying with arbitrary ERC20 token), and generally support paymentToken as a parameter to getMintSignature and getPrice in all platform services.

@defispartan
Copy link
Collaborator Author

defispartan commented Jun 12, 2024

Currently receiving 500 response from calldata generation when dstToken is not set as default address (base token)

https://github.com/0xnogo/nft-openAction-kit/blob/feat/zora-erc20-minter/src/NftOpenActionKit.ts#L137

https://box-api-git-kanty-lens-v2-decent-webapp.vercel.app/api/getBoxAction?arguments={%22sender%22:%220x354cd122a1b3ebf102306f6bccccf8abebaff708%22,%22srcChainId%22:137,%22srcToken%22:%220x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270%22,%22dstChainId%22:8453,%22dstToken%22:%220x4ed4E862860beD51a9570b96d89aF5E1B0Efefed%22,%22slippage%22:3,%22actionType%22:%22lens-open-action%22,%22actionConfig%22:{%22functionCall%22:%22processPublicationAction%22,%22pubId%22:%2249%22,%22profileId%22:%22182087%22,%22contractAddress%22:%220xFecf9eF230A234BA535C182823f48347C002Cef5%22,%22chainId%22:8453,%22cost%22:{%22isNative%22:true,%22amount%22:%2269000000000000000000n%22},%22signature%22:%22function%20mint(address%20mintTo,%20uint256%20quantity,%20address%20tokenAddress,%20uint256%20tokenId,%20uint256%20totalValue,%20address%20currency,%20address%20mintReferral,%20string%20comment)%22,%22args%22:[%220x04E2516A2c207E84a1839755675dfd8eF6302F0a%22,%221n%22,%221n%22,%2269000000000000000000n%22,%220x4ed4E862860beD51a9570b96d89aF5E1B0Efefed%22,%220x354cd122a1b3ebf102306f6bccccf8abebaff708%22,%22%22]}}

@defispartan defispartan linked an issue Jun 12, 2024 that may be closed by this pull request
@defispartan
Copy link
Collaborator Author

Example NFT: https://zora.co/collect/zora:0xefcfa9a3658443a7702c59d1c68be5c52a23df43/25
Example post: https://hey.xyz/posts/0x020e3d-0x43

When running the NFT Open Action testing environment (https://github.com/defispartan/nft-oa-test) locally with nft-openaction-kit package version linked from this branch, the call to actionDataFromPost fails with 500 error from Decent API:

https://box-api-git-kanty-lens-v2-decent-webapp.vercel.app/api/getBoxAction?arguments={%22sender%22:%220x354cd122a1b3ebf102306f6bccccf8abebaff708%22,%22srcChainId%22:137,%22srcToken%22:%220x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270%22,%22dstChainId%22:7777777,%22dstToken%22:%220xa6B280B42CB0b7c4a4F789eC6cCC3a7609A1Bc39%22,%22slippage%22:3,%22actionType%22:%22lens-open-action%22,%22actionConfig%22:{%22functionCall%22:%22processPublicationAction%22,%22pubId%22:%2267%22,%22profileId%22:%22134717%22,%22contractAddress%22:%220xEfCfA9A3658443A7702c59D1C68BE5C52A23df43%22,%22chainId%22:7777777,%22cost%22:{%22isNative%22:true,%22amount%22:%22777000000000000000000n%22},%22signature%22:%22function%20mint(address%20mintTo,%20uint256%20quantity,%20address%20tokenAddress,%20uint256%20tokenId,%20uint256%20totalValue,%20address%20currency,%20address%20mintReferral,%20string%20comment)%22,%22args%22:[%220x04E2516A2c207E84a1839755675dfd8eF6302F0a%22,%221n%22,%2225n%22,%22777000000000000000000n%22,%220xa6B280B42CB0b7c4a4F789eC6cCC3a7609A1Bc39%22,%220x354cd122a1b3ebf102306f6bccccf8abebaff708%22,%22%22]}}

@defispartan defispartan marked this pull request as draft August 6, 2024 05:40
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 Zora ERC20Minter
1 participant