clanker-sdk 4.2.5 → 4.2.6

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.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { C as ClankerTokenV3 } from './clankerTokenV3-BqHTF9QY.js';
2
2
  import { a as Chain, C as ClankerTokenV4, b as ClankerDeployment } from './clankerTokenV4-xiAq6G4R.js';
3
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-xiAq6G4R.js';
4
- import { ContractConstructorArgs, Hex } from 'viem';
4
+ import { ContractConstructorArgs, Hex, PublicClient } 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';
7
7
  import 'zod/v4';
@@ -95,4 +95,135 @@ declare function createMerkleTree(entries: AirdropEntry[]): {
95
95
  declare function getMerkleProof(tree: StandardMerkleTree<[string, string]>, entries: [string, string][], account: `0x${string}`, amount: number): `0x${string}`[];
96
96
  declare function encodeAirdropData(merkleRoot: `0x${string}`, lockupDuration: number, vestingDuration: number): `0x${string}`;
97
97
 
98
- export { A0X_ADDRESS, ANON_ADDRESS, type AirdropEntry, CB_BTC_ADDRESS, CLANKER_ADDRESS, Chain, ClankerDeployment, ClankerTokenV4, DEFAULT_SUPPLY, DEGEN_ADDRESS, FEE_CONFIGS, FeeConfigs, HIGHER_ADDRESS, NATIVE_ADDRESS, POOL_POSITIONS, PoolPositions, WETH_ADDRESSES, createMerkleTree, encodeAirdropData, findVanityAddress, findVanityAddressV4, getMerkleProof, getTickFromMarketCap, getTickFromMarketCapUSDC, predictTokenAddressV4 };
98
+ /**
99
+ * Represents an allowlist entry with an address and allowed ETH amount
100
+ */
101
+ interface AllowlistEntry {
102
+ /** The wallet address that is allowed to participate */
103
+ address: `0x${string}`;
104
+ /** The maximum amount of ETH this address is allowed to contribute (in ETH, not wei) */
105
+ allowedAmount: number;
106
+ }
107
+ /**
108
+ * Allowlist proof structure for contract calls
109
+ */
110
+ interface AllowlistProof {
111
+ /** The maximum amount of ETH the buyer is allowed to contribute */
112
+ allowedAmount: bigint;
113
+ /** Merkle proof bytes32 array */
114
+ proof: `0x${string}`[];
115
+ }
116
+ /**
117
+ * Create a Merkle tree from allowlist entries
118
+ *
119
+ * @param entries Array of allowlist entries with addresses and allowed amounts
120
+ * @returns Object containing the Merkle tree, root, and formatted entries
121
+ *
122
+ * @example
123
+ * ```typescript
124
+ * const entries = [
125
+ * { address: '0x123...', allowedAmount: 1.0 }, // 1 ETH max
126
+ * { address: '0x456...', allowedAmount: 0.5 }, // 0.5 ETH max
127
+ * ];
128
+ * const { root, tree } = createAllowlistMerkleTree(entries);
129
+ * ```
130
+ */
131
+ declare function createAllowlistMerkleTree(entries: AllowlistEntry[]): {
132
+ tree: StandardMerkleTree<[string, string]>;
133
+ root: `0x${string}`;
134
+ entries: [string, string][];
135
+ };
136
+ /**
137
+ * Get a Merkle proof for a specific address in the allowlist
138
+ *
139
+ * @param tree The Merkle tree created from allowlist entries
140
+ * @param entries The formatted entries array from createAllowlistMerkleTree
141
+ * @param address The address to get a proof for
142
+ * @param allowedAmount The allowed amount for this address (in ETH)
143
+ * @returns Array of proof hashes
144
+ *
145
+ * @example
146
+ * ```typescript
147
+ * const { tree, entries } = createAllowlistMerkleTree(allowlistEntries);
148
+ * const proof = getAllowlistMerkleProof(tree, entries, '0x123...', 1.0);
149
+ * ```
150
+ */
151
+ declare function getAllowlistMerkleProof(tree: StandardMerkleTree<[string, string]>, entries: [string, string][], address: `0x${string}`, allowedAmount: number): `0x${string}`[];
152
+ /**
153
+ * Encode allowlist initialization data for starting a presale with a merkle root
154
+ *
155
+ * @param merkleRoot The merkle root for the allowlist
156
+ * @returns Encoded bytes for the allowlistInitializationData parameter
157
+ *
158
+ * @example
159
+ * ```typescript
160
+ * const { root } = createAllowlistMerkleTree(entries);
161
+ * const initData = encodeAllowlistInitializationData(root);
162
+ * // Use initData in presaleConfig.allowlistInitializationData
163
+ * ```
164
+ */
165
+ declare function encodeAllowlistInitializationData(merkleRoot: `0x${string}`): `0x${string}`;
166
+ /**
167
+ * Encode allowlist proof data for buying into a presale with proof
168
+ *
169
+ * @param allowedAmount The maximum allowed ETH amount for the buyer (in ETH)
170
+ * @param proof The merkle proof array
171
+ * @returns Encoded bytes for the proof parameter
172
+ *
173
+ * @example
174
+ * ```typescript
175
+ * const proof = getAllowlistMerkleProof(tree, entries, buyerAddress, 1.0);
176
+ * const proofData = encodeAllowlistProofData(1.0, proof);
177
+ * // Use proofData when calling buyIntoPresaleWithProof
178
+ * ```
179
+ */
180
+ declare function encodeAllowlistProofData(allowedAmount: number, proof: `0x${string}`[]): `0x${string}`;
181
+ /**
182
+ * Get the allowlist contract address for a specific chain
183
+ *
184
+ * @param chainId The chain ID
185
+ * @returns The allowlist contract address, or undefined if not available on this chain
186
+ */
187
+ declare function getAllowlistAddress(chainId: Chain): `0x${string}` | undefined;
188
+ /**
189
+ * Get allowlist information for a presale
190
+ *
191
+ * @param publicClient The viem public client
192
+ * @param presaleId The presale ID
193
+ * @param chainId The chain ID
194
+ * @returns Allowlist data including presale owner, merkle root, and enabled status
195
+ */
196
+ declare function getAllowlistInfo(publicClient: PublicClient, presaleId: bigint, chainId: Chain): Promise<{
197
+ presaleOwner: `0x${string}`;
198
+ merkleRoot: `0x${string}`;
199
+ enabled: boolean;
200
+ }>;
201
+ /**
202
+ * Get the allowed amount for a specific buyer in a presale
203
+ *
204
+ * @param publicClient The viem public client
205
+ * @param presaleId The presale ID
206
+ * @param buyer The buyer's address
207
+ * @param proof The encoded proof data (use encodeAllowlistProofData or pass '0x' for no proof)
208
+ * @param chainId The chain ID
209
+ * @returns The allowed amount in wei (returns max uint256 if allowlist is disabled)
210
+ */
211
+ declare function getAllowedAmountForBuyer(publicClient: PublicClient, presaleId: bigint, buyer: `0x${string}`, proof: `0x${string}`, chainId: Chain): Promise<bigint>;
212
+ /**
213
+ * Helper to verify if a buyer is allowed to purchase a specific amount
214
+ *
215
+ * @param publicClient The viem public client
216
+ * @param presaleId The presale ID
217
+ * @param buyer The buyer's address
218
+ * @param desiredAmount The amount the buyer wants to purchase (in ETH)
219
+ * @param proof The encoded proof data
220
+ * @param chainId The chain ID
221
+ * @returns Object with isAllowed boolean and allowedAmount in ETH
222
+ */
223
+ declare function verifyBuyerAllowance(publicClient: PublicClient, presaleId: bigint, buyer: `0x${string}`, desiredAmount: number, proof: `0x${string}`, chainId: Chain): Promise<{
224
+ isAllowed: boolean;
225
+ allowedAmountEth: number;
226
+ allowedAmountWei: bigint;
227
+ }>;
228
+
229
+ export { A0X_ADDRESS, ANON_ADDRESS, type AirdropEntry, type AllowlistEntry, type AllowlistProof, CB_BTC_ADDRESS, CLANKER_ADDRESS, Chain, ClankerDeployment, ClankerTokenV4, DEFAULT_SUPPLY, DEGEN_ADDRESS, FEE_CONFIGS, FeeConfigs, HIGHER_ADDRESS, NATIVE_ADDRESS, POOL_POSITIONS, PoolPositions, WETH_ADDRESSES, createAllowlistMerkleTree, createMerkleTree, encodeAirdropData, encodeAllowlistInitializationData, encodeAllowlistProofData, findVanityAddress, findVanityAddressV4, getAllowedAmountForBuyer, getAllowlistAddress, getAllowlistInfo, getAllowlistMerkleProof, getMerkleProof, getTickFromMarketCap, getTickFromMarketCapUSDC, predictTokenAddressV4, verifyBuyerAllowance };
package/dist/index.js CHANGED
@@ -5840,6 +5840,225 @@ function encodeAirdropData(merkleRoot, lockupDuration, vestingDuration) {
5840
5840
  [merkleRoot, BigInt(lockupDuration), BigInt(vestingDuration)]
5841
5841
  );
5842
5842
  }
