@flaunch/sdk 0.9.11 → 0.9.13

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/index.esm.js CHANGED
@@ -5702,7 +5702,6 @@ const FlaunchAddress = {
5702
5702
  [base.id]: "0xCc7A4A00072ccbeEEbd999edc812C0ce498Fb63B",
5703
5703
  [baseSepolia.id]: "0x7D375C9133721083DF7b7e5Cb0Ed8Fc78862dfe3",
5704
5704
  };
5705
- // also supports AnyPositionManager
5706
5705
  const FlaunchV1_1Address = {
5707
5706
  [base.id]: "0xb4512bf57d50fbcb64a3adf8b17a79b2a204c18c",
5708
5707
  [baseSepolia.id]: "0x96be8ff5e244294a34bfa507a39190dc7a839baa",
@@ -5759,7 +5758,7 @@ const BuyBackManagerAddress = {
5759
5758
  };
5760
5759
  /** Verifiers */
5761
5760
  const TokenImporterAddress = {
5762
- [base.id]: "0xb47af90ae61bc916ea4b4bacffae4570e7435842",
5761
+ [base.id]: "0x6fb66f4fc262dc86e12136c481ba7c411e668197",
5763
5762
  [baseSepolia.id]: "0x7981369D21975F39773f289F759F7d7CE1097139",
5764
5763
  };
5765
5764
  const ClankerWorldVerifierAddress = {
@@ -15153,6 +15152,554 @@ class ReadFlaunch {
15153
15152
  }
15154
15153
  }
15155
15154
 
15155
+ const AnyFlaunchAbi = [
15156
+ {
15157
+ inputs: [{ internalType: "string", name: "_baseURI", type: "string" }],
15158
+ stateMutability: "nonpayable",
15159
+ type: "constructor",
15160
+ },
15161
+ { inputs: [], name: "AccountBalanceOverflow", type: "error" },
15162
+ { inputs: [], name: "AlreadyInitialized", type: "error" },
15163
+ { inputs: [], name: "BalanceQueryForZeroAddress", type: "error" },
15164
+ { inputs: [], name: "BaseURICannotBeEmpty", type: "error" },
15165
+ { inputs: [], name: "CallerIsNotPositionManager", type: "error" },
15166
+ {
15167
+ inputs: [
15168
+ { internalType: "uint24", name: "_allocation", type: "uint24" },
15169
+ { internalType: "uint256", name: "_maxAllocation", type: "uint256" },
15170
+ ],
15171
+ name: "CreatorFeeAllocationInvalid",
15172
+ type: "error",
15173
+ },
15174
+ { inputs: [], name: "InvalidInitialization", type: "error" },
15175
+ { inputs: [], name: "NewOwnerIsZeroAddress", type: "error" },
15176
+ { inputs: [], name: "NoHandoverRequest", type: "error" },
15177
+ { inputs: [], name: "NotInitializing", type: "error" },
15178
+ { inputs: [], name: "NotOwnerNorApproved", type: "error" },
15179
+ { inputs: [], name: "TokenAlreadyExists", type: "error" },
15180
+ { inputs: [], name: "TokenDoesNotExist", type: "error" },
15181
+ { inputs: [], name: "TransferFromIncorrectOwner", type: "error" },
15182
+ { inputs: [], name: "TransferToNonERC721ReceiverImplementer", type: "error" },
15183
+ { inputs: [], name: "TransferToZeroAddress", type: "error" },
15184
+ { inputs: [], name: "Unauthorized", type: "error" },
15185
+ {
15186
+ anonymous: false,
15187
+ inputs: [
15188
+ {
15189
+ indexed: true,
15190
+ internalType: "address",
15191
+ name: "owner",
15192
+ type: "address",
15193
+ },
15194
+ {
15195
+ indexed: true,
15196
+ internalType: "address",
15197
+ name: "account",
15198
+ type: "address",
15199
+ },
15200
+ { indexed: true, internalType: "uint256", name: "id", type: "uint256" },
15201
+ ],
15202
+ name: "Approval",
15203
+ type: "event",
15204
+ },
15205
+ {
15206
+ anonymous: false,
15207
+ inputs: [
15208
+ {
15209
+ indexed: true,
15210
+ internalType: "address",
15211
+ name: "owner",
15212
+ type: "address",
15213
+ },
15214
+ {
15215
+ indexed: true,
15216
+ internalType: "address",
15217
+ name: "operator",
15218
+ type: "address",
15219
+ },
15220
+ {
15221
+ indexed: false,
15222
+ internalType: "bool",
15223
+ name: "isApproved",
15224
+ type: "bool",
15225
+ },
15226
+ ],
15227
+ name: "ApprovalForAll",
15228
+ type: "event",
15229
+ },
15230
+ {
15231
+ anonymous: false,
15232
+ inputs: [
15233
+ {
15234
+ indexed: false,
15235
+ internalType: "string",
15236
+ name: "_newBaseURI",
15237
+ type: "string",
15238
+ },
15239
+ ],
15240
+ name: "BaseURIUpdated",
15241
+ type: "event",
15242
+ },
15243
+ {
15244
+ anonymous: false,
15245
+ inputs: [
15246
+ {
15247
+ indexed: false,
15248
+ internalType: "uint64",
15249
+ name: "version",
15250
+ type: "uint64",
15251
+ },
15252
+ ],
15253
+ name: "Initialized",
15254
+ type: "event",
15255
+ },
15256
+ {
15257
+ anonymous: false,
15258
+ inputs: [
15259
+ {
15260
+ indexed: false,
15261
+ internalType: "address",
15262
+ name: "_newImplementation",
15263
+ type: "address",
15264
+ },
15265
+ ],
15266
+ name: "MemecoinTreasuryImplementationUpdated",
15267
+ type: "event",
15268
+ },
15269
+ {
15270
+ anonymous: false,
15271
+ inputs: [
15272
+ {
15273
+ indexed: true,
15274
+ internalType: "address",
15275
+ name: "pendingOwner",
15276
+ type: "address",
15277
+ },
15278
+ ],
15279
+ name: "OwnershipHandoverCanceled",
15280
+ type: "event",
15281
+ },
15282
+ {
15283
+ anonymous: false,
15284
+ inputs: [
15285
+ {
15286
+ indexed: true,
15287
+ internalType: "address",
15288
+ name: "pendingOwner",
15289
+ type: "address",
15290
+ },
15291
+ ],
15292
+ name: "OwnershipHandoverRequested",
15293
+ type: "event",
15294
+ },
15295
+ {
15296
+ anonymous: false,
15297
+ inputs: [
15298
+ {
15299
+ indexed: true,
15300
+ internalType: "address",
15301
+ name: "oldOwner",
15302
+ type: "address",
15303
+ },
15304
+ {
15305
+ indexed: true,
15306
+ internalType: "address",
15307
+ name: "newOwner",
15308
+ type: "address",
15309
+ },
15310
+ ],
15311
+ name: "OwnershipTransferred",
15312
+ type: "event",
15313
+ },
15314
+ {
15315
+ anonymous: false,
15316
+ inputs: [
15317
+ { indexed: true, internalType: "address", name: "from", type: "address" },
15318
+ { indexed: true, internalType: "address", name: "to", type: "address" },
15319
+ { indexed: true, internalType: "uint256", name: "id", type: "uint256" },
15320
+ ],
15321
+ name: "Transfer",
15322
+ type: "event",
15323
+ },
15324
+ {
15325
+ inputs: [],
15326
+ name: "MAX_CREATOR_ALLOCATION",
15327
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
15328
+ stateMutability: "view",
15329
+ type: "function",
15330
+ },
15331
+ {
15332
+ inputs: [
15333
+ { internalType: "address", name: "account", type: "address" },
15334
+ { internalType: "uint256", name: "id", type: "uint256" },
15335
+ ],
15336
+ name: "approve",
15337
+ outputs: [],
15338
+ stateMutability: "payable",
15339
+ type: "function",
15340
+ },
15341
+ {
15342
+ inputs: [{ internalType: "address", name: "owner", type: "address" }],
15343
+ name: "balanceOf",
15344
+ outputs: [{ internalType: "uint256", name: "result", type: "uint256" }],
15345
+ stateMutability: "view",
15346
+ type: "function",
15347
+ },
15348
+ {
15349
+ inputs: [],
15350
+ name: "baseURI",
15351
+ outputs: [{ internalType: "string", name: "", type: "string" }],
15352
+ stateMutability: "view",
15353
+ type: "function",
15354
+ },
15355
+ {
15356
+ inputs: [{ internalType: "uint256", name: "_tokenId", type: "uint256" }],
15357
+ name: "burn",
15358
+ outputs: [],
15359
+ stateMutability: "nonpayable",
15360
+ type: "function",
15361
+ },
15362
+ {
15363
+ inputs: [],
15364
+ name: "cancelOwnershipHandover",
15365
+ outputs: [],
15366
+ stateMutability: "payable",
15367
+ type: "function",
15368
+ },
15369
+ {
15370
+ inputs: [
15371
+ { internalType: "address", name: "pendingOwner", type: "address" },
15372
+ ],
15373
+ name: "completeOwnershipHandover",
15374
+ outputs: [],
15375
+ stateMutability: "payable",
15376
+ type: "function",
15377
+ },
15378
+ {
15379
+ inputs: [{ internalType: "address", name: "_memecoin", type: "address" }],
15380
+ name: "creator",
15381
+ outputs: [{ internalType: "address", name: "creator_", type: "address" }],
15382
+ stateMutability: "view",
15383
+ type: "function",
15384
+ },
15385
+ {
15386
+ inputs: [
15387
+ {
15388
+ components: [
15389
+ { internalType: "address", name: "memecoin", type: "address" },
15390
+ { internalType: "address", name: "creator", type: "address" },
15391
+ {
15392
+ internalType: "uint24",
15393
+ name: "creatorFeeAllocation",
15394
+ type: "uint24",
15395
+ },
15396
+ { internalType: "bytes", name: "initialPriceParams", type: "bytes" },
15397
+ { internalType: "bytes", name: "feeCalculatorParams", type: "bytes" },
15398
+ ],
15399
+ internalType: "struct AnyPositionManager.FlaunchParams",
15400
+ name: "_params",
15401
+ type: "tuple",
15402
+ },
15403
+ ],
15404
+ name: "flaunch",
15405
+ outputs: [
15406
+ {
15407
+ internalType: "address payable",
15408
+ name: "memecoinTreasury_",
15409
+ type: "address",
15410
+ },
15411
+ { internalType: "uint256", name: "tokenId_", type: "uint256" },
15412
+ ],
15413
+ stateMutability: "nonpayable",
15414
+ type: "function",
15415
+ },
15416
+ {
15417
+ inputs: [{ internalType: "uint256", name: "id", type: "uint256" }],
15418
+ name: "getApproved",
15419
+ outputs: [{ internalType: "address", name: "result", type: "address" }],
15420
+ stateMutability: "view",
15421
+ type: "function",
15422
+ },
15423
+ {
15424
+ inputs: [
15425
+ {
15426
+ internalType: "contract AnyPositionManager",
15427
+ name: "_positionManager",
15428
+ type: "address",
15429
+ },
15430
+ {
15431
+ internalType: "address",
15432
+ name: "_memecoinTreasuryImplementation",
15433
+ type: "address",
15434
+ },
15435
+ ],
15436
+ name: "initialize",
15437
+ outputs: [],
15438
+ stateMutability: "nonpayable",
15439
+ type: "function",
15440
+ },
15441
+ {
15442
+ inputs: [
15443
+ { internalType: "address", name: "owner", type: "address" },
15444
+ { internalType: "address", name: "operator", type: "address" },
15445
+ ],
15446
+ name: "isApprovedForAll",
15447
+ outputs: [{ internalType: "bool", name: "result", type: "bool" }],
15448
+ stateMutability: "view",
15449
+ type: "function",
15450
+ },
15451
+ {
15452
+ inputs: [{ internalType: "uint256", name: "_tokenId", type: "uint256" }],
15453
+ name: "memecoin",
15454
+ outputs: [{ internalType: "address", name: "", type: "address" }],
15455
+ stateMutability: "view",
15456
+ type: "function",
15457
+ },
15458
+ {
15459
+ inputs: [{ internalType: "address", name: "_memecoin", type: "address" }],
15460
+ name: "memecoinTreasury",
15461
+ outputs: [{ internalType: "address payable", name: "", type: "address" }],
15462
+ stateMutability: "view",
15463
+ type: "function",
15464
+ },
15465
+ {
15466
+ inputs: [{ internalType: "uint256", name: "_tokenId", type: "uint256" }],
15467
+ name: "memecoinTreasury",
15468
+ outputs: [{ internalType: "address payable", name: "", type: "address" }],
15469
+ stateMutability: "view",
15470
+ type: "function",
15471
+ },
15472
+ {
15473
+ inputs: [],
15474
+ name: "memecoinTreasuryImplementation",
15475
+ outputs: [{ internalType: "address", name: "", type: "address" }],
15476
+ stateMutability: "view",
15477
+ type: "function",
15478
+ },
15479
+ {
15480
+ inputs: [],
15481
+ name: "name",
15482
+ outputs: [{ internalType: "string", name: "", type: "string" }],
15483
+ stateMutability: "view",
15484
+ type: "function",
15485
+ },
15486
+ {
15487
+ inputs: [],
15488
+ name: "nextTokenId",
15489
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
15490
+ stateMutability: "view",
15491
+ type: "function",
15492
+ },
15493
+ {
15494
+ inputs: [],
15495
+ name: "owner",
15496
+ outputs: [{ internalType: "address", name: "result", type: "address" }],
15497
+ stateMutability: "view",
15498
+ type: "function",
15499
+ },
15500
+ {
15501
+ inputs: [{ internalType: "uint256", name: "id", type: "uint256" }],
15502
+ name: "ownerOf",
15503
+ outputs: [{ internalType: "address", name: "result", type: "address" }],
15504
+ stateMutability: "view",
15505
+ type: "function",
15506
+ },
15507
+ {
15508
+ inputs: [
15509
+ { internalType: "address", name: "pendingOwner", type: "address" },
15510
+ ],
15511
+ name: "ownershipHandoverExpiresAt",
15512
+ outputs: [{ internalType: "uint256", name: "result", type: "uint256" }],
15513
+ stateMutability: "view",
15514
+ type: "function",
15515
+ },
15516
+ {
15517
+ inputs: [{ internalType: "uint256", name: "_tokenId", type: "uint256" }],
15518
+ name: "poolId",
15519
+ outputs: [{ internalType: "PoolId", name: "", type: "bytes32" }],
15520
+ stateMutability: "view",
15521
+ type: "function",
15522
+ },
15523
+ {
15524
+ inputs: [],
15525
+ name: "positionManager",
15526
+ outputs: [
15527
+ {
15528
+ internalType: "contract AnyPositionManager",
15529
+ name: "",
15530
+ type: "address",
15531
+ },
15532
+ ],
15533
+ stateMutability: "view",
15534
+ type: "function",
15535
+ },
15536
+ {
15537
+ inputs: [],
15538
+ name: "renounceOwnership",
15539
+ outputs: [],
15540
+ stateMutability: "payable",
15541
+ type: "function",
15542
+ },
15543
+ {
15544
+ inputs: [],
15545
+ name: "requestOwnershipHandover",
15546
+ outputs: [],
15547
+ stateMutability: "payable",
15548
+ type: "function",
15549
+ },
15550
+ {
15551
+ inputs: [
15552
+ { internalType: "address", name: "from", type: "address" },
15553
+ { internalType: "address", name: "to", type: "address" },
15554
+ { internalType: "uint256", name: "id", type: "uint256" },
15555
+ ],
15556
+ name: "safeTransferFrom",
15557
+ outputs: [],
15558
+ stateMutability: "payable",
15559
+ type: "function",
15560
+ },
15561
+ {
15562
+ inputs: [
15563
+ { internalType: "address", name: "from", type: "address" },
15564
+ { internalType: "address", name: "to", type: "address" },
15565
+ { internalType: "uint256", name: "id", type: "uint256" },
15566
+ { internalType: "bytes", name: "data", type: "bytes" },
15567
+ ],
15568
+ name: "safeTransferFrom",
15569
+ outputs: [],
15570
+ stateMutability: "payable",
15571
+ type: "function",
15572
+ },
15573
+ {
15574
+ inputs: [
15575
+ { internalType: "address", name: "operator", type: "address" },
15576
+ { internalType: "bool", name: "isApproved", type: "bool" },
15577
+ ],
15578
+ name: "setApprovalForAll",
15579
+ outputs: [],
15580
+ stateMutability: "nonpayable",
15581
+ type: "function",
15582
+ },
15583
+ {
15584
+ inputs: [{ internalType: "string", name: "_baseURI", type: "string" }],
15585
+ name: "setBaseURI",
15586
+ outputs: [],
15587
+ stateMutability: "nonpayable",
15588
+ type: "function",
15589
+ },
15590
+ {
15591
+ inputs: [
15592
+ {
15593
+ internalType: "address",
15594
+ name: "_memecoinTreasuryImplementation",
15595
+ type: "address",
15596
+ },
15597
+ ],
15598
+ name: "setMemecoinTreasuryImplementation",
15599
+ outputs: [],
15600
+ stateMutability: "nonpayable",
15601
+ type: "function",
15602
+ },
15603
+ {
15604
+ inputs: [{ internalType: "bytes4", name: "interfaceId", type: "bytes4" }],
15605
+ name: "supportsInterface",
15606
+ outputs: [{ internalType: "bool", name: "result", type: "bool" }],
15607
+ stateMutability: "view",
15608
+ type: "function",
15609
+ },
15610
+ {
15611
+ inputs: [],
15612
+ name: "symbol",
15613
+ outputs: [{ internalType: "string", name: "", type: "string" }],
15614
+ stateMutability: "view",
15615
+ type: "function",
15616
+ },
15617
+ {
15618
+ inputs: [{ internalType: "address", name: "_memecoin", type: "address" }],
15619
+ name: "tokenId",
15620
+ outputs: [{ internalType: "uint256", name: "_tokenId", type: "uint256" }],
15621
+ stateMutability: "view",
15622
+ type: "function",
15623
+ },
15624
+ {
15625
+ inputs: [{ internalType: "uint256", name: "_tokenId", type: "uint256" }],
15626
+ name: "tokenURI",
15627
+ outputs: [{ internalType: "string", name: "", type: "string" }],
15628
+ stateMutability: "view",
15629
+ type: "function",
15630
+ },
15631
+ {
15632
+ inputs: [
15633
+ { internalType: "address", name: "from", type: "address" },
15634
+ { internalType: "address", name: "to", type: "address" },
15635
+ { internalType: "uint256", name: "id", type: "uint256" },
15636
+ ],
15637
+ name: "transferFrom",
15638
+ outputs: [],
15639
+ stateMutability: "payable",
15640
+ type: "function",
15641
+ },
15642
+ {
15643
+ inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
15644
+ name: "transferOwnership",
15645
+ outputs: [],
15646
+ stateMutability: "payable",
15647
+ type: "function",
15648
+ },
15649
+ ];
15650
+
15651
+ /**
15652
+ * Client for interacting with the AnyFlaunch contract in read-only mode
15653
+ * Provides methods to query token IDs and metadata URIs
15654
+ */
15655
+ class ReadAnyFlaunch {
15656
+ /**
15657
+ * Creates a new ReadAnyFlaunch instance
15658
+ * @param address - The address of the AnyFlaunch contract
15659
+ * @param drift - Optional drift instance for contract interactions (creates new instance if not provided)
15660
+ * @throws Error if address is not provided
15661
+ */
15662
+ constructor(address, drift = createDrift$1()) {
15663
+ if (!address) {
15664
+ throw new Error("Address is required");
15665
+ }
15666
+ this.contract = drift.contract({
15667
+ abi: AnyFlaunchAbi,
15668
+ address,
15669
+ });
15670
+ }
15671
+ /**
15672
+ * Gets the token ID associated with a memecoin
15673
+ * @param coinAddress - The address of the memecoin
15674
+ * @returns Promise<bigint> - The token ID
15675
+ */
15676
+ tokenId(coinAddress) {
15677
+ return this.contract.read("tokenId", {
15678
+ _memecoin: coinAddress,
15679
+ });
15680
+ }
15681
+ /**
15682
+ * Gets the metadata URI for a token
15683
+ * @param tokenId - The ID of the token
15684
+ * @returns Promise<string> - The token's metadata URI
15685
+ */
15686
+ tokenURI(tokenId) {
15687
+ return this.contract.read("tokenURI", {
15688
+ _tokenId: tokenId,
15689
+ });
15690
+ }
15691
+ /**
15692
+ * Gets the memecoin address for a given token ID
15693
+ * @param tokenId - The ID of the token
15694
+ * @returns Promise<Address> - The address of the memecoin
15695
+ */
15696
+ memecoin(tokenId) {
15697
+ return this.contract.read("memecoin", {
15698
+ _tokenId: tokenId,
15699
+ });
15700
+ }
15701
+ }
15702
+
15156
15703
  const MemecoinAbi = [
15157
15704
  { inputs: [], stateMutability: "nonpayable", type: "constructor" },
15158
15705
  { inputs: [], name: "CallerNotFlaunch", type: "error" },
@@ -20397,279 +20944,406 @@ class ReadWriteAnyPositionManager extends ReadAnyPositionManager {
20397
20944
 
20398
20945
  const TokenImporterAbi = [
20399
20946
  {
20400
- type: "constructor",
20401
- inputs: [
20947
+ "type": "constructor",
20948
+ "inputs": [
20402
20949
  {
20403
- name: "_anyPositionManager",
20404
- type: "address",
20405
- internalType: "address payable",
20406
- },
20950
+ "name": "_anyPositionManager",
20951
+ "type": "address",
20952
+ "internalType": "address payable"
20953
+ }
20407
20954
  ],
20408
- stateMutability: "nonpayable",
20955
+ "stateMutability": "nonpayable"
20409
20956
  },
20410
20957
  {
20411
- type: "function",
20412
- name: "addVerifier",
20413
- inputs: [{ name: "_verifier", type: "address", internalType: "address" }],
20414
- outputs: [],
20415
- stateMutability: "nonpayable",
20958
+ "type": "function",
20959
+ "name": "addVerifier",
20960
+ "inputs": [
20961
+ {
20962
+ "name": "_verifier",
20963
+ "type": "address",
20964
+ "internalType": "address"
20965
+ }
20966
+ ],
20967
+ "outputs": [],
20968
+ "stateMutability": "nonpayable"
20416
20969
  },
20417
20970
  {
20418
- type: "function",
20419
- name: "anyPositionManager",
20420
- inputs: [],
20421
- outputs: [
20971
+ "type": "function",
20972
+ "name": "anyPositionManager",
20973
+ "inputs": [],
20974
+ "outputs": [
20422
20975
  {
20423
- name: "",
20424
- type: "address",
20425
- internalType: "contract AnyPositionManager",
20426
- },
20976
+ "name": "",
20977
+ "type": "address",
20978
+ "internalType": "contract AnyPositionManager"
20979
+ }
20427
20980
  ],
20428
- stateMutability: "view",
20981
+ "stateMutability": "view"
20429
20982
  },
20430
20983
  {
20431
- type: "function",
20432
- name: "cancelOwnershipHandover",
20433
- inputs: [],
20434
- outputs: [],
20435
- stateMutability: "payable",
20984
+ "type": "function",
20985
+ "name": "cancelOwnershipHandover",
20986
+ "inputs": [],
20987
+ "outputs": [],
20988
+ "stateMutability": "payable"
20436
20989
  },
20437
20990
  {
20438
- type: "function",
20439
- name: "completeOwnershipHandover",
20440
- inputs: [
20441
- { name: "pendingOwner", type: "address", internalType: "address" },
20991
+ "type": "function",
20992
+ "name": "completeOwnershipHandover",
20993
+ "inputs": [
20994
+ {
20995
+ "name": "pendingOwner",
20996
+ "type": "address",
20997
+ "internalType": "address"
20998
+ }
20442
20999
  ],
20443
- outputs: [],
20444
- stateMutability: "payable",
21000
+ "outputs": [],
21001
+ "stateMutability": "payable"
20445
21002
  },
20446
21003
  {
20447
- type: "function",
20448
- name: "getAllVerifiers",
20449
- inputs: [],
20450
- outputs: [
21004
+ "type": "function",
21005
+ "name": "getAllVerifiers",
21006
+ "inputs": [],
21007
+ "outputs": [
21008
+ {
21009
+ "name": "verifiers_",
21010
+ "type": "address[]",
21011
+ "internalType": "address[]"
21012
+ }
21013
+ ],
21014
+ "stateMutability": "view"
21015
+ },
21016
+ {
21017
+ "type": "function",
21018
+ "name": "initialize",
21019
+ "inputs": [
21020
+ {
21021
+ "name": "_memecoin",
21022
+ "type": "address",
21023
+ "internalType": "address"
21024
+ },
20451
21025
  {
20452
- name: "verifiers_",
20453
- type: "address[]",
20454
- internalType: "address[]",
21026
+ "name": "_creatorFeeAllocation",
21027
+ "type": "uint24",
21028
+ "internalType": "uint24"
20455
21029
  },
21030
+ {
21031
+ "name": "_initialMarketCap",
21032
+ "type": "uint256",
21033
+ "internalType": "uint256"
21034
+ },
21035
+ {
21036
+ "name": "_verifier",
21037
+ "type": "address",
21038
+ "internalType": "address"
21039
+ }
20456
21040
  ],
20457
- stateMutability: "view",
21041
+ "outputs": [],
21042
+ "stateMutability": "nonpayable"
20458
21043
  },
20459
21044
  {
20460
- type: "function",
20461
- name: "initialize",
20462
- inputs: [
20463
- { name: "_memecoin", type: "address", internalType: "address" },
21045
+ "type": "function",
21046
+ "name": "initialize",
21047
+ "inputs": [
20464
21048
  {
20465
- name: "_creatorFeeAllocation",
20466
- type: "uint24",
20467
- internalType: "uint24",
21049
+ "name": "_memecoin",
21050
+ "type": "address",
21051
+ "internalType": "address"
20468
21052
  },
20469
21053
  {
20470
- name: "_initialMarketCap",
20471
- type: "uint256",
20472
- internalType: "uint256",
21054
+ "name": "_creatorFeeAllocation",
21055
+ "type": "uint24",
21056
+ "internalType": "uint24"
21057
+ },
21058
+ {
21059
+ "name": "_initialMarketCap",
21060
+ "type": "uint256",
21061
+ "internalType": "uint256"
21062
+ },
21063
+ {
21064
+ "name": "_totalSupply",
21065
+ "type": "uint256",
21066
+ "internalType": "uint256"
20473
21067
  },
20474
- { name: "_verifier", type: "address", internalType: "address" },
21068
+ {
21069
+ "name": "_verifier",
21070
+ "type": "address",
21071
+ "internalType": "address"
21072
+ }
20475
21073
  ],
20476
- outputs: [],
20477
- stateMutability: "nonpayable",
21074
+ "outputs": [],
21075
+ "stateMutability": "nonpayable"
20478
21076
  },
20479
21077
  {
20480
- type: "function",
20481
- name: "initialize",
20482
- inputs: [
20483
- { name: "_memecoin", type: "address", internalType: "address" },
21078
+ "type": "function",
21079
+ "name": "initialize",
21080
+ "inputs": [
20484
21081
  {
20485
- name: "_creatorFeeAllocation",
20486
- type: "uint24",
20487
- internalType: "uint24",
21082
+ "name": "_memecoin",
21083
+ "type": "address",
21084
+ "internalType": "address"
20488
21085
  },
20489
21086
  {
20490
- name: "_initialMarketCap",
20491
- type: "uint256",
20492
- internalType: "uint256",
21087
+ "name": "_creatorFeeAllocation",
21088
+ "type": "uint24",
21089
+ "internalType": "uint24"
20493
21090
  },
21091
+ {
21092
+ "name": "_initialMarketCap",
21093
+ "type": "uint256",
21094
+ "internalType": "uint256"
21095
+ }
20494
21096
  ],
20495
- outputs: [],
20496
- stateMutability: "nonpayable",
21097
+ "outputs": [],
21098
+ "stateMutability": "nonpayable"
20497
21099
  },
20498
21100
  {
20499
- type: "function",
20500
- name: "owner",
20501
- inputs: [],
20502
- outputs: [{ name: "result", type: "address", internalType: "address" }],
20503
- stateMutability: "view",
21101
+ "type": "function",
21102
+ "name": "owner",
21103
+ "inputs": [],
21104
+ "outputs": [
21105
+ {
21106
+ "name": "result",
21107
+ "type": "address",
21108
+ "internalType": "address"
21109
+ }
21110
+ ],
21111
+ "stateMutability": "view"
20504
21112
  },
20505
21113
  {
20506
- type: "function",
20507
- name: "ownershipHandoverExpiresAt",
20508
- inputs: [
20509
- { name: "pendingOwner", type: "address", internalType: "address" },
21114
+ "type": "function",
21115
+ "name": "ownershipHandoverExpiresAt",
21116
+ "inputs": [
21117
+ {
21118
+ "name": "pendingOwner",
21119
+ "type": "address",
21120
+ "internalType": "address"
21121
+ }
20510
21122
  ],
20511
- outputs: [{ name: "result", type: "uint256", internalType: "uint256" }],
20512
- stateMutability: "view",
21123
+ "outputs": [
21124
+ {
21125
+ "name": "result",
21126
+ "type": "uint256",
21127
+ "internalType": "uint256"
21128
+ }
21129
+ ],
21130
+ "stateMutability": "view"
20513
21131
  },
20514
21132
  {
20515
- type: "function",
20516
- name: "removeVerifier",
20517
- inputs: [{ name: "_verifier", type: "address", internalType: "address" }],
20518
- outputs: [],
20519
- stateMutability: "nonpayable",
21133
+ "type": "function",
21134
+ "name": "removeVerifier",
21135
+ "inputs": [
21136
+ {
21137
+ "name": "_verifier",
21138
+ "type": "address",
21139
+ "internalType": "address"
21140
+ }
21141
+ ],
21142
+ "outputs": [],
21143
+ "stateMutability": "nonpayable"
20520
21144
  },
20521
21145
  {
20522
- type: "function",
20523
- name: "renounceOwnership",
20524
- inputs: [],
20525
- outputs: [],
20526
- stateMutability: "payable",
21146
+ "type": "function",
21147
+ "name": "renounceOwnership",
21148
+ "inputs": [],
21149
+ "outputs": [],
21150
+ "stateMutability": "payable"
20527
21151
  },
20528
21152
  {
20529
- type: "function",
20530
- name: "requestOwnershipHandover",
20531
- inputs: [],
20532
- outputs: [],
20533
- stateMutability: "payable",
21153
+ "type": "function",
21154
+ "name": "requestOwnershipHandover",
21155
+ "inputs": [],
21156
+ "outputs": [],
21157
+ "stateMutability": "payable"
20534
21158
  },
20535
21159
  {
20536
- type: "function",
20537
- name: "setAnyPositionManager",
20538
- inputs: [
21160
+ "type": "function",
21161
+ "name": "setAnyPositionManager",
21162
+ "inputs": [
20539
21163
  {
20540
- name: "_anyPositionManager",
20541
- type: "address",
20542
- internalType: "address payable",
20543
- },
21164
+ "name": "_anyPositionManager",
21165
+ "type": "address",
21166
+ "internalType": "address payable"
21167
+ }
20544
21168
  ],
20545
- outputs: [],
20546
- stateMutability: "nonpayable",
21169
+ "outputs": [],
21170
+ "stateMutability": "nonpayable"
20547
21171
  },
20548
21172
  {
20549
- type: "function",
20550
- name: "transferOwnership",
20551
- inputs: [{ name: "newOwner", type: "address", internalType: "address" }],
20552
- outputs: [],
20553
- stateMutability: "payable",
21173
+ "type": "function",
21174
+ "name": "transferOwnership",
21175
+ "inputs": [
21176
+ {
21177
+ "name": "newOwner",
21178
+ "type": "address",
21179
+ "internalType": "address"
21180
+ }
21181
+ ],
21182
+ "outputs": [],
21183
+ "stateMutability": "payable"
20554
21184
  },
20555
21185
  {
20556
- type: "function",
20557
- name: "verifyMemecoin",
20558
- inputs: [{ name: "_memecoin", type: "address", internalType: "address" }],
20559
- outputs: [{ name: "verifier_", type: "address", internalType: "address" }],
20560
- stateMutability: "view",
21186
+ "type": "function",
21187
+ "name": "verifyMemecoin",
21188
+ "inputs": [
21189
+ {
21190
+ "name": "_memecoin",
21191
+ "type": "address",
21192
+ "internalType": "address"
21193
+ }
21194
+ ],
21195
+ "outputs": [
21196
+ {
21197
+ "name": "verifier_",
21198
+ "type": "address",
21199
+ "internalType": "address"
21200
+ }
21201
+ ],
21202
+ "stateMutability": "view"
20561
21203
  },
20562
21204
  {
20563
- type: "event",
20564
- name: "AnyPositionManagerSet",
20565
- inputs: [
21205
+ "type": "event",
21206
+ "name": "AnyPositionManagerSet",
21207
+ "inputs": [
20566
21208
  {
20567
- name: "_anyPositionManager",
20568
- type: "address",
20569
- indexed: true,
20570
- internalType: "address",
20571
- },
21209
+ "name": "_anyPositionManager",
21210
+ "type": "address",
21211
+ "indexed": true,
21212
+ "internalType": "address"
21213
+ }
20572
21214
  ],
20573
- anonymous: false,
21215
+ "anonymous": false
20574
21216
  },
20575
21217
  {
20576
- type: "event",
20577
- name: "OwnershipHandoverCanceled",
20578
- inputs: [
21218
+ "type": "event",
21219
+ "name": "OwnershipHandoverCanceled",
21220
+ "inputs": [
20579
21221
  {
20580
- name: "pendingOwner",
20581
- type: "address",
20582
- indexed: true,
20583
- internalType: "address",
20584
- },
21222
+ "name": "pendingOwner",
21223
+ "type": "address",
21224
+ "indexed": true,
21225
+ "internalType": "address"
21226
+ }
20585
21227
  ],
20586
- anonymous: false,
21228
+ "anonymous": false
20587
21229
  },
20588
21230
  {
20589
- type: "event",
20590
- name: "OwnershipHandoverRequested",
20591
- inputs: [
21231
+ "type": "event",
21232
+ "name": "OwnershipHandoverRequested",
21233
+ "inputs": [
20592
21234
  {
20593
- name: "pendingOwner",
20594
- type: "address",
20595
- indexed: true,
20596
- internalType: "address",
20597
- },
21235
+ "name": "pendingOwner",
21236
+ "type": "address",
21237
+ "indexed": true,
21238
+ "internalType": "address"
21239
+ }
20598
21240
  ],
20599
- anonymous: false,
21241
+ "anonymous": false
20600
21242
  },
20601
21243
  {
20602
- type: "event",
20603
- name: "OwnershipTransferred",
20604
- inputs: [
21244
+ "type": "event",
21245
+ "name": "OwnershipTransferred",
21246
+ "inputs": [
20605
21247
  {
20606
- name: "oldOwner",
20607
- type: "address",
20608
- indexed: true,
20609
- internalType: "address",
21248
+ "name": "oldOwner",
21249
+ "type": "address",
21250
+ "indexed": true,
21251
+ "internalType": "address"
20610
21252
  },
20611
21253
  {
20612
- name: "newOwner",
20613
- type: "address",
20614
- indexed: true,
20615
- internalType: "address",
20616
- },
21254
+ "name": "newOwner",
21255
+ "type": "address",
21256
+ "indexed": true,
21257
+ "internalType": "address"
21258
+ }
20617
21259
  ],
20618
- anonymous: false,
21260
+ "anonymous": false
20619
21261
  },
20620
21262
  {
20621
- type: "event",
20622
- name: "TokenImported",
20623
- inputs: [
21263
+ "type": "event",
21264
+ "name": "TokenImported",
21265
+ "inputs": [
20624
21266
  {
20625
- name: "_memecoin",
20626
- type: "address",
20627
- indexed: true,
20628
- internalType: "address",
21267
+ "name": "_memecoin",
21268
+ "type": "address",
21269
+ "indexed": true,
21270
+ "internalType": "address"
20629
21271
  },
20630
21272
  {
20631
- name: "_verifier",
20632
- type: "address",
20633
- indexed: true,
20634
- internalType: "address",
20635
- },
21273
+ "name": "_verifier",
21274
+ "type": "address",
21275
+ "indexed": true,
21276
+ "internalType": "address"
21277
+ }
20636
21278
  ],
20637
- anonymous: false,
21279
+ "anonymous": false
20638
21280
  },
20639
21281
  {
20640
- type: "event",
20641
- name: "VerifierAdded",
20642
- inputs: [
21282
+ "type": "event",
21283
+ "name": "VerifierAdded",
21284
+ "inputs": [
20643
21285
  {
20644
- name: "_verifier",
20645
- type: "address",
20646
- indexed: true,
20647
- internalType: "address",
20648
- },
21286
+ "name": "_verifier",
21287
+ "type": "address",
21288
+ "indexed": true,
21289
+ "internalType": "address"
21290
+ }
20649
21291
  ],
20650
- anonymous: false,
21292
+ "anonymous": false
20651
21293
  },
20652
21294
  {
20653
- type: "event",
20654
- name: "VerifierRemoved",
20655
- inputs: [
21295
+ "type": "event",
21296
+ "name": "VerifierRemoved",
21297
+ "inputs": [
20656
21298
  {
20657
- name: "_verifier",
20658
- type: "address",
20659
- indexed: true,
20660
- internalType: "address",
20661
- },
21299
+ "name": "_verifier",
21300
+ "type": "address",
21301
+ "indexed": true,
21302
+ "internalType": "address"
21303
+ }
20662
21304
  ],
20663
- anonymous: false,
21305
+ "anonymous": false
20664
21306
  },
20665
- { type: "error", name: "AlreadyInitialized", inputs: [] },
20666
- { type: "error", name: "InvalidMemecoin", inputs: [] },
20667
- { type: "error", name: "NewOwnerIsZeroAddress", inputs: [] },
20668
- { type: "error", name: "NoHandoverRequest", inputs: [] },
20669
- { type: "error", name: "Unauthorized", inputs: [] },
20670
- { type: "error", name: "VerifierAlreadyAdded", inputs: [] },
20671
- { type: "error", name: "VerifierNotAdded", inputs: [] },
20672
- { type: "error", name: "ZeroAddress", inputs: [] },
21307
+ {
21308
+ "type": "error",
21309
+ "name": "AlreadyInitialized",
21310
+ "inputs": []
21311
+ },
21312
+ {
21313
+ "type": "error",
21314
+ "name": "InvalidMemecoin",
21315
+ "inputs": []
21316
+ },
21317
+ {
21318
+ "type": "error",
21319
+ "name": "NewOwnerIsZeroAddress",
21320
+ "inputs": []
21321
+ },
21322
+ {
21323
+ "type": "error",
21324
+ "name": "NoHandoverRequest",
21325
+ "inputs": []
21326
+ },
21327
+ {
21328
+ "type": "error",
21329
+ "name": "Unauthorized",
21330
+ "inputs": []
21331
+ },
21332
+ {
21333
+ "type": "error",
21334
+ "name": "VerifierAlreadyAdded",
21335
+ "inputs": []
21336
+ },
21337
+ {
21338
+ "type": "error",
21339
+ "name": "VerifierNotAdded",
21340
+ "inputs": []
21341
+ },
21342
+ {
21343
+ "type": "error",
21344
+ "name": "ZeroAddress",
21345
+ "inputs": []
21346
+ }
20673
21347
  ];
20674
21348
 
20675
21349
  /**
@@ -20751,12 +21425,20 @@ class ReadWriteTokenImporter extends ReadTokenImporter {
20751
21425
  : await this.contract.read("verifyMemecoin", {
20752
21426
  _memecoin: params.coinAddress,
20753
21427
  });
20754
- return {
21428
+ const baseParams = {
20755
21429
  _memecoin: params.coinAddress,
20756
21430
  _creatorFeeAllocation: creatorFeeAllocationInBps,
20757
21431
  _initialMarketCap: initialMCapInUSDCWei,
20758
21432
  _verifier,
20759
21433
  };
21434
+ // If tokenSupply is provided (even if 0n), include it to use the 5-parameter initialize overload
21435
+ if (params.tokenSupply !== undefined) {
21436
+ return {
21437
+ ...baseParams,
21438
+ _totalSupply: params.tokenSupply,
21439
+ };
21440
+ }
21441
+ return baseParams;
20760
21442
  }
20761
21443
  }
20762
21444
 
@@ -26152,6 +26834,7 @@ class ReadFlaunchSDK {
26152
26834
  this.readFlaunch = new ReadFlaunch(FlaunchAddress[this.chainId], drift);
26153
26835
  this.readFlaunchV1_1 = new ReadFlaunchV1_1(FlaunchV1_1Address[this.chainId], drift);
26154
26836
  this.readFlaunchV1_2 = new ReadFlaunchV1_2(FlaunchV1_2Address[this.chainId], drift);
26837
+ this.readAnyFlaunch = new ReadAnyFlaunch(AnyFlaunchAddress[this.chainId], drift);
26155
26838
  this.readQuoter = new ReadQuoter(this.chainId, QuoterAddress[this.chainId], drift);
26156
26839
  this.readPermit2 = new ReadPermit2(Permit2Address[this.chainId], drift);
26157
26840
  }
@@ -26242,23 +26925,30 @@ class ReadFlaunchSDK {
26242
26925
  }
26243
26926
  }
26244
26927
  /**
26245
- * Gets the flaunch contract address for a given version
26246
- * @param version - The version to get the flaunch contract address for
26928
+ * Gets the flaunch contract instance for a given version
26929
+ * @param version - The version to get the flaunch contract instance for
26247
26930
  */
26248
- getFlaunchAddress(version) {
26931
+ getFlaunch(version) {
26249
26932
  switch (version) {
26250
26933
  case FlaunchVersion.V1:
26251
- return this.readFlaunch.contract.address;
26934
+ return this.readFlaunch;
26252
26935
  case FlaunchVersion.V1_1:
26253
- return this.readFlaunchV1_1.contract.address;
26936
+ return this.readFlaunchV1_1;
26254
26937
  case FlaunchVersion.V1_2:
26255
- return this.readFlaunchV1_2.contract.address;
26938
+ return this.readFlaunchV1_2;
26256
26939
  case FlaunchVersion.ANY:
26257
- return this.readFlaunchV1_1.contract.address;
26940
+ return this.readAnyFlaunch;
26258
26941
  default:
26259
- return this.readFlaunchV1_1.contract.address;
26942
+ return this.readFlaunchV1_2;
26260
26943
  }
26261
26944
  }
26945
+ /**
26946
+ * Gets the flaunch contract address for a given version
26947
+ * @param version - The version to get the flaunch contract address for
26948
+ */
26949
+ getFlaunchAddress(version) {
26950
+ return this.getFlaunch(version).contract.address;
26951
+ }
26262
26952
  getPositionManagerAddress(version) {
26263
26953
  return this.getPositionManager(version).contract.address;
26264
26954
  }
@@ -26268,6 +26958,20 @@ class ReadFlaunchSDK {
26268
26958
  getBidWallAddress(version) {
26269
26959
  return this.getBidWall(version).contract.address;
26270
26960
  }
26961
+ /**
26962
+ * Gets the flaunch contract address and token ID for a memecoin
26963
+ * @param coinAddress - The address of the memecoin
26964
+ * @returns Promise<{ flaunchAddress: Address; tokenId: bigint }> - The flaunch contract address and token ID
26965
+ */
26966
+ async getFlaunchTokenIdForMemecoin(coinAddress) {
26967
+ const version = await this.getCoinVersion(coinAddress);
26968
+ const flaunch = this.getFlaunch(version);
26969
+ const tokenId = await flaunch.tokenId(coinAddress);
26970
+ return {
26971
+ flaunchAddress: flaunch.contract.address,
26972
+ tokenId,
26973
+ };
26974
+ }
26271
26975
  /**
26272
26976
  * Retrieves metadata for a given Flaunch coin
26273
26977
  * @param coinAddress - The address of the coin
@@ -28138,11 +28842,21 @@ class ReadWriteFlaunchSDK extends ReadFlaunchSDK {
28138
28842
  const version = await this.determineCoinVersion(coinAddress, params.version);
28139
28843
  const poolKey = this.createPoolKey(coinAddress, version);
28140
28844
  let currentTick;
28141
- // if initial marketcap or price is provided, it means that the pool is not initialized yet
28142
- // so determining the currentTick
28143
- if (("initialMarketCapUSD" in params && params.initialMarketCapUSD) ||
28144
- ("initialPriceUSD" in params && params.initialPriceUSD)) {
28145
- const { decimals: coinDecimals, formattedTotalSupplyInDecimals } = await this.getCoinInfo(coinAddress);
28845
+ // First, check if the pool is initialized as we can then get the current tick directly from
28846
+ // the state view.
28847
+ const poolState = await this.readStateView.poolSlot0({
28848
+ poolId: getPoolId(poolKey),
28849
+ });
28850
+ currentTick = poolState.tick;
28851
+ // If the current sqrtPriceX96 of the pool is zero, and the initial marketcap or price is provided,
28852
+ // we can use this to determine the current tick.
28853
+ if (poolState.sqrtPriceX96 === 0n && (("initialMarketCapUSD" in params && params.initialMarketCapUSD) ||
28854
+ ("initialPriceUSD" in params && params.initialPriceUSD))) {
28855
+ let { decimals: coinDecimals, formattedTotalSupplyInDecimals } = await this.getCoinInfo(coinAddress);
28856
+ // If we have a tokenSupply set, then overwrite the value
28857
+ if ("tokenSupply" in params && params.tokenSupply !== undefined) {
28858
+ formattedTotalSupplyInDecimals = parseFloat(formatUnits$1(params.tokenSupply, coinDecimals));
28859
+ }
28146
28860
  // Determine market cap based on provided parameter
28147
28861
  let initialMarketCapUSD;
28148
28862
  if ("initialMarketCapUSD" in params && params.initialMarketCapUSD) {
@@ -28162,13 +28876,6 @@ class ReadWriteFlaunchSDK extends ReadFlaunchSDK {
28162
28876
  }
28163
28877
  currentTick = calculatedTick;
28164
28878
  }
28165
- else {
28166
- // the pool is already initialized, get the current tick from the pool
28167
- const poolState = await this.readStateView.poolSlot0({
28168
- poolId: getPoolId(poolKey),
28169
- });
28170
- currentTick = poolState.tick;
28171
- }
28172
28879
  // We want to add liquidity from current price to infinity (as coin appreciates vs flETH)
28173
28880
  // This means providing single-sided coin liquidity that becomes active as coin price increases
28174
28881
  const isFLETHZero = this.flETHIsCurrencyZero(coinAddress);
@@ -28286,24 +28993,54 @@ class ReadWriteFlaunchSDK extends ReadFlaunchSDK {
28286
28993
  let importParams;
28287
28994
  if ("initialMarketCapUSD" in params) {
28288
28995
  const paramsWithMarketCap = params;
28289
- importParams = await this.readWriteTokenImporter.getInitializeParams({
28290
- coinAddress: paramsWithMarketCap.coinAddress,
28291
- creatorFeeAllocationPercent: paramsWithMarketCap.creatorFeeAllocationPercent,
28292
- initialMarketCapUSD: paramsWithMarketCap.initialMarketCapUSD,
28293
- verifier: paramsWithMarketCap.verifier,
28294
- });
28996
+ if ("tokenSupply" in paramsWithMarketCap &&
28997
+ paramsWithMarketCap.tokenSupply !== undefined) {
28998
+ importParams = await this.readWriteTokenImporter.getInitializeParams({
28999
+ coinAddress: paramsWithMarketCap.coinAddress,
29000
+ creatorFeeAllocationPercent: paramsWithMarketCap.creatorFeeAllocationPercent,
29001
+ initialMarketCapUSD: paramsWithMarketCap.initialMarketCapUSD,
29002
+ verifier: paramsWithMarketCap.verifier,
29003
+ tokenSupply: paramsWithMarketCap.tokenSupply,
29004
+ });
29005
+ }
29006
+ else {
29007
+ importParams = await this.readWriteTokenImporter.getInitializeParams({
29008
+ coinAddress: paramsWithMarketCap.coinAddress,
29009
+ creatorFeeAllocationPercent: paramsWithMarketCap.creatorFeeAllocationPercent,
29010
+ initialMarketCapUSD: paramsWithMarketCap.initialMarketCapUSD,
29011
+ verifier: paramsWithMarketCap.verifier,
29012
+ });
29013
+ }
28295
29014
  }
28296
29015
  else {
28297
29016
  const paramsWithPrice = params;
28298
- importParams = await this.readWriteTokenImporter.getInitializeParams({
28299
- coinAddress: paramsWithPrice.coinAddress,
28300
- creatorFeeAllocationPercent: paramsWithPrice.creatorFeeAllocationPercent,
28301
- initialPriceUSD: paramsWithPrice.initialPriceUSD,
28302
- verifier: paramsWithPrice.verifier,
28303
- });
29017
+ if ("tokenSupply" in paramsWithPrice &&
29018
+ paramsWithPrice.tokenSupply !== undefined) {
29019
+ importParams = await this.readWriteTokenImporter.getInitializeParams({
29020
+ coinAddress: paramsWithPrice.coinAddress,
29021
+ creatorFeeAllocationPercent: paramsWithPrice.creatorFeeAllocationPercent,
29022
+ initialPriceUSD: paramsWithPrice.initialPriceUSD,
29023
+ verifier: paramsWithPrice.verifier,
29024
+ tokenSupply: paramsWithPrice.tokenSupply,
29025
+ });
29026
+ }
29027
+ else {
29028
+ importParams = await this.readWriteTokenImporter.getInitializeParams({
29029
+ coinAddress: paramsWithPrice.coinAddress,
29030
+ creatorFeeAllocationPercent: paramsWithPrice.creatorFeeAllocationPercent,
29031
+ initialPriceUSD: paramsWithPrice.initialPriceUSD,
29032
+ verifier: paramsWithPrice.verifier,
29033
+ });
29034
+ }
28304
29035
  }
28305
29036
  const addLiquidityCalls = await this.getSingleSidedCoinAddLiquidityCalls({
29037
+ // Add our liquidity parameters
28306
29038
  ...params,
29039
+ // Add our optional tokenSupply if provided from our initialize params
29040
+ ...("_totalSupply" in importParams && {
29041
+ tokenSupply: importParams._totalSupply,
29042
+ }),
29043
+ // Set our FlaunchVersion
28307
29044
  version: FlaunchVersion.ANY, // optimize to avoid fetching if not passed
28308
29045
  });
28309
29046
  return [