-
Notifications
You must be signed in to change notification settings - Fork 90
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
Unique Zora Protocol Minting Use Case #428
Comments
It'd be really helpful if you had any links to the onchain interactions or tests so we can verify the metadata rather than reading the front-end code. |
Here are the basescan links to see the onchain interactions: Contract Addresses( test purchases can be viewed at bottom of page: Relevant Transaction Hash of createEditionWithReferral with logs: Transaction Hash of createDropWithReferral with logs: Latest contract creation Transaction Hash: Please let me know if this is the required information you meant or if more information is needed about the interactions. |
Your contract itself looks fine https://mint.fun/base/0x2506012d406Cd451735e78Ff5Bcea35dC7ee1505 and https://zora.co/collect/base:0x2506012d406Cd451735e78Ff5Bcea35dC7ee1505 However, your URI for each token is incorrect: Returns not found |
Thank you for looking things over. I was under the impression that using the EditionMetadataRenderer would change the metadata for the entire edition, but for my use case, each user would need their own specific unique image metadata to be updated for their specific tokens, that's why I was going with DropMetadataRenderer. I only did the createEditionReferral function as a test to see if I could successfully call Zora functions. I really need the createDropWithReferral which allows for each token to have its own unique image.
|
Thanks for pointing me in the direction of the EditionMetadataRenderer. There appears to be a mistake in the Zora docs with the function though Nonetheless, I've been trying to mint upon deployment by using the multicall pattern with setupCalls according to the docs, but I keep running into minting errors. Unable to decode signature "0x717c5130" as it was not found on the provided ABI. Hash | Name This is my updated code I seem to be missing something:
// Set up sale configuration
|
|
You're also setting |
I tried adminMint with editionSize:BigInt(1), and 1 as the maxCanMintPerAddress first and I was getting the Mint_SoldOut error which led me to change the code to editionSize:BigInt(2), I thought maybe I was getting the error because I was trying to mint the only available token in the smart contract or I was getting the error because the it wasn't recognizing 1 for something but I tried that first, same error. I understand why you say mintWithRewards would not work since it needed a payable value & adminMint would theoretically bypass the need for that so I get why that code above didn't work but I tried adminMint first and I was getting the same simulation error as you see above over and over with each different approach I had , I tried both adminMint & adminMintAirdrop functions and they all lead to the same: Error minting token: Error: Transaction simulation failed: The contract function "createAndConfigureDrop" reverted with the following signature: I thought maybe it had something to do with trying to mint & handle token creation simultaneously with the address of the deployed contract not being able to be properly accessed during the deployment to mint in the same instance of createAndConfigureDrop function. Maybe I was missing something with the multicall pattern functionality or a function I was missing, I tried almost all of the ones that made sense and none of them worked. How should it be used properly? What would the correct way to use the setupCalls in the createAndConfigureDrop function to mint upon deployment like the docs say? |
I tried it again for good measure and it didn't work, I got the the same Mint_SoldOut signature error. When I remove adminMint from setup calls , it prompts me with a contract interaction sign transaction to deploy the contract and when I added it back, the transaction reverted and it didn't even prompt me to sign the transaction at all.
|
Are you able to publish the failing txn so i can take a look?
…On Wed, Aug 7, 2024 at 15:30 babyuniverse ***@***.***> wrote:
adminMint *should* work in this context if you try to mint a token that's
been setup.
I tried it again for good measure and it didn't work, I got the the same
Mint_SoldOut signature error. When I remove adminMint from setup calls , it
prompts me with a contract interaction sign transaction to deploy the
contract and when I added it back, the transaction reverted and it didn't
even prompt me to sign the transaction at all.
const erc721DropInterface = new ethers.Interface(erc721DropABI);
const saleConfig = {
publicSalePrice: BigInt(0),
maxSalePurchasePerAddress: 1,
publicSaleStart: BigInt(0),
publicSaleEnd: BigInt("0xFFFFFFFFFFFFFFFF"),
presaleStart: BigInt(0),
presaleEnd: BigInt(0),
presaleMerkleRoot: "0x0000000000000000000000000000000000000000000000000000000000000000"
};
const setSaleConfigCall = erc721DropInterface.encodeFunctionData(
'setSaleConfiguration',
Object.values(saleConfig)
);
const recipientAddress = address;
const mintQuantity = 1;
const adminMintCall = erc721DropInterface.encodeFunctionData(
'adminMint',
[recipientAddress, mintQuantity]
);
const setupCalls: readonly `0x${string}`[] = [
setSaleConfigCall as `0x${string}`,
adminMintCall as `0x${string}`
];
const args = [
"Playground Pic", // name
"PP", // symbol
address as `0x${string}`, // defaultAdmin
BigInt(1), // editionSize (1 for a single mint)
300, // royaltyBPS (3%)
address as `0x${string}`, // fundsRecipient
setupCalls, // setupCalls
'0x7d1a46c6e614A0091c39E102F2798C27c1fA8892' as `0x${string}`, // (EDITION_METADATA_RENDERER)
metadataInitializer as `0x${string}`,
"0x124F3eB5540BfF243c2B57504e0801E02696920E" as `0x${string}`, // createReferral
] as const;
setMintingStep('Deploying contract...');
const deployTx = await writeContractAsync({
address: zoraNftCreatorV1Config.address[base.id],
abi: zoraNftCreatorV1Config.abi,
functionName: "createAndConfigureDrop",
args,
});
const receipt = await waitForTransactionReceipt(publicClient, { hash: deployTx });
—
Reply to this email directly, view it on GitHub
<#428 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGMCOEN34WKDH2SPX6EC6LZQJYU3AVCNFSM6AAAAABK7ASWMWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZUGIYDAMZTG4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I use Tenderly to simulate transactions, I have a shared link for the latest attempt at a transaction, you can see the error Mint_SoldOut persists: |
The simulation shows the transaction is being reverted specifically at the ERC721Drop.sol:
It appears to happen right as the salesConfig data is being encoded when I examine this part of the simulation : ERC721Drop ERC721Drop ERC721Drop 0x175b0092075748fb3234e04ebc3c7521aba485ba 0x175b0092075748fb3234e04ebc3c7521aba485ba ( ERC721Drop ERC721Drop ERC721Drop ERC721Drop ERC721Drop ERC721Drop ERC721Drop This is what is logged as the arguments being passed in the console when I try to mint: |
Hi sorry for the delay – have you figured this out? |
I'm still new to smart contract architecture and NFT minting through coding and I've been running into an issue with figuring out what are the proper functions I should be running to achieve my team's project needs. I am needing to have a smart contract deployed that allows me to have each user have a unique image of their canvas capture as the image in their metadata at the time of minting which has caused me a bit of trouble. I have tried the createEditionWithReferral & createDropWithReferral functions to no avail and I even tried to deploy a smart contract using the sdk CreatorClient and I've tried the purchase and mintWithRewards functions but I couldn't quite nail it. I tried to have the updateTokenURI function run simultaneously at the time of minting, but I was having ABI issues when using the ERC721DropABI. I wanna know if I could be pointed in the proper direction. I'm so close to figuring it out, but I'm not quite there yet. The implementation is using html2canvas to capture the canvas and it gets uploaded to IPFS and that hash is then being passed to the metadata for the tokenURI so that each user has a unique image as their NFT with Wagmi handling my blockchain interactions.
For the most part, I've been experiencing minting blank NFTs and also NFTs that have the contract IPFS image instead of the unique canvas capture. I just need to be pointed in the correct direction of which function usage should be for my use case. I don't need anything done for me per se, I just need to know what specific smart contract deployment function I need to deploy and what purchase or mint function that can accommodate my needs with the corresponding pages in the Zora docs so that I can figure out the proper usage of the Zora Protocol. Thank you.
This is a link to the Github project that shows the code. My apologies, there are a lot of different versions of different tests and the code may not be the best:
updateMetadateBaseWithDetails Version:
https://github.com/playgotchi/playground/blob/67370a3fd86614327af24e5b5c21ae9736006ac3/components/canvas.tsx
UpdateTokenURI version(minted blank NFT image: https://github.com/playgotchi/playground/blob/dee14438397c6f9f408b259c49a17679afd2767f/components/canvas.tsx
mintWithRewards test (was never prompted to sign transaction in Metamask:
https://github.com/playgotchi/playground/blob/9cf21dadae4f590707a4e4ee92177dbe392110c5/components/canvas.tsx
createEditionWithReferral purchase function successful mint:
I've had a successful mint but it didn't incorporate the unique canvas capture functionality that I needed. https://zora.co/collect/base:0x6458804cd6868b1edf8e61f267e626ffd57d51ec
https://github.com/playgotchi/playground/blob/62ea1970578783b842eeb5038d955d90c55b2682/components/canvas.tsx
The text was updated successfully, but these errors were encountered: