@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
@@ -493,6 +493,10 @@ var ADDRESSES = {
493
493
  noOpGovernanceFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MAINNET].NoOpGovernanceFactory,
494
494
  launchpadGovernanceFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MAINNET].LaunchpadGovernanceFactory,
495
495
  streamableFeesLocker: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MAINNET].StreamableFeesLocker,
496
+ streamableFeesLockerV2: getGeneratedAddress(
497
+ CHAIN_IDS.MAINNET,
498
+ "StreamableFeesLockerV2"
499
+ ),
496
500
  topUpDistributor: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MAINNET].TopUpDistributor,
497
501
  universalRouter: "0x66a9893cc07d91d95644aedd05d03f95e1dba8af",
498
502
  permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
@@ -588,6 +592,10 @@ var ADDRESSES = {
588
592
  noOpGovernanceFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE].NoOpGovernanceFactory,
589
593
  launchpadGovernanceFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE].LaunchpadGovernanceFactory,
590
594
  streamableFeesLocker: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE].StreamableFeesLocker,
595
+ streamableFeesLockerV2: getGeneratedAddress(
596
+ CHAIN_IDS.BASE,
597
+ "StreamableFeesLockerV2"
598
+ ),
591
599
  topUpDistributor: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE].TopUpDistributor,
592
600
  universalRouter: "0x6ff5693b99212da76ad316178a184ab56d299b43",
593
601
  univ2Router02: "0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",
@@ -652,6 +660,10 @@ var ADDRESSES = {
652
660
  noOpGovernanceFactory: "0x916b8987e4ad325c10d58ed8dc2036a6ff5eb228",
653
661
  launchpadGovernanceFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE_SEPOLIA].LaunchpadGovernanceFactory,
654
662
  streamableFeesLocker: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE_SEPOLIA].StreamableFeesLocker,
663
+ streamableFeesLockerV2: getGeneratedAddress(
664
+ CHAIN_IDS.BASE_SEPOLIA,
665
+ "StreamableFeesLockerV2"
666
+ ),
655
667
  topUpDistributor: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE_SEPOLIA].TopUpDistributor,
656
668
  universalRouter: "0x492E6456D9528771018DeB9E87ef7750EF184104",
657
669
  univ2Router02: "0x1689E7B1F10000AE47eBfE339a4f69dECd19F602",
@@ -833,6 +845,10 @@ var ADDRESSES = {
833
845
  ),
834
846
  streamableFeesLocker: ZERO_ADDRESS,
835
847
  // Not yet deployed
848
+ streamableFeesLockerV2: getGeneratedAddress(
849
+ CHAIN_IDS.MONAD_MAINNET,
850
+ "StreamableFeesLockerV2"
851
+ ),
836
852
  universalRouter: "0x0d97dc33264bfc1c226207428a79b26757fb9dc3",
837
853
  univ2Router02: ZERO_ADDRESS,
838
854
  uniswapV2Factory: "0x182a927119d56008d921126764bf884221b10f59",
@@ -7371,6 +7387,126 @@ var DopplerFactory = class {
7371
7387
  }
7372
7388
  return [];
7373
7389
  }
