From 87fd4a0f06cbabe9bb081eb01babc7222bd1db91 Mon Sep 17 00:00:00 2001 From: Dan Oved Date: Thu, 13 Jun 2024 17:40:24 -0600 Subject: [PATCH] wip on docs improvements (#456) --- docs/pages/protocol-sdk/creator/onchain.mdx | 10 ++++++++-- docs/snippets/protocol-sdk/collect/createPremint.ts | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/docs/pages/protocol-sdk/creator/onchain.mdx b/docs/pages/protocol-sdk/creator/onchain.mdx index 2698978f8..c1eabda64 100644 --- a/docs/pages/protocol-sdk/creator/onchain.mdx +++ b/docs/pages/protocol-sdk/creator/onchain.mdx @@ -4,13 +4,19 @@ The Protocol SDK can be used to prepare transactions to create 1155 contracts an ### Setup/Create the Creator Client -Initialize a Creator Client with a chain. The chain is used to determine the network to interact with. +Initialize a Creator Client with a chain id and `PublicClient`. The chain is used to determine the network to interact with. ```ts twoslash import { createCreatorClient } from "@zoralabs/protocol-sdk"; +import { createPublicClient, http } from 'viem'; import { zora } from "viem/chains"; -const creatorClient = createCreatorClient({ chain: zora }); +const publicClient = createPublicClient({ + chain: zora, + transport: http() +}); + +const creatorClient = createCreatorClient({ chainId: zora.id, publicClient }); ``` ### Creating a new 1155 contract and token diff --git a/docs/snippets/protocol-sdk/collect/createPremint.ts b/docs/snippets/protocol-sdk/collect/createPremint.ts index 649b643f3..0161cf88c 100644 --- a/docs/snippets/protocol-sdk/collect/createPremint.ts +++ b/docs/snippets/protocol-sdk/collect/createPremint.ts @@ -9,9 +9,9 @@ const creatorClient = createCreatorClient({ chainId, publicClient }); const creatorAccount = "0xf69fEc6d858c77e969509843852178bd24CAd2B6"; const { - // the premint that was created + // the premint that is to be created premintConfig, - // collection address of the premint + // deterministic collection address of the premint collectionAddress, typedDataDefinition, submit,