@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/README.md +25 -0
- package/dist/admin.d.ts +195 -0
- package/dist/admin.js +91 -0
- package/dist/client.d.ts +9 -2
- package/dist/client.js +12 -2
- package/dist/fpool.d.ts +179 -1
- package/dist/fpool.js +4 -2
- package/dist/generated.d.ts +1113 -214
- package/dist/generated.js +736 -101
- package/dist/indexer.js +1 -6
- package/dist/keys.d.ts +8 -6
- package/dist/keys.js +6 -5
- package/dist/liquidity.d.ts +8 -1
- package/dist/liquidity.js +5 -2
- package/dist/pools.d.ts +17 -9
- package/dist/pools.js +23 -22
- package/dist/positions.d.ts +20 -8
- package/dist/positions.js +36 -15
- package/package.json +1 -1
- package/src/admin.ts +123 -1
- package/src/client.ts +12 -2
- package/src/fpool.ts +13 -3
- package/src/generated.ts +736 -101
- package/src/indexer.ts +1 -6
- package/src/keys.ts +8 -6
- package/src/liquidity.ts +10 -2
- package/src/pools.ts +29 -24
- package/src/positions.ts +39 -16
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.
|