Open defispartan opened 4 months ago
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]}}
Currently the ZoraService only supports FixedPriceMinter. This can be updated to change the payment token and utilize the ERC20Minter address.
The fallback to decide what minter to use should be handled in getContractType and fallback if the FixedPriceMinter returns blank values for price and saleEnd timestamp.