7390
+ resolveGovernanceFactoryAddress(args) {
7391
+ if (args.governance.type === "noOp") {
7392
+ const resolved2 = args.modules?.governanceFactory ?? args.addresses.noOpGovernanceFactory ?? ZERO_ADDRESS;
7393
+ if (!resolved2 || resolved2 === ZERO_ADDRESS) {
7394
+ throw new Error(args.noOpError);
7395
+ }
7396
+ return resolved2;
7397
+ }
7398
+ if (args.governance.type === "launchpad") {
7399
+ const resolved2 = args.modules?.governanceFactory ?? args.addresses.launchpadGovernanceFactory ?? ZERO_ADDRESS;
7400
+ if (!resolved2 || resolved2 === ZERO_ADDRESS) {
7401
+ throw new Error(args.launchpadError);
7402
+ }
7403
+ return resolved2;
7404
+ }
7405
+ const resolved = args.modules?.governanceFactory ?? args.addresses.governanceFactory;
7406
+ if (!resolved || resolved === ZERO_ADDRESS) {
7407
+ throw new Error(args.standardError);
7408
+ }
7409
+ return resolved;
7410
+ }
7411
+ shouldAutoExcludeGovernanceTimelock(args) {
7412
+ if (args.governance.type !== "default" && args.governance.type !== "custom") {
7413
+ return false;
7414
+ }
7415
+ if (args.modules?.governanceFactory) {
7416
+ return false;
7417
+ }
7418
+ const noOpGovernanceFactory = args.addresses.noOpGovernanceFactory;
7419
+ return !noOpGovernanceFactory || args.governanceFactory.toLowerCase() !== noOpGovernanceFactory.toLowerCase();
7420
+ }
7421
+ resolveMigrationLockerBalanceLimitExclusions(migration, addresses) {
7422
+ if ((migration.type === "uniswapV4" || migration.type === "uniswapV4Split") && migration.streamableFees) {
7423
+ return [addresses.streamableFeesLocker];
7424
+ }
7425
+ if (migration.type === "dopplerHook") {
7426
+ return [
7427
+ addresses.streamableFeesLockerV2 ?? addresses.streamableFeesLocker
7428
+ ];
7429
+ }
7430
+ return [];
7431
+ }
7432
+ withDopplerERC20V1EncodedBalanceLimitExclusions(tokenFactoryData, exclusions) {
7433
+ const decoded = viem.decodeAbiParameters(
7434
+ [
7435
+ { type: "string" },
7436
+ { type: "string" },
7437
+ {
7438
+ type: "tuple[]",
7439
+ components: [
7440
+ { type: "uint64", name: "cliff" },
7441
+ { type: "uint64", name: "duration" }
7442
+ ]
7443
+ },
7444
+ { type: "address[]" },
7445
+ { type: "uint256[]" },
7446
+ { type: "uint256[]" },
7447
+ { type: "string" },
7448
+ { type: "uint256" },
7449
+ { type: "uint48" },
7450
+ { type: "address" },
7451
+ { type: "address[]" }
7452
+ ],
7453
+ tokenFactoryData
7454
+ );
7455
+ if (decoded[7] === 0n && decoded[8] === 0) {
7456
+ return tokenFactoryData;
7457
+ }
7458
+ return viem.encodeAbiParameters(
7459
+ [
7460
+ { type: "string" },
7461
+ { type: "string" },
7462
+ {
7463
+ type: "tuple[]",
7464
+ components: [
7465
+ { type: "uint64", name: "cliff" },
7466
+ { type: "uint64", name: "duration" }
7467
+ ]
7468
+ },
7469
+ { type: "address[]" },
7470
+ { type: "uint256[]" },
7471
+ { type: "uint256[]" },
7472
+ { type: "string" },
7473
+ { type: "uint256" },
7474
+ { type: "uint48" },
7475
+ { type: "address" },
7476
+ { type: "address[]" }
7477
+ ],
7478
+ [
7479
+ decoded[0],
7480
+ decoded[1],
7481
+ decoded[2],
7482
+ decoded[3],
7483
+ decoded[4],
7484
+ decoded[5],
7485
+ decoded[6],
7486
+ decoded[7],
7487
+ decoded[8],
7488
+ decoded[9],
7489
+ this.mergeDopplerERC20V1BalanceLimitExclusions(decoded[10], exclusions)
7490
+ ]
7491
+ );
7492
+ }
7493
+ withSimulationGovernanceTimelockExclusion(args) {
7494
+ if (!this.isDopplerERC20V1Token(args.token) || !this.usesDefaultDopplerERC20V1Integration(args.modules) || args.simResult.length < 4 || !this.shouldAutoExcludeGovernanceTimelock({
7495
+ governance: args.governance,
7496
+ governanceFactory: args.createParams.governanceFactory,
7497
+ modules: args.modules,
7498
+ addresses: args.addresses
7499
+ })) {
7500
+ return args.createParams;
7501
+ }
7502
+ return {
7503
+ ...args.createParams,
7504
+ tokenFactoryData: this.withDopplerERC20V1EncodedBalanceLimitExclusions(
7505
+ args.createParams.tokenFactoryData,
7506
+ [args.simResult[3]]
7507
+ )
7508
+ };
7509
+ }
7374
7510
  withDopplerERC20V1BalanceLimitExclusions(tokenFactoryData, exclusions) {
7375
7511
  if (!this.isDopplerERC20V1BalanceLimitActive(tokenFactoryData)) {
7376
7512
  return { ...tokenFactoryData };
@@ -7852,6 +7988,10 @@ var DopplerFactory = class {
7852
7988
  poolInitializerAddress,
7853
7989
  liquidityMigratorAddress,
7854
7990
  params.migration.type === "uniswapV4" ? params.modules?.poolManager ?? addresses.poolManager : void 0,
7991
+ ...this.resolveMigrationLockerBalanceLimitExclusions(
7992
+ params.migration,
7993
+ addresses
7994
+ ),
7855
7995
  ...this.resolveGovernanceBalanceLimitExclusions(
7856
7996
  params.governance
7857
7997
  )
@@ -7897,33 +8037,14 @@ var DopplerFactory = class {
7897
8037
  ]
7898
8038
  );
7899
8039
  })();
