clanker-sdk 4.1.20 → 4.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,6 +22,9 @@ type RelatedV4 = {
22
22
  feeLocker: `0x${string}`;
23
23
  feeStaticHook: `0x${string}`;
24
24
  feeDynamicHook: `0x${string}`;
25
+ mevModuleV2?: `0x${string}`;
26
+ feeStaticHookV2?: `0x${string}`;
27
+ feeDynamicHookV2?: `0x${string}`;
25
28
  };
26
29
  type RelatedAddresses = RelatedV0 | RelatedV1 | RelatedV2 | RelatedV3 | RelatedV4;
27
30
  type ClankerDeployment<T extends RelatedAddresses = RelatedAddresses> = {
@@ -5301,9 +5304,12 @@ declare const CLANKERS: {
5301
5304
  airdrop: "0xf652B3610D75D81871bf96DB50825d9af28391E0";
5302
5305
  devbuy: "0x1331f0788F9c08C8F38D52c7a1152250A9dE00be";
5303
5306
  mevModule: "0xFdc013ce003980889cFfd66b0c8329545ae1d1E8";
5307
+ mevModuleV2: "0xebB25BB797D82CB78E1bc70406b13233c0854413";
5304
5308
  feeLocker: "0xF3622742b1E446D92e45E22923Ef11C2fcD55D68";
5305
5309
  feeStaticHook: "0xDd5EeaFf7BD481AD55Db083062b13a3cdf0A68CC";
5310
+ feeStaticHookV2: "0xb429d62f8f3bFFb98CdB9569533eA23bF0Ba28CC";
5306
5311
  feeDynamicHook: "0x34a45c6B61876d739400Bd71228CbcbD4F53E8cC";
5312
+ feeDynamicHookV2: "0xd60D6B218116cFd801E28F78d011a203D2b068Cc";
5307
5313
  };
5308
5314
  };
5309
5315
  readonly clanker_v4_sepolia: {
@@ -6136,7 +6142,9 @@ declare const CLANKERS: {
6136
6142
  mevModule: "0x261fE99C4D0D41EE8d0e594D11aec740E8354ab0";
6137
6143
  feeLocker: "0x42A95190B4088C88Dd904d930c79deC1158bF09D";
6138
6144
  feeStaticHook: "0xDFcCcfBeef7F3Fc8b16027Ce6feACb48024068cC";
6145
+ feeStaticHookV2: "0x11b51DBC2f7F683b81CeDa83DC0078D57bA328cc";
6139
6146
  feeDynamicHook: "0xE63b0A59100698f379F9B577441A561bAF9828cc";
6147
+ feeDynamicHookV2: "0xBF4983dC0f2F8FE78C5cf8Fc621f294A993728Cc";
6140
6148
  };
6141
6149
  };
6142
6150
  readonly clanker_v4_arbitrum: {
@@ -7849,6 +7857,11 @@ declare const clankerTokenV4: z.ZodObject<{
7849
7857
  messageId: z.ZodOptional<z.ZodString>;
7850
7858
  id: z.ZodOptional<z.ZodString>;
7851
7859
  }, z.core.$strict>>;
7860
+ /** [v4.1+ only] Custom developer extension */
7861
+ poolExtension: z.ZodPrefault<z.ZodObject<{
7862
+ address: z.ZodCustom<`0x${string}`, `0x${string}`>;
7863
+ initData: z.ZodCustom<`0x${string}`, `0x${string}`>;
7864
+ }, z.core.$strip>>;
7852
7865
  /** Pool information */
7853
7866
  pool: z.ZodPrefault<z.ZodObject<{
7854
7867
  pairedToken: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"WETH">, z.ZodCustom<`0x${string}`, `0x${string}`>]>>;
@@ -7907,6 +7920,12 @@ declare const clankerTokenV4: z.ZodObject<{
7907
7920
  feeControlNumerator: z.ZodNumber;
7908
7921
  decayFilterBps: z.ZodNumber;
7909
7922
  }, z.core.$strip>]>>;
7923
+ /** [v4.1+ only] Sniper fees */
7924
+ sniperFees: z.ZodPrefault<z.ZodObject<{
7925
+ startingFee: z.ZodNumber;
7926
+ endingFee: z.ZodNumber;
7927
+ secondsToDecay: z.ZodNumber;
7928
+ }, z.core.$strip>>;
7910
7929
  /** Rewards & recipients for rewards generated by the token. */
