clanker-sdk 4.2.5 → 4.2.7
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/{clankerTokenV4-xiAq6G4R.d.ts → clankerTokenV4-nI7uj0d1.d.ts} +1 -0
- package/dist/index.d.ts +135 -4
- package/dist/index.js +228 -1
- package/dist/v3/index.d.ts +1 -1
- package/dist/v4/extensions/index.d.ts +193 -3
- package/dist/v4/extensions/index.js +250 -2
- package/dist/v4/index.d.ts +3 -3
- package/dist/v4/index.js +4 -2
- package/dist/{write-clanker-contracts-B4LSHPv2.d.ts → write-clanker-contracts-CQTURFDk.d.ts} +212 -2
- package/package.json +1 -1
|
@@ -18082,6 +18082,7 @@ declare const clankerTokenV4: z.ZodObject<{
|
|
|
18082
18082
|
hooks: z.ZodCustom<`0x${string}`, `0x${string}`>;
|
|
18083
18083
|
}, z.core.$strip>>;
|
|
18084
18084
|
amountOutMin: z.ZodDefault<z.ZodNumber>;
|
|
18085
|
+
recipient: z.ZodOptional<z.ZodCustom<`0x${string}`, `0x${string}`>>;
|
|
18085
18086
|
}, z.core.$strip>>;
|
|
18086
18087
|
/** Fee structure for the token. */
|
|
18087
18088
|
fees: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { C as ClankerTokenV3 } from './clankerTokenV3-BqHTF9QY.js';
|
|
2
|
-
import { a as Chain, C as ClankerTokenV4, b as ClankerDeployment } from './clankerTokenV4-
|
|
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-
|
|
4
|
-
import { ContractConstructorArgs, Hex } from 'viem';
|
|
2
|
+
import { a as Chain, C as ClankerTokenV4, b as ClankerDeployment } from './clankerTokenV4-nI7uj0d1.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-nI7uj0d1.js';
|
|
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
|
-
|
|
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
|
};
|
package/dist/v3/index.d.ts
CHANGED
|
@@ -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-
|
|
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,7 +1,7 @@
|
|
|
1
|
-
import { C as ClankerTransactionConfig, f as ClankerAirdrop_v4_abi, c as ClankerResult, g as Clanker_PresaleEthToCreator_v4_1_abi } from '../../write-clanker-contracts-
|
|
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
|
-
import { a as Chain, C as ClankerTokenV4 } from '../../clankerTokenV4-
|
|
4
|
+
import { a as Chain, C as ClankerTokenV4 } from '../../clankerTokenV4-nI7uj0d1.js';
|
|
5
5
|
import { Clanker } from '../index.js';
|
|
6
6
|
import { C as ClankerError } from '../../errors-5Gv28Tkr.js';
|
|
7
7
|
import 'viem';
|
|
@@ -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 };
|
|
@@ -7240,7 +7240,9 @@ var clankerTokenV4 = z3.strictObject({
|
|
|
7240
7240
|
hooks: addressSchema
|
|
7241
7241
|
}).default(NULL_DEVBUY_POOL_CONFIG),
|
|
7242
7242
|
/** Amount out min for the ETH -> PAIR swap. Used if the clanker is not paired with ETH. */
|
|
7243
|
-
amountOutMin: z3.number().default(0)
|
|
7243
|
+
amountOutMin: z3.number().default(0),
|
|
7244
|
+
/** Recipient address for the purchased tokens. Defaults to tokenAdmin if not specified. */
|
|
7245
|
+
recipient: addressSchema.optional()
|
|
7244
7246
|
}).optional(),
|
|
7245
7247
|
/** Fee structure for the token. */
|
|
7246
7248
|
fees: z3.discriminatedUnion("type", [
|
|
@@ -7461,7 +7463,7 @@ var clankerTokenV4Converter = async (config) => {
|
|
|
7461
7463
|
extensionData: encodeAbiParameters2(ClankerUniV4EthDevBuy_Instantiation_v4_abi, [
|
|
7462
7464
|
cfg.devBuy.poolKey,
|
|
7463
7465
|
BigInt(cfg.devBuy.amountOutMin * 1e18),
|
|
7464
|
-
cfg.tokenAdmin
|
|
7466
|
+
cfg.devBuy.recipient ?? cfg.tokenAdmin
|
|
7465
7467
|
])
|
|
7466
7468
|
}
|
|
7467
7469
|
] : [],
|
|
@@ -7844,9 +7846,248 @@ function getAllowlistAddress(chainId) {
|
|
|
7844
7846
|
const config = clankerConfigFor(chainId, "clanker_v4");
|
|
7845
7847
|
return config?.related?.presaleAllowlist;
|
|
7846
7848
|
}
|
|
7849
|
+
function getBuyIntoPresaleWithProofTransaction({
|
|
7850
|
+
presaleId,
|
|
7851
|
+
chainId,
|
|
7852
|
+
value,
|
|
7853
|
+
proof
|
|
7854
|
+
}) {
|
|
7855
|
+
const config = clankerConfigFor(chainId, "clanker_v4");
|
|
7856
|
+
if (!config?.related?.presale) {
|
|
7857
|
+
throw new Error(`PresaleEthToCreator is not available on chain ${chainId}`);
|
|
7858
|
+
}
|
|
7859
|
+
return {
|
|
7860
|
+
chainId,
|
|
7861
|
+
address: config.related.presale,
|
|
7862
|
+
abi: Clanker_PresaleEthToCreator_v4_1_abi,
|
|
7863
|
+
functionName: "buyIntoPresaleWithProof",
|
|
7864
|
+
args: [presaleId, proof],
|
|
7865
|
+
value
|
|
7866
|
+
};
|
|
7867
|
+
}
|
|
7868
|
+
function buyIntoPresaleWithProof(data) {
|
|
7869
|
+
if (!data.clanker.publicClient) throw new Error("Public client required on clanker");
|
|
7870
|
+
if (!data.clanker.wallet) throw new Error("Wallet client required on clanker");
|
|
7871
|
+
const tx = getBuyIntoPresaleWithProofTransaction({
|
|
7872
|
+
presaleId: data.presaleId,
|
|
7873
|
+
chainId: data.clanker.wallet.chain.id,
|
|
7874
|
+
value: BigInt(data.ethAmount * 1e18),
|
|
7875
|
+
// Convert ETH to wei
|
|
7876
|
+
proof: data.proof
|
|
7877
|
+
});
|
|
7878
|
+
return writeClankerContract(data.clanker.publicClient, data.clanker.wallet, tx);
|
|
7879
|
+
}
|
|
7880
|
+
|
|
7881
|
+
// src/abi/v4.1/ClankerPresaleAllowlist.ts
|
|
7882
|
+
var Clanker_PresaleAllowlist_v4_1_abi = [
|
|
7883
|
+
{
|
|
7884
|
+
type: "constructor",
|
|
7885
|
+
inputs: [{ name: "presale_", type: "address", internalType: "address" }],
|
|
7886
|
+
stateMutability: "nonpayable"
|
|
7887
|
+
},
|
|
7888
|
+
{
|
|
7889
|
+
type: "function",
|
|
7890
|
+
name: "allowlists",
|
|
7891
|
+
inputs: [{ name: "presaleId", type: "uint256", internalType: "uint256" }],
|
|
7892
|
+
outputs: [
|
|
7893
|
+
{ name: "presaleOwner", type: "address", internalType: "address" },
|
|
7894
|
+
{ name: "merkleRoot", type: "bytes32", internalType: "bytes32" },
|
|
7895
|
+
{ name: "enabled", type: "bool", internalType: "bool" }
|
|
7896
|
+
],
|
|
7897
|
+
stateMutability: "view"
|
|
7898
|
+
},
|
|
7899
|
+
{
|
|
7900
|
+
type: "function",
|
|
7901
|
+
name: "getAllowedAmountForBuyer",
|
|
7902
|
+
inputs: [
|
|
7903
|
+
{ name: "presaleId", type: "uint256", internalType: "uint256" },
|
|
7904
|
+
{ name: "buyer", type: "address", internalType: "address" },
|
|
7905
|
+
{ name: "proof", type: "bytes", internalType: "bytes" }
|
|
7906
|
+
],
|
|
7907
|
+
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
7908
|
+
stateMutability: "view"
|
|
7909
|
+
},
|
|
7910
|
+
{
|
|
7911
|
+
type: "function",
|
|
7912
|
+
name: "initialize",
|
|
7913
|
+
inputs: [
|
|
7914
|
+
{ name: "presaleId", type: "uint256", internalType: "uint256" },
|
|
7915
|
+
{ name: "presaleOwner", type: "address", internalType: "address" },
|
|
7916
|
+
{ name: "initializationData", type: "bytes", internalType: "bytes" }
|
|
7917
|
+
],
|
|
7918
|
+
outputs: [],
|
|
7919
|
+
stateMutability: "nonpayable"
|
|
7920
|
+
},
|
|
7921
|
+
{
|
|
7922
|
+
type: "function",
|
|
7923
|
+
name: "presale",
|
|
7924
|
+
inputs: [],
|
|
7925
|
+
outputs: [{ name: "", type: "address", internalType: "address" }],
|
|
7926
|
+
stateMutability: "view"
|
|
7927
|
+
},
|
|
7928
|
+
{
|
|
7929
|
+
type: "function",
|
|
7930
|
+
name: "setAddressOverride",
|
|
7931
|
+
inputs: [
|
|
7932
|
+
{ name: "presaleId", type: "uint256", internalType: "uint256" },
|
|
7933
|
+
{ name: "buyer", type: "address", internalType: "address" },
|
|
7934
|
+
{ name: "allowedAmount", type: "uint256", internalType: "uint256" }
|
|
7935
|
+
],
|
|
7936
|
+
outputs: [],
|
|
7937
|
+
stateMutability: "nonpayable"
|
|
7938
|
+
},
|
|
7939
|
+
{
|
|
7940
|
+
type: "function",
|
|
7941
|
+
name: "setAllowlistEnabled",
|
|
7942
|
+
inputs: [
|
|
7943
|
+
{ name: "presaleId", type: "uint256", internalType: "uint256" },
|
|
7944
|
+
{ name: "enabled", type: "bool", internalType: "bool" }
|
|
7945
|
+
],
|
|
7946
|
+
outputs: [],
|
|
7947
|
+
stateMutability: "nonpayable"
|
|
7948
|
+
},
|
|
7949
|
+
{
|
|
7950
|
+
type: "function",
|
|
7951
|
+
name: "setMerkleRoot",
|
|
7952
|
+
inputs: [
|
|
7953
|
+
{ name: "presaleId", type: "uint256", internalType: "uint256" },
|
|
7954
|
+
{ name: "merkleRoot", type: "bytes32", internalType: "bytes32" }
|
|
7955
|
+
],
|
|
7956
|
+
outputs: [],
|
|
7957
|
+
stateMutability: "nonpayable"
|
|
7958
|
+
},
|
|
7959
|
+
{
|
|
7960
|
+
type: "event",
|
|
7961
|
+
name: "Initialize",
|
|
7962
|
+
inputs: [
|
|
7963
|
+
{ name: "presaleId", type: "uint256", indexed: true, internalType: "uint256" },
|
|
7964
|
+
{ name: "presaleOwner", type: "address", indexed: true, internalType: "address" },
|
|
7965
|
+
{ name: "merkleRoot", type: "bytes32", indexed: false, internalType: "bytes32" }
|
|
7966
|
+
],
|
|
7967
|
+
anonymous: false
|
|
7968
|
+
},
|
|
7969
|
+
{
|
|
7970
|
+
type: "event",
|
|
7971
|
+
name: "SetAddressOverride",
|
|
7972
|
+
inputs: [
|
|
7973
|
+
{ name: "presaleId", type: "uint256", indexed: true, internalType: "uint256" },
|
|
7974
|
+
{ name: "buyer", type: "address", indexed: true, internalType: "address" },
|
|
7975
|
+
{ name: "allowedAmount", type: "uint256", indexed: false, internalType: "uint256" }
|
|
7976
|
+
],
|
|
7977
|
+
anonymous: false
|
|
7978
|
+
},
|
|
7979
|
+
{
|
|
7980
|
+
type: "event",
|
|
7981
|
+
name: "SetAllowlistEnabled",
|
|
7982
|
+
inputs: [
|
|
7983
|
+
{ name: "presaleId", type: "uint256", indexed: true, internalType: "uint256" },
|
|
7984
|
+
{ name: "enabled", type: "bool", indexed: false, internalType: "bool" }
|
|
7985
|
+
],
|
|
7986
|
+
anonymous: false
|
|
7987
|
+
},
|
|
7988
|
+
{
|
|
7989
|
+
type: "event",
|
|
7990
|
+
name: "SetMerkleRoot",
|
|
7991
|
+
inputs: [
|
|
7992
|
+
{ name: "presaleId", type: "uint256", indexed: true, internalType: "uint256" },
|
|
7993
|
+
{ name: "merkleRoot", type: "bytes32", indexed: false, internalType: "bytes32" }
|
|
7994
|
+
],
|
|
7995
|
+
anonymous: false
|
|
7996
|
+
},
|
|
7997
|
+
{ type: "error", name: "InvalidProof", inputs: [] },
|
|
7998
|
+
{ type: "error", name: "MerkleRootNotSet", inputs: [] },
|
|
7999
|
+
{ type: "error", name: "Unauthorized", inputs: [] }
|
|
8000
|
+
];
|
|
8001
|
+
|
|
8002
|
+
// src/v4/extensions/presale-allowlist-management.ts
|
|
8003
|
+
function getSetMerkleRootTransaction({
|
|
8004
|
+
presaleId,
|
|
8005
|
+
merkleRoot,
|
|
8006
|
+
chainId
|
|
8007
|
+
}) {
|
|
8008
|
+
const config = clankerConfigFor(chainId, "clanker_v4");
|
|
8009
|
+
if (!config?.related?.presaleAllowlist) {
|
|
8010
|
+
throw new Error(`Allowlist contract not available on chain ${chainId}`);
|
|
8011
|
+
}
|
|
8012
|
+
return {
|
|
8013
|
+
chainId,
|
|
8014
|
+
address: config.related.presaleAllowlist,
|
|
8015
|
+
abi: Clanker_PresaleAllowlist_v4_1_abi,
|
|
8016
|
+
functionName: "setMerkleRoot",
|
|
8017
|
+
args: [presaleId, merkleRoot]
|
|
8018
|
+
};
|
|
8019
|
+
}
|
|
8020
|
+
function setMerkleRoot(data) {
|
|
8021
|
+
if (!data.clanker.publicClient) throw new Error("Public client required on clanker");
|
|
8022
|
+
if (!data.clanker.wallet) throw new Error("Wallet client required on clanker");
|
|
8023
|
+
const tx = getSetMerkleRootTransaction({
|
|
8024
|
+
presaleId: data.presaleId,
|
|
8025
|
+
merkleRoot: data.merkleRoot,
|
|
8026
|
+
chainId: data.clanker.wallet.chain.id
|
|
8027
|
+
});
|
|
8028
|
+
return writeClankerContract(data.clanker.publicClient, data.clanker.wallet, tx);
|
|
8029
|
+
}
|
|
8030
|
+
function getSetAddressOverrideTransaction({
|
|
8031
|
+
presaleId,
|
|
8032
|
+
buyer,
|
|
8033
|
+
allowedAmount,
|
|
8034
|
+
chainId
|
|
8035
|
+
}) {
|
|
8036
|
+
const config = clankerConfigFor(chainId, "clanker_v4");
|
|
8037
|
+
if (!config?.related?.presaleAllowlist) {
|
|
8038
|
+
throw new Error(`Allowlist contract not available on chain ${chainId}`);
|
|
8039
|
+
}
|
|
8040
|
+
return {
|
|
8041
|
+
chainId,
|
|
8042
|
+
address: config.related.presaleAllowlist,
|
|
8043
|
+
abi: Clanker_PresaleAllowlist_v4_1_abi,
|
|
8044
|
+
functionName: "setAddressOverride",
|
|
8045
|
+
args: [presaleId, buyer, allowedAmount]
|
|
8046
|
+
};
|
|
8047
|
+
}
|
|
8048
|
+
function setAddressOverride(data) {
|
|
8049
|
+
if (!data.clanker.publicClient) throw new Error("Public client required on clanker");
|
|
8050
|
+
if (!data.clanker.wallet) throw new Error("Wallet client required on clanker");
|
|
8051
|
+
const tx = getSetAddressOverrideTransaction({
|
|
8052
|
+
presaleId: data.presaleId,
|
|
8053
|
+
buyer: data.buyer,
|
|
8054
|
+
allowedAmount: BigInt(data.allowedAmountEth * 1e18),
|
|
8055
|
+
// Convert ETH to wei
|
|
8056
|
+
chainId: data.clanker.wallet.chain.id
|
|
8057
|
+
});
|
|
8058
|
+
return writeClankerContract(data.clanker.publicClient, data.clanker.wallet, tx);
|
|
8059
|
+
}
|
|
8060
|
+
function getSetAllowlistEnabledTransaction({
|
|
8061
|
+
presaleId,
|
|
8062
|
+
enabled,
|
|
8063
|
+
chainId
|
|
8064
|
+
}) {
|
|
8065
|
+
const config = clankerConfigFor(chainId, "clanker_v4");
|
|
8066
|
+
if (!config?.related?.presaleAllowlist) {
|
|
8067
|
+
throw new Error(`Allowlist contract not available on chain ${chainId}`);
|
|
8068
|
+
}
|
|
8069
|
+
return {
|
|
8070
|
+
chainId,
|
|
8071
|
+
address: config.related.presaleAllowlist,
|
|
8072
|
+
abi: Clanker_PresaleAllowlist_v4_1_abi,
|
|
8073
|
+
functionName: "setAllowlistEnabled",
|
|
8074
|
+
args: [presaleId, enabled]
|
|
8075
|
+
};
|
|
8076
|
+
}
|
|
8077
|
+
function setAllowlistEnabled(data) {
|
|
8078
|
+
if (!data.clanker.publicClient) throw new Error("Public client required on clanker");
|
|
8079
|
+
if (!data.clanker.wallet) throw new Error("Wallet client required on clanker");
|
|
8080
|
+
const tx = getSetAllowlistEnabledTransaction({
|
|
8081
|
+
presaleId: data.presaleId,
|
|
8082
|
+
enabled: data.enabled,
|
|
8083
|
+
chainId: data.clanker.wallet.chain.id
|
|
8084
|
+
});
|
|
8085
|
+
return writeClankerContract(data.clanker.publicClient, data.clanker.wallet, tx);
|
|
8086
|
+
}
|
|
7847
8087
|
export {
|
|
7848
8088
|
PresaleStatus,
|
|
7849
8089
|
buyIntoPresale,
|
|
8090
|
+
buyIntoPresaleWithProof,
|
|
7850
8091
|
claimAirdrop,
|
|
7851
8092
|
claimEth,
|
|
7852
8093
|
claimTokens,
|
|
@@ -7857,6 +8098,7 @@ export {
|
|
|
7857
8098
|
getAllowlistAddress,
|
|
7858
8099
|
getAmountAvailableToClaim,
|
|
7859
8100
|
getBuyIntoPresaleTransaction,
|
|
8101
|
+
getBuyIntoPresaleWithProofTransaction,
|
|
7860
8102
|
getClaimAirdropTransaction,
|
|
7861
8103
|
getClaimEthTransaction,
|
|
7862
8104
|
getClaimTokensTransaction,
|
|
@@ -7865,9 +8107,15 @@ export {
|
|
|
7865
8107
|
getPresaleBuys,
|
|
7866
8108
|
getPresaleClaimed,
|
|
7867
8109
|
getPresaleState,
|
|
8110
|
+
getSetAddressOverrideTransaction,
|
|
8111
|
+
getSetAllowlistEnabledTransaction,
|
|
8112
|
+
getSetMerkleRootTransaction,
|
|
7868
8113
|
getStartPresaleTransaction,
|
|
7869
8114
|
getWithdrawFromPresaleTransaction,
|
|
7870
8115
|
registerAirdrop,
|
|
8116
|
+
setAddressOverride,
|
|
8117
|
+
setAllowlistEnabled,
|
|
8118
|
+
setMerkleRoot,
|
|
7871
8119
|
startPresale,
|
|
7872
8120
|
withdrawFromPresale
|
|
7873
8121
|
};
|
package/dist/v4/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { C as ClankerTransactionConfig, d as ClankerFeeLocker_abi, b as ClankerFactory, c as ClankerResult, e as ClankerLocker_v4_abi } from '../write-clanker-contracts-
|
|
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';
|
|
5
|
-
import { C as ClankerTokenV4 } from '../clankerTokenV4-
|
|
6
|
-
export { e as encodeFeeConfig } from '../clankerTokenV4-
|
|
5
|
+
import { C as ClankerTokenV4 } from '../clankerTokenV4-nI7uj0d1.js';
|
|
6
|
+
export { e as encodeFeeConfig } from '../clankerTokenV4-nI7uj0d1.js';
|
|
7
7
|
import { C as ClankerError } from '../errors-5Gv28Tkr.js';
|
|
8
8
|
import 'zod/v4';
|
|
9
9
|
|
package/dist/v4/index.js
CHANGED
|
@@ -6795,7 +6795,9 @@ var clankerTokenV4 = z2.strictObject({
|
|
|
6795
6795
|
hooks: addressSchema
|
|
6796
6796
|
}).default(NULL_DEVBUY_POOL_CONFIG),
|
|
6797
6797
|
/** Amount out min for the ETH -> PAIR swap. Used if the clanker is not paired with ETH. */
|
|
6798
|
-
amountOutMin: z2.number().default(0)
|
|
6798
|
+
amountOutMin: z2.number().default(0),
|
|
6799
|
+
/** Recipient address for the purchased tokens. Defaults to tokenAdmin if not specified. */
|
|
6800
|
+
recipient: addressSchema.optional()
|
|
6799
6801
|
}).optional(),
|
|
6800
6802
|
/** Fee structure for the token. */
|
|
6801
6803
|
fees: z2.discriminatedUnion("type", [
|
|
@@ -7016,7 +7018,7 @@ var clankerTokenV4Converter = async (config) => {
|
|
|
7016
7018
|
extensionData: encodeAbiParameters2(ClankerUniV4EthDevBuy_Instantiation_v4_abi, [
|
|
7017
7019
|
cfg.devBuy.poolKey,
|
|
7018
7020
|
BigInt(cfg.devBuy.amountOutMin * 1e18),
|
|
7019
|
-
cfg.tokenAdmin
|
|
7021
|
+
cfg.devBuy.recipient ?? cfg.tokenAdmin
|
|
7020
7022
|
])
|
|
7021
7023
|
}
|
|
7022
7024
|
] : [],
|
package/dist/{write-clanker-contracts-B4LSHPv2.d.ts → write-clanker-contracts-CQTURFDk.d.ts}
RENAMED
|
@@ -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 };
|