7900
- const governanceFactoryAddress = (() => {
7901
- if (params.governance.type === "noOp") {
7902
- const resolved2 = params.modules?.governanceFactory ?? addresses.noOpGovernanceFactory ?? ZERO_ADDRESS;
7903
- if (!resolved2 || resolved2 === ZERO_ADDRESS) {
7904
- throw new Error(
7905
- "No-op governance requested, but no-op governanceFactory is not configured on this chain. Provide a governanceFactory override or use a supported chain."
7906
- );
7907
- }
7908
- return resolved2;
7909
- }
7910
- if (params.governance.type === "launchpad") {
7911
- const resolved2 = params.modules?.governanceFactory ?? addresses.launchpadGovernanceFactory ?? ZERO_ADDRESS;
7912
- if (!resolved2 || resolved2 === ZERO_ADDRESS) {
7913
- throw new Error(
7914
- "Launchpad governance requested, but launchpadGovernanceFactory is not configured on this chain. Provide a governanceFactory override or use a supported chain."
7915
- );
7916
- }
7917
- return resolved2;
7918
- }
7919
- const resolved = params.modules?.governanceFactory ?? addresses.governanceFactory;
7920
- if (!resolved || resolved === ZERO_ADDRESS) {
7921
- throw new Error(
7922
- "Standard governance requested but governanceFactory is not deployed on this chain."
7923
- );
7924
- }
7925
- return resolved;
7926
- })();
8040
+ const governanceFactoryAddress = this.resolveGovernanceFactoryAddress({
8041
+ governance: params.governance,
8042
+ modules: params.modules,
8043
+ addresses,
8044
+ noOpError: "No-op governance requested, but no-op governanceFactory is not configured on this chain. Provide a governanceFactory override or use a supported chain.",
8045
+ launchpadError: "Launchpad governance requested, but launchpadGovernanceFactory is not configured on this chain. Provide a governanceFactory override or use a supported chain.",
8046
+ standardError: "Standard governance requested but governanceFactory is not deployed on this chain."
8047
+ });
7927
8048
  if (!tokenFactoryData) {
7928
8049
  throw new Error("Token factory data could not be resolved.");
7929
8050
  }
