clanker-sdk 4.2.14 → 4.2.16
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 +48 -8
- package/dist/cli/commands/rewards.js +46 -6
- package/dist/cli/utils/output.js +1 -1
- package/dist/v3/index.d.ts +2 -2
- package/dist/v4/index.d.ts +2 -2
- package/package.json +1 -1
package/dist/cli/cli.js
CHANGED
|
@@ -8335,7 +8335,7 @@ function getBanner(version) {
|
|
|
8335
8335
|
lines.push(` ${gradient(line, BRAND_FROM, BRAND_TO)}`);
|
|
8336
8336
|
}
|
|
8337
8337
|
lines.push("");
|
|
8338
|
-
lines.push(` ${dim(gray("Deploy tokens on
|
|
8338
|
+
lines.push(` ${dim(gray("Deploy tokens on EVM chains"))} ${dim(cyan(`v${version}`))}`);
|
|
8339
8339
|
lines.push(` ${separator(48)}`);
|
|
8340
8340
|
lines.push("");
|
|
8341
8341
|
return lines.join("\n");
|
|
@@ -10397,8 +10397,19 @@ async function deployV3(opts, jsonMode) {
|
|
|
10397
10397
|
|
|
10398
10398
|
// src/cli/commands/rewards.ts
|
|
10399
10399
|
function registerRewardsCommand(program2) {
|
|
10400
|
-
const rewards = program2.command("rewards").description("
|
|
10401
|
-
rewards.command("claim").description("Claim
|
|
10400
|
+
const rewards = program2.command("rewards").description("Check and claim creator rewards (LP fees) for a token");
|
|
10401
|
+
rewards.command("claim").description("Claim accumulated fees for a specific reward token (e.g. WETH, USDT)").requiredOption(
|
|
10402
|
+
"--token <address>",
|
|
10403
|
+
"reward token to claim (the fee token address, e.g. WETH \u2014 not the clanker token)"
|
|
10404
|
+
).option("--recipient <address>", "reward recipient address (defaults to wallet)").addHelpText(
|
|
10405
|
+
"after",
|
|
10406
|
+
`
|
|
10407
|
+
Examples:
|
|
10408
|
+
$ clanker rewards claim --token 0x4200000000000000000000000000000000000006
|
|
10409
|
+
$ clanker rewards claim --token 0x4200000000000000000000000000000000000006 --chain bsc
|
|
10410
|
+
$ clanker rewards claim --token <WETH_ADDRESS> --recipient 0xYourAddr --dry-run
|
|
10411
|
+
`
|
|
10412
|
+
).action(async (_opts, command) => {
|
|
10402
10413
|
const globalOpts = command.parent?.parent?.opts();
|
|
10403
10414
|
const localOpts = command.opts();
|
|
10404
10415
|
const jsonMode = globalOpts.json ?? false;
|
|
@@ -10423,7 +10434,18 @@ function registerRewardsCommand(program2) {
|
|
|
10423
10434
|
process.exit(1);
|
|
10424
10435
|
}
|
|
10425
10436
|
});
|
|
10426
|
-
rewards.command("available").description("Check
|
|
10437
|
+
rewards.command("available").description("Check claimable fee balance for a specific reward token").requiredOption(
|
|
10438
|
+
"--token <address>",
|
|
10439
|
+
"reward token to check (the fee token address, e.g. WETH \u2014 not the clanker token)"
|
|
10440
|
+
).option("--recipient <address>", "reward recipient address (defaults to wallet)").addHelpText(
|
|
10441
|
+
"after",
|
|
10442
|
+
`
|
|
10443
|
+
Examples:
|
|
10444
|
+
$ clanker rewards available --token 0x4200000000000000000000000000000000000006
|
|
10445
|
+
$ clanker rewards available --token 0x4200000000000000000000000000000000000006 --chain bsc
|
|
10446
|
+
$ clanker rewards available --token <WETH_ADDRESS> --recipient 0xSomeAddr
|
|
10447
|
+
`
|
|
10448
|
+
).action(async (_opts, command) => {
|
|
10427
10449
|
const globalOpts = command.parent?.parent?.opts();
|
|
10428
10450
|
const localOpts = command.opts();
|
|
10429
10451
|
const jsonMode = globalOpts.json ?? false;
|
|
@@ -10454,7 +10476,13 @@ function registerRewardsCommand(program2) {
|
|
|
10454
10476
|
process.exit(1);
|
|
10455
10477
|
}
|
|
10456
10478
|
});
|
|
10457
|
-
rewards.command("info").description("Show reward admins and recipients for a token").requiredOption("--token <address>", "token address").
|
|
10479
|
+
rewards.command("info").description("Show reward admins and recipients for a clanker token").requiredOption("--token <address>", "clanker token address").addHelpText(
|
|
10480
|
+
"after",
|
|
10481
|
+
`
|
|
10482
|
+
Example:
|
|
10483
|
+
$ clanker rewards info --token 0xe75785C92cc93938160e0BE449073A1C35521010
|
|
10484
|
+
`
|
|
10485
|
+
).action(async (_opts, command) => {
|
|
10458
10486
|
const globalOpts = command.parent?.parent?.opts();
|
|
10459
10487
|
const localOpts = command.opts();
|
|
10460
10488
|
const jsonMode = globalOpts.json ?? false;
|
|
@@ -10472,7 +10500,13 @@ function registerRewardsCommand(program2) {
|
|
|
10472
10500
|
process.exit(1);
|
|
10473
10501
|
}
|
|
10474
10502
|
});
|
|
10475
|
-
rewards.command("update-recipient").description("Update a
|
|
10503
|
+
rewards.command("update-recipient").description("Update who receives rewards for a clanker token").requiredOption("--token <address>", "clanker token address").requiredOption("--index <n>", "reward position index (0-based)").requiredOption("--new-recipient <address>", "new recipient address").addHelpText(
|
|
10504
|
+
"after",
|
|
10505
|
+
`
|
|
10506
|
+
Example:
|
|
10507
|
+
$ clanker rewards update-recipient --token 0xClankerToken --index 0 --new-recipient 0xNewAddr
|
|
10508
|
+
`
|
|
10509
|
+
).action(async (_opts, command) => {
|
|
10476
10510
|
const globalOpts = command.parent?.parent?.opts();
|
|
10477
10511
|
const localOpts = command.opts();
|
|
10478
10512
|
const jsonMode = globalOpts.json ?? false;
|
|
@@ -10508,7 +10542,13 @@ function registerRewardsCommand(program2) {
|
|
|
10508
10542
|
process.exit(1);
|
|
10509
10543
|
}
|
|
10510
10544
|
});
|
|
10511
|
-
rewards.command("update-admin").description("Update a
|
|
10545
|
+
rewards.command("update-admin").description("Update who can manage rewards for a clanker token").requiredOption("--token <address>", "clanker token address").requiredOption("--index <n>", "reward position index (0-based)").requiredOption("--new-admin <address>", "new admin address").addHelpText(
|
|
10546
|
+
"after",
|
|
10547
|
+
`
|
|
10548
|
+
Example:
|
|
10549
|
+
$ clanker rewards update-admin --token 0xClankerToken --index 0 --new-admin 0xNewAdmin
|
|
10550
|
+
`
|
|
10551
|
+
).action(async (_opts, command) => {
|
|
10512
10552
|
const globalOpts = command.parent?.parent?.opts();
|
|
10513
10553
|
const localOpts = command.opts();
|
|
10514
10554
|
const jsonMode = globalOpts.json ?? false;
|
|
@@ -10832,7 +10872,7 @@ var __dirname2 = dirname(fileURLToPath(import.meta.url));
|
|
|
10832
10872
|
var pkg = JSON.parse(readFileSync3(join2(__dirname2, "..", "..", "package.json"), "utf8"));
|
|
10833
10873
|
var VERSION = pkg.version;
|
|
10834
10874
|
var program = new Command();
|
|
10835
|
-
program.name("clanker").description("Deploy and manage tokens on
|
|
10875
|
+
program.name("clanker").description("Deploy and manage tokens on EVM chains").version(VERSION).option("--chain <name>", `target chain (${CHAIN_NAMES.join(", ")})`, "base").option("--rpc <url>", "custom RPC URL").option("--private-key <key>", "wallet private key (or set PRIVATE_KEY env)").option("--json", "output machine-readable JSON", false).option("--dry-run", "simulate transaction without sending", false);
|
|
10836
10876
|
program.addHelpText("beforeAll", () => getBanner(VERSION));
|
|
10837
10877
|
program.addHelpText(
|
|
10838
10878
|
"after",
|
|
@@ -8084,8 +8084,19 @@ function resolvePublicClient(opts) {
|
|
|
8084
8084
|
|
|
8085
8085
|
// src/cli/commands/rewards.ts
|
|
8086
8086
|
function registerRewardsCommand(program) {
|
|
8087
|
-
const rewards = program.command("rewards").description("
|
|
8088
|
-
rewards.command("claim").description("Claim
|
|
8087
|
+
const rewards = program.command("rewards").description("Check and claim creator rewards (LP fees) for a token");
|
|
8088
|
+
rewards.command("claim").description("Claim accumulated fees for a specific reward token (e.g. WETH, USDT)").requiredOption(
|
|
8089
|
+
"--token <address>",
|
|
8090
|
+
"reward token to claim (the fee token address, e.g. WETH \u2014 not the clanker token)"
|
|
8091
|
+
).option("--recipient <address>", "reward recipient address (defaults to wallet)").addHelpText(
|
|
8092
|
+
"after",
|
|
8093
|
+
`
|
|
8094
|
+
Examples:
|
|
8095
|
+
$ clanker rewards claim --token 0x4200000000000000000000000000000000000006
|
|
8096
|
+
$ clanker rewards claim --token 0x4200000000000000000000000000000000000006 --chain bsc
|
|
8097
|
+
$ clanker rewards claim --token <WETH_ADDRESS> --recipient 0xYourAddr --dry-run
|
|
8098
|
+
`
|
|
8099
|
+
).action(async (_opts, command) => {
|
|
8089
8100
|
const globalOpts = command.parent?.parent?.opts();
|
|
8090
8101
|
const localOpts = command.opts();
|
|
8091
8102
|
const jsonMode = globalOpts.json ?? false;
|
|
@@ -8110,7 +8121,18 @@ function registerRewardsCommand(program) {
|
|
|
8110
8121
|
process.exit(1);
|
|
8111
8122
|
}
|
|
8112
8123
|
});
|
|
8113
|
-
rewards.command("available").description("Check
|
|
8124
|
+
rewards.command("available").description("Check claimable fee balance for a specific reward token").requiredOption(
|
|
8125
|
+
"--token <address>",
|
|
8126
|
+
"reward token to check (the fee token address, e.g. WETH \u2014 not the clanker token)"
|
|
8127
|
+
).option("--recipient <address>", "reward recipient address (defaults to wallet)").addHelpText(
|
|
8128
|
+
"after",
|
|
8129
|
+
`
|
|
8130
|
+
Examples:
|
|
8131
|
+
$ clanker rewards available --token 0x4200000000000000000000000000000000000006
|
|
8132
|
+
$ clanker rewards available --token 0x4200000000000000000000000000000000000006 --chain bsc
|
|
8133
|
+
$ clanker rewards available --token <WETH_ADDRESS> --recipient 0xSomeAddr
|
|
8134
|
+
`
|
|
8135
|
+
).action(async (_opts, command) => {
|
|
8114
8136
|
const globalOpts = command.parent?.parent?.opts();
|
|
8115
8137
|
const localOpts = command.opts();
|
|
8116
8138
|
const jsonMode = globalOpts.json ?? false;
|
|
@@ -8141,7 +8163,13 @@ function registerRewardsCommand(program) {
|
|
|
8141
8163
|
process.exit(1);
|
|
8142
8164
|
}
|
|
8143
8165
|
});
|
|
8144
|
-
rewards.command("info").description("Show reward admins and recipients for a token").requiredOption("--token <address>", "token address").
|
|
8166
|
+
rewards.command("info").description("Show reward admins and recipients for a clanker token").requiredOption("--token <address>", "clanker token address").addHelpText(
|
|
8167
|
+
"after",
|
|
8168
|
+
`
|
|
8169
|
+
Example:
|
|
8170
|
+
$ clanker rewards info --token 0xe75785C92cc93938160e0BE449073A1C35521010
|
|
8171
|
+
`
|
|
8172
|
+
).action(async (_opts, command) => {
|
|
8145
8173
|
const globalOpts = command.parent?.parent?.opts();
|
|
8146
8174
|
const localOpts = command.opts();
|
|
8147
8175
|
const jsonMode = globalOpts.json ?? false;
|
|
@@ -8159,7 +8187,13 @@ function registerRewardsCommand(program) {
|
|
|
8159
8187
|
process.exit(1);
|
|
8160
8188
|
}
|
|
8161
8189
|
});
|
|
8162
|
-
rewards.command("update-recipient").description("Update a
|
|
8190
|
+
rewards.command("update-recipient").description("Update who receives rewards for a clanker token").requiredOption("--token <address>", "clanker token address").requiredOption("--index <n>", "reward position index (0-based)").requiredOption("--new-recipient <address>", "new recipient address").addHelpText(
|
|
8191
|
+
"after",
|
|
8192
|
+
`
|
|
8193
|
+
Example:
|
|
8194
|
+
$ clanker rewards update-recipient --token 0xClankerToken --index 0 --new-recipient 0xNewAddr
|
|
8195
|
+
`
|
|
8196
|
+
).action(async (_opts, command) => {
|
|
8163
8197
|
const globalOpts = command.parent?.parent?.opts();
|
|
8164
8198
|
const localOpts = command.opts();
|
|
8165
8199
|
const jsonMode = globalOpts.json ?? false;
|
|
@@ -8195,7 +8229,13 @@ function registerRewardsCommand(program) {
|
|
|
8195
8229
|
process.exit(1);
|
|
8196
8230
|
}
|
|
8197
8231
|
});
|
|
8198
|
-
rewards.command("update-admin").description("Update a
|
|
8232
|
+
rewards.command("update-admin").description("Update who can manage rewards for a clanker token").requiredOption("--token <address>", "clanker token address").requiredOption("--index <n>", "reward position index (0-based)").requiredOption("--new-admin <address>", "new admin address").addHelpText(
|
|
8233
|
+
"after",
|
|
8234
|
+
`
|
|
8235
|
+
Example:
|
|
8236
|
+
$ clanker rewards update-admin --token 0xClankerToken --index 0 --new-admin 0xNewAdmin
|
|
8237
|
+
`
|
|
8238
|
+
).action(async (_opts, command) => {
|
|
8199
8239
|
const globalOpts = command.parent?.parent?.opts();
|
|
8200
8240
|
const localOpts = command.opts();
|
|
8201
8241
|
const jsonMode = globalOpts.json ?? false;
|
package/dist/cli/utils/output.js
CHANGED
|
@@ -101,7 +101,7 @@ function getBanner(version) {
|
|
|
101
101
|
lines.push(` ${gradient(line, BRAND_FROM, BRAND_TO)}`);
|
|
102
102
|
}
|
|
103
103
|
lines.push("");
|
|
104
|
-
lines.push(` ${dim(gray("Deploy tokens on
|
|
104
|
+
lines.push(` ${dim(gray("Deploy tokens on EVM chains"))} ${dim(cyan(`v${version}`))}`);
|
|
105
105
|
lines.push(` ${separator(48)}`);
|
|
106
106
|
lines.push("");
|
|
107
107
|
return lines.join("\n");
|
package/dist/v3/index.d.ts
CHANGED
|
@@ -877,7 +877,7 @@ declare class Clanker {
|
|
|
877
877
|
}];
|
|
878
878
|
readonly stateMutability: "view";
|
|
879
879
|
readonly type: "function";
|
|
880
|
-
}], "
|
|
880
|
+
}], "deployToken" | "renounceOwnership" | "transferOwnership" | "updateLiquidityLocker" | "setDeprecated" | "claimRewards" | "setAdmin" | "deployTokenWithCustomTeamRewardRecipient" | "deployTokenZeroSupply" | "initialize" | "updateVault"> & {
|
|
881
881
|
error?: undefined;
|
|
882
882
|
}) | ({
|
|
883
883
|
result?: undefined;
|
|
@@ -4519,7 +4519,7 @@ declare class Clanker {
|
|
|
4519
4519
|
* @param requestorAddress Requestor for the deployment. Various admins will fall back to this.
|
|
4520
4520
|
* @returns Abi transaction
|
|
4521
4521
|
*/
|
|
4522
|
-
deploySimulate(token: ClankerTokenV3, account?: Account): Promise<(viem.SimulateContractReturnType<ClankerFactory, "
|
|
4522
|
+
deploySimulate(token: ClankerTokenV3, account?: Account): Promise<(viem.SimulateContractReturnType<ClankerFactory, "deployToken" | "renounceOwnership" | "transferOwnership" | "updateLiquidityLocker" | "setDeprecated" | "claimRewards" | "setAdmin" | "deployTokenWithCustomTeamRewardRecipient" | "deployTokenZeroSupply" | "initialize" | "updateVault" | "claimTeamFees" | "setExtension" | "setHook" | "setLocker" | "setMevModule" | "setTeamFeeRecipient"> & {
|
|
4523
4523
|
error?: undefined;
|
|
4524
4524
|
}) | ({
|
|
4525
4525
|
result?: undefined;
|
package/dist/v4/index.d.ts
CHANGED
|
@@ -332,7 +332,7 @@ declare class Clanker {
|
|
|
332
332
|
readonly outputs: readonly [];
|
|
333
333
|
readonly stateMutability: "nonpayable";
|
|
334
334
|
readonly type: "function";
|
|
335
|
-
}], "
|
|
335
|
+
}], "claim" | "renounceOwnership" | "transferOwnership" | "addDepositor" | "storeFees"> & {
|
|
336
336
|
error?: undefined;
|
|
337
337
|
}) | ({
|
|
338
338
|
result?: undefined;
|
|
@@ -1507,7 +1507,7 @@ declare class Clanker {
|
|
|
1507
1507
|
* @param account Optional account for the deployer
|
|
1508
1508
|
* @returns Abi transaction
|
|
1509
1509
|
*/
|
|
1510
|
-
deploySimulate(token: ClankerTokenV4, account?: Account): Promise<(viem.SimulateContractReturnType<ClankerFactory, "
|
|
1510
|
+
deploySimulate(token: ClankerTokenV4, account?: Account): Promise<(viem.SimulateContractReturnType<ClankerFactory, "deployToken" | "renounceOwnership" | "transferOwnership" | "updateLiquidityLocker" | "setDeprecated" | "claimRewards" | "setAdmin" | "deployTokenWithCustomTeamRewardRecipient" | "deployTokenZeroSupply" | "initialize" | "updateVault" | "claimTeamFees" | "setExtension" | "setHook" | "setLocker" | "setMevModule" | "setTeamFeeRecipient"> & {
|
|
1511
1511
|
error?: undefined;
|
|
1512
1512
|
}) | ({
|
|
1513
1513
|
result?: undefined;
|