clanker-sdk 4.1.27 → 4.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,6 +22,8 @@ type RelatedV4 = {
22
22
  feeLocker: `0x${string}`;
23
23
  feeStaticHook: `0x${string}`;
24
24
  feeDynamicHook: `0x${string}`;
25
+ presale?: `0x${string}`;
26
+ presaleAllowlist?: `0x${string}`;
25
27
  mevModuleV2?: `0x${string}`;
26
28
  feeStaticHookV2?: `0x${string}`;
27
29
  feeDynamicHookV2?: `0x${string}`;
@@ -8971,6 +8973,8 @@ declare const CLANKERS: {
8971
8973
  feeStaticHookV2: "0xb429d62f8f3bFFb98CdB9569533eA23bF0Ba28CC";
8972
8974
  feeDynamicHook: "0x34a45c6B61876d739400Bd71228CbcbD4F53E8cC";
8973
8975
  feeDynamicHookV2: "0xd60D6B218116cFd801E28F78d011a203D2b068Cc";
8976
+ presale: "0xeeBbC567C3D612f50a67820f39CDD30dcCF7E6b8";
8977
+ presaleAllowlist: "0x789c2452353eee400868E7d3e5aDD6Be0Ef4185D";
8974
8978
  };
8975
8979
  };
8976
8980
  readonly clanker_v4_sepolia: {
@@ -14349,6 +14353,8 @@ declare const CLANKERS: {
14349
14353
  feeStaticHookV2: "0x6C24D0bCC264EF6A740754A11cA579b9d225e8Cc";
14350
14354
  feeDynamicHook: "0x0000000000000000000000000000000000000000";
14351
14355
  feeDynamicHookV2: "0x0000000000000000000000000000000000000000";
14356
+ presale: "0xf7db81910444ab0f07bA264d7636d219A8c7769D";
14357
+ presaleAllowlist: "0xF6C7Ff92F71e2eDd19c421E4962949Df4cD6b6F3";
14352
14358
  };
14353
14359
  };
14354
14360
  readonly clanker_v4_unichain: {
@@ -18089,7 +18095,7 @@ declare const clankerTokenV4: z.ZodObject<{
18089
18095
  resetTickFilter: z.ZodNumber;
18090
18096
  feeControlNumerator: z.ZodNumber;
18091
18097
  decayFilterBps: z.ZodNumber;
18092
- }, z.core.$strip>], "type">>;
18098
+ }, z.core.$strip>]>>;
18093
18099
  /** [v4.1+ only] Sniper fees */
18094
18100
  sniperFees: z.ZodPrefault<z.ZodObject<{
18095
18101
  startingFee: z.ZodNumber;
@@ -18105,6 +18111,10 @@ declare const clankerTokenV4: z.ZodObject<{
18105
18111
  token: z.ZodLiteral<"Both" | "Paired" | "Clanker">;
18106
18112
  }, z.core.$strip>>;
18107
18113
  }, z.core.$strip>>;
18114
+ /** Presale configuration for the token. Must be deployed via the presale contract. */
18115
+ presale: z.ZodOptional<z.ZodObject<{
18116
+ bps: z.ZodNumber;
18117
+ }, z.core.$strip>>;
18108
18118
  /** Whether or not to enable the "0xb07" address suffix. */
18109
18119
  vanity: z.ZodDefault<z.ZodBoolean>;
18110
18120
  }, z.core.$strict>;
@@ -18121,4 +18131,4 @@ declare function encodeFeeConfig(tokenConfig: z.infer<typeof clankerTokenV4>, cl
18121
18131
  poolData: `0x${string}`;
18122
18132
  };
18123
18133
 
18124
- export { type Chain as C, type RelatedV3_1 as R, type Type as T, type ClankerTokenV4 as a, type ClankerDeployment as b, type RelatedV4 as c, CLANKERS as d, encodeFeeConfig as e, type Clankers as f, Chains as g, ClankerDeployments as h, clankerConfigFor as i };
18134
+ export { type ClankerTokenV4 as C, type RelatedV3_1 as R, type Type as T, type Chain as a, type ClankerDeployment as b, type RelatedV4 as c, CLANKERS as d, encodeFeeConfig as e, type Clankers as f, Chains as g, ClankerDeployments as h, clankerConfigFor as i };
package/dist/cli/cli.js CHANGED
@@ -9,12 +9,12 @@ var __export = (target, all) => {
9
9
  __defProp(target, name, { get: all[name], enumerable: true });
10
10
  };
