ourzora / ocs-hackathon-24

Zora Onchain Summer Hackathon 24 Guide
7 stars 0 forks source link

Zora 0xsplits example? #2

Open rubinovitz opened 3 weeks ago

rubinovitz commented 3 weeks ago

Hi I’m trying to create new Zora NFTs with variable revenue splits using an embedded privy wallet and 0xsplits.

do you have examples of your 0xsplits integration I can look at?

Thank you!

oveddan commented 3 weeks ago

hi @rubinovitz are you creating an onchain or premint contract/token?

rubinovitz commented 3 weeks ago

Do you have any documentation on pre-mint? Was unaware it was an option and the one link on Google is broken. Also can't find it in your docs.

oveddan commented 3 weeks ago

hi @rubinovitz we don't currently have much documentation on Premint (we need to add it). but here's some documentation on it from the sdk standpoint: https://ourzora.github.io/zora-protocol/protocol-sdk/premint-client

to get a better understanding of how it works, you could look at the code for the premint client here: https://github.com/ourzora/zora-protocol/blob/main/packages/protocol-sdk/src/premint/premint-client.ts#L227

rubinovitz commented 3 weeks ago

@oveddan thanks I think we’re going to do premint

oveddan commented 3 weeks ago

got it - splits on premint are not supported yet (but it's planned).

rubinovitz commented 3 weeks ago

@oveddan ok in that case can we do onchain?

iainnash commented 2 weeks ago

Yes it can be done onchain – you can submit the split on chain before a premint or submit both the mint and the split onchain. You can just use the splits SDK/API and then submit that address to the contract payoutaddress.

oveddan commented 2 weeks ago

we should have this supported in our sdk soon

oveddan commented 2 weeks ago

hey we have an updated sdk and example for creating with splits, check it out here: https://ourzora.github.io/zora-protocol/protocol-sdk/creator/splits

rubinovitz commented 4 days ago

@oveddan is your documentation for contract metadata correct? If so what is the difference between image and imageURI?

mattleesounds commented 4 days ago

@oveddan The collection metadata here https://docs.zora.co/docs/smart-contracts/creator-tools/Deploy1155Contract is what @rubinovitz is referring to.

I am also confused about how these two pages of documentation work together because there is also this one https://ourzora.github.io/zora-protocol/protocol-sdk/creator/onchain

oveddan commented 3 days ago

hey weve been migrating our docs so there is a bit of confusion/duplication between the two.

For now you can know that:

Contract metadata has the following json schema:

{
  "name": "{contract name}",
  "description": "{contract description}",
  "image": "{contract image}"
} 

Token metadata has the following json schema:

{
  "name": "{token name}",
  "description": "{token description}",
  "image": "{token image ipfs url}",
  "animation_url": "{token media ipfs url}",
  "content": {
    "mime": "{content mime type}",
    "uri": "{content ipfs uri}"
  },
  "attributes": {
    "trait_type": "{trait type}",
    "value": "{trait value}"
  }
}

Contract and token metadata should be pinned to IPFS using a preferred pinning service, and the url when set on a contract or token should be in an ipfs url format, like: ipfs://{cid}

rubinovitz commented 3 days ago

Thanks!

What is the data type of the contract image?

On Thu, Jun 27, 2024 at 12:57 PM Dan Oved @.***> wrote:

hey weve been migrating our docs so there is a bit of confusion/duplication between the two.

For now you can know that:

Contract metadata has the following json schema:

{ "name": "{contract name}", "description": "{contract description}", "image": "{contract image}" }

Token metadata has the following json schema:

{ "name": "{token name}", "description": "{token description}", "image": "{token image ipfs url}", "animation_url": "{token media ipfs url}", "content": { "mime": "{content mime type}", "uri": "{content ipfs uri}" }, "attributes": { "trait_type": "{trait type}", "value": "{trait value}" } }

Contract and token metadata should be pinned to IPFS using a preferred pinning service, and the url when set on a contract or token should be in an ipfs url format, like: ipfs://{cid}

— Reply to this email directly, view it on GitHub https://github.com/ourzora/ocs-hackathon-24/issues/2#issuecomment-2195218087, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANZMF6XDGUEBZWA7XQ4653ZJQ775AVCNFSM6AAAAABIXSHVLGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJVGIYTQMBYG4 . You are receiving this because you were mentioned.Message ID: @.***>