@whetstone-research/doppler-sdk 1.0.12 → 1.0.14

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.
Files changed (39) hide show
  1. package/README.md +49 -13
  2. package/dist/{chunk-AT33RY6T.cjs → chunk-3BW6IVP3.cjs} +46 -37
  3. package/dist/chunk-3BW6IVP3.cjs.map +1 -0
  4. package/dist/{chunk-ZQEEGBXT.js → chunk-NMTYI3TB.js} +23 -26
  5. package/dist/chunk-NMTYI3TB.js.map +1 -0
  6. package/dist/{chunk-2NFQKIOB.js → chunk-TVBSIQIX.js} +35 -26
  7. package/dist/chunk-TVBSIQIX.js.map +1 -0
  8. package/dist/{chunk-LL7TW3GU.cjs → chunk-W5TMS4RD.cjs} +56 -59
  9. package/dist/chunk-W5TMS4RD.cjs.map +1 -0
  10. package/dist/evm/index.cjs +226 -115
  11. package/dist/evm/index.cjs.map +1 -1
  12. package/dist/evm/index.d.cts +6 -0
  13. package/dist/evm/index.d.ts +6 -0
  14. package/dist/evm/index.js +227 -116
  15. package/dist/evm/index.js.map +1 -1
  16. package/dist/{oracle-CU-nZnja.d.cts → oracle-DN8BrGPh.d.cts} +28 -28
  17. package/dist/{oracle-CU-nZnja.d.ts → oracle-DN8BrGPh.d.ts} +28 -28
  18. package/dist/{pda-FLNTBIC5.js → pda-5D3GD5S6.js} +3 -3
  19. package/dist/pda-5D3GD5S6.js.map +1 -0
  20. package/dist/{pda-G25AJSXG.cjs → pda-GNZYNRUH.cjs} +17 -17
  21. package/dist/{pda-G25AJSXG.cjs.map → pda-GNZYNRUH.cjs.map} +1 -1
  22. package/dist/solana/index.cjs +875 -740
  23. package/dist/solana/index.cjs.map +1 -1
  24. package/dist/solana/index.d.cts +545 -471
  25. package/dist/solana/index.d.ts +545 -471
  26. package/dist/solana/index.js +738 -603
  27. package/dist/solana/index.js.map +1 -1
  28. package/dist/solana/react/index.cjs +57 -57
  29. package/dist/solana/react/index.cjs.map +1 -1
  30. package/dist/solana/react/index.d.cts +5 -5
  31. package/dist/solana/react/index.d.ts +5 -5
  32. package/dist/solana/react/index.js +15 -15
  33. package/dist/solana/react/index.js.map +1 -1
  34. package/package.json +4 -2
  35. package/dist/chunk-2NFQKIOB.js.map +0 -1
  36. package/dist/chunk-AT33RY6T.cjs.map +0 -1
  37. package/dist/chunk-LL7TW3GU.cjs.map +0 -1
  38. package/dist/chunk-ZQEEGBXT.js.map +0 -1
  39. package/dist/pda-FLNTBIC5.js.map +0 -1
