clanker-sdk 4.2.7 → 4.2.9
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/cli/cli.js +14 -6
- package/dist/cli/create-clanker.js +13 -5
- package/dist/{clankerTokenV4-nI7uj0d1.d.ts → deploy-BvFgwMVl.d.ts} +6 -1
- package/dist/index.d.ts +2 -2
- package/dist/legacyFeeClaims/index.d.ts +394 -2
- package/dist/legacyFeeClaims/index.js +6174 -33
- package/dist/v3/index.d.ts +1 -1
- package/dist/v3/index.js +12 -4
- package/dist/v4/extensions/index.d.ts +2 -2
- package/dist/v4/extensions/index.js +5 -1
- package/dist/v4/index.d.ts +6 -4
- package/dist/v4/index.js +16 -6
- package/dist/{write-clanker-contracts-CQTURFDk.d.ts → write-clanker-contracts-wZSL1UyM.d.ts} +1 -0
- package/package.json +1 -1
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-wZSL1UyM.js';
|
|
2
2
|
import * as viem from 'viem';
|
|
3
3
|
import { WalletClient, Transport, Chain, Account, PublicClient } from 'viem';
|
|
4
4
|
import { C as ClankerToken_v3_1_abi } from '../ClankerToken-Dra5lppJ.js';
|
package/dist/v3/index.js
CHANGED
|
@@ -6581,7 +6581,11 @@ var writeClankerContract = async (client, wallet, tx, options) => {
|
|
|
6581
6581
|
}
|
|
6582
6582
|
}
|
|
6583
6583
|
try {
|
|
6584
|
-
const txHash = await writeContract(wallet,
|
|
6584
|
+
const txHash = await writeContract(wallet, {
|
|
6585
|
+
...tx,
|
|
6586
|
+
dataSuffix: tx.dataSuffix
|
|
6587
|
+
// biome-ignore lint/suspicious/noExplicitAny: It's difficult to type tx correctly with viem's generic constraints
|
|
6588
|
+
});
|
|
6585
6589
|
return { txHash };
|
|
6586
6590
|
} catch (e) {
|
|
6587
6591
|
return { error: understandError(e) };
|
|
@@ -6597,7 +6601,7 @@ async function simulateDeployToken(tx, account, publicClient) {
|
|
|
6597
6601
|
}
|
|
6598
6602
|
return simulateClankerContract(publicClient, account, tx);
|
|
6599
6603
|
}
|
|
6600
|
-
async function deployToken(tx, wallet, publicClient) {
|
|
6604
|
+
async function deployToken(tx, wallet, publicClient, options) {
|
|
6601
6605
|
const account = wallet?.account;
|
|
6602
6606
|
if (!account) {
|
|
6603
6607
|
throw new Error("Wallet account required for deployToken");
|
|
@@ -6612,14 +6616,18 @@ async function deployToken(tx, wallet, publicClient) {
|
|
|
6612
6616
|
`Token chainId doesn't match wallet chainId: ${tx.chainId} != ${wallet.chain?.id}`
|
|
6613
6617
|
);
|
|
6614
6618
|
}
|
|
6615
|
-
const { gas, error: gasError } = await estimateGasClankerContract(publicClient, account,
|
|
6619
|
+
const { gas, error: gasError } = await estimateGasClankerContract(publicClient, account, {
|
|
6620
|
+
...tx,
|
|
6621
|
+
dataSuffix: options?.dataSuffix
|
|
6622
|
+
});
|
|
6616
6623
|
if (gasError) return { error: gasError };
|
|
6617
6624
|
const { txHash, error: txError } = await writeClankerContract(
|
|
6618
6625
|
publicClient,
|
|
6619
6626
|
wallet,
|
|
6620
6627
|
{
|
|
6621
6628
|
...tx,
|
|
6622
|
-
gas: gas * 12n / 10n
|
|
6629
|
+
gas: gas * 12n / 10n,
|
|
6630
|
+
dataSuffix: options?.dataSuffix
|
|
6623
6631
|
},
|
|
6624
6632
|
{
|
|
6625
6633
|
simulate: true
|
|
@@ -1,7 +1,7 @@
|
|
|
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-
|
|
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-wZSL1UyM.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 '../../
|
|
4
|
+
import { a as Chain, C as ClankerTokenV4 } from '../../deploy-BvFgwMVl.js';
|
|
5
5
|
import { Clanker } from '../index.js';
|
|
6
6
|
import { C as ClankerError } from '../../errors-5Gv28Tkr.js';
|
|
7
7
|
import 'viem';
|
|
@@ -5838,7 +5838,11 @@ var writeClankerContract = async (client, wallet, tx, options) => {
|
|
|
5838
5838
|
}
|
|
5839
5839
|
}
|
|
5840
5840
|
try {
|
|
5841
|
-
const txHash = await writeContract(wallet,
|
|
5841
|
+
const txHash = await writeContract(wallet, {
|
|
5842
|
+
...tx,
|
|
5843
|
+
dataSuffix: tx.dataSuffix
|
|
5844
|
+
// biome-ignore lint/suspicious/noExplicitAny: It's difficult to type tx correctly with viem's generic constraints
|
|
5845
|
+
});
|
|
5842
5846
|
return { txHash };
|
|
5843
5847
|
} catch (e) {
|
|
5844
5848
|
return { error: understandError(e) };
|
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-wZSL1UyM.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 '../
|
|
6
|
-
export { e as encodeFeeConfig } from '../
|
|
5
|
+
import { C as ClankerTokenV4, D as DeployTokenOptions } from '../deploy-BvFgwMVl.js';
|
|
6
|
+
export { e as encodeFeeConfig } from '../deploy-BvFgwMVl.js';
|
|
7
7
|
import { C as ClankerError } from '../errors-5Gv28Tkr.js';
|
|
8
8
|
import 'zod/v4';
|
|
9
9
|
|
|
@@ -1518,9 +1518,11 @@ declare class Clanker {
|
|
|
1518
1518
|
* Deploy a token
|
|
1519
1519
|
*
|
|
1520
1520
|
* @param token The token to deploy
|
|
1521
|
+
* @param options Optional deployment options
|
|
1522
|
+
* @param options.dataSuffix Data to append to transaction calldata (e.g., Base builder codes)
|
|
1521
1523
|
* @returns Transaction hash and awaitable function for full deployment
|
|
1522
1524
|
*/
|
|
1523
|
-
deploy(token: ClankerTokenV4): Promise<({
|
|
1525
|
+
deploy(token: ClankerTokenV4, options?: DeployTokenOptions): Promise<({
|
|
1524
1526
|
txHash: `0x${string}`;
|
|
1525
1527
|
waitForTransaction: () => ClankerResult<{
|
|
1526
1528
|
address: `0x${string}`;
|
package/dist/v4/index.js
CHANGED
|
@@ -7207,7 +7207,11 @@ var writeClankerContract = async (client, wallet, tx, options) => {
|
|
|
7207
7207
|
}
|
|
7208
7208
|
}
|
|
7209
7209
|
try {
|
|
7210
|
-
const txHash = await writeContract(wallet,
|
|
7210
|
+
const txHash = await writeContract(wallet, {
|
|
7211
|
+
...tx,
|
|
7212
|
+
dataSuffix: tx.dataSuffix
|
|
7213
|
+
// biome-ignore lint/suspicious/noExplicitAny: It's difficult to type tx correctly with viem's generic constraints
|
|
7214
|
+
});
|
|
7211
7215
|
return { txHash };
|
|
7212
7216
|
} catch (e) {
|
|
7213
7217
|
return { error: understandError(e) };
|
|
@@ -7223,7 +7227,7 @@ async function simulateDeployToken(tx, account, publicClient) {
|
|
|
7223
7227
|
}
|
|
7224
7228
|
return simulateClankerContract(publicClient, account, tx);
|
|
7225
7229
|
}
|
|
7226
|
-
async function deployToken(tx, wallet, publicClient) {
|
|
7230
|
+
async function deployToken(tx, wallet, publicClient, options) {
|
|
7227
7231
|
const account = wallet?.account;
|
|
7228
7232
|
if (!account) {
|
|
7229
7233
|
throw new Error("Wallet account required for deployToken");
|
|
@@ -7238,14 +7242,18 @@ async function deployToken(tx, wallet, publicClient) {
|
|
|
7238
7242
|
`Token chainId doesn't match wallet chainId: ${tx.chainId} != ${wallet.chain?.id}`
|
|
7239
7243
|
);
|
|
7240
7244
|
}
|
|
7241
|
-
const { gas, error: gasError } = await estimateGasClankerContract(publicClient, account,
|
|
7245
|
+
const { gas, error: gasError } = await estimateGasClankerContract(publicClient, account, {
|
|
7246
|
+
...tx,
|
|
7247
|
+
dataSuffix: options?.dataSuffix
|
|
7248
|
+
});
|
|
7242
7249
|
if (gasError) return { error: gasError };
|
|
7243
7250
|
const { txHash, error: txError } = await writeClankerContract(
|
|
7244
7251
|
publicClient,
|
|
7245
7252
|
wallet,
|
|
7246
7253
|
{
|
|
7247
7254
|
...tx,
|
|
7248
|
-
gas: gas * 12n / 10n
|
|
7255
|
+
gas: gas * 12n / 10n,
|
|
7256
|
+
dataSuffix: options?.dataSuffix
|
|
7249
7257
|
},
|
|
7250
7258
|
{
|
|
7251
7259
|
simulate: true
|
|
@@ -7402,13 +7410,15 @@ var Clanker = class {
|
|
|
7402
7410
|
* Deploy a token
|
|
7403
7411
|
*
|
|
7404
7412
|
* @param token The token to deploy
|
|
7413
|
+
* @param options Optional deployment options
|
|
7414
|
+
* @param options.dataSuffix Data to append to transaction calldata (e.g., Base builder codes)
|
|
7405
7415
|
* @returns Transaction hash and awaitable function for full deployment
|
|
7406
7416
|
*/
|
|
7407
|
-
async deploy(token) {
|
|
7417
|
+
async deploy(token, options) {
|
|
7408
7418
|
if (!this.wallet) throw new Error("Wallet client required for deployment");
|
|
7409
7419
|
if (!this.publicClient) throw new Error("Public client required for deployment");
|
|
7410
7420
|
const input = await this.getDeployTransaction(token);
|
|
7411
|
-
return deployToken(input, this.wallet, this.publicClient);
|
|
7421
|
+
return deployToken(input, this.wallet, this.publicClient, options);
|
|
7412
7422
|
}
|
|
7413
7423
|
/**
|
|
7414
7424
|
* Get an abi-typed transaction for updating the reward recipient.
|
package/dist/{write-clanker-contracts-CQTURFDk.d.ts → write-clanker-contracts-wZSL1UyM.d.ts}
RENAMED
|
@@ -9415,6 +9415,7 @@ type ClankerTransactionConfig<abi extends ClankerContract = ClankerContract, fun
|
|
|
9415
9415
|
gasPrice?: bigint;
|
|
9416
9416
|
value?: bigint;
|
|
9417
9417
|
chainId?: number;
|
|
9418
|
+
dataSuffix?: `0x${string}`;
|
|
9418
9419
|
};
|
|
9419
9420
|
|
|
9420
9421
|
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 };
|