@logswap/sdk 0.5.73 → 0.5.74

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/fpool.js CHANGED
@@ -47,6 +47,7 @@ export { fPoolManagerAbi, padPolicyAbi, polPolicyAbi, privatePolicyAbi, publicPo
47
47
  export const fPolicyBaseAbi = polPolicyAbi;
48
48
  import { fallBackUnlessRejected, signerFor } from "./write.js";
49
49
  import { getEventLogs } from "./history.js";
50
+ import { presetMintFee } from "./positions.js";
50
51
  const WAD = 10n ** 18n;
51
52
  const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
52
53
  /** The optional questions a policy declared at birth, as bits of `Pool.asks`. */
@@ -93,6 +94,7 @@ export async function getFPool(c, poolId) {
93
94
  Q: p.Q,
94
95
  L: p.L,
95
96
  swapFee: p.swapFee,
97
+ mintFee: p.mintFee,
96
98
  refLogFloor: p.refLogFloor,
97
99
  logFloor: v.logFloor,
98
100
  compositeX: v.compositeX,
@@ -756,7 +758,7 @@ export async function fPoolInitialize(c, a) {
756
758
  address: c.addresses.fPoolManager,
757
759
  abi: fPoolManagerAbi,
758
760
  functionName: "initialize",
759
- args: [key],
761
+ args: [key, a.mintFee ?? presetMintFee(a.swapFee)],
760
762
  account: wallet.account,
761
763
  });
762
764
  return c.wallet.writeContract(request);
@@ -993,7 +995,7 @@ export function fPoolLaunchCalls(poolId, a) {
993
995
  const enc = (functionName, args) => encodeFunctionData({ abi: fPoolManagerAbi, functionName, args });
994
996
  const calls = [];
995
997
  if (!a.initialized)
996
- calls.push(enc("initialize", [key]));
998
+ calls.push(enc("initialize", [key, a.mintFee ?? presetMintFee(a.swapFee)]));
997
999
  calls.push(enc("seed", [poolId, a.L0, companions[1], a.Q0]));
998
1000
  // gen 0 by construction: a launch is the pool's FIRST seed — a relaunch is `fPoolRelaunch`.
999
1001
  // No transfer to 0xdead: on a pad `seed` mints every share there itself.