@@ -52,6 +52,7 @@ interface ChainAddresses {
52
52
  noOpGovernanceFactory?: Address;
53
53
  launchpadGovernanceFactory?: Address;
54
54
  streamableFeesLocker?: Address;
55
+ streamableFeesLockerV2?: Address;
55
56
  topUpDistributor?: Address;
56
57
  universalRouter: Address;
57
58
  univ2Router02?: Address;
@@ -837,6 +838,11 @@ declare class DopplerFactory<C extends SupportedChainId = SupportedChainId> {
837
838
  private isDopplerERC20V1BalanceLimitActive;
838
839
  private usesDefaultDopplerERC20V1Integration;
839
840
  private resolveGovernanceBalanceLimitExclusions;
841
+ private resolveGovernanceFactoryAddress;
842
+ private shouldAutoExcludeGovernanceTimelock;
843
+ private resolveMigrationLockerBalanceLimitExclusions;
844
+ private withDopplerERC20V1EncodedBalanceLimitExclusions;
845
+ private withSimulationGovernanceTimelockExclusion;
840
846
  private withDopplerERC20V1BalanceLimitExclusions;
841
847
  private deriveCreate2Address;
842
848
  private predictDopplerERC20V1TokenAddress;
@@ -52,6 +52,7 @@ interface ChainAddresses {
52
52
  noOpGovernanceFactory?: Address;
53
53
  launchpadGovernanceFactory?: Address;
54
54
  streamableFeesLocker?: Address;
55
+ streamableFeesLockerV2?: Address;
55
56
  topUpDistributor?: Address;
56
57
  universalRouter: Address;
57
58
  univ2Router02?: Address;
@@ -837,6 +838,11 @@ declare class DopplerFactory<C extends SupportedChainId = SupportedChainId> {
837
838
  private isDopplerERC20V1BalanceLimitActive;
838
839
  private usesDefaultDopplerERC20V1Integration;
839
840
  private resolveGovernanceBalanceLimitExclusions;
841
+ private resolveGovernanceFactoryAddress;
842
+ private shouldAutoExcludeGovernanceTimelock;
843
+ private resolveMigrationLockerBalanceLimitExclusions;
844
+ private withDopplerERC20V1EncodedBalanceLimitExclusions;
845
+ private withSimulationGovernanceTimelockExclusion;
840
846
  private withDopplerERC20V1BalanceLimitExclusions;
841
847
  private deriveCreate2Address;
842
848
  private predictDopplerERC20V1TokenAddress;
package/dist/evm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import '../chunk-PZ5AY32C.js';
2
- import { parseEther, formatEther, getAddress, encodeAbiParameters, keccak256, encodePacked, decodeEventLog, toHex, decodeAbiParameters, zeroAddress, zeroHash, encodeFunctionData } from 'viem';
2
+ import { parseEther, formatEther, getAddress, encodeAbiParameters, keccak256, decodeAbiParameters, encodePacked, decodeEventLog, toHex, zeroAddress, zeroHash, encodeFunctionData } from 'viem';
3
3
 
4
4
  // src/evm/deployments.generated.ts
5
5
  var GENERATED_DOPPLER_DEPLOYMENTS = {
@@ -491,6 +491,10 @@ var ADDRESSES = {
491
491
  noOpGovernanceFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MAINNET].NoOpGovernanceFactory,
492
492
  launchpadGovernanceFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MAINNET].LaunchpadGovernanceFactory,
493
493
  streamableFeesLocker: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MAINNET].StreamableFeesLocker,
494
+ streamableFeesLockerV2: getGeneratedAddress(
495
+ CHAIN_IDS.MAINNET,
496
+ "StreamableFeesLockerV2"
497
+ ),
494
498
  topUpDistributor: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MAINNET].TopUpDistributor,
495
499
  universalRouter: "0x66a9893cc07d91d95644aedd05d03f95e1dba8af",
496
500
  permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
@@ -586,6 +590,10 @@ var ADDRESSES = {
586
590
  noOpGovernanceFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE].NoOpGovernanceFactory,
587
591
  launchpadGovernanceFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE].LaunchpadGovernanceFactory,
588
592
  streamableFeesLocker: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE].StreamableFeesLocker,
593
+ streamableFeesLockerV2: getGeneratedAddress(
594
+ CHAIN_IDS.BASE,
595
+ "StreamableFeesLockerV2"
596
+ ),
589
597
  topUpDistributor: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE].TopUpDistributor,
590
598
  universalRouter: "0x6ff5693b99212da76ad316178a184ab56d299b43",
591
599
  univ2Router02: "0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",
@@ -650,6 +658,10 @@ var ADDRESSES = {
650
658
  noOpGovernanceFactory: "0x916b8987e4ad325c10d58ed8dc2036a6ff5eb228",
651
659
  launchpadGovernanceFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE_SEPOLIA].LaunchpadGovernanceFactory,
652
660
  streamableFeesLocker: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE_SEPOLIA].StreamableFeesLocker,
661
+ streamableFeesLockerV2: getGeneratedAddress(
662
+ CHAIN_IDS.BASE_SEPOLIA,
663
+ "StreamableFeesLockerV2"
664
+ ),
653
665
  topUpDistributor: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE_SEPOLIA].TopUpDistributor,
654
666
  universalRouter: "0x492E6456D9528771018DeB9E87ef7750EF184104",
655
667
  univ2Router02: "0x1689E7B1F10000AE47eBfE339a4f69dECd19F602",
@@ -831,6 +843,10 @@ var ADDRESSES = {
831
843
  ),
