@flaunch/sdk 0.9.5 → 0.9.6

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
@@ -13998,17 +13998,18 @@ class ReadWriteFlaunchZap extends ReadFlaunchZap {
13998
13998
  * @param params.initialMarketCapUSD - Initial market cap in USD
13999
13999
  * @param params.creator - Address of the token creator
14000
14000
  * @param params.creatorFeeAllocationPercent - Percentage of fees allocated to creator (0-100)
14001
- * @param params.creatorSplitPercent - Percentage of fees allocated to creator (0-100)
14001
+ * @param params.creatorSplitPercent - Split percentage of the fees for the creator (0-100)
14002
+ * @param params.managerOwnerSplitPercent - Split percentage of the fees for the manager owner (0-100)
14002
14003
  * @param params.splitReceivers - List of recipients and their percentage of the fees
14003
14004
  * @param params.flaunchAt - Optional timestamp when the flaunch should start
14004
14005
  * @param params.premineAmount - Optional amount of tokens to premine
14005
- * @param params.creatorSplitPercent - Split percentage of the fees for the creator (0-100)
14006
- * @param params.splitReceivers - List of recipients and their percentage of the fees
14006
+ * @param params.treasuryManagerParams - Optional treasury manager configuration
14007
14007
  * @returns Transaction response for the flaunch creation
14008
14008
  */
14009
14009
  async flaunchWithSplitManager(params) {
14010
14010
  const VALID_SHARE_TOTAL = 10000000n; // 5 decimals as BigInt
14011
14011
  let creatorShare = (BigInt(params.creatorSplitPercent) * VALID_SHARE_TOTAL) / 100n;
14012
+ const managerOwnerShare = (BigInt(params.managerOwnerSplitPercent) * VALID_SHARE_TOTAL) / 100n;
14012
14013
  const recipientShares = params.splitReceivers.map((receiver) => {
14013
14014
  return {
14014
14015
  recipient: receiver.address,
@@ -14017,7 +14018,7 @@ class ReadWriteFlaunchZap extends ReadFlaunchZap {
14017
14018
  });
14018
14019
  const totalRecipientShares = recipientShares.reduce((acc, curr) => acc + curr.share, 0n);
14019
14020
  // if there's a remainder (due to rounding errors), add it to the creator share
14020
- const remainderShares = VALID_SHARE_TOTAL - totalRecipientShares;
14021
+ const remainderShares = VALID_SHARE_TOTAL - totalRecipientShares - managerOwnerShare;
14021
14022
  creatorShare += remainderShares;
14022
14023
  const initializeData = encodeAbiParameters$1([
14023
14024
  {
@@ -14025,6 +14026,7 @@ class ReadWriteFlaunchZap extends ReadFlaunchZap {
14025
14026
  name: "params",
14026
14027
  components: [
14027
14028
  { type: "uint256", name: "creatorShare" },
14029
+ { type: "uint256", name: "ownerShare" },
14028
14030
  {
14029
14031
  type: "tuple[]",
14030
14032
  name: "recipientShares",
@@ -14038,6 +14040,7 @@ class ReadWriteFlaunchZap extends ReadFlaunchZap {
14038
14040
  ], [
14039
14041
  {
14040
14042
  creatorShare,
14043
+ ownerShare: managerOwnerShare,
14041
14044
  recipientShares,
14042
14045
  },
14043
14046
  ]);