Skip to content

Commit

Permalink
wip on docs improvements (#456)
Browse files Browse the repository at this point in the history
  • Loading branch information
oveddan authored Jun 13, 2024
1 parent 37724e9 commit 87fd4a0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions docs/pages/protocol-sdk/creator/onchain.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/snippets/protocol-sdk/collect/createPremint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 87fd4a0

Please sign in to comment.