832
844
  streamableFeesLocker: ZERO_ADDRESS,
833
845
  // Not yet deployed
846
+ streamableFeesLockerV2: getGeneratedAddress(
847
+ CHAIN_IDS.MONAD_MAINNET,
848
+ "StreamableFeesLockerV2"
849
+ ),
834
850
  universalRouter: "0x0d97dc33264bfc1c226207428a79b26757fb9dc3",
835
851
  univ2Router02: ZERO_ADDRESS,
836
852
  uniswapV2Factory: "0x182a927119d56008d921126764bf884221b10f59",
@@ -7369,6 +7385,126 @@ var DopplerFactory = class {
7369
7385
  }
7370
7386
  return [];
7371
7387
  }
7388
+ resolveGovernanceFactoryAddress(args) {
7389
+ if (args.governance.type === "noOp") {
7390
+ const resolved2 = args.modules?.governanceFactory ?? args.addresses.noOpGovernanceFactory ?? ZERO_ADDRESS;
7391
+ if (!resolved2 || resolved2 === ZERO_ADDRESS) {
7392
+ throw new Error(args.noOpError);
7393
+ }
7394
+ return resolved2;
7395
+ }
7396
+ if (args.governance.type === "launchpad") {
7397
+ const resolved2 = args.modules?.governanceFactory ?? args.addresses.launchpadGovernanceFactory ?? ZERO_ADDRESS;
7398
+ if (!resolved2 || resolved2 === ZERO_ADDRESS) {
7399
+ throw new Error(args.launchpadError);
7400
+ }
7401
+ return resolved2;
7402
+ }
7403
+ const resolved = args.modules?.governanceFactory ?? args.addresses.governanceFactory;
7404
+ if (!resolved || resolved === ZERO_ADDRESS) {
7405
+ throw new Error(args.standardError);
7406
+ }
7407
+ return resolved;
7408
+ }
7409
+ shouldAutoExcludeGovernanceTimelock(args) {
7410
+ if (args.governance.type !== "default" && args.governance.type !== "custom") {
7411
+ return false;
7412
+ }
7413
+ if (args.modules?.governanceFactory) {
7414
+ return false;
7415
+ }
7416
+ const noOpGovernanceFactory = args.addresses.noOpGovernanceFactory;
7417
+ return !noOpGovernanceFactory || args.governanceFactory.toLowerCase() !== noOpGovernanceFactory.toLowerCase();
7418
+ }
7419
+ resolveMigrationLockerBalanceLimitExclusions(migration, addresses) {
7420
+ if ((migration.type === "uniswapV4" || migration.type === "uniswapV4Split") && migration.streamableFees) {
7421
+ return [addresses.streamableFeesLocker];
7422
+ }
7423
+ if (migration.type === "dopplerHook") {
7424
+ return [
7425
+ addresses.streamableFeesLockerV2 ?? addresses.streamableFeesLocker
7426
+ ];
7427
+ }
7428
+ return [];
7429
+ }
7430
+ withDopplerERC20V1EncodedBalanceLimitExclusions(tokenFactoryData, exclusions) {
7431
+ const decoded = decodeAbiParameters(
7432
+ [
7433
+ { type: "string" },
7434
+ { type: "string" },
7435
+ {
7436
+ type: "tuple[]",
7437
+ components: [
7438
+ { type: "uint64", name: "cliff" },
7439
+ { type: "uint64", name: "duration" }
7440
+ ]
7441
+ },
7442
+ { type: "address[]" },
7443
+ { type: "uint256[]" },
7444
+ { type: "uint256[]" },
7445
+ { type: "string" },
7446
+ { type: "uint256" },
7447
+ { type: "uint48" },
7448
+ { type: "address" },
7449
+ { type: "address[]" }
7450
+ ],
7451
+ tokenFactoryData
7452
+ );
7453
+ if (decoded[7] === 0n && decoded[8] === 0) {
7454
+ return tokenFactoryData;
7455
+ }
7456
+ return encodeAbiParameters(
7457
+ [
7458
+ { type: "string" },
7459
+ { type: "string" },
7460
+ {
7461
+ type: "tuple[]",
7462
+ components: [
7463
+ { type: "uint64", name: "cliff" },
7464
+ { type: "uint64", name: "duration" }
7465
+ ]
7466
+ },
7467
+ { type: "address[]" },
7468
+ { type: "uint256[]" },
7469
+ { type: "uint256[]" },
7470
+ { type: "string" },
7471
+ { type: "uint256" },
7472
+ { type: "uint48" },
7473
+ { type: "address" },
7474
+ { type: "address[]" }
7475
+ ],
7476
+ [
7477
+ decoded[0],
7478
+ decoded[1],
7479
+ decoded[2],
7480
+ decoded[3],
7481
+ decoded[4],
7482
+ decoded[5],
7483
+ decoded[6],
7484
+ decoded[7],
7485
+ decoded[8],
7486
+ decoded[9],
7487
+ this.mergeDopplerERC20V1BalanceLimitExclusions(decoded[10], exclusions)
7488
+ ]
7489
+ );
7490
+ }
7491
+ withSimulationGovernanceTimelockExclusion(args) {
7492
+ if (!this.isDopplerERC20V1Token(args.token) || !this.usesDefaultDopplerERC20V1Integration(args.modules) || args.simResult.length < 4 || !this.shouldAutoExcludeGovernanceTimelock({
7493
+ governance: args.governance,
7494
+ governanceFactory: args.createParams.governanceFactory,
7495
+ modules: args.modules,
7496
+ addresses: args.addresses
7497
+ })) {
7498
+ return args.createParams;
7499
+ }
7500
+ return {
7501
+ ...args.createParams,
7502
+ tokenFactoryData: this.withDopplerERC20V1EncodedBalanceLimitExclusions(
7503
+ args.createParams.tokenFactoryData,
7504
+ [args.simResult[3]]
7505
+ )
7506
+ };
7507
+ }
7372
7508
  withDopplerERC20V1BalanceLimitExclusions(tokenFactoryData, exclusions) {
7373
7509
  if (!this.isDopplerERC20V1BalanceLimitActive(tokenFactoryData)) {
7374
7510
  return { ...tokenFactoryData };
@@ -7850,6 +7986,10 @@ var DopplerFactory = class {
7850
7986
  poolInitializerAddress,
7851
7987
  liquidityMigratorAddress,
7852
7988
  params.migration.type === "uniswapV4" ? params.modules?.poolManager ?? addresses.poolManager : void 0,
7989
+ ...this.resolveMigrationLockerBalanceLimitExclusions(
7990
+ params.migration,
7991
+ addresses
7992
+ ),
7853
7993
  ...this.resolveGovernanceBalanceLimitExclusions(
7854
7994
  params.governance
7855
7995
  )
@@ -7895,33 +8035,14 @@ var DopplerFactory = class {
7895
8035
  ]
7896
8036
  );
7897
8037
  })();
