@flaunch/sdk 0.9.9 → 0.9.11

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.cjs.js CHANGED
@@ -5778,6 +5778,10 @@ const DopplerVerifierAddress = {
5778
5778
  [base.id]: "0xedd66b080b8e9425c39d349a3fb69f480580f993",
5779
5779
  [baseSepolia.id]: "0x6428b5C4da36ecB070aBdcB5E1939244A3cC7fb5",
5780
5780
  };
5781
+ const SolanaVerifierAddress = {
5782
+ [base.id]: "0xba28ac1540893a34476c24b2c4fa32e0506c9055",
5783
+ [baseSepolia.id]: "0x47226918e518f205584bd75bf81e0b532b0b3ea7",
5784
+ };
5781
5785
  const VirtualsVerifierAddress = {
5782
5786
  [base.id]: "0x06a089fa231aca48d2aa77365123ad9aca43d3a4",
5783
5787
  [baseSepolia.id]: "0x6582d2bc6a7eba3b40bdf46b3868fc7ec2ff96ec",
@@ -11894,6 +11898,7 @@ exports.Verifier = void 0;
11894
11898
  (function (Verifier) {
11895
11899
  Verifier["CLANKER"] = "clanker";
11896
11900
  Verifier["DOPPLER"] = "doppler";
11901
+ Verifier["SOLANA"] = "solana";
11897
11902
  Verifier["VIRTUALS"] = "virtuals";
11898
11903
  Verifier["WHITELIST"] = "whitelist";
11899
11904
  Verifier["ZORA"] = "zora";
@@ -20711,6 +20716,8 @@ class ReadTokenImporter {
20711
20716
  return ClankerWorldVerifierAddress[this.chainId];
20712
20717
  case exports.Verifier.DOPPLER:
20713
20718
  return DopplerVerifierAddress[this.chainId];
20719
+ case exports.Verifier.SOLANA:
20720
+ return SolanaVerifierAddress[this.chainId];
20714
20721
  case exports.Verifier.VIRTUALS:
20715
20722
  return VirtualsVerifierAddress[this.chainId];
20716
20723
  case exports.Verifier.WHITELIST:
@@ -26416,6 +26423,50 @@ class ReadFlaunchSDK {
26416
26423
  }
26417
26424
  return poll();
26418
26425
  }
26426
+ /**
26427
+ * Parses a transaction to extract PoolCreated event data
26428
+ * @param txHash - The transaction hash to parse
26429
+ * @returns PoolCreated event parameters or null if not found
26430
+ */
26431
+ async getPoolCreatedFromTx(txHash) {
26432
+ if (!this.publicClient) {
26433
+ throw new Error("Public client is required to fetch transaction data");
26434
+ }
26435
+ // Get transaction receipt
26436
+ const receipt = await this.publicClient.getTransactionReceipt({
26437
+ hash: txHash,
26438
+ });
26439
+ if (!receipt) {
26440
+ throw new Error(`Transaction not found: ${txHash}`);
26441
+ }
26442
+ // Find PoolCreated event in logs by trying to decode each log
26443
+ // Using V1_2 ABI which is compatible with all versions (V1_2 has extra fields that are optional)
26444
+ for (const log of receipt.logs) {
26445
+ try {
26446
+ const decodedLog = viem.decodeEventLog({
26447
+ abi: FlaunchPositionManagerV1_2Abi,
26448
+ data: log.data,
26449
+ topics: log.topics,
26450
+ });
26451
+ if (decodedLog.eventName === "PoolCreated") {
26452
+ return {
26453
+ poolId: decodedLog.args._poolId,
26454
+ memecoin: decodedLog.args._memecoin,
26455
+ memecoinTreasury: decodedLog.args._memecoinTreasury,
26456
+ tokenId: decodedLog.args._tokenId,
26457
+ currencyFlipped: decodedLog.args._currencyFlipped,
26458
+ flaunchFee: decodedLog.args._flaunchFee,
26459
+ params: decodedLog.args._params,
26460
+ };
26461
+ }
26462
+ }
26463
+ catch (error) {
26464
+ // Not a PoolCreated event or decoding failed, continue to next log
26465
+ continue;
26466
+ }
26467
+ }
26468
+ return null;
26469
+ }
26419
26470
  /**
26420
26471
  * Watches for pool swap events
26421
26472
  * @param params - Parameters for watching pool swaps including optional coin filter
@@ -32146,6 +32197,7 @@ exports.ReferralEscrowAbi = ReferralEscrowAbi;
32146
32197
  exports.ReferralEscrowAddress = ReferralEscrowAddress;
32147
32198
  exports.RevenueManagerAbi = RevenueManagerAbi;
32148
32199
  exports.RevenueManagerAddress = RevenueManagerAddress;
32200
+ exports.SolanaVerifierAddress = SolanaVerifierAddress;
32149
32201
  exports.StakingManagerAddress = StakingManagerAddress;
32150
32202
  exports.StateViewAbi = StateViewAbi;
32151
32203
  exports.StateViewAddress = StateViewAddress;