5843
+
5844
+ // src/utils/presale-allowlist.ts
5845
+ import { StandardMerkleTree as StandardMerkleTree2 } from "@openzeppelin/merkle-tree";
5846
+ import { encodeAbiParameters as encodeAbiParameters3 } from "viem";
5847
+
5848
+ // src/abi/v4.1/ClankerPresaleAllowlist.ts
5849
+ var Clanker_PresaleAllowlist_v4_1_abi = [
5850
+ {
5851
+ type: "constructor",
5852
+ inputs: [{ name: "presale_", type: "address", internalType: "address" }],
5853
+ stateMutability: "nonpayable"
5854
+ },
5855
+ {
5856
+ type: "function",
5857
+ name: "allowlists",
5858
+ inputs: [{ name: "presaleId", type: "uint256", internalType: "uint256" }],
5859
+ outputs: [
5860
+ { name: "presaleOwner", type: "address", internalType: "address" },
5861
+ { name: "merkleRoot", type: "bytes32", internalType: "bytes32" },
5862
+ { name: "enabled", type: "bool", internalType: "bool" }
5863
+ ],
5864
+ stateMutability: "view"
5865
+ },
5866
+ {
5867
+ type: "function",
5868
+ name: "getAllowedAmountForBuyer",
5869
+ inputs: [
5870
+ { name: "presaleId", type: "uint256", internalType: "uint256" },
5871
+ { name: "buyer", type: "address", internalType: "address" },
5872
+ { name: "proof", type: "bytes", internalType: "bytes" }
5873
+ ],
5874
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
5875
+ stateMutability: "view"
5876
+ },
5877
+ {
5878
+ type: "function",
5879
+ name: "initialize",
5880
+ inputs: [
5881
+ { name: "presaleId", type: "uint256", internalType: "uint256" },
5882
+ { name: "presaleOwner", type: "address", internalType: "address" },
5883
+ { name: "initializationData", type: "bytes", internalType: "bytes" }
5884
+ ],
5885
+ outputs: [],
5886
+ stateMutability: "nonpayable"
5887
+ },
5888
+ {
5889
+ type: "function",
5890
+ name: "presale",
5891
+ inputs: [],
5892
+ outputs: [{ name: "", type: "address", internalType: "address" }],
5893
+ stateMutability: "view"
5894
+ },
5895
+ {
5896
+ type: "function",
5897
+ name: "setAddressOverride",
5898
+ inputs: [
5899
+ { name: "presaleId", type: "uint256", internalType: "uint256" },
5900
+ { name: "buyer", type: "address", internalType: "address" },
5901
+ { name: "allowedAmount", type: "uint256", internalType: "uint256" }
5902
+ ],
5903
+ outputs: [],
5904
+ stateMutability: "nonpayable"
5905
+ },
5906
+ {
5907
+ type: "function",
5908
+ name: "setAllowlistEnabled",
5909
+ inputs: [
5910
+ { name: "presaleId", type: "uint256", internalType: "uint256" },
5911
+ { name: "enabled", type: "bool", internalType: "bool" }
5912
+ ],
5913
+ outputs: [],
5914
+ stateMutability: "nonpayable"
5915
+ },
5916
+ {
5917
+ type: "function",
5918
+ name: "setMerkleRoot",
5919
+ inputs: [
5920
+ { name: "presaleId", type: "uint256", internalType: "uint256" },
5921
+ { name: "merkleRoot", type: "bytes32", internalType: "bytes32" }
5922
+ ],
5923
+ outputs: [],
5924
+ stateMutability: "nonpayable"
5925
+ },
5926
+ {
5927
+ type: "event",
5928
+ name: "Initialize",
5929
+ inputs: [
5930
+ { name: "presaleId", type: "uint256", indexed: true, internalType: "uint256" },
5931
+ { name: "presaleOwner", type: "address", indexed: true, internalType: "address" },
5932
+ { name: "merkleRoot", type: "bytes32", indexed: false, internalType: "bytes32" }
5933
+ ],
5934
+ anonymous: false
5935
+ },
5936
+ {
5937
+ type: "event",
5938
+ name: "SetAddressOverride",
5939
+ inputs: [
5940
+ { name: "presaleId", type: "uint256", indexed: true, internalType: "uint256" },
5941
+ { name: "buyer", type: "address", indexed: true, internalType: "address" },
5942
+ { name: "allowedAmount", type: "uint256", indexed: false, internalType: "uint256" }
5943
+ ],
5944
+ anonymous: false
5945
+ },
5946
+ {
5947
+ type: "event",
5948
+ name: "SetAllowlistEnabled",
5949
+ inputs: [
5950
+ { name: "presaleId", type: "uint256", indexed: true, internalType: "uint256" },
5951
+ { name: "enabled", type: "bool", indexed: false, internalType: "bool" }
5952
+ ],
5953
+ anonymous: false
5954
+ },
5955
+ {
5956
+ type: "event",
5957
+ name: "SetMerkleRoot",
5958
+ inputs: [
5959
+ { name: "presaleId", type: "uint256", indexed: true, internalType: "uint256" },
5960
+ { name: "merkleRoot", type: "bytes32", indexed: false, internalType: "bytes32" }
5961
+ ],
5962
+ anonymous: false
5963
+ },
5964
+ { type: "error", name: "InvalidProof", inputs: [] },
5965
+ { type: "error", name: "MerkleRootNotSet", inputs: [] },
5966
+ { type: "error", name: "Unauthorized", inputs: [] }
5967
+ ];
5968
+
5969
+ // src/utils/presale-allowlist.ts
5970
+ function createAllowlistMerkleTree(entries) {
5971
+ const values = entries.map((entry) => [
5972
+ entry.address.toLowerCase(),
5973
+ BigInt(entry.allowedAmount * 1e18).toString()
5974
+ // Convert ETH to wei
5975
+ ]);
5976
+ const tree = StandardMerkleTree2.of(values, ["address", "uint256"]);
5977
+ const root = tree.root;
5978
+ return { tree, root, entries: values };
5979
+ }
5980
+ function getAllowlistMerkleProof(tree, entries, address, allowedAmount) {
5981
+ const allowedAmountInWei = BigInt(allowedAmount * 1e18);
5982
+ const leaf = [address.toLowerCase(), allowedAmountInWei.toString()];
5983
+ const index = entries.findIndex(([addr, amt]) => addr === leaf[0] && amt === leaf[1]);
5984
+ if (index === -1) {
5985
+ throw new Error(`Entry not found in allowlist Merkle tree for address ${address}`);
5986
+ }
5987
+ const proof = tree.getProof(index);
5988
+ return proof.map((p) => p);
5989
+ }
5990
+ function encodeAllowlistInitializationData(merkleRoot) {
5991
+ return encodeAbiParameters3([{ type: "bytes32", name: "merkleRoot" }], [merkleRoot]);
5992
+ }
5993
+ function encodeAllowlistProofData(allowedAmount, proof) {
5994
+ const allowedAmountInWei = BigInt(allowedAmount * 1e18);
5995
+ return encodeAbiParameters3(
5996
+ [
5997
+ {
5998
+ type: "tuple",
5999
+ components: [
6000
+ { name: "allowedAmount", type: "uint256" },
6001
+ { name: "proof", type: "bytes32[]" }
6002
+ ]
6003
+ }
6004
+ ],
6005
+ [
6006
+ {
6007
+ allowedAmount: allowedAmountInWei,
6008
+ proof
6009
+ }
6010
+ ]
6011
+ );
6012
+ }
6013
+ function getAllowlistAddress(chainId) {
6014
+ const config = clankerConfigFor(chainId, "clanker_v4");
6015
+ return config?.related?.presaleAllowlist;
6016
+ }
6017
+ async function getAllowlistInfo(publicClient, presaleId, chainId) {
6018
+ const allowlistAddress = getAllowlistAddress(chainId);
6019
+ if (!allowlistAddress) {
6020
+ throw new Error(`Allowlist contract not available on chain ${chainId}`);
6021
+ }
6022
+ const result = await publicClient.readContract({
6023
+ address: allowlistAddress,
6024
+ abi: Clanker_PresaleAllowlist_v4_1_abi,
6025
+ functionName: "allowlists",
6026
+ args: [presaleId]
6027
+ });
6028
+ return {
6029
+ presaleOwner: result[0],
6030
+ merkleRoot: result[1],
6031
+ enabled: result[2]
6032
+ };
6033
+ }
6034
+ async function getAllowedAmountForBuyer(publicClient, presaleId, buyer, proof, chainId) {
6035
+ const allowlistAddress = getAllowlistAddress(chainId);
6036
+ if (!allowlistAddress) {
6037
+ throw new Error(`Allowlist contract not available on chain ${chainId}`);
6038
+ }
6039
+ return publicClient.readContract({
6040
+ address: allowlistAddress,
6041
+ abi: Clanker_PresaleAllowlist_v4_1_abi,
6042
+ functionName: "getAllowedAmountForBuyer",
6043
+ args: [presaleId, buyer, proof]
6044
+ });
6045
+ }
6046
+ async function verifyBuyerAllowance(publicClient, presaleId, buyer, desiredAmount, proof, chainId) {
6047
+ const allowedAmountWei = await getAllowedAmountForBuyer(
6048
+ publicClient,
6049
+ presaleId,
6050
+ buyer,
6051
+ proof,
6052
+ chainId
6053
+ );
6054
+ const allowedAmountEth = Number(allowedAmountWei) / 1e18;
6055
+ const isAllowed = desiredAmount <= allowedAmountEth;
6056
+ return {
6057
+ isAllowed,
6058
+ allowedAmountEth,
6059
+ allowedAmountWei
6060
+ };
6061
+ }
5843
6062
  export {
5844
6063
  A0X_ADDRESS,
5845
6064
  ANON_ADDRESS,
@@ -5858,12 +6077,20 @@ export {
5858
6077
  PoolPositions,
5859
6078
  WETH_ADDRESSES,
5860
6079
  clankerConfigFor,
6080
+ createAllowlistMerkleTree,
5861
6081
  createMerkleTree,
5862
6082
  encodeAirdropData,
6083
+ encodeAllowlistInitializationData,
6084
+ encodeAllowlistProofData,
5863
6085
  findVanityAddress,
5864
6086
  findVanityAddressV4,
6087
+ getAllowedAmountForBuyer,
6088
+ getAllowlistAddress,
6089
+ getAllowlistInfo,
6090
+ getAllowlistMerkleProof,
5865
6091
  getMerkleProof,
5866
6092
  getTickFromMarketCap,
5867
6093
  getTickFromMarketCapUSDC,
5868
- predictTokenAddressV4
6094
+ predictTokenAddressV4,
6095
+ verifyBuyerAllowance
5869
6096
  };
@@ -1,4 +1,4 @@
1
- import { C as ClankerTransactionConfig, a as Clanker_v3_1_abi, b as ClankerFactory, c as ClankerResult } from '../write-clanker-contracts-B4LSHPv2.js';
1
+ import { C as ClankerTransactionConfig, a as Clanker_v3_1_abi, b as ClankerFactory, c as ClankerResult } from '../write-clanker-contracts-CQTURFDk.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';
@@ -1,4 +1,4 @@
1
- import { C as ClankerTransactionConfig, f as ClankerAirdrop_v4_abi, c as ClankerResult, g as Clanker_PresaleEthToCreator_v4_1_abi } from '../../write-clanker-contracts-B4LSHPv2.js';
1
+ import { C as ClankerTransactionConfig, f as ClankerAirdrop_v4_abi, c as ClankerResult, g as Clanker_PresaleEthToCreator_v4_1_abi, h as Clanker_PresaleAllowlist_v4_1_abi } from '../../write-clanker-contracts-CQTURFDk.js';
2
2
  import { MerkleTree } from '@openzeppelin/merkle-tree/dist/merkletree.js';
3
3
  import * as z from 'zod/v4';
4
4
  import { a as Chain, C as ClankerTokenV4 } from '../../clankerTokenV4-xiAq6G4R.js';
@@ -490,5 +490,195 @@ declare function withdrawFromPresale(data: {
490
490
  * @returns The allowlist contract address, or undefined if not available
491
491
  */
492
492
  declare function getAllowlistAddress(chainId: Chain): `0x${string}` | undefined;
493
+ /**
494
+ * Get a transaction to buy into a presale with allowlist proof
495
+ *
496
+ * Use this when buying into a presale that has an allowlist enabled.
497
+ * The proof must contain your allowlist proof data (merkle proof + allowed amount).
498
+ *
499
+ * @param presaleId The ID of the presale
500
+ * @param chainId The chain ID
501
+ * @param value The ETH amount to send (in wei)
502
+ * @param proof The encoded proof data from encodeAllowlistProofData
503
+ * @returns Transaction configuration for buying into a presale with proof
504
+ */
505
+ declare function getBuyIntoPresaleWithProofTransaction({ presaleId, chainId, value, proof, }: {
506
+ presaleId: bigint;
507
+ chainId: Chain;
508
+ value: bigint;
509
+ proof: `0x${string}`;
510
+ }): ClankerTransactionConfig<typeof Clanker_PresaleEthToCreator_v4_1_abi, 'buyIntoPresaleWithProof'>;
511
+ /**
512
+ * Buy into a presale with allowlist proof
513
+ *
514
+ * Use this when buying into a presale that has an allowlist enabled.
515
+ * You must provide proof that your address is on the allowlist.
516
+ *
517
+ * @param clanker Clanker object used for buying into presale
518
+ * @param presaleId The ID of the presale
519
+ * @param ethAmount The ETH amount to send (in ETH, will be converted to wei)
520
+ * @param proof The encoded proof data from encodeAllowlistProofData
521
+ * @returns Outcome of the transaction
522
+ *
523
+ * @example
524
+ * ```typescript
525
+ * import { createAllowlistMerkleTree, getAllowlistMerkleProof, encodeAllowlistProofData } from '../utils/presale-allowlist';
526
+ *
527
+ * // Get your proof from the allowlist
528
+ * const { tree, entries } = createAllowlistMerkleTree(allowlistEntries);
529
+ * const proof = getAllowlistMerkleProof(tree, entries, buyerAddress, 1.0);
530
+ * const proofData = encodeAllowlistProofData(1.0, proof);
531
+ *
532
+ * // Buy with proof
533
+ * await buyIntoPresaleWithProof({ clanker, presaleId: 1n, ethAmount: 0.5, proof: proofData });
534
+ * ```
535
+ */
536
+ declare function buyIntoPresaleWithProof(data: {
537
+ clanker: Clanker;
538
+ presaleId: bigint;
539
+ ethAmount: number;
540
+ proof: `0x${string}`;
541
+ }): ClankerResult<{
542
+ txHash: `0x${string}`;
543
+ }>;
544
+
545
+ /**
546
+ * Get a transaction to set the merkle root for a presale allowlist
547
+ *
548
+ * Only callable by the presale owner. This allows updating the allowlist
549
+ * after the presale has been created.
550
+ *
551
+ * @param presaleId The presale ID
552
+ * @param merkleRoot The new merkle root
553
+ * @param chainId The chain ID
554
+ * @returns Transaction configuration
555
+ */
556
+ declare function getSetMerkleRootTransaction({ presaleId, merkleRoot, chainId, }: {
557
+ presaleId: bigint;
558
+ merkleRoot: `0x${string}`;
559
+ chainId: Chain;
560
+ }): ClankerTransactionConfig<typeof Clanker_PresaleAllowlist_v4_1_abi, 'setMerkleRoot'>;
561
+ /**
562
+ * Set the merkle root for a presale allowlist
563
+ *
564
+ * Only callable by the presale owner. This allows updating the allowlist
565
+ * after the presale has been created.
566
+ *
567
+ * @param clanker Clanker object
568
+ * @param presaleId The presale ID
569
+ * @param merkleRoot The new merkle root
570
+ * @returns Outcome of the transaction
571
+ */
572
+ declare function setMerkleRoot(data: {
573
+ clanker: Clanker;
574
+ presaleId: bigint;
575
+ merkleRoot: `0x${string}`;
576
+ }): ClankerResult<{
577
+ txHash: `0x${string}`;
578
+ }>;
579
+ /**
580
+ * Get a transaction to set an address override for a presale allowlist
581
+ *
582
+ * Only callable by the presale owner. Address overrides take precedence
583
+ * over the merkle tree allowlist. Setting allowedAmount to 0 effectively
584
+ * removes the override.
585
+ *
586
+ * @param presaleId The presale ID
587
+ * @param buyer The buyer's address to override
588
+ * @param allowedAmount The allowed amount in wei (0 to remove override)
589
+ * @param chainId The chain ID
590
+ * @returns Transaction configuration
591
+ */
592
+ declare function getSetAddressOverrideTransaction({ presaleId, buyer, allowedAmount, chainId, }: {
593
+ presaleId: bigint;
594
+ buyer: `0x${string}`;
595
+ allowedAmount: bigint;
596
+ chainId: Chain;
597
+ }): ClankerTransactionConfig<typeof Clanker_PresaleAllowlist_v4_1_abi, 'setAddressOverride'>;
598
+ /**
599
+ * Set an address override for a presale allowlist
600
+ *
601
+ * Only callable by the presale owner. Address overrides take precedence
602
+ * over the merkle tree allowlist. This is useful for manually adding
603
+ * addresses without regenerating the entire merkle tree.
604
+ *
605
+ * @param clanker Clanker object
606
+ * @param presaleId The presale ID
607
+ * @param buyer The buyer's address to override
608
+ * @param allowedAmountEth The allowed amount in ETH (0 to remove override)
609
+ * @returns Outcome of the transaction
610
+ *
611
+ * @example
612
+ * ```typescript
613
+ * // Allow a specific address to buy up to 2 ETH
614
+ * await setAddressOverride({
615
+ * clanker,
616
+ * presaleId: 1n,
617
+ * buyer: '0x123...',
618
+ * allowedAmountEth: 2.0
619
+ * });
620
+ *
621
+ * // Remove the override (set to 0)
622
+ * await setAddressOverride({
623
+ * clanker,
624
+ * presaleId: 1n,
625
+ * buyer: '0x123...',
626
+ * allowedAmountEth: 0
627
+ * });
628
+ * ```
629
+ */
630
+ declare function setAddressOverride(data: {
631
+ clanker: Clanker;
632
+ presaleId: bigint;
633
+ buyer: `0x${string}`;
634
+ allowedAmountEth: number;
635
+ }): ClankerResult<{
636
+ txHash: `0x${string}`;
637
+ }>;
638
+ /**
639
+ * Get a transaction to enable or disable the allowlist for a presale
640
+ *
641
+ * Only callable by the presale owner. When disabled, anyone can buy
642
+ * into the presale without restrictions. When enabled, buyers must
643
+ * provide proof or have an address override.
644
+ *
645
+ * @param presaleId The presale ID
646
+ * @param enabled Whether to enable or disable the allowlist
647
+ * @param chainId The chain ID
648
+ * @returns Transaction configuration
649
+ */
650
+ declare function getSetAllowlistEnabledTransaction({ presaleId, enabled, chainId, }: {
651
+ presaleId: bigint;
652
+ enabled: boolean;
653
+ chainId: Chain;
654
+ }): ClankerTransactionConfig<typeof Clanker_PresaleAllowlist_v4_1_abi, 'setAllowlistEnabled'>;
655
+ /**
656
+ * Enable or disable the allowlist for a presale
657
+ *
658
+ * Only callable by the presale owner. When disabled, anyone can buy
659
+ * into the presale without restrictions. When enabled, buyers must
660
+ * provide proof or have an address override.
661
+ *
662
+ * @param clanker Clanker object
663
+ * @param presaleId The presale ID
664
+ * @param enabled Whether to enable or disable the allowlist
665
+ * @returns Outcome of the transaction
666
+ *
667
+ * @example
668
+ * ```typescript
669
+ * // Disable the allowlist to let anyone participate
670
+ * await setAllowlistEnabled({ clanker, presaleId: 1n, enabled: false });
671
+ *
672
+ * // Re-enable the allowlist
673
+ * await setAllowlistEnabled({ clanker, presaleId: 1n, enabled: true });
674
+ * ```
675
+ */
676
+ declare function setAllowlistEnabled(data: {
677
+ clanker: Clanker;
678
+ presaleId: bigint;
679
+ enabled: boolean;
680
+ }): ClankerResult<{
681
+ txHash: `0x${string}`;
682
+ }>;
493
683
 
494
- 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 };
684
+ export { type AirdropRecipient, type PresaleConfig, PresaleStatus, buyIntoPresale, buyIntoPresaleWithProof, claimAirdrop, claimEth, claimTokens, createAirdrop, endPresale, fetchAirdropProofs, getAirdropProofs, getAllowlistAddress, getAmountAvailableToClaim, getBuyIntoPresaleTransaction, getBuyIntoPresaleWithProofTransaction, getClaimAirdropTransaction, getClaimEthTransaction, getClaimTokensTransaction, getEndPresaleTransaction, getPresale, getPresaleBuys, getPresaleClaimed, getPresaleState, getSetAddressOverrideTransaction, getSetAllowlistEnabledTransaction, getSetMerkleRootTransaction, getStartPresaleTransaction, getWithdrawFromPresaleTransaction, registerAirdrop, setAddressOverride, setAllowlistEnabled, setMerkleRoot, startPresale, withdrawFromPresale };
@@ -7844,9 +7844,248 @@ function getAllowlistAddress(chainId) {
7844
7844
  const config = clankerConfigFor(chainId, "clanker_v4");
7845
7845
  return config?.related?.presaleAllowlist;
7846
7846
  }
7847
+ function getBuyIntoPresaleWithProofTransaction({
7848
+ presaleId,
7849
+ chainId,
7850
+ value,
7851
+ proof
7852
+ }) {
7853
+ const config = clankerConfigFor(chainId, "clanker_v4");
7854
+ if (!config?.related?.presale) {
7855
+ throw new Error(`PresaleEthToCreator is not available on chain ${chainId}`);
7856
+ }
7857
+ return {
7858
+ chainId,
7859
+ address: config.related.presale,
7860
+ abi: Clanker_PresaleEthToCreator_v4_1_abi,
7861
+ functionName: "buyIntoPresaleWithProof",
7862
+ args: [presaleId, proof],
7863
+ value
7864
+ };
7865
+ }
7866
+ function buyIntoPresaleWithProof(data) {
7867
+ if (!data.clanker.publicClient) throw new Error("Public client required on clanker");
7868
+ if (!data.clanker.wallet) throw new Error("Wallet client required on clanker");
7869
+ const tx = getBuyIntoPresaleWithProofTransaction({
7870
+ presaleId: data.presaleId,
7871
+ chainId: data.clanker.wallet.chain.id,
7872
+ value: BigInt(data.ethAmount * 1e18),
7873
+ // Convert ETH to wei
7874
+ proof: data.proof
7875
+ });
7876
+ return writeClankerContract(data.clanker.publicClient, data.clanker.wallet, tx);
7877
+ }
7878
+
7879
+ // src/abi/v4.1/ClankerPresaleAllowlist.ts
7880
+ var Clanker_PresaleAllowlist_v4_1_abi = [
7881
+ {
7882
+ type: "constructor",
7883
+ inputs: [{ name: "presale_", type: "address", internalType: "address" }],
7884
+ stateMutability: "nonpayable"
7885
+ },
7886
+ {
7887
+ type: "function",
7888
+ name: "allowlists",
7889
+ inputs: [{ name: "presaleId", type: "uint256", internalType: "uint256" }],
7890
+ outputs: [
7891
+ { name: "presaleOwner", type: "address", internalType: "address" },
7892
+ { name: "merkleRoot", type: "bytes32", internalType: "bytes32" },
7893
+ { name: "enabled", type: "bool", internalType: "bool" }
7894
+ ],
7895
+ stateMutability: "view"
7896
+ },
7897
+ {
7898
+ type: "function",
7899
+ name: "getAllowedAmountForBuyer",
7900
+ inputs: [
7901
+ { name: "presaleId", type: "uint256", internalType: "uint256" },
7902
+ { name: "buyer", type: "address", internalType: "address" },
7903
+ { name: "proof", type: "bytes", internalType: "bytes" }
7904
+ ],
7905
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
7906
+ stateMutability: "view"
7907
+ },
7908
+ {
7909
+ type: "function",
7910
+ name: "initialize",
7911
+ inputs: [
7912
+ { name: "presaleId", type: "uint256", internalType: "uint256" },
7913
+ { name: "presaleOwner", type: "address", internalType: "address" },
7914
+ { name: "initializationData", type: "bytes", internalType: "bytes" }
7915
+ ],
7916
+ outputs: [],
7917
+ stateMutability: "nonpayable"
7918
+ },
7919
+ {
7920
+ type: "function",
7921
+ name: "presale",
7922
+ inputs: [],
7923
+ outputs: [{ name: "", type: "address", internalType: "address" }],
7924
+ stateMutability: "view"
7925
+ },
7926
+ {
7927
+ type: "function",
7928
+ name: "setAddressOverride",
7929
+ inputs: [
7930
+ { name: "presaleId", type: "uint256", internalType: "uint256" },
7931
+ { name: "buyer", type: "address", internalType: "address" },
7932
+ { name: "allowedAmount", type: "uint256", internalType: "uint256" }
7933
+ ],
7934
+ outputs: [],
7935
+ stateMutability: "nonpayable"
7936
+ },
7937
+ {
7938
+ type: "function",
7939
+ name: "setAllowlistEnabled",
7940
+ inputs: [
7941
+ { name: "presaleId", type: "uint256", internalType: "uint256" },
7942
+ { name: "enabled", type: "bool", internalType: "bool" }
7943
+ ],
7944
+ outputs: [],
7945
+ stateMutability: "nonpayable"
7946
+ },
7947
+ {
7948
+ type: "function",
7949
+ name: "setMerkleRoot",
7950
+ inputs: [
7951
+ { name: "presaleId", type: "uint256", internalType: "uint256" },
7952
+ { name: "merkleRoot", type: "bytes32", internalType: "bytes32" }
7953
+ ],
7954
+ outputs: [],
7955
+ stateMutability: "nonpayable"
7956
+ },
7957
+ {
7958
+ type: "event",
7959
+ name: "Initialize",
7960
+ inputs: [
7961
+ { name: "presaleId", type: "uint256", indexed: true, internalType: "uint256" },
7962
+ { name: "presaleOwner", type: "address", indexed: true, internalType: "address" },
7963
+ { name: "merkleRoot", type: "bytes32", indexed: false, internalType: "bytes32" }
7964
+ ],
7965
+ anonymous: false
7966
+ },
7967
+ {
7968
+ type: "event",
7969
+ name: "SetAddressOverride",
7970
+ inputs: [
7971
+ { name: "presaleId", type: "uint256", indexed: true, internalType: "uint256" },
7972
+ { name: "buyer", type: "address", indexed: true, internalType: "address" },
7973
+ { name: "allowedAmount", type: "uint256", indexed: false, internalType: "uint256" }
7974
+ ],
7975
+ anonymous: false
7976
+ },
7977
+ {
7978
+ type: "event",
7979
+ name: "SetAllowlistEnabled",
7980
+ inputs: [
7981
+ { name: "presaleId", type: "uint256", indexed: true, internalType: "uint256" },
7982
+ { name: "enabled", type: "bool", indexed: false, internalType: "bool" }
7983
+ ],
7984
+ anonymous: false
7985
+ },
7986
+ {
7987
+ type: "event",
7988
+ name: "SetMerkleRoot",
7989
+ inputs: [
7990
+ { name: "presaleId", type: "uint256", indexed: true, internalType: "uint256" },
7991
+ { name: "merkleRoot", type: "bytes32", indexed: false, internalType: "bytes32" }
7992
+ ],
7993
+ anonymous: false
7994
+ },
7995
+ { type: "error", name: "InvalidProof", inputs: [] },
7996
+ { type: "error", name: "MerkleRootNotSet", inputs: [] },
7997
+ { type: "error", name: "Unauthorized", inputs: [] }
7998
+ ];
7999
+
8000
+ // src/v4/extensions/presale-allowlist-management.ts
8001
+ function getSetMerkleRootTransaction({
8002
+ presaleId,
8003
+ merkleRoot,
8004
+ chainId
8005
+ }) {
8006
+ const config = clankerConfigFor(chainId, "clanker_v4");
8007
+ if (!config?.related?.presaleAllowlist) {
8008
+ throw new Error(`Allowlist contract not available on chain ${chainId}`);
8009
+ }
8010
+ return {
8011
+ chainId,
8012
+ address: config.related.presaleAllowlist,
8013
+ abi: Clanker_PresaleAllowlist_v4_1_abi,
8014
+ functionName: "setMerkleRoot",
8015
+ args: [presaleId, merkleRoot]
8016
+ };
8017
+ }
8018
+ function setMerkleRoot(data) {
8019
+ if (!data.clanker.publicClient) throw new Error("Public client required on clanker");
8020
+ if (!data.clanker.wallet) throw new Error("Wallet client required on clanker");
8021
+ const tx = getSetMerkleRootTransaction({
8022
+ presaleId: data.presaleId,
8023
+ merkleRoot: data.merkleRoot,
8024
+ chainId: data.clanker.wallet.chain.id
8025
+ });
8026
+ return writeClankerContract(data.clanker.publicClient, data.clanker.wallet, tx);
8027
+ }
8028
+ function getSetAddressOverrideTransaction({
8029
+ presaleId,
8030
+ buyer,
8031
+ allowedAmount,
8032
+ chainId
8033
+ }) {
8034
+ const config = clankerConfigFor(chainId, "clanker_v4");
8035
+ if (!config?.related?.presaleAllowlist) {
8036
+ throw new Error(`Allowlist contract not available on chain ${chainId}`);
8037
+ }
8038
+ return {
8039
+ chainId,
8040
+ address: config.related.presaleAllowlist,
8041
+ abi: Clanker_PresaleAllowlist_v4_1_abi,
8042
+ functionName: "setAddressOverride",
8043
+ args: [presaleId, buyer, allowedAmount]
8044
+ };
8045
+ }
8046
+ function setAddressOverride(data) {
8047
+ if (!data.clanker.publicClient) throw new Error("Public client required on clanker");
8048
+ if (!data.clanker.wallet) throw new Error("Wallet client required on clanker");
8049
+ const tx = getSetAddressOverrideTransaction({
8050
+ presaleId: data.presaleId,
8051
+ buyer: data.buyer,
8052
+ allowedAmount: BigInt(data.allowedAmountEth * 1e18),
8053
+ // Convert ETH to wei
8054
+ chainId: data.clanker.wallet.chain.id
8055
+ });
8056
+ return writeClankerContract(data.clanker.publicClient, data.clanker.wallet, tx);
8057
+ }
8058
+ function getSetAllowlistEnabledTransaction({
8059
+ presaleId,
8060
+ enabled,
8061
+ chainId
8062
+ }) {
8063
+ const config = clankerConfigFor(chainId, "clanker_v4");
8064
+ if (!config?.related?.presaleAllowlist) {
8065
+ throw new Error(`Allowlist contract not available on chain ${chainId}`);
8066
+ }
8067
+ return {
8068
+ chainId,
8069
+ address: config.related.presaleAllowlist,
8070
+ abi: Clanker_PresaleAllowlist_v4_1_abi,
8071
+ functionName: "setAllowlistEnabled",
8072
+ args: [presaleId, enabled]
8073
+ };
8074
+ }
8075
+ function setAllowlistEnabled(data) {
8076
+ if (!data.clanker.publicClient) throw new Error("Public client required on clanker");
8077
+ if (!data.clanker.wallet) throw new Error("Wallet client required on clanker");
8078
+ const tx = getSetAllowlistEnabledTransaction({
8079
+ presaleId: data.presaleId,
8080
+ enabled: data.enabled,
8081
+ chainId: data.clanker.wallet.chain.id
8082
+ });
8083
+ return writeClankerContract(data.clanker.publicClient, data.clanker.wallet, tx);
8084
+ }
7847
8085
  export {
7848
8086
  PresaleStatus,
7849
8087
  buyIntoPresale,
8088
+ buyIntoPresaleWithProof,
7850
8089
  claimAirdrop,
7851
8090
  claimEth,
7852
8091
  claimTokens,
@@ -7857,6 +8096,7 @@ export {
7857
8096
  getAllowlistAddress,
7858
8097
  getAmountAvailableToClaim,
7859
8098
  getBuyIntoPresaleTransaction,
8099
+ getBuyIntoPresaleWithProofTransaction,
7860
8100
  getClaimAirdropTransaction,
7861
8101
  getClaimEthTransaction,
7862
8102
  getClaimTokensTransaction,
@@ -7865,9 +8105,15 @@ export {
7865
8105
  getPresaleBuys,
7866
8106
  getPresaleClaimed,
7867
8107
  getPresaleState,
8108
+ getSetAddressOverrideTransaction,
8109
+ getSetAllowlistEnabledTransaction,
8110
+ getSetMerkleRootTransaction,
7868
8111
  getStartPresaleTransaction,
7869
8112
  getWithdrawFromPresaleTransaction,
7870
8113
  registerAirdrop,
8114
+ setAddressOverride,
8115
+ setAllowlistEnabled,
8116
+ setMerkleRoot,
7871
8117
  startPresale,
7872
8118
  withdrawFromPresale
7873
8119
  };
@@ -1,4 +1,4 @@
1
- import { C as ClankerTransactionConfig, d as ClankerFeeLocker_abi, b as ClankerFactory, c as ClankerResult, e as ClankerLocker_v4_abi } from '../write-clanker-contracts-B4LSHPv2.js';
1
+ import { C as ClankerTransactionConfig, d as ClankerFeeLocker_abi, b as ClankerFactory, c as ClankerResult, e as ClankerLocker_v4_abi } from '../write-clanker-contracts-CQTURFDk.js';
2
2
  import * as viem from 'viem';
3
3
  import { WalletClient, Transport, Chain, Account, PublicClient } from 'viem';
4
4
  import { a as ClankerToken_v4_abi } from '../ClankerToken-Dra5lppJ.js';
@@ -7455,6 +7455,216 @@ declare const ClankerLocker_v4_abi: readonly [{
7455
7455
  readonly inputs: readonly [];
7456
7456
  }];
7457
7457
 
7458
+ declare const Clanker_PresaleAllowlist_v4_1_abi: readonly [{
7459
+ readonly type: "constructor";
7460
+ readonly inputs: readonly [{
7461
+ readonly name: "presale_";
7462
+ readonly type: "address";
7463
+ readonly internalType: "address";
7464
+ }];
7465
+ readonly stateMutability: "nonpayable";
7466
+ }, {
7467
+ readonly type: "function";
7468
+ readonly name: "allowlists";
7469
+ readonly inputs: readonly [{
7470
+ readonly name: "presaleId";
7471
+ readonly type: "uint256";
7472
+ readonly internalType: "uint256";
7473
+ }];
7474
+ readonly outputs: readonly [{
7475
+ readonly name: "presaleOwner";
7476
+ readonly type: "address";
7477
+ readonly internalType: "address";
7478
+ }, {
7479
+ readonly name: "merkleRoot";
7480
+ readonly type: "bytes32";
7481
+ readonly internalType: "bytes32";
7482
+ }, {
7483
+ readonly name: "enabled";
7484
+ readonly type: "bool";
7485
+ readonly internalType: "bool";
7486
+ }];
7487
+ readonly stateMutability: "view";
7488
+ }, {
7489
+ readonly type: "function";
7490
+ readonly name: "getAllowedAmountForBuyer";
7491
+ readonly inputs: readonly [{
7492
+ readonly name: "presaleId";
7493
+ readonly type: "uint256";
7494
+ readonly internalType: "uint256";
7495
+ }, {
7496
+ readonly name: "buyer";
7497
+ readonly type: "address";
7498
+ readonly internalType: "address";
7499
+ }, {
7500
+ readonly name: "proof";
7501
+ readonly type: "bytes";
7502
+ readonly internalType: "bytes";
7503
+ }];
7504
+ readonly outputs: readonly [{
7505
+ readonly name: "";
7506
+ readonly type: "uint256";
7507
+ readonly internalType: "uint256";
7508
+ }];
7509
+ readonly stateMutability: "view";
7510
+ }, {
7511
+ readonly type: "function";
7512
+ readonly name: "initialize";
7513
+ readonly inputs: readonly [{
7514
+ readonly name: "presaleId";
7515
+ readonly type: "uint256";
7516
+ readonly internalType: "uint256";
7517
+ }, {
7518
+ readonly name: "presaleOwner";
7519
+ readonly type: "address";
7520
+ readonly internalType: "address";
7521
+ }, {
7522
+ readonly name: "initializationData";
7523
+ readonly type: "bytes";
7524
+ readonly internalType: "bytes";
7525
+ }];
7526
+ readonly outputs: readonly [];
7527
+ readonly stateMutability: "nonpayable";
7528
+ }, {
7529
+ readonly type: "function";
7530
+ readonly name: "presale";
7531
+ readonly inputs: readonly [];
7532
+ readonly outputs: readonly [{
7533
+ readonly name: "";
7534
+ readonly type: "address";
7535
+ readonly internalType: "address";
7536
+ }];
7537
+ readonly stateMutability: "view";
7538
+ }, {
7539
+ readonly type: "function";
7540
+ readonly name: "setAddressOverride";
7541
+ readonly inputs: readonly [{
7542
+ readonly name: "presaleId";
7543
+ readonly type: "uint256";
7544
+ readonly internalType: "uint256";
7545
+ }, {
7546
+ readonly name: "buyer";
7547
+ readonly type: "address";
7548
+ readonly internalType: "address";
7549
+ }, {
7550
+ readonly name: "allowedAmount";
7551
+ readonly type: "uint256";
7552
+ readonly internalType: "uint256";
7553
+ }];
7554
+ readonly outputs: readonly [];
7555
+ readonly stateMutability: "nonpayable";
7556
+ }, {
7557
+ readonly type: "function";
7558
+ readonly name: "setAllowlistEnabled";
7559
+ readonly inputs: readonly [{
7560
+ readonly name: "presaleId";
7561
+ readonly type: "uint256";
7562
+ readonly internalType: "uint256";
7563
+ }, {
7564
+ readonly name: "enabled";
7565
+ readonly type: "bool";
7566
+ readonly internalType: "bool";
7567
+ }];
7568
+ readonly outputs: readonly [];
7569
+ readonly stateMutability: "nonpayable";
7570
+ }, {
7571
+ readonly type: "function";
7572
+ readonly name: "setMerkleRoot";
7573
+ readonly inputs: readonly [{
7574
+ readonly name: "presaleId";
7575
+ readonly type: "uint256";
7576
+ readonly internalType: "uint256";
7577
+ }, {
7578
+ readonly name: "merkleRoot";
7579
+ readonly type: "bytes32";
7580
+ readonly internalType: "bytes32";
7581
+ }];
7582
+ readonly outputs: readonly [];
7583
+ readonly stateMutability: "nonpayable";
7584
+ }, {
7585
+ readonly type: "event";
7586
+ readonly name: "Initialize";
7587
+ readonly inputs: readonly [{
7588
+ readonly name: "presaleId";
7589
+ readonly type: "uint256";
7590
+ readonly indexed: true;
7591
+ readonly internalType: "uint256";
7592
+ }, {
7593
+ readonly name: "presaleOwner";
7594
+ readonly type: "address";
7595
+ readonly indexed: true;
7596
+ readonly internalType: "address";
7597
+ }, {
7598
+ readonly name: "merkleRoot";
7599
+ readonly type: "bytes32";
7600
+ readonly indexed: false;
7601
+ readonly internalType: "bytes32";
7602
+ }];
7603
+ readonly anonymous: false;
7604
+ }, {
7605
+ readonly type: "event";
7606
+ readonly name: "SetAddressOverride";
7607
+ readonly inputs: readonly [{
7608
+ readonly name: "presaleId";
7609
+ readonly type: "uint256";
7610
+ readonly indexed: true;
7611
+ readonly internalType: "uint256";
7612
+ }, {
7613
+ readonly name: "buyer";
7614
+ readonly type: "address";
7615
+ readonly indexed: true;
7616
+ readonly internalType: "address";
7617
+ }, {
7618
+ readonly name: "allowedAmount";
7619
+ readonly type: "uint256";
7620
+ readonly indexed: false;
7621
+ readonly internalType: "uint256";
7622
+ }];
7623
+ readonly anonymous: false;
7624
+ }, {
7625
+ readonly type: "event";
7626
+ readonly name: "SetAllowlistEnabled";
7627
+ readonly inputs: readonly [{
7628
+ readonly name: "presaleId";
7629
+ readonly type: "uint256";
7630
+ readonly indexed: true;
7631
+ readonly internalType: "uint256";
7632
+ }, {
7633
+ readonly name: "enabled";
7634
+ readonly type: "bool";
7635
+ readonly indexed: false;
7636
+ readonly internalType: "bool";
7637
+ }];
7638
+ readonly anonymous: false;
7639
+ }, {
7640
+ readonly type: "event";
7641
+ readonly name: "SetMerkleRoot";
7642
+ readonly inputs: readonly [{
7643
+ readonly name: "presaleId";
7644
+ readonly type: "uint256";
7645
+ readonly indexed: true;
7646
+ readonly internalType: "uint256";
7647
+ }, {
7648
+ readonly name: "merkleRoot";
7649
+ readonly type: "bytes32";
7650
+ readonly indexed: false;
7651
+ readonly internalType: "bytes32";
7652
+ }];
7653
+ readonly anonymous: false;
7654
+ }, {
7655
+ readonly type: "error";
7656
+ readonly name: "InvalidProof";
7657
+ readonly inputs: readonly [];
7658
+ }, {
7659
+ readonly type: "error";
7660
+ readonly name: "MerkleRootNotSet";
7661
+ readonly inputs: readonly [];
7662
+ }, {
7663
+ readonly type: "error";
7664
+ readonly name: "Unauthorized";
7665
+ readonly inputs: readonly [];
7666
+ }];
7667
+
7458
7668
  declare const Clanker_PresaleEthToCreator_v4_1_abi: readonly [{
7459
7669
  readonly type: "constructor";
7460
7670
  readonly inputs: readonly [{
@@ -9186,7 +9396,7 @@ declare const Clanker_PresaleEthToCreator_v4_1_abi: readonly [{
9186
9396
  type ClankerToken = typeof ClankerToken_v3_1_abi | typeof ClankerToken_v4_abi;
9187
9397
  type ClankerFactory = typeof Clanker_v3_1_abi | typeof Clanker_v4_abi;
9188
9398
  type ClankerHooks = typeof ClankerHook_DynamicFee_v4_abi | typeof ClankerHook_StaticFee_v4_abi;
9189
- type ClankerContract = typeof ClankerFeeLocker_abi | ClankerFactory | ClankerToken | ClankerHooks | typeof ClankerAirdrop_v4_abi | typeof ClankerAirdropv2_v4_abi | typeof LpLockerv2_abi | typeof ClankerLocker_v4_abi | typeof Clanker_PresaleEthToCreator_v4_1_abi | typeof Clanker_v0_abi;
9399
+ type ClankerContract = typeof ClankerFeeLocker_abi | ClankerFactory | ClankerToken | ClankerHooks | typeof ClankerAirdrop_v4_abi | typeof ClankerAirdropv2_v4_abi | typeof LpLockerv2_abi | typeof ClankerLocker_v4_abi | typeof Clanker_PresaleAllowlist_v4_1_abi | typeof Clanker_PresaleEthToCreator_v4_1_abi | typeof Clanker_v0_abi;
9190
9400
 
9191
9401
  type UndefinedValues<T> = {
9192
9402
  [P in keyof T]?: undefined;
@@ -9207,4 +9417,4 @@ type ClankerTransactionConfig<abi extends ClankerContract = ClankerContract, fun
9207
9417
  chainId?: number;
9208
9418
  };
9209
9419
 
9210
- export { type ClankerTransactionConfig as C, Clanker_v3_1_abi as a, type ClankerFactory as b, type ClankerResult as c, ClankerFeeLocker_abi as d, ClankerLocker_v4_abi as e, ClankerAirdrop_v4_abi as f, Clanker_PresaleEthToCreator_v4_1_abi as g };
9420
+ export { type ClankerTransactionConfig as C, Clanker_v3_1_abi as a, type ClankerFactory as b, type ClankerResult as c, ClankerFeeLocker_abi as d, ClankerLocker_v4_abi as e, ClankerAirdrop_v4_abi as f, Clanker_PresaleEthToCreator_v4_1_abi as g, Clanker_PresaleAllowlist_v4_1_abi as h };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clanker-sdk",
3
- "version": "4.2.5",
3
+ "version": "4.2.6",
4
4
  "description": "SDK for deploying tokens using Clanker",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",