@@ -8170,7 +8291,14 @@ var DopplerFactory = class {
8170
8291
  const isToken0 = BigInt(tokenAddress) < numeraireBigInt;
8171
8292
  const wantToken0 = isToken0Expected(params.sale.numeraire);
8172
8293
  if (wantToken0 && isToken0 || !wantToken0 && !isToken0) {
8173
- return createParams;
8294
+ return this.withSimulationGovernanceTimelockExclusion({
8295
+ createParams,
8296
+ simResult,
8297
+ token: params.token,
8298
+ governance: params.governance,
8299
+ modules: params.modules,
8300
+ addresses
8301
+ });
8174
8302
  }
8175
8303
  attempt += 1n;
8176
8304
  const incrementedAccount = viem.toHex(
@@ -8265,6 +8393,10 @@ var DopplerFactory = class {
8265
8393
  poolInitializerAddress,
8266
8394
  params.modules?.poolManager ?? addresses.poolManager,
8267
8395
  liquidityMigratorAddress,
8396
+ ...this.resolveMigrationLockerBalanceLimitExclusions(
8397
+ params.migration,
8398
+ addresses
8399
+ ),
8268
8400
  ...this.resolveGovernanceBalanceLimitExclusions(
8269
8401
  params.governance
8270
8402
  )
@@ -8329,33 +8461,14 @@ var DopplerFactory = class {
8329
8461
  ]
8330
8462
  );
8331
8463
  })();
8332
- const governanceFactoryAddress = (() => {
8333
- if (params.governance.type === "noOp") {
8334
- const resolved2 = params.modules?.governanceFactory ?? addresses.noOpGovernanceFactory ?? ZERO_ADDRESS;
8335
- if (!resolved2 || resolved2 === ZERO_ADDRESS) {
8336
- throw new Error(
8337
- "No-op governance requested, but no-op governanceFactory is not configured on this chain. Provide a governanceFactory override or use a supported chain."
8338
- );
8339
- }
8340
- return resolved2;
8341
- }
8342
- if (params.governance.type === "launchpad") {
8343
- const resolved2 = params.modules?.governanceFactory ?? addresses.launchpadGovernanceFactory ?? ZERO_ADDRESS;
8344
- if (!resolved2 || resolved2 === ZERO_ADDRESS) {
8345
- throw new Error(
8346
- "Launchpad governance requested, but launchpadGovernanceFactory is not configured on this chain. Provide a governanceFactory override or use a supported chain."
8347
- );
8348
- }
8349
- return resolved2;
8350
- }
8351
- const resolved = params.modules?.governanceFactory ?? addresses.governanceFactory;
8352
- if (!resolved || resolved === ZERO_ADDRESS) {
8353
- throw new Error(
8354
- "Standard governance requested but governanceFactory is not deployed on this chain."
8355
- );
8356
- }
8357
- return resolved;
8358
- })();
8464
+ const governanceFactoryAddress = this.resolveGovernanceFactoryAddress({
8465
+ governance: params.governance,
8466
+ modules: params.modules,
8467
+ addresses,
8468
+ noOpError: "No-op governance requested, but no-op governanceFactory is not configured on this chain. Provide a governanceFactory override or use a supported chain.",
8469
+ launchpadError: "Launchpad governance requested, but launchpadGovernanceFactory is not configured on this chain. Provide a governanceFactory override or use a supported chain.",
8470
+ standardError: "Standard governance requested but governanceFactory is not deployed on this chain."
8471
+ });
8359
8472
  const createParams = {
8360
8473
  initialSupply: params.sale.initialSupply,
8361
8474
  numTokensToSell: params.sale.numTokensToSell,
@@ -8481,13 +8594,23 @@ var DopplerFactory = class {
8481
8594
  tickSpacing: params.pool.tickSpacing,
8482
8595
  hooks: hookAddress
8483
8596
  });
8484
- return {
8597
+ const createParamsWithTimelock = this.withSimulationGovernanceTimelockExclusion({
8485
8598
  createParams,
8599
+ simResult,
8600
+ token: params.token,
8601
+ governance: params.governance,
8602
+ modules: params.modules,
8603
+ addresses
8604
+ });
8605
+ return {
8606
+ createParams: createParamsWithTimelock,
8486
8607
  hookAddress,
8487
8608
  tokenAddress,
8488
8609
  poolId,
8489
8610
  gasEstimate,
8490
- execute: () => this.createDynamicAuction(params, { _createParams: createParams })
8611
+ execute: () => this.createDynamicAuction(params, {
8612
+ _createParams: createParamsWithTimelock
8613
+ })
8491
8614
  };
8492
8615
  }