7898
- const governanceFactoryAddress = (() => {
7899
- if (params.governance.type === "noOp") {
7900
- const resolved2 = params.modules?.governanceFactory ?? addresses.noOpGovernanceFactory ?? ZERO_ADDRESS;
7901
- if (!resolved2 || resolved2 === ZERO_ADDRESS) {
7902
- throw new Error(
7903
- "No-op governance requested, but no-op governanceFactory is not configured on this chain. Provide a governanceFactory override or use a supported chain."
7904
- );
7905
- }
7906
- return resolved2;
7907
- }
7908
- if (params.governance.type === "launchpad") {
7909
- const resolved2 = params.modules?.governanceFactory ?? addresses.launchpadGovernanceFactory ?? ZERO_ADDRESS;
7910
- if (!resolved2 || resolved2 === ZERO_ADDRESS) {
7911
- throw new Error(
7912
- "Launchpad governance requested, but launchpadGovernanceFactory is not configured on this chain. Provide a governanceFactory override or use a supported chain."
7913
- );
7914
- }
7915
- return resolved2;
7916
- }
7917
- const resolved = params.modules?.governanceFactory ?? addresses.governanceFactory;
7918
- if (!resolved || resolved === ZERO_ADDRESS) {
7919
- throw new Error(
7920
- "Standard governance requested but governanceFactory is not deployed on this chain."
7921
- );
7922
- }
7923
- return resolved;
7924
- })();
8038
+ const governanceFactoryAddress = this.resolveGovernanceFactoryAddress({
8039
+ governance: params.governance,
8040
+ modules: params.modules,
8041
+ addresses,
8042
+ noOpError: "No-op governance requested, but no-op governanceFactory is not configured on this chain. Provide a governanceFactory override or use a supported chain.",
8043
+ launchpadError: "Launchpad governance requested, but launchpadGovernanceFactory is not configured on this chain. Provide a governanceFactory override or use a supported chain.",
8044
+ standardError: "Standard governance requested but governanceFactory is not deployed on this chain."
8045
+ });
7925
8046
  if (!tokenFactoryData) {
7926
8047
  throw new Error("Token factory data could not be resolved.");
7927
8048
  }