11
11
 
12
- // node_modules/tsup/assets/esm_shims.js
12
+ // node_modules/.pnpm/tsup@8.4.0_typescript@5.8.3/node_modules/tsup/assets/esm_shims.js
13
13
  import { fileURLToPath } from "url";
14
14
  import path from "path";
15
15
  var getFilename, getDirname, __dirname;
16
16
  var init_esm_shims = __esm({
17
- "node_modules/tsup/assets/esm_shims.js"() {
17
+ "node_modules/.pnpm/tsup@8.4.0_typescript@5.8.3/node_modules/tsup/assets/esm_shims.js"() {
18
18
  "use strict";
19
19
  getFilename = () => fileURLToPath(import.meta.url);
20
20
  getDirname = () => path.dirname(getFilename());
@@ -6151,7 +6151,9 @@ var init_clankers = __esm({
6151
6151
  feeStaticHook: "0xDd5EeaFf7BD481AD55Db083062b13a3cdf0A68CC",
6152
6152
  feeStaticHookV2: "0xb429d62f8f3bFFb98CdB9569533eA23bF0Ba28CC",
6153
6153
  feeDynamicHook: "0x34a45c6B61876d739400Bd71228CbcbD4F53E8cC",
6154
- feeDynamicHookV2: "0xd60D6B218116cFd801E28F78d011a203D2b068Cc"
6154
+ feeDynamicHookV2: "0xd60D6B218116cFd801E28F78d011a203D2b068Cc",
6155
+ presale: "0xeeBbC567C3D612f50a67820f39CDD30dcCF7E6b8",
6156
+ presaleAllowlist: "0x789c2452353eee400868E7d3e5aDD6Be0Ef4185D"
6155
6157
  }
6156
6158
  },
6157
6159
  clanker_v4_sepolia: {
@@ -6216,7 +6218,9 @@ var init_clankers = __esm({
6216
6218
  feeStaticHook: "0x6C24D0bCC264EF6A740754A11cA579b9d225e8Cc",
6217
6219
  feeStaticHookV2: "0x6C24D0bCC264EF6A740754A11cA579b9d225e8Cc",
6218
6220
  feeDynamicHook: "0x0000000000000000000000000000000000000000",
6219
- feeDynamicHookV2: "0x0000000000000000000000000000000000000000"
6221
+ feeDynamicHookV2: "0x0000000000000000000000000000000000000000",
6222
+ presale: "0xf7db81910444ab0f07bA264d7636d219A8c7769D",
6223
+ presaleAllowlist: "0xF6C7Ff92F71e2eDd19c421E4962949Df4cD6b6F3"
6220
6224
  }
6221
6225
  },
6222
6226
  clanker_v4_unichain: {
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- // node_modules/tsup/assets/esm_shims.js
3
+ // node_modules/.pnpm/tsup@8.4.0_typescript@5.8.3/node_modules/tsup/assets/esm_shims.js
4
4
  import { fileURLToPath } from "url";
5
5
  import path from "path";
6
6
  var getFilename = () => fileURLToPath(import.meta.url);
@@ -6050,7 +6050,9 @@ var CLANKERS = {
6050
6050
  feeStaticHook: "0xDd5EeaFf7BD481AD55Db083062b13a3cdf0A68CC",
6051
6051
  feeStaticHookV2: "0xb429d62f8f3bFFb98CdB9569533eA23bF0Ba28CC",
6052
6052
  feeDynamicHook: "0x34a45c6B61876d739400Bd71228CbcbD4F53E8cC",
6053
- feeDynamicHookV2: "0xd60D6B218116cFd801E28F78d011a203D2b068Cc"
6053
+ feeDynamicHookV2: "0xd60D6B218116cFd801E28F78d011a203D2b068Cc",
6054
+ presale: "0xeeBbC567C3D612f50a67820f39CDD30dcCF7E6b8",
6055
+ presaleAllowlist: "0x789c2452353eee400868E7d3e5aDD6Be0Ef4185D"
6054
6056
  }
6055
6057
  },
6056
6058
  clanker_v4_sepolia: {
@@ -6115,7 +6117,9 @@ var CLANKERS = {
6115
6117
  feeStaticHook: "0x6C24D0bCC264EF6A740754A11cA579b9d225e8Cc",
6116
6118
  feeStaticHookV2: "0x6C24D0bCC264EF6A740754A11cA579b9d225e8Cc",
6117
6119
  feeDynamicHook: "0x0000000000000000000000000000000000000000",
6118
- feeDynamicHookV2: "0x0000000000000000000000000000000000000000"
6120
+ feeDynamicHookV2: "0x0000000000000000000000000000000000000000",
6121
+ presale: "0xf7db81910444ab0f07bA264d7636d219A8c7769D",
6122
+ presaleAllowlist: "0xF6C7Ff92F71e2eDd19c421E4962949Df4cD6b6F3"
6119
6123
  }
6120
6124
  },
6121
6125
  clanker_v4_unichain: {
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { C as ClankerTokenV3 } from './clankerTokenV3-BqHTF9QY.js';
2
- import { C as Chain, a as ClankerTokenV4, b as ClankerDeployment } from './clankerTokenV4-ANE_FqFi.js';
3
- export { d as CLANKERS, g as Chains, h as ClankerDeployments, f as Clankers, R as RelatedV3_1, c as RelatedV4, T as Type, i as clankerConfigFor } from './clankerTokenV4-ANE_FqFi.js';
2
+ import { a as Chain, C as ClankerTokenV4, b as ClankerDeployment } from './clankerTokenV4-CYKWWpwe.js';
3
+ export { d as CLANKERS, g as Chains, h as ClankerDeployments, f as Clankers, R as RelatedV3_1, c as RelatedV4, T as Type, i as clankerConfigFor } from './clankerTokenV4-CYKWWpwe.js';
4
4
  import { ContractConstructorArgs } from 'viem';
5
5
  import { C as ClankerToken_v3_1_abi, a as ClankerToken_v4_abi } from './ClankerToken-Dra5lppJ.js';
6
6
  import { StandardMerkleTree } from '@openzeppelin/merkle-tree';
package/dist/index.js CHANGED
@@ -5561,7 +5561,9 @@ var CLANKERS = {
5561
5561
  feeStaticHook: "0xDd5EeaFf7BD481AD55Db083062b13a3cdf0A68CC",
5562
5562
  feeStaticHookV2: "0xb429d62f8f3bFFb98CdB9569533eA23bF0Ba28CC",
5563
5563
  feeDynamicHook: "0x34a45c6B61876d739400Bd71228CbcbD4F53E8cC",
5564
- feeDynamicHookV2: "0xd60D6B218116cFd801E28F78d011a203D2b068Cc"
5564
+ feeDynamicHookV2: "0xd60D6B218116cFd801E28F78d011a203D2b068Cc",
5565
+ presale: "0xeeBbC567C3D612f50a67820f39CDD30dcCF7E6b8",
5566
+ presaleAllowlist: "0x789c2452353eee400868E7d3e5aDD6Be0Ef4185D"
5565
5567
  }
5566
5568
  },
5567
5569
  clanker_v4_sepolia: {
@@ -5626,7 +5628,9 @@ var CLANKERS = {
5626
5628
  feeStaticHook: "0x6C24D0bCC264EF6A740754A11cA579b9d225e8Cc",
5627
5629
  feeStaticHookV2: "0x6C24D0bCC264EF6A740754A11cA579b9d225e8Cc",
5628
5630
  feeDynamicHook: "0x0000000000000000000000000000000000000000",
5629
- feeDynamicHookV2: "0x0000000000000000000000000000000000000000"
5631
+ feeDynamicHookV2: "0x0000000000000000000000000000000000000000",
5632
+ presale: "0xf7db81910444ab0f07bA264d7636d219A8c7769D",
5633
+ presaleAllowlist: "0xF6C7Ff92F71e2eDd19c421E4962949Df4cD6b6F3"
5630
5634
  }
5631
5635
  },
5632
5636
  clanker_v4_unichain: {
@@ -1,4 +1,4 @@
1
- import { C as ClankerTransactionConfig, a as Clanker_v3_1_abi, b as ClankerError, c as ClankerFactory, d as ClankerResult } from '../write-clanker-contracts-B573YCMc.js';
1
+ import { C as ClankerTransactionConfig, a as Clanker_v3_1_abi, b as ClankerError, c as ClankerFactory, d as ClankerResult } from '../write-clanker-contracts-DVM3LXMa.js';
2
2
  import * as viem from 'viem';
3
3
  import { WalletClient, Transport, Chain, Account, PublicClient } from 'viem';
4
4
  import { C as ClankerToken_v3_1_abi } from '../ClankerToken-Dra5lppJ.js';
package/dist/v3/index.js CHANGED
@@ -6032,7 +6032,9 @@ var CLANKERS = {
6032
6032
  feeStaticHook: "0xDd5EeaFf7BD481AD55Db083062b13a3cdf0A68CC",
6033
6033
  feeStaticHookV2: "0xb429d62f8f3bFFb98CdB9569533eA23bF0Ba28CC",
6034
6034
  feeDynamicHook: "0x34a45c6B61876d739400Bd71228CbcbD4F53E8cC",
6035
- feeDynamicHookV2: "0xd60D6B218116cFd801E28F78d011a203D2b068Cc"
6035
+ feeDynamicHookV2: "0xd60D6B218116cFd801E28F78d011a203D2b068Cc",
6036
+ presale: "0xeeBbC567C3D612f50a67820f39CDD30dcCF7E6b8",
6037
+ presaleAllowlist: "0x789c2452353eee400868E7d3e5aDD6Be0Ef4185D"
6036
6038
  }
6037
6039
  },
6038
6040
  clanker_v4_sepolia: {
@@ -6097,7 +6099,9 @@ var CLANKERS = {
6097
6099
  feeStaticHook: "0x6C24D0bCC264EF6A740754A11cA579b9d225e8Cc",
6098
6100
  feeStaticHookV2: "0x6C24D0bCC264EF6A740754A11cA579b9d225e8Cc",
6099
6101
  feeDynamicHook: "0x0000000000000000000000000000000000000000",
6100
- feeDynamicHookV2: "0x0000000000000000000000000000000000000000"
6102
+ feeDynamicHookV2: "0x0000000000000000000000000000000000000000",
6103
+ presale: "0xf7db81910444ab0f07bA264d7636d219A8c7769D",
6104
+ presaleAllowlist: "0xF6C7Ff92F71e2eDd19c421E4962949Df4cD6b6F3"
6101
6105
  }
6102
6106
  },
6103
6107
  clanker_v4_unichain: {
@@ -1,7 +1,7 @@
1
- import { C as ClankerTransactionConfig, e as ClankerAirdrop_v4_abi, d as ClankerResult } from '../../write-clanker-contracts-B573YCMc.js';
1
+ import { C as ClankerTransactionConfig, g as ClankerAirdrop_v4_abi, d as ClankerResult, h as Clanker_PresaleEthToCreator_v4_1_abi, b as ClankerError } from '../../write-clanker-contracts-DVM3LXMa.js';
2
2
  import { MerkleTree } from '@openzeppelin/merkle-tree/dist/merkletree.js';
3
3
  import * as z from 'zod/v4';
4
- import { C as Chain } from '../../clankerTokenV4-ANE_FqFi.js';
4
+ import { a as Chain, C as ClankerTokenV4 } from '../../clankerTokenV4-CYKWWpwe.js';
5
5
  import { Clanker } from '../index.js';
6
6
  import 'viem';
7
7
  import '../../ClankerToken-Dra5lppJ.js';
@@ -107,4 +107,387 @@ declare function claimAirdrop(data: {
107
107
  txHash: `0x${string}`;
108
108
  }>;
109
109
 
110
- export { type AirdropRecipient, claimAirdrop, createAirdrop, fetchAirdropProofs, getAirdropProofs, getClaimAirdropTransaction, registerAirdrop };
110
+ declare enum PresaleStatus {
111
+ NotCreated = 0,
112
+ Active = 1,
113
+ SuccessfulMinimumHit = 2,
114
+ SuccessfulMaximumHit = 3,
115
+ Failed = 4,
116
+ Claimable = 5
117
+ }
118
+ declare const PresaleConfigSchema: z.ZodObject<{
119
+ minEthGoal: z.ZodNumber;
120
+ maxEthGoal: z.ZodNumber;
121
+ presaleDuration: z.ZodNumber;
122
+ recipient: z.ZodCustom<`0x${string}`, `0x${string}`>;
123
+ lockupDuration: z.ZodDefault<z.ZodNumber>;
124
+ vestingDuration: z.ZodDefault<z.ZodNumber>;
125
+ allowlist: z.ZodDefault<z.ZodCustom<`0x${string}`, `0x${string}`>>;
126
+ allowlistInitializationData: z.ZodDefault<z.ZodCustom<`0x${string}`, `0x${string}`>>;
127
+ presaleSupplyBps: z.ZodDefault<z.ZodNumber>;
128
+ }, z.core.$strip>;
129
+ type PresaleConfig = z.input<typeof PresaleConfigSchema>;
130
+ /**
131
+ * Get a transaction to start a presale
132
+ *
133
+ * @param deploymentConfig The deployment configuration for the token
134
+ * @param presaleConfig The presale configuration
135
+ * @param chainId The chain ID
136
+ * @returns Transaction configuration for starting a presale
137
+ */
138
+ declare function getStartPresaleTransaction({ tokenConfig, presaleConfig, }: {
139
+ tokenConfig: ClankerTokenV4;
140
+ presaleConfig: PresaleConfig;
141
+ }): Promise<ClankerTransactionConfig<typeof Clanker_PresaleEthToCreator_v4_1_abi, 'startPresale'>>;
142
+ /**
143
+ * Start a presale
144
+ *
145
+ * @param clanker Clanker object used for starting presale
146
+ * @param deploymentConfig The deployment configuration for the token
147
+ * @param presaleConfig The presale configuration
148
+ * @returns Outcome of the transaction
149
+ */
150
+ declare function startPresale(data: {
151
+ clanker: Clanker;
152
+ tokenConfig: ClankerTokenV4;
153
+ presaleConfig: PresaleConfig;
154
+ }): Promise<({
155
+ txHash: `0x${string}`;
156
+ } & {
157
+ error?: undefined;
158
+ }) | ({
159
+ txHash?: undefined;
160
+ } & {
161
+ error: ClankerError;
162
+ })>;
163
+ /**
164
+ * Get a transaction to buy into a presale
165
+ *
166
+ * @param presaleId The ID of the presale
167
+ * @param chainId The chain ID
168
+ * @param value The ETH amount to send (in wei)
169
+ * @returns Transaction configuration for buying into a presale
170
+ */
171
+ declare function getBuyIntoPresaleTransaction({ presaleId, chainId, value, }: {
172
+ presaleId: bigint;
173
+ chainId: Chain;
174
+ value: bigint;
175
+ }): ClankerTransactionConfig<typeof Clanker_PresaleEthToCreator_v4_1_abi, 'buyIntoPresale'>;
176
+ /**
177
+ * Buy into a presale
178
+ *
179
+ * @param clanker Clanker object used for buying into presale
180
+ * @param presaleId The ID of the presale
181
+ * @param ethAmount The ETH amount to send (in ETH, will be converted to wei)
182
+ * @returns Outcome of the transaction
183
+ */
184
+ declare function buyIntoPresale(data: {
185
+ clanker: Clanker;
186
+ presaleId: bigint;
187
+ ethAmount: number;
188
+ }): ClankerResult<{
189
+ txHash: `0x${string}`;
190
+ }>;
191
+ /**
192
+ * Get a transaction to end a presale
193
+ *
194
+ * A presale can be ended in three scenarios:
195
+ * 1. Maximum ETH goal is reached (anyone can call)
196
+ * 2. Minimum ETH goal is reached AND duration has expired (anyone can call)
197
+ * 3. Minimum ETH goal is reached AND presale owner wants to end early (only presale owner can call)
198
+ *
199
+ * @param presaleId The ID of the presale
200
+ * @param salt The salt for token deployment
201
+ * @param chainId The chain ID
202
+ * @returns Transaction configuration for ending a presale
203
+ */
204
+ declare function getEndPresaleTransaction({ presaleId, salt, chainId, }: {
205
+ presaleId: bigint;
206
+ salt: `0x${string}`;
207
+ chainId: Chain;
208
+ }): ClankerTransactionConfig<typeof Clanker_PresaleEthToCreator_v4_1_abi, 'endPresale'>;
209
+ /**
210
+ * End a presale and deploy the token
211
+ *
212
+ * A presale can be ended in three scenarios:
213
+ * 1. Maximum ETH goal is reached (anyone can call)
214
+ * 2. Minimum ETH goal is reached AND duration has expired (anyone can call)
215
+ * 3. Minimum ETH goal is reached AND presale owner wants to end early (only presale owner can call)
216
+ *
217
+ * If the presale is successful (minimum goal reached), this will:
218
+ * - Deploy the token
219
+ * - Send raised ETH to the recipient (minus Clanker fee)
220
+ * - Allow users to claim tokens after lockup period
221
+ *
222
+ * @param clanker Clanker object used for ending presale
223
+ * @param presaleId The ID of the presale
224
+ * @param salt The salt for token deployment
225
+ * @returns Outcome of the transaction
226
+ */
227
+ declare function endPresale(data: {
228
+ clanker: Clanker;
229
+ presaleId: bigint;
230
+ salt: `0x${string}`;
231
+ }): ClankerResult<{
232
+ txHash: `0x${string}`;
233
+ }>;
234
+ /**
235
+ * Get a transaction to claim tokens from a presale
236
+ *
237
+ * @param presaleId The ID of the presale
238
+ * @param chainId The chain ID
239
+ * @returns Transaction configuration for claiming tokens
240
+ */
241
+ declare function getClaimTokensTransaction({ presaleId, chainId, }: {
242
+ presaleId: bigint;
243
+ chainId: Chain;
244
+ }): ClankerTransactionConfig<typeof Clanker_PresaleEthToCreator_v4_1_abi, 'claimTokens'>;
245
+ /**
246
+ * Claim tokens from a presale
247
+ *
248
+ * @param clanker Clanker object used for claiming tokens
249
+ * @param presaleId The ID of the presale
250
+ * @returns Outcome of the transaction
251
+ */
252
+ declare function claimTokens(data: {
253
+ clanker: Clanker;
254
+ presaleId: bigint;
255
+ }): ClankerResult<{
256
+ txHash: `0x${string}`;
257
+ }>;
258
+ /**
259
+ * Get a transaction to claim ETH from a successful presale (for presale owners)
260
+ *
261
+ * This function allows the presale owner to claim the raised ETH after the presale
262
+ * has been completed and the token has been deployed. Only callable by the presale
263
+ * owner or contract owner. A Clanker fee is deducted and the remaining ETH is sent
264
+ * to the recipient.
265
+ *
266
+ * @param presaleId The ID of the presale
267
+ * @param recipient The recipient address for the ETH (must be presale owner if called by contract owner)
268
+ * @param chainId The chain ID
269
+ * @returns Transaction configuration for claiming ETH
270
+ */
271
+ declare function getClaimEthTransaction({ presaleId, recipient, chainId, }: {
272
+ presaleId: bigint;
273
+ recipient: `0x${string}`;
274
+ chainId: Chain;
275
+ }): ClankerTransactionConfig<typeof Clanker_PresaleEthToCreator_v4_1_abi, 'claimEth'>;
276
+ /**
277
+ * Claim ETH from a successful presale
278
+ *
279
+ * This function allows the presale owner to claim the raised ETH after the presale
280
+ * has been completed and the token has been deployed. Only callable by the presale
281
+ * owner or contract owner. A Clanker fee is deducted and the remaining ETH is sent
282
+ * to the recipient. Can only be called once per presale.
283
+ *
284
+ * Note: For withdrawing from failed or active presales, use `withdrawFromPresale` instead.
285
+ *
286
+ * @param clanker Clanker object used for claiming ETH
287
+ * @param presaleId The ID of the presale
288
+ * @param recipient The recipient address for the ETH (must be presale owner if called by contract owner)
289
+ * @returns Outcome of the transaction
290
+ */
291
+ declare function claimEth(data: {
292
+ clanker: Clanker;
293
+ presaleId: bigint;
294
+ recipient: `0x${string}`;
295
+ }): ClankerResult<{
296
+ txHash: `0x${string}`;
297
+ }>;
298
+ /**
299
+ * Get presale information
300
+ *
301
+ * @param clanker Clanker object used for reading presale data
302
+ * @param presaleId The ID of the presale
303
+ * @returns Presale data
304
+ */
305
+ declare function getPresale(data: {
306
+ clanker: Clanker;
307
+ presaleId: bigint;
308
+ }): Promise<{
309
+ status: number;
310
+ deploymentConfig: {
311
+ tokenConfig: {
312
+ tokenAdmin: `0x${string}`;
313
+ name: string;
314
+ symbol: string;
315
+ salt: `0x${string}`;
316
+ image: string;
317
+ metadata: string;
318
+ context: string;
319
+ originatingChainId: bigint;
320
+ };
321
+ poolConfig: {
322
+ hook: `0x${string}`;
323
+ pairedToken: `0x${string}`;
324
+ tickIfToken0IsClanker: number;
325
+ tickSpacing: number;
326
+ poolData: `0x${string}`;
327
+ };
328
+ lockerConfig: {
329
+ locker: `0x${string}`;
330
+ rewardAdmins: readonly `0x${string}`[];
331
+ rewardRecipients: readonly `0x${string}`[];
332
+ rewardBps: readonly number[];
333
+ tickLower: readonly number[];
334
+ tickUpper: readonly number[];
335
+ positionBps: readonly number[];
336
+ lockerData: `0x${string}`;
337
+ };
338
+ mevModuleConfig: {
339
+ mevModule: `0x${string}`;
340
+ mevModuleData: `0x${string}`;
341
+ };
342
+ extensionConfigs: readonly {
343
+ extension: `0x${string}`;
344
+ msgValue: bigint;
345
+ extensionBps: number;
346
+ extensionData: `0x${string}`;
347
+ }[];
348
+ };
349
+ allowlist: `0x${string}`;
350
+ presaleOwner: `0x${string}`;
351
+ minEthGoal: bigint;
352
+ maxEthGoal: bigint;
353
+ endTime: bigint;
354
+ deployedToken: `0x${string}`;
355
+ ethRaised: bigint;
356
+ tokenSupply: bigint;
357
+ deploymentExpected: boolean;
358
+ ethClaimed: boolean;
359
+ lockupDuration: bigint;
360
+ vestingDuration: bigint;
361
+ lockupEndTime: bigint;
362
+ vestingEndTime: bigint;
363
+ clankerFee: bigint;
364
+ }>;
365
+ /**
366
+ * Get presale state (same as getPresale but different function name in contract)
367
+ *
368
+ * @param clanker Clanker object used for reading presale state
369
+ * @param presaleId The ID of the presale
370
+ * @returns Presale data
371
+ */
372
+ declare function getPresaleState(data: {
373
+ clanker: Clanker;
374
+ presaleId: bigint;
375
+ }): Promise<readonly [number, {
376
+ tokenConfig: {
377
+ tokenAdmin: `0x${string}`;
378
+ name: string;
379
+ symbol: string;
380
+ salt: `0x${string}`;
381
+ image: string;
382
+ metadata: string;
383
+ context: string;
384
+ originatingChainId: bigint;
385
+ };
386
+ poolConfig: {
387
+ hook: `0x${string}`;
388
+ pairedToken: `0x${string}`;
389
+ tickIfToken0IsClanker: number;
390
+ tickSpacing: number;
391
+ poolData: `0x${string}`;
392
+ };
393
+ lockerConfig: {
394
+ locker: `0x${string}`;
395
+ rewardAdmins: readonly `0x${string}`[];
396
+ rewardRecipients: readonly `0x${string}`[];
397
+ rewardBps: readonly number[];
398
+ tickLower: readonly number[];
399
+ tickUpper: readonly number[];
400
+ positionBps: readonly number[];
401
+ lockerData: `0x${string}`;
402
+ };
403
+ mevModuleConfig: {
404
+ mevModule: `0x${string}`;
405
+ mevModuleData: `0x${string}`;
406
+ };
407
+ extensionConfigs: readonly {
408
+ extension: `0x${string}`;
409
+ msgValue: bigint;
410
+ extensionBps: number;
411
+ extensionData: `0x${string}`;
412
+ }[];
413
+ }, `0x${string}`, `0x${string}`, bigint, bigint, bigint, `0x${string}`, bigint, bigint, boolean, boolean, bigint, bigint, bigint, bigint, bigint]>;
414
+ /**
415
+ * Get the amount of ETH a user has contributed to a presale
416
+ *
417
+ * @param clanker Clanker object used for reading presale data
418
+ * @param presaleId The ID of the presale
419
+ * @param user The user address
420
+ * @returns Amount of ETH contributed
421
+ */
422
+ declare function getPresaleBuys(data: {
423
+ clanker: Clanker;
424
+ presaleId: bigint;
425
+ user: `0x${string}`;
426
+ }): Promise<bigint>;
427
+ /**
428
+ * Get the amount of tokens a user has claimed from a presale
429
+ *
430
+ * @param clanker Clanker object used for reading presale data
431
+ * @param presaleId The ID of the presale
432
+ * @param user The user address
433
+ * @returns Amount of tokens claimed
434
+ */
435
+ declare function getPresaleClaimed(data: {
436
+ clanker: Clanker;
437
+ presaleId: bigint;
438
+ user: `0x${string}`;
439
+ }): Promise<bigint>;
440
+ /**
441
+ * Get the amount available for a user to claim from a presale
442
+ *
443
+ * @param clanker Clanker object used for reading presale data
444
+ * @param presaleId The ID of the presale
445
+ * @param user The user address
446
+ * @returns Amount available to claim
447
+ */
448
+ declare function getAmountAvailableToClaim(data: {
449
+ clanker: Clanker;
450
+ presaleId: bigint;
451
+ user: `0x${string}`;
452
+ }): Promise<bigint>;
453
+ /**
454
+ * Get a transaction to withdraw from a presale
455
+ *
456
+ * @param presaleId The ID of the presale
457
+ * @param amount The amount of ETH to withdraw (in wei)
458
+ * @param recipient The recipient address for the withdrawn ETH
459
+ * @param chainId The chain ID
460
+ * @returns Transaction configuration for withdrawing from a presale
461
+ */
462
+ declare function getWithdrawFromPresaleTransaction({ presaleId, amount, recipient, chainId, }: {
463
+ presaleId: bigint;
464
+ amount: bigint;
465
+ recipient: `0x${string}`;
466
+ chainId: Chain;
467
+ }): ClankerTransactionConfig<typeof Clanker_PresaleEthToCreator_v4_1_abi, 'withdrawFromPresale'>;
468
+ /**
469
+ * Withdraw ETH from an active presale
470
+ *
471
+ * @param clanker Clanker object used for withdrawing from presale
472
+ * @param presaleId The ID of the presale
473
+ * @param ethAmount The ETH amount to withdraw (in ETH, will be converted to wei)
474
+ * @param recipient The recipient address for the withdrawn ETH
475
+ * @returns Outcome of the transaction
476
+ */
477
+ declare function withdrawFromPresale(data: {
478
+ clanker: Clanker;
479
+ presaleId: bigint;
480
+ ethAmount: number;
481
+ recipient: `0x${string}`;
482
+ }): ClankerResult<{
483
+ txHash: `0x${string}`;
484
+ }>;
485
+ /**
486
+ * Get the allowlist contract address for a specific chain
487
+ *
488
+ * @param chainId The chain ID to get the allowlist address for
489
+ * @returns The allowlist contract address, or undefined if not available
490
+ */
491
+ declare function getAllowlistAddress(chainId: Chain): `0x${string}` | undefined;
492
+
493
+ export { type AirdropRecipient, type PresaleConfig, PresaleStatus, buyIntoPresale, claimAirdrop, claimEth, claimTokens, createAirdrop, endPresale, fetchAirdropProofs, getAirdropProofs, getAllowlistAddress, getAmountAvailableToClaim, getBuyIntoPresaleTransaction, getClaimAirdropTransaction, getClaimEthTransaction, getClaimTokensTransaction, getEndPresaleTransaction, getPresale, getPresaleBuys, getPresaleClaimed, getPresaleState, getStartPresaleTransaction, getWithdrawFromPresaleTransaction, registerAirdrop, startPresale, withdrawFromPresale };