8493
8616
  async encodeCreateOpeningAuctionParams(params) {
@@ -8641,6 +8764,10 @@ var DopplerFactory = class {
8641
8764
  poolManagerForAuction,
8642
8765
  auctionDeployer,
8643
8766
  liquidityMigratorAddress,
8767
+ ...this.resolveMigrationLockerBalanceLimitExclusions(
8768
+ params.migration,
8769
+ addresses
8770
+ ),
8644
8771
  ...this.resolveGovernanceBalanceLimitExclusions(
8645
8772
  params.governance
8646
8773
  )
@@ -8703,33 +8830,14 @@ var DopplerFactory = class {
8703
8830
  ]
8704
8831
  );
8705
8832
  })();
8706
- const governanceFactoryAddress = (() => {
8707
- if (params.governance.type === "noOp") {
8708
- const resolved2 = params.modules?.governanceFactory ?? addresses.noOpGovernanceFactory ?? ZERO_ADDRESS;
8709
- if (!resolved2 || resolved2 === ZERO_ADDRESS) {
8710
- throw new Error(
8711
- "No-op governance requested, but no-op governanceFactory is not configured on this chain. Provide a governanceFactory override or use a supported chain."
8712
- );
8713
- }
8714
- return resolved2;
8715
- }
8716
- if (params.governance.type === "launchpad") {
8717
- const resolved2 = params.modules?.governanceFactory ?? addresses.launchpadGovernanceFactory ?? ZERO_ADDRESS;
8718
- if (!resolved2 || resolved2 === ZERO_ADDRESS) {
8719
- throw new Error(
8720
- "Launchpad governance requested, but launchpadGovernanceFactory is not configured on this chain. Provide a governanceFactory override or use a supported chain."
8721
- );
8722
- }
8723
- return resolved2;
8724
- }
8725
- const resolved = params.modules?.governanceFactory ?? addresses.governanceFactory;
8726
- if (!resolved || resolved === ZERO_ADDRESS) {
8727
- throw new Error(
8728
- "Standard governance requested but governanceFactory is not deployed on this chain."
8729
- );
8730
- }
8731
- return resolved;
8732
- })();
8833
+ const governanceFactoryAddress = this.resolveGovernanceFactoryAddress({
8834
+ governance: params.governance,
8835
+ modules: params.modules,
8836
+ addresses,
8837
+ noOpError: "No-op governance requested, but no-op governanceFactory is not configured on this chain. Provide a governanceFactory override or use a supported chain.",
8838
+ launchpadError: "Launchpad governance requested, but launchpadGovernanceFactory is not configured on this chain. Provide a governanceFactory override or use a supported chain.",
8839
+ standardError: "Standard governance requested but governanceFactory is not deployed on this chain."
8840
+ });
8733
8841
  if (!tokenFactoryData) {
8734
8842
  throw new Error("Token factory data could not be resolved.");
8735
8843
  }