@@ -8168,7 +8289,14 @@ var DopplerFactory = class {
8168
8289
  const isToken0 = BigInt(tokenAddress) < numeraireBigInt;
8169
8290
  const wantToken0 = isToken0Expected(params.sale.numeraire);
8170
8291
  if (wantToken0 && isToken0 || !wantToken0 && !isToken0) {
8171
- return createParams;
8292
+ return this.withSimulationGovernanceTimelockExclusion({
8293
+ createParams,
8294
+ simResult,
8295
+ token: params.token,
8296
+ governance: params.governance,
8297
+ modules: params.modules,
8298
+ addresses
8299
+ });
8172
8300
  }
8173
8301
  attempt += 1n;
8174
8302
  const incrementedAccount = toHex(
@@ -8263,6 +8391,10 @@ var DopplerFactory = class {
8263
8391
  poolInitializerAddress,
8264
8392
  params.modules?.poolManager ?? addresses.poolManager,
8265
8393
  liquidityMigratorAddress,
8394
+ ...this.resolveMigrationLockerBalanceLimitExclusions(
8395
+ params.migration,
8396
+ addresses
8397
+ ),
8266
8398
  ...this.resolveGovernanceBalanceLimitExclusions(
8267
8399
  params.governance
8268
8400
  )
@@ -8327,33 +8459,14 @@ var DopplerFactory = class {
8327
8459
  ]
8328
8460
  );
8329
8461
  })();
8330
- const governanceFactoryAddress = (() => {
8331
- if (params.governance.type === "noOp") {
8332
- const resolved2 = params.modules?.governanceFactory ?? addresses.noOpGovernanceFactory ?? ZERO_ADDRESS;
8333
- if (!resolved2 || resolved2 === ZERO_ADDRESS) {
8334
- throw new Error(
8335
- "No-op governance requested, but no-op governanceFactory is not configured on this chain. Provide a governanceFactory override or use a supported chain."
8336
- );
8337
- }
8338
- return resolved2;
8339
- }
8340
- if (params.governance.type === "launchpad") {
8341
- const resolved2 = params.modules?.governanceFactory ?? addresses.launchpadGovernanceFactory ?? ZERO_ADDRESS;
8342
- if (!resolved2 || resolved2 === ZERO_ADDRESS) {
8343
- throw new Error(
8344
- "Launchpad governance requested, but launchpadGovernanceFactory is not configured on this chain. Provide a governanceFactory override or use a supported chain."
8345
- );
8346
- }
8347
- return resolved2;
8348
- }
8349
- const resolved = params.modules?.governanceFactory ?? addresses.governanceFactory;
8350
- if (!resolved || resolved === ZERO_ADDRESS) {
8351
- throw new Error(
8352
- "Standard governance requested but governanceFactory is not deployed on this chain."
8353
- );
8354
- }
8355
- return resolved;
8356
- })();
8462
+ const governanceFactoryAddress = this.resolveGovernanceFactoryAddress({
8463
+ governance: params.governance,
8464
+ modules: params.modules,
8465
+ addresses,
8466
+ noOpError: "No-op governance requested, but no-op governanceFactory is not configured on this chain. Provide a governanceFactory override or use a supported chain.",
8467
+ launchpadError: "Launchpad governance requested, but launchpadGovernanceFactory is not configured on this chain. Provide a governanceFactory override or use a supported chain.",
8468
+ standardError: "Standard governance requested but governanceFactory is not deployed on this chain."
8469
+ });
8357
8470
  const createParams = {
8358
8471
  initialSupply: params.sale.initialSupply,
8359
8472
  numTokensToSell: params.sale.numTokensToSell,
@@ -8479,13 +8592,23 @@ var DopplerFactory = class {
8479
8592
  tickSpacing: params.pool.tickSpacing,
8480
8593
  hooks: hookAddress
8481
8594
  });
