lynx-client 0.0.7 → 0.0.9
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/cjs/lib/addresses/lensAddresses.js +4 -4
- package/dist/cjs/lib/addresses/systemAddresses.js +3 -3
- package/dist/cjs/lib/utils/bignumbers.js +10 -1
- package/dist/esm/lib/addresses/lensAddresses.d.ts +4 -4
- package/dist/esm/lib/addresses/lensAddresses.js +4 -4
- package/dist/esm/lib/addresses/systemAddresses.js +3 -3
- package/dist/esm/lib/utils/bignumbers.d.ts.map +1 -1
- package/dist/esm/lib/utils/bignumbers.js +10 -1
- package/dist/types/lib/addresses/lensAddresses.d.ts +4 -4
- package/dist/types/lib/utils/bignumbers.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -21,9 +21,9 @@ exports.LensAddresses = {
|
|
|
21
21
|
triggersAndPortalLens: "",
|
|
22
22
|
},
|
|
23
23
|
flare: {
|
|
24
|
-
intentsVerifierLens: "
|
|
25
|
-
lexLens: "
|
|
26
|
-
tradingFloorLensLens: "
|
|
27
|
-
triggersAndPortalLens: "
|
|
24
|
+
intentsVerifierLens: "0x8fBb98F9BbBBB455A86371D4B2E8ECc7b1b9C6F6",
|
|
25
|
+
lexLens: "0xa986a137BcDfcd7C1031990716ED70068f1526EE",
|
|
26
|
+
tradingFloorLensLens: "0x17C13aBF241Bf57ab33f8F45EB94AB2B7CCB5158",
|
|
27
|
+
triggersAndPortalLens: "0x51190405e62EFd43154492005D2deEAd5f0D5727",
|
|
28
28
|
},
|
|
29
29
|
};
|
|
@@ -13,9 +13,9 @@ exports.LynxSystemAddresses = {
|
|
|
13
13
|
orderBookProxyAddress: "0xD22c72aB0f4967edB876d84773BfF0b60A92e51a",
|
|
14
14
|
},
|
|
15
15
|
flare: {
|
|
16
|
-
registryProxyAddress: "
|
|
17
|
-
tradingFloorProxyAddress: "
|
|
18
|
-
orderBookProxyAddress: "
|
|
16
|
+
registryProxyAddress: "0x5a32d0347f01e0F7c27Cc6330b4697BBce1eFD55",
|
|
17
|
+
tradingFloorProxyAddress: "0x9A60488fFAdA402E7E8CcAE2Fb3B72C792bDFE8D",
|
|
18
|
+
orderBookProxyAddress: "0x9106D70e4FD52eb2b47F0c8650f54632dA4E636B",
|
|
19
19
|
},
|
|
20
20
|
fantom: {
|
|
21
21
|
registryProxyAddress: "0x3b7ED1cDF0Fc64d95c0D0428b9Cc99b6A9a5CB94",
|
|
@@ -16,7 +16,16 @@ function floatToEtherBn(units) {
|
|
|
16
16
|
return ethers_1.ethers.parseEther(units.toFixed(18));
|
|
17
17
|
}
|
|
18
18
|
function floatToUnitsBn(units, decimals, precisionDecimals) {
|
|
19
|
-
|
|
19
|
+
// Convert to string if number
|
|
20
|
+
let unitsStr = units.toString();
|
|
21
|
+
// Handle decimal precision if needed
|
|
22
|
+
if (precisionDecimals !== undefined) {
|
|
23
|
+
const [intPart, decPart = ""] = unitsStr.split(".");
|
|
24
|
+
unitsStr = intPart + "." + decPart.slice(0, precisionDecimals);
|
|
25
|
+
}
|
|
26
|
+
return ethers_1.ethers.parseUnits(
|
|
27
|
+
// units.toFixed(precisionDecimals ?? decimals),
|
|
28
|
+
unitsStr, decimals);
|
|
20
29
|
}
|
|
21
30
|
function bigintToHumanNumber(value, decimals, decimalsToShow, useCommas = true) {
|
|
22
31
|
const decimalValue = (value / BigInt(10 ** decimals)).toString();
|
|
@@ -18,10 +18,10 @@ export declare const LensAddresses: {
|
|
|
18
18
|
readonly triggersAndPortalLens: "";
|
|
19
19
|
};
|
|
20
20
|
readonly flare: {
|
|
21
|
-
readonly intentsVerifierLens: "
|
|
22
|
-
readonly lexLens: "
|
|
23
|
-
readonly tradingFloorLensLens: "
|
|
24
|
-
readonly triggersAndPortalLens: "
|
|
21
|
+
readonly intentsVerifierLens: "0x8fBb98F9BbBBB455A86371D4B2E8ECc7b1b9C6F6";
|
|
22
|
+
readonly lexLens: "0xa986a137BcDfcd7C1031990716ED70068f1526EE";
|
|
23
|
+
readonly tradingFloorLensLens: "0x17C13aBF241Bf57ab33f8F45EB94AB2B7CCB5158";
|
|
24
|
+
readonly triggersAndPortalLens: "0x51190405e62EFd43154492005D2deEAd5f0D5727";
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
27
|
//# sourceMappingURL=lensAddresses.d.ts.map
|
|
@@ -21,9 +21,9 @@ exports.LensAddresses = {
|
|
|
21
21
|
triggersAndPortalLens: "",
|
|
22
22
|
},
|
|
23
23
|
flare: {
|
|
24
|
-
intentsVerifierLens: "
|
|
25
|
-
lexLens: "
|
|
26
|
-
tradingFloorLensLens: "
|
|
27
|
-
triggersAndPortalLens: "
|
|
24
|
+
intentsVerifierLens: "0x8fBb98F9BbBBB455A86371D4B2E8ECc7b1b9C6F6",
|
|
25
|
+
lexLens: "0xa986a137BcDfcd7C1031990716ED70068f1526EE",
|
|
26
|
+
tradingFloorLensLens: "0x17C13aBF241Bf57ab33f8F45EB94AB2B7CCB5158",
|
|
27
|
+
triggersAndPortalLens: "0x51190405e62EFd43154492005D2deEAd5f0D5727",
|
|
28
28
|
},
|
|
29
29
|
};
|
|
@@ -13,9 +13,9 @@ exports.LynxSystemAddresses = {
|
|
|
13
13
|
orderBookProxyAddress: "0xD22c72aB0f4967edB876d84773BfF0b60A92e51a",
|
|
14
14
|
},
|
|
15
15
|
flare: {
|
|
16
|
-
registryProxyAddress: "
|
|
17
|
-
tradingFloorProxyAddress: "
|
|
18
|
-
orderBookProxyAddress: "
|
|
16
|
+
registryProxyAddress: "0x5a32d0347f01e0F7c27Cc6330b4697BBce1eFD55",
|
|
17
|
+
tradingFloorProxyAddress: "0x9A60488fFAdA402E7E8CcAE2Fb3B72C792bDFE8D",
|
|
18
|
+
orderBookProxyAddress: "0x9106D70e4FD52eb2b47F0c8650f54632dA4E636B",
|
|
19
19
|
},
|
|
20
20
|
fantom: {
|
|
21
21
|
registryProxyAddress: "0x3b7ED1cDF0Fc64d95c0D0428b9Cc99b6A9a5CB94",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bignumbers.d.ts","sourceRoot":"","sources":["../../../../lib/utils/bignumbers.ts"],"names":[],"mappings":"AAEA,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAExE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,iBAAiB,CAAC,EAAE,MAAM,GACzB,MAAM,
|
|
1
|
+
{"version":3,"file":"bignumbers.d.ts","sourceRoot":"","sources":["../../../../lib/utils/bignumbers.ts"],"names":[],"mappings":"AAEA,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAExE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,iBAAiB,CAAC,EAAE,MAAM,GACzB,MAAM,CAeR;AAED,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,EACtB,SAAS,GAAE,OAAc,GACxB,MAAM,CAkBR"}
|
|
@@ -16,7 +16,16 @@ function floatToEtherBn(units) {
|
|
|
16
16
|
return ethers_1.ethers.parseEther(units.toFixed(18));
|
|
17
17
|
}
|
|
18
18
|
function floatToUnitsBn(units, decimals, precisionDecimals) {
|
|
19
|
-
|
|
19
|
+
// Convert to string if number
|
|
20
|
+
let unitsStr = units.toString();
|
|
21
|
+
// Handle decimal precision if needed
|
|
22
|
+
if (precisionDecimals !== undefined) {
|
|
23
|
+
const [intPart, decPart = ""] = unitsStr.split(".");
|
|
24
|
+
unitsStr = intPart + "." + decPart.slice(0, precisionDecimals);
|
|
25
|
+
}
|
|
26
|
+
return ethers_1.ethers.parseUnits(
|
|
27
|
+
// units.toFixed(precisionDecimals ?? decimals),
|
|
28
|
+
unitsStr, decimals);
|
|
20
29
|
}
|
|
21
30
|
function bigintToHumanNumber(value, decimals, decimalsToShow, useCommas = true) {
|
|
22
31
|
const decimalValue = (value / BigInt(10 ** decimals)).toString();
|
|
@@ -18,10 +18,10 @@ export declare const LensAddresses: {
|
|
|
18
18
|
readonly triggersAndPortalLens: "";
|
|
19
19
|
};
|
|
20
20
|
readonly flare: {
|
|
21
|
-
readonly intentsVerifierLens: "
|
|
22
|
-
readonly lexLens: "
|
|
23
|
-
readonly tradingFloorLensLens: "
|
|
24
|
-
readonly triggersAndPortalLens: "
|
|
21
|
+
readonly intentsVerifierLens: "0x8fBb98F9BbBBB455A86371D4B2E8ECc7b1b9C6F6";
|
|
22
|
+
readonly lexLens: "0xa986a137BcDfcd7C1031990716ED70068f1526EE";
|
|
23
|
+
readonly tradingFloorLensLens: "0x17C13aBF241Bf57ab33f8F45EB94AB2B7CCB5158";
|
|
24
|
+
readonly triggersAndPortalLens: "0x51190405e62EFd43154492005D2deEAd5f0D5727";
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
27
|
//# sourceMappingURL=lensAddresses.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bignumbers.d.ts","sourceRoot":"","sources":["../../../../lib/utils/bignumbers.ts"],"names":[],"mappings":"AAEA,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAExE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,iBAAiB,CAAC,EAAE,MAAM,GACzB,MAAM,
|
|
1
|
+
{"version":3,"file":"bignumbers.d.ts","sourceRoot":"","sources":["../../../../lib/utils/bignumbers.ts"],"names":[],"mappings":"AAEA,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAExE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,iBAAiB,CAAC,EAAE,MAAM,GACzB,MAAM,CAeR;AAED,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,EACtB,SAAS,GAAE,OAAc,GACxB,MAAM,CAkBR"}
|