liquid-sdk 1.3.1 → 1.4.0
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 +4 -9
- package/dist/index.d.mts +30 -5
- package/dist/index.d.ts +30 -5
- package/dist/index.js +21 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// src/client.ts
|
|
2
2
|
import {
|
|
3
|
+
createPublicClient,
|
|
4
|
+
http,
|
|
3
5
|
decodeEventLog,
|
|
4
6
|
encodeAbiParameters as encodeAbiParameters2,
|
|
5
7
|
encodePacked,
|
|
@@ -13,20 +15,21 @@ import { base as base2 } from "viem/chains";
|
|
|
13
15
|
// src/constants.ts
|
|
14
16
|
import { base } from "viem/chains";
|
|
15
17
|
var ADDRESSES = {
|
|
16
|
-
FACTORY: "
|
|
17
|
-
POOL_EXTENSION_ALLOWLIST: "
|
|
18
|
-
FEE_LOCKER: "
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
18
|
+
FACTORY: "0x04F1a284168743759BE6554f607a10CEBdB77760",
|
|
19
|
+
POOL_EXTENSION_ALLOWLIST: "0xb614167d79aDBaA9BA35d05fE1d5542d7316Ccaa",
|
|
20
|
+
FEE_LOCKER: "0xF7d3BE3FC0de76fA5550C29A8F6fa53667B876FF",
|
|
21
|
+
LP_LOCKER_FEE_CONVERSION: "0x77247fCD1d5e34A3703AcA898A591Dc7422435f3",
|
|
22
|
+
VAULT: "0xdFCCC93257c20519A9005A2281CFBdF84836d50E",
|
|
23
|
+
HOOK_DYNAMIC_FEE_V2: "0x80E2F7dC8C2C880BbC4BDF80A5Fb0eB8B1DB68CC",
|
|
24
|
+
HOOK_STATIC_FEE_V2: "0x9811f10Cd549c754Fa9E5785989c422A762c28cc",
|
|
25
|
+
SNIPER_AUCTION_V2: "0x187e8627c02c58F31831953C1268e157d3BfCefd",
|
|
26
|
+
SNIPER_UTIL_V2: "0x2B6cd5Be183c388Dd0074d53c52317df1414cd9f",
|
|
27
|
+
MEV_DESCENDING_FEES: "0x8D6B080e48756A99F3893491D556B5d6907b6910",
|
|
28
|
+
AIRDROP_V2: "0x1423974d48f525462f1c087cBFdCC20BDBc33CdD",
|
|
29
|
+
UNIV4_ETH_DEV_BUY: "0x5934097864dC487D21A7B4e4EEe201A39ceF728D",
|
|
30
|
+
UNIV3_ETH_DEV_BUY: "0x376028cfb6b9A120E24Aa14c3FAc4205179c0025",
|
|
31
|
+
PRESALE_ETH_TO_CREATOR: "0x3bca63EcB49d5f917092d10fA879Fdb422740163",
|
|
32
|
+
PRESALE_ALLOWLIST: "0xCBb4ccC4B94E23233c14759f4F9629F7dD01f10B"
|
|
30
33
|
};
|
|
31
34
|
var EXTERNAL = {
|
|
32
35
|
POOL_MANAGER: "0x498581fF718922c3f8e6A244956aF099B2652b2b",
|
|
@@ -1023,7 +1026,10 @@ var LiquidSDK = class {
|
|
|
1023
1026
|
publicClient;
|
|
1024
1027
|
walletClient;
|
|
1025
1028
|
constructor(config) {
|
|
1026
|
-
this.publicClient = config.publicClient
|
|
1029
|
+
this.publicClient = config.publicClient ?? createPublicClient({
|
|
1030
|
+
chain: base2,
|
|
1031
|
+
transport: http()
|
|
1032
|
+
});
|
|
1027
1033
|
this.walletClient = config.walletClient;
|
|
1028
1034
|
}
|
|
1029
1035
|
// ── Dev Buy Helper ───────────────────────────────────────────────
|
|
@@ -1675,14 +1681,14 @@ var LiquidSDK = class {
|
|
|
1675
1681
|
// ── MEV Block Delay ─────────────────────────────────────────────────
|
|
1676
1682
|
async getMevBlockDelay() {
|
|
1677
1683
|
return await this.publicClient.readContract({
|
|
1678
|
-
address: ADDRESSES.
|
|
1684
|
+
address: ADDRESSES.MEV_DESCENDING_FEES,
|
|
1679
1685
|
abi: LiquidMevBlockDelayAbi,
|
|
1680
1686
|
functionName: "blockDelay"
|
|
1681
1687
|
});
|
|
1682
1688
|
}
|
|
1683
1689
|
async getPoolUnlockTime(poolId) {
|
|
1684
1690
|
return await this.publicClient.readContract({
|
|
1685
|
-
address: ADDRESSES.
|
|
1691
|
+
address: ADDRESSES.MEV_DESCENDING_FEES,
|
|
1686
1692
|
abi: LiquidMevBlockDelayAbi,
|
|
1687
1693
|
functionName: "poolUnlockTime",
|
|
1688
1694
|
args: [poolId]
|