@@ -8776,14 +8884,22 @@ var DopplerFactory = class {
8776
8884
  if (!simResult || !Array.isArray(simResult) || simResult.length < 2) {
8777
8885
  throw new Error("Failed to simulate opening auction create");
8778
8886
  }
8779
- return {
8887
+ const createParamsWithTimelock = this.withSimulationGovernanceTimelockExclusion({
8780
8888
  createParams,
8889
+ simResult,
8890
+ token: params.token,
8891
+ governance: params.governance,
8892
+ modules: params.modules,
8893
+ addresses
8894
+ });
8895
+ return {
8896
+ createParams: createParamsWithTimelock,
8781
8897
  openingAuctionHookAddress: simResult[1],
8782
8898
  tokenAddress: simResult[0],
8783
8899
  minedSalt,
8784
8900
  gasEstimate,
8785
8901
  execute: () => this.createOpeningAuction(params, {
8786
- _createParams: createParams,
8902
+ _createParams: createParamsWithTimelock,
8787
8903
  _minedSalt: minedSalt
8788
8904
  })
8789
8905
  };
@@ -10401,6 +10517,10 @@ var DopplerFactory = class {
10401
10517
  resolvedInitializer,
10402
10518
  resolvedMigrator,
10403
10519
  params.modules?.poolManager ?? addresses.poolManager,
10520
+ ...this.resolveMigrationLockerBalanceLimitExclusions(
10521
+ params.migration,
10522
+ addresses
10523
+ ),
10404
10524
  ...this.resolveGovernanceBalanceLimitExclusions(
10405
10525
  params.governance
10406
10526
  )
@@ -10426,33 +10546,14 @@ var DopplerFactory = class {
10426
10546
  finalV1TokenFactoryData
10427
10547
  );
10428
10548
  }
10429
- const governanceFactoryAddress = (() => {
10430
- if (params.governance.type === "noOp") {
10431
- const resolved2 = params.modules?.governanceFactory ?? addresses.noOpGovernanceFactory ?? ZERO_ADDRESS;
10432
- if (!resolved2 || resolved2 === ZERO_ADDRESS) {
10433
- throw new Error(
10434
- "No-op governance requested, but no-op governanceFactory is not configured on this chain."
10435
- );
10436
- }
10437
- return resolved2;
10438
- }
10439
- if (params.governance.type === "launchpad") {
10440
- const resolved2 = params.modules?.governanceFactory ?? addresses.launchpadGovernanceFactory ?? ZERO_ADDRESS;
10441
- if (!resolved2 || resolved2 === ZERO_ADDRESS) {
10442
- throw new Error(
10443
- "Launchpad governance requested, but launchpadGovernanceFactory is not configured on this chain."
10444
- );
10445
- }
10446
- return resolved2;
10447
- }
10448
- const resolved = params.modules?.governanceFactory ?? addresses.governanceFactory;
10449
- if (!resolved || resolved === ZERO_ADDRESS) {
10450
- throw new Error(
10451
- "Standard governance requested but governanceFactory is not deployed on this chain."
10452
- );
10453
- }
10454
- return resolved;
10455
- })();
10549
+ const governanceFactoryAddress = this.resolveGovernanceFactoryAddress({
10550
+ governance: params.governance,
10551
+ modules: params.modules,
10552
+ addresses,
10553
+ noOpError: "No-op governance requested, but no-op governanceFactory is not configured on this chain.",
10554
+ launchpadError: "Launchpad governance requested, but launchpadGovernanceFactory is not configured on this chain.",
10555
+ standardError: "Standard governance requested but governanceFactory is not deployed on this chain."
10556
+ });
10456
10557
  if (!tokenFactoryData) {
10457
10558
  throw new Error("Token factory data could not be resolved.");
10458
10559
  }
@@ -10496,12 +10597,22 @@ var DopplerFactory = class {
10496
10597
  }
10497
10598
  const tokenAddress = simResult[0];
10498
10599
  const poolId = await this.computeMulticurvePoolId(params, tokenAddress);
10499
- return {
10600
+ const createParamsWithTimelock = this.withSimulationGovernanceTimelockExclusion({
10500
10601
  createParams,
10602
+ simResult,
10603
+ token: params.token,
10604
+ governance: params.governance,
10605
+ modules: params.modules,
10606
+ addresses
10607
+ });
10608
+ return {
10609
+ createParams: createParamsWithTimelock,
10501
10610
  tokenAddress,
10502
10611
  poolId,
10503
10612
  gasEstimate,
10504
- execute: () => this.createMulticurve(params, { _createParams: createParams })
10613
+ execute: () => this.createMulticurve(params, {
10614
+ _createParams: createParamsWithTimelock
10615
+ })
10505
10616
  };
10506
10617
  }
10507
10618
  async createMulticurve(params, options) {