7911
7930
  rewards: z.ZodOptional<z.ZodObject<{
7912
7931
  recipients: z.ZodArray<z.ZodObject<{
@@ -7927,7 +7946,7 @@ type ClankerTokenV4 = z.input<typeof clankerTokenV4>;
7927
7946
  * @param clankerConfig A clanker configuration
7928
7947
  * @returns A correctly formatted fee configuration
7929
7948
  */
7930
- declare function encodeFeeConfig(config: z.infer<typeof clankerTokenV4>['fees'], clankerConfig: ClankerDeployment<RelatedV4>): {
7949
+ declare function encodeFeeConfig(tokenConfig: z.infer<typeof clankerTokenV4>, clankerConfig: ClankerDeployment<RelatedV4>): {
7931
7950
  hook: Address;
7932
7951
  poolData: `0x${string}`;
7933
7952
  };
package/dist/cli/cli.js CHANGED
@@ -4393,9 +4393,12 @@ var init_clankers = __esm({
4393
4393
  airdrop: "0xf652B3610D75D81871bf96DB50825d9af28391E0",
4394
4394
  devbuy: "0x1331f0788F9c08C8F38D52c7a1152250A9dE00be",
4395
4395
  mevModule: "0xFdc013ce003980889cFfd66b0c8329545ae1d1E8",
4396
+ mevModuleV2: "0xebB25BB797D82CB78E1bc70406b13233c0854413",
4396
4397
  feeLocker: "0xF3622742b1E446D92e45E22923Ef11C2fcD55D68",
4397
4398
  feeStaticHook: "0xDd5EeaFf7BD481AD55Db083062b13a3cdf0A68CC",
4398
- feeDynamicHook: "0x34a45c6B61876d739400Bd71228CbcbD4F53E8cC"
4399
+ feeStaticHookV2: "0xb429d62f8f3bFFb98CdB9569533eA23bF0Ba28CC",
4400
+ feeDynamicHook: "0x34a45c6B61876d739400Bd71228CbcbD4F53E8cC",
4401
+ feeDynamicHookV2: "0xd60D6B218116cFd801E28F78d011a203D2b068Cc"
4399
4402
  }
4400
4403
  },
4401
4404
  clanker_v4_sepolia: {
@@ -4411,7 +4414,9 @@ var init_clankers = __esm({
4411
4414
  mevModule: "0x261fE99C4D0D41EE8d0e594D11aec740E8354ab0",
4412
4415
  feeLocker: "0x42A95190B4088C88Dd904d930c79deC1158bF09D",
4413
4416
  feeStaticHook: "0xDFcCcfBeef7F3Fc8b16027Ce6feACb48024068cC",
4414
- feeDynamicHook: "0xE63b0A59100698f379F9B577441A561bAF9828cc"
4417
+ feeStaticHookV2: "0x11b51DBC2f7F683b81CeDa83DC0078D57bA328cc",
4418
+ feeDynamicHook: "0xE63b0A59100698f379F9B577441A561bAF9828cc",
4419
+ feeDynamicHookV2: "0xBF4983dC0f2F8FE78C5cf8Fc621f294A993728Cc"
4415
4420
  }
4416
4421
  },
4417
4422
  clanker_v4_arbitrum: {
@@ -4323,9 +4323,12 @@ var CLANKERS = {
4323
4323
  airdrop: "0xf652B3610D75D81871bf96DB50825d9af28391E0",
4324
4324
  devbuy: "0x1331f0788F9c08C8F38D52c7a1152250A9dE00be",
4325
4325
  mevModule: "0xFdc013ce003980889cFfd66b0c8329545ae1d1E8",
4326
+ mevModuleV2: "0xebB25BB797D82CB78E1bc70406b13233c0854413",
4326
4327
  feeLocker: "0xF3622742b1E446D92e45E22923Ef11C2fcD55D68",
4327
4328
  feeStaticHook: "0xDd5EeaFf7BD481AD55Db083062b13a3cdf0A68CC",
4328
- feeDynamicHook: "0x34a45c6B61876d739400Bd71228CbcbD4F53E8cC"
4329
+ feeStaticHookV2: "0xb429d62f8f3bFFb98CdB9569533eA23bF0Ba28CC",
4330
+ feeDynamicHook: "0x34a45c6B61876d739400Bd71228CbcbD4F53E8cC",
4331
+ feeDynamicHookV2: "0xd60D6B218116cFd801E28F78d011a203D2b068Cc"
4329
4332
  }
4330
4333
  },
4331
4334
  clanker_v4_sepolia: {
@@ -4341,7 +4344,9 @@ var CLANKERS = {
4341
4344
  mevModule: "0x261fE99C4D0D41EE8d0e594D11aec740E8354ab0",
4342
4345
  feeLocker: "0x42A95190B4088C88Dd904d930c79deC1158bF09D",
4343
4346
  feeStaticHook: "0xDFcCcfBeef7F3Fc8b16027Ce6feACb48024068cC",
4344
- feeDynamicHook: "0xE63b0A59100698f379F9B577441A561bAF9828cc"
4347
+ feeStaticHookV2: "0x11b51DBC2f7F683b81CeDa83DC0078D57bA328cc",
4348
+ feeDynamicHook: "0xE63b0A59100698f379F9B577441A561bAF9828cc",
4349
+ feeDynamicHookV2: "0xBF4983dC0f2F8FE78C5cf8Fc621f294A993728Cc"
4345
4350
  }
4346
4351
  },
4347
4352
  clanker_v4_arbitrum: {
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { C as ClankerTokenV3 } from './clankerTokenV3-BqHTF9QY.js';
2
- import { C as Chain, a as ClankerTokenV4, b as ClankerDeployment } from './clankerTokenV4-BoDH1QfY.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-BoDH1QfY.js';
2
+ import { C as Chain, a as ClankerTokenV4, b as ClankerDeployment } from './clankerTokenV4-K5Wc0bcj.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-K5Wc0bcj.js';
4
4
  import { ContractConstructorArgs } from 'viem';
5
5
  import { C as ClankerToken_v3_1_abi, a as ClankerToken_v4_abi } from './ClankerToken-Dra5lppJ.js';
6
6
  import { StandardMerkleTree } from '@openzeppelin/merkle-tree';
package/dist/index.js CHANGED
@@ -4943,9 +4943,12 @@ var CLANKERS = {
4943
4943
  airdrop: "0xf652B3610D75D81871bf96DB50825d9af28391E0",
4944
4944
  devbuy: "0x1331f0788F9c08C8F38D52c7a1152250A9dE00be",
4945
4945
  mevModule: "0xFdc013ce003980889cFfd66b0c8329545ae1d1E8",
4946
+ mevModuleV2: "0xebB25BB797D82CB78E1bc70406b13233c0854413",
4946
4947
  feeLocker: "0xF3622742b1E446D92e45E22923Ef11C2fcD55D68",
4947
4948
  feeStaticHook: "0xDd5EeaFf7BD481AD55Db083062b13a3cdf0A68CC",
4948
- feeDynamicHook: "0x34a45c6B61876d739400Bd71228CbcbD4F53E8cC"
4949
+ feeStaticHookV2: "0xb429d62f8f3bFFb98CdB9569533eA23bF0Ba28CC",
4950
+ feeDynamicHook: "0x34a45c6B61876d739400Bd71228CbcbD4F53E8cC",
4951
+ feeDynamicHookV2: "0xd60D6B218116cFd801E28F78d011a203D2b068Cc"
4949
4952
  }
4950
4953
  },
4951
4954
  clanker_v4_sepolia: {
@@ -4961,7 +4964,9 @@ var CLANKERS = {
4961
4964
  mevModule: "0x261fE99C4D0D41EE8d0e594D11aec740E8354ab0",
4962
4965
  feeLocker: "0x42A95190B4088C88Dd904d930c79deC1158bF09D",
4963
4966
  feeStaticHook: "0xDFcCcfBeef7F3Fc8b16027Ce6feACb48024068cC",
4964
- feeDynamicHook: "0xE63b0A59100698f379F9B577441A561bAF9828cc"
4967
+ feeStaticHookV2: "0x11b51DBC2f7F683b81CeDa83DC0078D57bA328cc",
4968
+ feeDynamicHook: "0xE63b0A59100698f379F9B577441A561bAF9828cc",
4969
+ feeDynamicHookV2: "0xBF4983dC0f2F8FE78C5cf8Fc621f294A993728Cc"
4965
4970
  }
4966
4971
  },
4967
4972
  clanker_v4_arbitrum: {
package/dist/v3/index.js CHANGED
@@ -4305,9 +4305,12 @@ var CLANKERS = {
4305
4305
  airdrop: "0xf652B3610D75D81871bf96DB50825d9af28391E0",
4306
4306
  devbuy: "0x1331f0788F9c08C8F38D52c7a1152250A9dE00be",
4307
4307
  mevModule: "0xFdc013ce003980889cFfd66b0c8329545ae1d1E8",
4308
+ mevModuleV2: "0xebB25BB797D82CB78E1bc70406b13233c0854413",
4308
4309
  feeLocker: "0xF3622742b1E446D92e45E22923Ef11C2fcD55D68",
4309
4310
  feeStaticHook: "0xDd5EeaFf7BD481AD55Db083062b13a3cdf0A68CC",
4310
- feeDynamicHook: "0x34a45c6B61876d739400Bd71228CbcbD4F53E8cC"
4311
+ feeStaticHookV2: "0xb429d62f8f3bFFb98CdB9569533eA23bF0Ba28CC",
4312
+ feeDynamicHook: "0x34a45c6B61876d739400Bd71228CbcbD4F53E8cC",
4313
+ feeDynamicHookV2: "0xd60D6B218116cFd801E28F78d011a203D2b068Cc"
4311
4314
  }
4312
4315
  },
4313
4316
  clanker_v4_sepolia: {
@@ -4323,7 +4326,9 @@ var CLANKERS = {
4323
4326
  mevModule: "0x261fE99C4D0D41EE8d0e594D11aec740E8354ab0",
4324
4327
  feeLocker: "0x42A95190B4088C88Dd904d930c79deC1158bF09D",
4325
4328
  feeStaticHook: "0xDFcCcfBeef7F3Fc8b16027Ce6feACb48024068cC",
4326
- feeDynamicHook: "0xE63b0A59100698f379F9B577441A561bAF9828cc"
4329
+ feeStaticHookV2: "0x11b51DBC2f7F683b81CeDa83DC0078D57bA328cc",
4330
+ feeDynamicHook: "0xE63b0A59100698f379F9B577441A561bAF9828cc",
4331
+ feeDynamicHookV2: "0xBF4983dC0f2F8FE78C5cf8Fc621f294A993728Cc"
4327
4332
  }
4328
4333
  },
4329
4334
  clanker_v4_arbitrum: {
@@ -1,7 +1,7 @@
1
1
  import { C as ClankerTransactionConfig, e as ClankerAirdrop_v4_abi, d as ClankerResult } from '../../write-clanker-contracts-DZjOiPlv.js';
2
2
  import { MerkleTree } from '@openzeppelin/merkle-tree/dist/merkletree.js';
3
3
  import * as z from 'zod/v4';
4
- import { C as Chain } from '../../clankerTokenV4-BoDH1QfY.js';
4
+ import { C as Chain } from '../../clankerTokenV4-K5Wc0bcj.js';
5
5
  import { Clanker } from '../index.js';
6
6
  import 'viem';
7
7
  import '../../ClankerToken-Dra5lppJ.js';
@@ -2680,9 +2680,12 @@ var CLANKERS = {
2680
2680
  airdrop: "0xf652B3610D75D81871bf96DB50825d9af28391E0",
2681
2681
  devbuy: "0x1331f0788F9c08C8F38D52c7a1152250A9dE00be",
2682
2682
  mevModule: "0xFdc013ce003980889cFfd66b0c8329545ae1d1E8",
2683
+ mevModuleV2: "0xebB25BB797D82CB78E1bc70406b13233c0854413",
2683
2684
  feeLocker: "0xF3622742b1E446D92e45E22923Ef11C2fcD55D68",
2684
2685
  feeStaticHook: "0xDd5EeaFf7BD481AD55Db083062b13a3cdf0A68CC",
2685
- feeDynamicHook: "0x34a45c6B61876d739400Bd71228CbcbD4F53E8cC"
2686
+ feeStaticHookV2: "0xb429d62f8f3bFFb98CdB9569533eA23bF0Ba28CC",
2687
+ feeDynamicHook: "0x34a45c6B61876d739400Bd71228CbcbD4F53E8cC",
2688
+ feeDynamicHookV2: "0xd60D6B218116cFd801E28F78d011a203D2b068Cc"
2686
2689
  }
2687
2690
  },
2688
2691
  clanker_v4_sepolia: {
@@ -2698,7 +2701,9 @@ var CLANKERS = {
2698
2701
  mevModule: "0x261fE99C4D0D41EE8d0e594D11aec740E8354ab0",
2699
2702
  feeLocker: "0x42A95190B4088C88Dd904d930c79deC1158bF09D",
2700
2703
  feeStaticHook: "0xDFcCcfBeef7F3Fc8b16027Ce6feACb48024068cC",
2701
- feeDynamicHook: "0xE63b0A59100698f379F9B577441A561bAF9828cc"
2704
+ feeStaticHookV2: "0x11b51DBC2f7F683b81CeDa83DC0078D57bA328cc",
2705
+ feeDynamicHook: "0xE63b0A59100698f379F9B577441A561bAF9828cc",
2706
+ feeDynamicHookV2: "0xBF4983dC0f2F8FE78C5cf8Fc621f294A993728Cc"
2702
2707
  }
2703
2708
  },
2704
2709
  clanker_v4_arbitrum: {
@@ -1,8 +1,8 @@
1
1
  import { C as ClankerTransactionConfig, f as ClankerFeeLocker_abi, b as ClankerError, c as ClankerFactory, d as ClankerResult } from '../write-clanker-contracts-DZjOiPlv.js';
2
2
  import * as viem from 'viem';
3
3
  import { WalletClient, Transport, Chain, Account, PublicClient } from 'viem';
4
- import { a as ClankerTokenV4 } from '../clankerTokenV4-BoDH1QfY.js';
5
- export { e as encodeFeeConfig } from '../clankerTokenV4-BoDH1QfY.js';
4
+ import { a as ClankerTokenV4 } from '../clankerTokenV4-K5Wc0bcj.js';
5
+ export { e as encodeFeeConfig } from '../clankerTokenV4-K5Wc0bcj.js';
6
6
  import '../ClankerToken-Dra5lppJ.js';
7
7
  import 'zod/v4';
8
8
 
package/dist/v4/index.js CHANGED
@@ -881,6 +881,30 @@ var ClankerUniV4EthDevBuy_Instantiation_v4_abi = [
881
881
  { type: "address" }
882
882
  ];
883
883
 
884
+ // src/abi/v4.1/ClankerMevSniperAuction.ts
885
+ var Clanker_MevSniperAuction_InitData_v4_1_abi = [
886
+ {
887
+ type: "tuple",
888
+ components: [
889
+ { name: "startingFee", type: "uint24", internalType: "uint24" },
890
+ { name: "endingFee", type: "uint24", internalType: "uint24" },
891
+ { name: "secondsToDecay", type: "uint256", internalType: "uint256" }
892
+ ]
893
+ }
894
+ ];
895
+
896
+ // src/abi/v4.1/ClankerPool.ts
897
+ var Clanker_PoolInitializationData_v4_1_abi = [
898
+ {
899
+ type: "tuple",
900
+ components: [
901
+ { name: "extension", type: "address", internalType: "address" },
902
+ { name: "extensionData", type: "bytes", internalType: "bytes" },
903
+ { name: "feeData", type: "bytes", internalType: "bytes" }
904
+ ]
905
+ }
906
+ ];
907
+
884
908
  // src/constants.ts
885
909
  import { abstract, arbitrum, base, baseSepolia, monadTestnet, unichain } from "viem/chains";
886
910
  var WETH_ADDRESSES = {
@@ -3552,9 +3576,12 @@ var CLANKERS = {
3552
3576
  airdrop: "0xf652B3610D75D81871bf96DB50825d9af28391E0",
3553
3577
  devbuy: "0x1331f0788F9c08C8F38D52c7a1152250A9dE00be",
3554
3578
  mevModule: "0xFdc013ce003980889cFfd66b0c8329545ae1d1E8",
3579
+ mevModuleV2: "0xebB25BB797D82CB78E1bc70406b13233c0854413",
3555
3580
  feeLocker: "0xF3622742b1E446D92e45E22923Ef11C2fcD55D68",
3556
3581
  feeStaticHook: "0xDd5EeaFf7BD481AD55Db083062b13a3cdf0A68CC",
3557
- feeDynamicHook: "0x34a45c6B61876d739400Bd71228CbcbD4F53E8cC"
3582
+ feeStaticHookV2: "0xb429d62f8f3bFFb98CdB9569533eA23bF0Ba28CC",
3583
+ feeDynamicHook: "0x34a45c6B61876d739400Bd71228CbcbD4F53E8cC",
3584
+ feeDynamicHookV2: "0xd60D6B218116cFd801E28F78d011a203D2b068Cc"
3558
3585
  }
3559
3586
  },
3560
3587
  clanker_v4_sepolia: {
@@ -3570,7 +3597,9 @@ var CLANKERS = {
3570
3597
  mevModule: "0x261fE99C4D0D41EE8d0e594D11aec740E8354ab0",
3571
3598
  feeLocker: "0x42A95190B4088C88Dd904d930c79deC1158bF09D",
3572
3599
  feeStaticHook: "0xDFcCcfBeef7F3Fc8b16027Ce6feACb48024068cC",
3573
- feeDynamicHook: "0xE63b0A59100698f379F9B577441A561bAF9828cc"
3600
+ feeStaticHookV2: "0x11b51DBC2f7F683b81CeDa83DC0078D57bA328cc",
3601
+ feeDynamicHook: "0xE63b0A59100698f379F9B577441A561bAF9828cc",
3602
+ feeDynamicHookV2: "0xBF4983dC0f2F8FE78C5cf8Fc621f294A993728Cc"
3574
3603
  }
3575
3604
  },
3576
3605
  clanker_v4_arbitrum: {
@@ -3699,6 +3728,16 @@ var clankerTokenV4 = z2.strictObject({
3699
3728
  context: ClankerContextSchema.default({
3700
3729
  interface: "SDK"
3701
3730
  }),
3731
+ /** [v4.1+ only] Custom developer extension */
3732
+ poolExtension: z2.object({
3733
+ /** Address of the developer extension */
3734
+ address: addressSchema,
3735
+ /** Initialization data for the extension */
3736
+ initData: hexSchema
3737
+ }).prefault({
3738
+ address: zeroAddress,
3739
+ initData: "0x"
3740
+ }),
3702
3741
  /** Pool information */
3703
3742
  pool: z2.object({
3704
3743
  /** Token to pair the clanker with. */
@@ -3813,6 +3852,24 @@ var clankerTokenV4 = z2.strictObject({
3813
3852
  clankerFee: 100,
3814
3853
  pairedFee: 100
3815
3854
  }),
3855
+ /** [v4.1+ only] Sniper fees */
3856
+ sniperFees: z2.object({
3857
+ /** Starting sniper fee (units: Unibps) */
3858
+ startingFee: z2.number().min(3e4).max(8e5),
3859
+ /** Ending sniper fee (units: Unibps) */
3860
+ endingFee: z2.number().min(3e4).max(8e5),
3861
+ /** Sniper fee duration */
3862
+ secondsToDecay: z2.number().min(1).max(120)
3863
+ }).prefault({
3864
+ startingFee: 666777,
3865
+ // 66.6777%
3866
+ endingFee: 41673,
3867
+ // 4.1673%
3868
+ secondsToDecay: 15
3869
+ // 15 seconds
3870
+ }).refine((v) => v.endingFee < v.startingFee, {
3871
+ error: "Ending sniper fees must be less than the starting fees"
3872
+ }),
3816
3873
  /** Rewards & recipients for rewards generated by the token. */
3817
3874
  rewards: z2.object({
3818
3875
  /** Recipients of the token rewards. Must sum to 100%. */
@@ -3887,7 +3944,7 @@ var clankerTokenV4Converter = async (config) => {
3887
3944
  `Precision error for airdrop. Difference ${roundingVerificationAirdrop - airdropAmount} is too large.`
3888
3945
  );
3889
3946
  }
3890
- const { hook, poolData } = encodeFeeConfig(cfg.fees, clankerConfig);
3947
+ const { hook, poolData } = encodeFeeConfig(cfg, clankerConfig);
3891
3948
  return {
3892
3949
  address: clankerConfig.address,
3893
3950
  abi: Clanker_v4_abi,
@@ -3926,8 +3983,14 @@ var clankerTokenV4Converter = async (config) => {
3926
3983
  poolData
3927
3984
  },
3928
3985
  mevModuleConfig: {
3929
- mevModule: clankerConfig.related?.mevModule,
3930
- mevModuleData: "0x"
3986
+ mevModule: clankerConfig.related?.mevModuleV2 || clankerConfig.related?.mevModule,
3987
+ mevModuleData: clankerConfig.related?.mevModuleV2 ? encodeAbiParameters(Clanker_MevSniperAuction_InitData_v4_1_abi, [
3988
+ {
3989
+ startingFee: cfg.sniperFees.startingFee,
3990
+ endingFee: cfg.sniperFees.endingFee,
3991
+ secondsToDecay: BigInt(cfg.sniperFees.secondsToDecay)
3992
+ }
3993
+ ]) : "0x"
3931
3994
  },
3932
3995
  extensionConfigs: [
3933
3996
  // vaulting extension
@@ -3978,33 +4041,62 @@ var clankerTokenV4Converter = async (config) => {
3978
4041
  chainId: cfg.chainId
3979
4042
  };
3980
4043
  };
3981
- function encodeFeeConfig(config, clankerConfig) {
4044
+ function encodeFeeConfig(tokenConfig, clankerConfig) {
4045
+ const config = tokenConfig.fees;
3982
4046
  if (config.type === "static") {
4047
+ const feeData = encodeAbiParameters(ClankerHook_StaticFee_Instantiation_v4_abi, [
4048
+ config.clankerFee * 100,
4049
+ // uniBps
4050
+ config.pairedFee * 100
4051
+ // uniBps
4052
+ ]);
4053
+ if (clankerConfig.related.feeStaticHookV2) {
4054
+ return {
4055
+ hook: clankerConfig.related.feeStaticHookV2,
4056
+ poolData: encodeAbiParameters(Clanker_PoolInitializationData_v4_1_abi, [
4057
+ {
4058
+ extension: tokenConfig.poolExtension.address,
4059
+ extensionData: tokenConfig.poolExtension.initData,
4060
+ feeData
4061
+ }
4062
+ ])
4063
+ };
4064
+ }
3983
4065
  return {
3984
4066
  hook: clankerConfig.related.feeStaticHook,
3985
- poolData: encodeAbiParameters(ClankerHook_StaticFee_Instantiation_v4_abi, [
3986
- config.clankerFee * 100,
3987
- // uniBps
3988
- config.pairedFee * 100
3989
- // uniBps
3990
- ])
4067
+ poolData: feeData
3991
4068
  };
3992
- } else {
4069
+ }
4070
+ if (config.type === "dynamic") {
4071
+ const feeData = encodeAbiParameters(ClankerHook_DynamicFee_Instantiation_v4_abi, [
4072
+ config.baseFee * 100,
4073
+ // uniBps
4074
+ config.maxFee * 100,
4075
+ // uniBps
4076
+ BigInt(config.referenceTickFilterPeriod),
4077
+ BigInt(config.resetPeriod),
4078
+ config.resetTickFilter,
4079
+ BigInt(config.feeControlNumerator),
4080
+ config.decayFilterBps
4081
+ ]);
4082
+ if (clankerConfig.related.feeDynamicHookV2) {
4083
+ return {
4084
+ hook: clankerConfig.related.feeDynamicHookV2,
4085
+ poolData: encodeAbiParameters(Clanker_PoolInitializationData_v4_1_abi, [
4086
+ {
4087
+ extension: tokenConfig.poolExtension.address,
4088
+ extensionData: tokenConfig.poolExtension.initData,
4089
+ feeData
4090
+ }
4091
+ ])
4092
+ };
4093
+ }
3993
4094
  return {
3994
4095
  hook: clankerConfig.related.feeDynamicHook,
3995
- poolData: encodeAbiParameters(ClankerHook_DynamicFee_Instantiation_v4_abi, [
3996
- config.baseFee * 100,
3997
- // uniBps
3998
- config.maxFee * 100,
3999
- // uniBps
4000
- BigInt(config.referenceTickFilterPeriod),
4001
- BigInt(config.resetPeriod),
4002
- config.resetTickFilter,
4003
- BigInt(config.feeControlNumerator),
4004
- config.decayFilterBps
4005
- ])
4096
+ poolData: feeData
4006
4097
  };
4007
4098
  }
4099
+ throw new Error("Invalid config type");
4008
4100
  }
4009
4101
 
4010
4102
  // src/deployment/deploy.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clanker-sdk",
3
- "version": "4.1.20",
3
+ "version": "4.1.21",
4
4
  "description": "SDK for deploying tokens using Clanker",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",