You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
value:bigint; // ETH value to send (typically 0n for coin creation)
180
+
}>;
181
+
predictedCoinAddress:Address; // Deterministic address where coin will be deployed
182
+
};
183
+
```
184
+
185
+
The `calls` array contains the transaction parameters that can be passed to your tx‑sending flow (e.g., WAGMI `useSendTransaction`). The `predictedCoinAddress` provides the coin's address before the transaction is sent, allowing immediate UI updates or address storage.
127
186
128
187
```tsx
129
188
import*asReactfrom"react";
@@ -132,28 +191,42 @@ import { Address } from "viem";
Copy file name to clipboardExpand all lines: docs/pages/coins/sdk/queries/coin.mdx
+32-25Lines changed: 32 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,8 +12,8 @@ The `getCoin` function retrieves detailed information about a specific coin, inc
12
12
13
13
```ts twoslash
14
14
typeGetCoinParams= {
15
-
address:string; // The coin contract address
16
-
chain?:number; // Optional: The chain ID (defaults to Base: 8453)
15
+
address:string; // The coin contract address
16
+
chain?:number; // Optional: The chain ID (defaults to Base: 8453)
17
17
};
18
18
```
19
19
@@ -32,17 +32,25 @@ import { GetCoinResponse } from "@zoralabs/coins-sdk";
32
32
33
33
// The Zora20Token type is imported from the SDK's generated types.
34
34
// It includes detailed information about a specific coin, such as its metadata, market data, and creator information.
35
-
typeZora20Token=GetCoinResponse['zora20Token'];
35
+
typeZora20Token=GetCoinResponse["zora20Token"];
36
36
// ^?
37
37
38
-
39
-
40
-
41
-
42
38
//
43
-
44
39
```
45
40
41
+
**Key Response Fields:**
42
+
43
+
-`platformBlocked`: Boolean indicating whether the coin is blocked on the platform (most applications should exclude blocked coins from visibility)
44
+
-`creatorProfile.platformBlocked`: Boolean indicating whether the creator's profile is blocked on the platform (most applications should exclude blocked profiles from visibility)
console.log(`Activity: ${node.activityType}`); // "BUY" or "SELL"
145
153
console.log(`Amount: ${node.coinAmount}`);
@@ -161,10 +169,10 @@ The `getCoinComments` function retrieves comments associated with a specific coi
161
169
162
170
```ts twoslash
163
171
typeGetCoinCommentsParams= {
164
-
address:string; // The coin contract address
165
-
chain?:number; // Optional: The chain ID (defaults to Base: 8453)
166
-
after?:string; // Optional: Pagination cursor for fetching next page
167
-
count?:number; // Optional: Number of comments to return per page
172
+
address:string; // The coin contract address
173
+
chain?:number; // Optional: The chain ID (defaults to Base: 8453)
174
+
after?:string; // Optional: Pagination cursor for fetching next page
175
+
count?:number; // Optional: Number of comments to return per page
168
176
};
169
177
```
170
178
@@ -186,7 +194,6 @@ To fetch all comments for a coin, you can use pagination:
186
194
187
195
The response includes a `comments` array and pagination information:
188
196
189
-
190
197
## Error Handling
191
198
192
199
All query functions follow the same error handling pattern. When an error occurs, the promise is rejected with an error object that includes details about what went wrong.
0 commit comments