8482
- return {
8595
+ const createParamsWithTimelock = this.withSimulationGovernanceTimelockExclusion({
8483
8596
  createParams,
8597
+ simResult,
8598
+ token: params.token,
8599
+ governance: params.governance,
8600
+ modules: params.modules,
8601
+ addresses
8602
+ });
8603
+ return {
8604
+ createParams: createParamsWithTimelock,
8484
8605
  hookAddress,
8485
8606
  tokenAddress,
8486
8607
  poolId,
8487
8608
  gasEstimate,
8488
- execute: () => this.createDynamicAuction(params, { _createParams: createParams })
8609
+ execute: () => this.createDynamicAuction(params, {
8610
+ _createParams: createParamsWithTimelock
8611
+ })
8489
8612
  };
8490
8613
  }
8491
8614
  async encodeCreateOpeningAuctionParams(params) {
@@ -8639,6 +8762,10 @@ var DopplerFactory = class {
8639
8762
  poolManagerForAuction,
8640
8763
  auctionDeployer,
8641
8764
  liquidityMigratorAddress,
8765
+ ...this.resolveMigrationLockerBalanceLimitExclusions(
8766
+ params.migration,
8767
+ addresses
8768
+ ),
8642
8769
  ...this.resolveGovernanceBalanceLimitExclusions(
8643
8770
  params.governance
8644
8771
  )
@@ -8701,33 +8828,14 @@ var DopplerFactory = class {
8701
8828
  ]
8702
8829
  );
8703
8830
  })();
8704
- const governanceFactoryAddress = (() => {
8705
- if (params.governance.type === "noOp") {
8706
- const resolved2 = params.modules?.governanceFactory ?? addresses.noOpGovernanceFactory ?? ZERO_ADDRESS;
8707
- if (!resolved2 || resolved2 === ZERO_ADDRESS) {
8708
- throw new Error(
8709
- "No-op governance requested, but no-op governanceFactory is not configured on this chain. Provide a governanceFactory override or use a supported chain."
8710
- );
8711
- }
8712
- return resolved2;
8713
- }
8714
- if (params.governance.type === "launchpad") {
8715
- const resolved2 = params.modules?.governanceFactory ?? addresses.launchpadGovernanceFactory ?? ZERO_ADDRESS;
8716
- if (!resolved2 || resolved2 === ZERO_ADDRESS) {
8717
- throw new Error(
8718
- "Launchpad governance requested, but launchpadGovernanceFactory is not configured on this chain. Provide a governanceFactory override or use a supported chain."
8719
- );
8720
- }
8721
- return resolved2;
8722
- }
8723
- const resolved = params.modules?.governanceFactory ?? addresses.governanceFactory;
8724
- if (!resolved || resolved === ZERO_ADDRESS) {
8725
- throw new Error(
8726
- "Standard governance requested but governanceFactory is not deployed on this chain."
8727
- );
8728
- }
8729
- return resolved;
8730
- })();
8831
+ const governanceFactoryAddress = this.resolveGovernanceFactoryAddress({
8832
+ governance: params.governance,
8833
+ modules: params.modules,
8834
+ addresses,
8835
+ noOpError: "No-op governance requested, but no-op governanceFactory is not configured on this chain. Provide a governanceFactory override or use a supported chain.",
8836
+ launchpadError: "Launchpad governance requested, but launchpadGovernanceFactory is not configured on this chain. Provide a governanceFactory override or use a supported chain.",
8837
+ standardError: "Standard governance requested but governanceFactory is not deployed on this chain."
8838
+ });
8731
8839
  if (!tokenFactoryData) {
8732
8840
  throw new Error("Token factory data could not be resolved.");
8733
8841
  }
@@ -8774,14 +8882,22 @@ var DopplerFactory = class {
8774
8882
  if (!simResult || !Array.isArray(simResult) || simResult.length < 2) {
8775
8883
  throw new Error("Failed to simulate opening auction create");
8776
8884
  }
8777
- return {
8885
+ const createParamsWithTimelock = this.withSimulationGovernanceTimelockExclusion({
8778
8886
  createParams,
8887
+ simResult,
8888
+ token: params.token,
8889
+ governance: params.governance,
8890
+ modules: params.modules,
8891
+ addresses
8892
+ });
8893
+ return {
8894
+ createParams: createParamsWithTimelock,
8779
8895
  openingAuctionHookAddress: simResult[1],
8780
8896
  tokenAddress: simResult[0],
8781
8897
  minedSalt,
8782
8898
  gasEstimate,
8783
8899
  execute: () => this.createOpeningAuction(params, {
8784
- _createParams: createParams,
8900
+ _createParams: createParamsWithTimelock,
8785
8901
  _minedSalt: minedSalt
8786
8902
  })
8787
8903
  };
@@ -10399,6 +10515,10 @@ var DopplerFactory = class {
10399
10515
  resolvedInitializer,
10400
10516
  resolvedMigrator,
10401
10517
  params.modules?.poolManager ?? addresses.poolManager,
10518
+ ...this.resolveMigrationLockerBalanceLimitExclusions(
10519
+ params.migration,
10520
+ addresses
10521
+ ),
10402
10522
  ...this.resolveGovernanceBalanceLimitExclusions(
10403
10523
  params.governance
10404
10524
  )
@@ -10424,33 +10544,14 @@ var DopplerFactory = class {
10424
10544
  finalV1TokenFactoryData
10425
10545
  );
10426
10546
  }
10427
- const governanceFactoryAddress = (() => {
10428
- if (params.governance.type === "noOp") {
10429
- const resolved2 = params.modules?.governanceFactory ?? addresses.noOpGovernanceFactory ?? ZERO_ADDRESS;
10430
- if (!resolved2 || resolved2 === ZERO_ADDRESS) {
10431
- throw new Error(
10432
- "No-op governance requested, but no-op governanceFactory is not configured on this chain."
10433
- );
10434
- }
10435
- return resolved2;
10436
- }
10437
- if (params.governance.type === "launchpad") {
10438
- const resolved2 = params.modules?.governanceFactory ?? addresses.launchpadGovernanceFactory ?? ZERO_ADDRESS;
10439
- if (!resolved2 || resolved2 === ZERO_ADDRESS) {
10440
- throw new Error(
10441
- "Launchpad governance requested, but launchpadGovernanceFactory is not configured on this chain."
10442
- );
10443
- }
10444
- return resolved2;
10445
- }
10446
- const resolved = params.modules?.governanceFactory ?? addresses.governanceFactory;
10447
- if (!resolved || resolved === ZERO_ADDRESS) {
10448
- throw new Error(
10449
- "Standard governance requested but governanceFactory is not deployed on this chain."
10450
- );
10451
- }
10452
- return resolved;
10453
- })();
10547
+ const governanceFactoryAddress = this.resolveGovernanceFactoryAddress({
10548
+ governance: params.governance,
10549
+ modules: params.modules,
10550
+ addresses,
10551
+ noOpError: "No-op governance requested, but no-op governanceFactory is not configured on this chain.",
10552
+ launchpadError: "Launchpad governance requested, but launchpadGovernanceFactory is not configured on this chain.",
10553
+ standardError: "Standard governance requested but governanceFactory is not deployed on this chain."
10554
+ });
10454
10555
  if (!tokenFactoryData) {
10455
10556
  throw new Error("Token factory data could not be resolved.");
10456
10557
  }
@@ -10494,12 +10595,22 @@ var DopplerFactory = class {
10494
10595
  }
10495
10596
  const tokenAddress = simResult[0];
10496
10597
  const poolId = await this.computeMulticurvePoolId(params, tokenAddress);
10497
- return {
10598
+ const createParamsWithTimelock = this.withSimulationGovernanceTimelockExclusion({
10498
10599
  createParams,
10600
+ simResult,
10601
+ token: params.token,
10602
+ governance: params.governance,
10603
+ modules: params.modules,
10604
+ addresses
10605
+ });
10606
+ return {
10607
+ createParams: createParamsWithTimelock,
10499
10608
  tokenAddress,
10500
10609
  poolId,
10501
10610
  gasEstimate,
10502
- execute: () => this.createMulticurve(params, { _createParams: createParams })
10611
+ execute: () => this.createMulticurve(params, {
10612
+ _createParams: createParamsWithTimelock
10613
+ })
10503
10614
  };
10504
10615
  }
10505
10616
  async createMulticurve(params, options) {