-
Notifications
You must be signed in to change notification settings - Fork 103
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
using the CreatorContract in a Next JS / Typescript project #462
Comments
We strongly recommend using an IPFS service to upload your image before posting and incorporate that url in the make contract and token metadata fields. There are a number of IPFS services that will handle standard NFT metadata and docs on the spec here: https://docs.zora.co/contracts/Metadata Let us know if we can help clarify this information further :). |
thanks for the message... was curious, does the writeContract function return anything? const txResult = await writeContract( Thanks |
have another question... I am now using 'ipfs-http-client' to pin image to ipfs... //Pin ImageBuffer to IPFS thanks |
You need to pass in the cid using `ipfs://${cid}` for the urls. You can use
the same url if you want the same metadata for the contract and token or
different metadata.
…On Fri, Oct 25, 2024 at 16:51 Booker ***@***.***> wrote:
have another question... I am now using 'ipfs-http-client' to pin image to
ipfs...
//Pin ImageBuffer to IPFS
const { cid } = await ipfs.add(imageBuffer);
console.log('Image pinned to IPFS with CID:', cid.toString());
what do I do with makeImageTokenMetadata & makeContractMetadata functions
(zoralabs sdk)... do I need to pass them both the cid, since the image is
pinned to ipfs do I need to change part of the makeImageTokenMetadata
function?
thanks
—
Reply to this email directly, view it on GitHub
<#462 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGMCOABFXDI7DGXG5QDHBTZ5KVO5AVCNFSM6AAAAABQSKO6KOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZYG44DENJVGY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I have another related question... when using the CreatorContract does the writeContract() function from wagmi return anything? here is my mint function code.. export async function executeMint(parameters: any) {
} using the creatorContract I get back my parameters and everything fine, and have a contract address and abi but when I call writeContract() function and pass in what it wants, when I console log txResults it says 'undefined'. I am trying to mint to zoraSepolia and also dont see anything there |
yes it should return the hash of the transaction under the hash field.
…On Tue, Nov 26, 2024 at 03:40 Booker ***@***.***> wrote:
I have another related question... when using the CreatorContract does the
writeContract() function from wagmi return anything? here is my mint
function code..
export async function executeMint(parameters: any) {
const { writeContract } = useWriteContract();
const { abi } = parameters
try {
const txResult = await writeContract(
parameters.contractAddress,
abi,
);
console.log(txResult)
return txResult;
} catch (error) {
console.error('Error during NFT mint:', error);
throw error;
}
}
using the creatorContract I get back my parameters and everything fine,
and have a contract address and abi but when I call writeContract()
function and pass in what it wants, when I console log txResults it says
'undefined'. I am trying to mint to zoraSepolia and also dont see anything
there
—
Reply to this email directly, view it on GitHub
<#462 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGMCOHPEQ72NDZ3QFWCKHD2CN4LRAVCNFSM6AAAAABQSKO6KOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJYHA4DENBWGY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
should the entirety of 'parameters' be based through like 'writeContract(parameters)' or only the abi and contract address need to be passed in: |
All parameters from simulate should be passed in. |
ok thanks, gonna try that one |
I am having some problems creating a token on an existing contract... I have the parameters, plus a contract address... but an alert pops up and says it cant find the contract... the issue seems to happen at create1155OnExistingContract
|
Hello... I am having trouble implementing the creatorClient contract in NextJS w/ Typescript..
Here are my 2 function.
I am passing in an imagebuffer which is an AI generated image.
How do I use it inside the creatorClient.create1155 function?
Do I first need to do something w/ makeImageTokenMetadata, makeContractMetadata first to get the token and contract uri's? -- but then what do I do?
Also how would I call them correctly (makeImageTokenMetadata, makeContractMetadata)
thanks
The text was updated successfully, but these errors were encountered: