@lombard.finance/sdk 4.2.0 → 4.3.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/CHANGELOG.md +0 -94
- package/README.md +10 -59
- package/dist/api.cjs +1 -1
- package/dist/api.js +5 -5
- package/dist/bridge/lib/ccip-config.d.ts.map +1 -1
- package/dist/bridge/lib/config.d.ts +3 -3
- package/dist/bridge/lib/config.d.ts.map +1 -1
- package/dist/bridge.cjs +1 -1
- package/dist/bridge.js +1 -1
- package/dist/btc.cjs +1 -1
- package/dist/btc.js +2 -2
- package/dist/chunks/{BtcActions-D9eBmDj6.cjs → BtcActions-ByhBml_1.cjs} +2 -2
- package/dist/chunks/{BtcActions-D9eBmDj6.cjs.map → BtcActions-ByhBml_1.cjs.map} +1 -1
- package/dist/chunks/{BtcActions-DGqmtxjd.js → BtcActions-C_A1dUQ0.js} +20 -20
- package/dist/chunks/{BtcActions-DGqmtxjd.js.map → BtcActions-C_A1dUQ0.js.map} +1 -1
- package/dist/chunks/{EvmActions-BOwYPThp.cjs → EvmActions-DoYIhj61.cjs} +2 -2
- package/dist/chunks/{EvmActions-BOwYPThp.cjs.map → EvmActions-DoYIhj61.cjs.map} +1 -1
- package/dist/chunks/{EvmActions-MW5mNmqs.js → EvmActions-DucgT60w.js} +45 -45
- package/dist/chunks/{EvmActions-MW5mNmqs.js.map → EvmActions-DucgT60w.js.map} +1 -1
- package/dist/chunks/{ReferralsClient-DUwyIUe3.cjs → ReferralsClient-BC-1wT1q.cjs} +2 -2
- package/dist/chunks/{ReferralsClient-DUwyIUe3.cjs.map → ReferralsClient-BC-1wT1q.cjs.map} +1 -1
- package/dist/chunks/{ReferralsClient-JjWLlIO4.js → ReferralsClient-DbFWWtVi.js} +20 -20
- package/dist/chunks/{ReferralsClient-JjWLlIO4.js.map → ReferralsClient-DbFWWtVi.js.map} +1 -1
- package/dist/chunks/approveLBTC-B5-ZWqct.js +26 -0
- package/dist/chunks/{approveLBTC-DOP0wsm3.js.map → approveLBTC-B5-ZWqct.js.map} +1 -1
- package/dist/chunks/{approveLBTC-CN6rJF6_.cjs → approveLBTC-CZiZmdcX.cjs} +2 -2
- package/dist/chunks/{approveLBTC-CN6rJF6_.cjs.map → approveLBTC-CZiZmdcX.cjs.map} +1 -1
- package/dist/chunks/blockchain-identifier-BmadkNtK.js +113 -0
- package/dist/chunks/blockchain-identifier-BmadkNtK.js.map +1 -0
- package/dist/chunks/{blockchain-identifier-DtIGGlIi.cjs → blockchain-identifier-BzMQWh-C.cjs} +2 -2
- package/dist/chunks/blockchain-identifier-BzMQWh-C.cjs.map +1 -0
- package/dist/chunks/bridge-BzRlY9pP.cjs +12 -0
- package/dist/chunks/bridge-BzRlY9pP.cjs.map +1 -0
- package/dist/chunks/{bridge-DyAiDpxD.js → bridge-CTsiodO1.js} +72 -95
- package/dist/chunks/bridge-CTsiodO1.js.map +1 -0
- package/dist/chunks/{config-_8X_2sG4.js → config-hFKqUyg3.js} +2 -2
- package/dist/chunks/{config-_8X_2sG4.js.map → config-hFKqUyg3.js.map} +1 -1
- package/dist/chunks/{config-DqbLaiRi.cjs → config-l4ZaZw_g.cjs} +2 -2
- package/dist/chunks/{config-DqbLaiRi.cjs.map → config-l4ZaZw_g.cjs.map} +1 -1
- package/dist/chunks/{defi-registry-NGWlyxAY.cjs → defi-registry-BIRv_zkp.cjs} +2 -2
- package/dist/chunks/{defi-registry-NGWlyxAY.cjs.map → defi-registry-BIRv_zkp.cjs.map} +1 -1
- package/dist/chunks/{defi-registry-dhrQMy94.js → defi-registry-wNFN3qyB.js} +7 -7
- package/dist/chunks/{defi-registry-dhrQMy94.js.map → defi-registry-wNFN3qyB.js.map} +1 -1
- package/dist/chunks/{depositStatus-K6gky8zH.cjs → depositStatus-C3-EgT2a.cjs} +2 -2
- package/dist/chunks/{depositStatus-K6gky8zH.cjs.map → depositStatus-C3-EgT2a.cjs.map} +1 -1
- package/dist/chunks/{depositStatus-DeCO-K5Q.js → depositStatus-DM7fRmbN.js} +8 -8
- package/dist/chunks/{depositStatus-DeCO-K5Q.js.map → depositStatus-DM7fRmbN.js.map} +1 -1
- package/dist/chunks/{events-DIKZG4SZ.cjs → events-BTtwgCev.cjs} +2 -2
- package/dist/chunks/{events-DIKZG4SZ.cjs.map → events-BTtwgCev.cjs.map} +1 -1
- package/dist/chunks/{events-CLVUaKQS.js → events-DPi6MDRA.js} +35 -35
- package/dist/chunks/{events-CLVUaKQS.js.map → events-DPi6MDRA.js.map} +1 -1
- package/dist/chunks/{get-exchange-ratio-CM8W0jTw.cjs → get-exchange-ratio-C-7DadfD.cjs} +2 -2
- package/dist/chunks/{get-exchange-ratio-CM8W0jTw.cjs.map → get-exchange-ratio-C-7DadfD.cjs.map} +1 -1
- package/dist/chunks/get-exchange-ratio-NtnkG1kZ.js +20 -0
- package/dist/chunks/{get-exchange-ratio-B0CNEGOB.js.map → get-exchange-ratio-NtnkG1kZ.js.map} +1 -1
- package/dist/chunks/{get-positions-summary-Cled5YPA.js → get-positions-summary-B_MmGHLv.js} +4 -4
- package/dist/chunks/{get-positions-summary-Cled5YPA.js.map → get-positions-summary-B_MmGHLv.js.map} +1 -1
- package/dist/chunks/{get-positions-summary-Co7RZBiK.cjs → get-positions-summary-DkZZYbGP.cjs} +2 -2
- package/dist/chunks/{get-positions-summary-Co7RZBiK.cjs.map → get-positions-summary-DkZZYbGP.cjs.map} +1 -1
- package/dist/chunks/{get-vault-tvl-Bydlvlrv.cjs → get-vault-tvl-DmTUbOY7.cjs} +2 -2
- package/dist/chunks/{get-vault-tvl-Bydlvlrv.cjs.map → get-vault-tvl-DmTUbOY7.cjs.map} +1 -1
- package/dist/chunks/{get-vault-tvl-DxjO9xDs.js → get-vault-tvl-YAXePAW3.js} +4 -4
- package/dist/chunks/{get-vault-tvl-DxjO9xDs.js.map → get-vault-tvl-YAXePAW3.js.map} +1 -1
- package/dist/chunks/{get-vault-withdrawals-CSQqKFB8.js → get-vault-withdrawals-BrpZlt6s.js} +3 -3
- package/dist/chunks/{get-vault-withdrawals-CSQqKFB8.js.map → get-vault-withdrawals-BrpZlt6s.js.map} +1 -1
- package/dist/chunks/{get-vault-withdrawals-DBA3ok0m.cjs → get-vault-withdrawals-CWcYy_sH.cjs} +2 -2
- package/dist/chunks/{get-vault-withdrawals-DBA3ok0m.cjs.map → get-vault-withdrawals-CWcYy_sH.cjs.map} +1 -1
- package/dist/chunks/{getSharesByAddress-De7as74h.cjs → getSharesByAddress-U48H_ygt.cjs} +2 -2
- package/dist/chunks/{getSharesByAddress-De7as74h.cjs.map → getSharesByAddress-U48H_ygt.cjs.map} +1 -1
- package/dist/chunks/{getSharesByAddress-CK2q7gBI.js → getSharesByAddress-cUtkrKTq.js} +14 -14
- package/dist/chunks/{getSharesByAddress-CK2q7gBI.js.map → getSharesByAddress-cUtkrKTq.js.map} +1 -1
- package/dist/chunks/{getUserStakeAndBakeSignature--XsK93Lb.cjs → getUserStakeAndBakeSignature-BxRq2cI1.cjs} +2 -2
- package/dist/chunks/{getUserStakeAndBakeSignature--XsK93Lb.cjs.map → getUserStakeAndBakeSignature-BxRq2cI1.cjs.map} +1 -1
- package/dist/chunks/{getUserStakeAndBakeSignature-2xPkL9v_.js → getUserStakeAndBakeSignature-NGGblnJl.js} +11 -11
- package/dist/chunks/{getUserStakeAndBakeSignature-2xPkL9v_.js.map → getUserStakeAndBakeSignature-NGGblnJl.js.map} +1 -1
- package/dist/chunks/index-BKzxeh1Y.cjs.map +1 -1
- package/dist/chunks/index-CfcQ_g3t.js.map +1 -1
- package/dist/chunks/{lbtc-addresses-NHg9Gk5y.js → lbtc-addresses-BLRmtR3c.js} +2 -2
- package/dist/chunks/{lbtc-addresses-NHg9Gk5y.js.map → lbtc-addresses-BLRmtR3c.js.map} +1 -1
- package/dist/chunks/{lbtc-addresses-bj--zuK9.cjs → lbtc-addresses-xyTYV7hx.cjs} +2 -2
- package/dist/chunks/{lbtc-addresses-bj--zuK9.cjs.map → lbtc-addresses-xyTYV7hx.cjs.map} +1 -1
- package/dist/chunks/{statusConstants-ZJia15m2.js → statusConstants-CJk6vOiM.js} +844 -853
- package/dist/chunks/statusConstants-CJk6vOiM.js.map +1 -0
- package/dist/chunks/statusConstants-fmtIEEEM.cjs +2 -0
- package/dist/chunks/statusConstants-fmtIEEEM.cjs.map +1 -0
- package/dist/chunks/{storeNetworkFeeSignature-BZUZOxns.js → storeNetworkFeeSignature-BZGL2Zn_.js} +8 -8
- package/dist/chunks/{storeNetworkFeeSignature-BZUZOxns.js.map → storeNetworkFeeSignature-BZGL2Zn_.js.map} +1 -1
- package/dist/chunks/{storeNetworkFeeSignature-pV7xUOSo.cjs → storeNetworkFeeSignature-D7yo6lDV.cjs} +2 -2
- package/dist/chunks/{storeNetworkFeeSignature-pV7xUOSo.cjs.map → storeNetworkFeeSignature-D7yo6lDV.cjs.map} +1 -1
- package/dist/chunks/token-addresses-DRBecUa7.cjs +2 -0
- package/dist/chunks/token-addresses-DRBecUa7.cjs.map +1 -0
- package/dist/chunks/token-addresses-FKpA3uc4.js +541 -0
- package/dist/chunks/token-addresses-FKpA3uc4.js.map +1 -0
- package/dist/chunks/{tokens-Bw35TZqd.js → tokens-C6qZHzph.js} +28 -30
- package/dist/chunks/tokens-C6qZHzph.js.map +1 -0
- package/dist/chunks/tokens-D_HeVB5p.cjs +2 -0
- package/dist/chunks/tokens-D_HeVB5p.cjs.map +1 -0
- package/dist/chunks/{unstakeLBTC-Huy_ncVl.js → unstakeLBTC-B4Rwf65e.js} +141 -129
- package/dist/chunks/unstakeLBTC-B4Rwf65e.js.map +1 -0
- package/dist/chunks/unstakeLBTC-Wlfi14de.cjs +2 -0
- package/dist/chunks/unstakeLBTC-Wlfi14de.cjs.map +1 -0
- package/dist/chunks/{withdraw-Z77x7Hj4.cjs → withdraw-C1fMFSwy.cjs} +2 -2
- package/dist/chunks/{withdraw-Z77x7Hj4.cjs.map → withdraw-C1fMFSwy.cjs.map} +1 -1
- package/dist/chunks/{withdraw-CVNVJ7-x.js → withdraw-hHueI2p7.js} +9 -9
- package/dist/chunks/{withdraw-CVNVJ7-x.js.map → withdraw-hHueI2p7.js.map} +1 -1
- package/dist/clients/rpc-url-config.d.ts.map +1 -1
- package/dist/common/chains.d.ts +343 -112
- package/dist/common/chains.d.ts.map +1 -1
- package/dist/common/feature-config.d.ts.map +1 -1
- package/dist/contract-functions/getLBTCMintingFee/getLBTCMintingFee.d.ts +27 -0
- package/dist/contract-functions/getLBTCMintingFee/getLBTCMintingFee.d.ts.map +1 -1
- package/dist/contract-functions/signLbtcDestionationAddr/signLbtcDestinationAddr.d.ts +26 -0
- package/dist/contract-functions/signLbtcDestionationAddr/signLbtcDestinationAddr.d.ts.map +1 -1
- package/dist/contracts.cjs +1 -1
- package/dist/contracts.js +26 -24
- package/dist/core/chains/catalog.d.ts.map +1 -1
- package/dist/core/chains/types.d.ts +0 -1
- package/dist/core/chains/types.d.ts.map +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +29 -29
- package/dist/defi.cjs +1 -1
- package/dist/defi.js +3 -3
- package/dist/entries/contracts.d.ts +2 -2
- package/dist/entries/contracts.d.ts.map +1 -1
- package/dist/entries/evm.d.ts +1 -1
- package/dist/entries/evm.d.ts.map +1 -1
- package/dist/entries/utils.d.ts +1 -1
- package/dist/entries/utils.d.ts.map +1 -1
- package/dist/evm.cjs +1 -1
- package/dist/evm.js +34 -35
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +188 -187
- package/dist/metrics.cjs +1 -1
- package/dist/metrics.js +1 -1
- package/dist/stories/components/decorators/wagmi-decorator.d.ts.map +1 -1
- package/dist/tokens/token-addresses.d.ts.map +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +48 -49
- package/dist/vaults.cjs +1 -1
- package/dist/vaults.js +15 -15
- package/package.json +2 -2
- package/dist/chunks/approveLBTC-DOP0wsm3.js +0 -26
- package/dist/chunks/blockchain-identifier-DtIGGlIi.cjs.map +0 -1
- package/dist/chunks/blockchain-identifier-PNEhu-QU.js +0 -113
- package/dist/chunks/blockchain-identifier-PNEhu-QU.js.map +0 -1
- package/dist/chunks/bridge-DkZMwO7c.cjs +0 -12
- package/dist/chunks/bridge-DkZMwO7c.cjs.map +0 -1
- package/dist/chunks/bridge-DyAiDpxD.js.map +0 -1
- package/dist/chunks/get-exchange-ratio-B0CNEGOB.js +0 -20
- package/dist/chunks/statusConstants-DTDi_4Go.cjs +0 -2
- package/dist/chunks/statusConstants-DTDi_4Go.cjs.map +0 -1
- package/dist/chunks/statusConstants-ZJia15m2.js.map +0 -1
- package/dist/chunks/token-addresses-D859i6tX.cjs +0 -2
- package/dist/chunks/token-addresses-D859i6tX.cjs.map +0 -1
- package/dist/chunks/token-addresses-DmAr89jP.js +0 -579
- package/dist/chunks/token-addresses-DmAr89jP.js.map +0 -1
- package/dist/chunks/tokens-Bw35TZqd.js.map +0 -1
- package/dist/chunks/tokens-DLGMNeqZ.cjs +0 -2
- package/dist/chunks/tokens-DLGMNeqZ.cjs.map +0 -1
- package/dist/chunks/unstakeLBTC-CqZzj9WL.cjs +0 -2
- package/dist/chunks/unstakeLBTC-CqZzj9WL.cjs.map +0 -1
- package/dist/chunks/unstakeLBTC-Huy_ncVl.js.map +0 -1
|
@@ -2,18 +2,18 @@ var tt = Object.defineProperty;
|
|
|
2
2
|
var et = (n, a, t) => a in n ? tt(n, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[a] = t;
|
|
3
3
|
var u = (n, a, t) => et(n, typeof a != "symbol" ? a + "" : a, t);
|
|
4
4
|
import w from "bignumber.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { e as V, m as O, t as y,
|
|
9
|
-
import { g as dt, s as mt } from "./storeNetworkFeeSignature-
|
|
5
|
+
import { m as G, v as U, q as st, w as at, u as it, c as rt, t as z, r as nt, a as ot, e as ct } from "./unstakeLBTC-B4Rwf65e.js";
|
|
6
|
+
import { o as l, U as W, a as $, A as ht, b as Y } from "./token-addresses-FKpA3uc4.js";
|
|
7
|
+
import { a as _, y as P, c as e, z as S, L as c, X as E, g as i, A as x, Y as L, Z as ut, _ as Z, $ as I, x as K, a0 as Q, a1 as b, a2 as pt } from "./statusConstants-CJk6vOiM.js";
|
|
8
|
+
import { e as V, m as O, t as y, b as M, f as q } from "./tokens-C6qZHzph.js";
|
|
9
|
+
import { g as dt, s as mt } from "./storeNetworkFeeSignature-BZGL2Zn_.js";
|
|
10
10
|
import { r as vt } from "./fee-requirements-x8-8mpJ7.js";
|
|
11
|
-
import {
|
|
11
|
+
import { a as T, A as m } from "./defi-registry-wNFN3qyB.js";
|
|
12
12
|
import { r } from "./index-CfcQ_g3t.js";
|
|
13
|
-
import { t as
|
|
14
|
-
import { c as B, a as D, b as X } from "./config-
|
|
15
|
-
import { d as lt, c as Et, q as _t } from "./withdraw-
|
|
16
|
-
class
|
|
13
|
+
import { t as j } from "./numbers-CM-lcmt4.js";
|
|
14
|
+
import { c as B, a as D, b as X } from "./config-hFKqUyg3.js";
|
|
15
|
+
import { d as lt, c as Et, q as _t } from "./withdraw-hHueI2p7.js";
|
|
16
|
+
class gt {
|
|
17
17
|
constructor(a) {
|
|
18
18
|
this.env = a;
|
|
19
19
|
}
|
|
@@ -90,11 +90,11 @@ function ue() {
|
|
|
90
90
|
id: "evm",
|
|
91
91
|
chain: "evm",
|
|
92
92
|
register(n) {
|
|
93
|
-
return new
|
|
93
|
+
return new gt(n.env);
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
|
-
const
|
|
97
|
+
const Ct = {
|
|
98
98
|
routes: [
|
|
99
99
|
// Veda - Ethereum
|
|
100
100
|
{
|
|
@@ -172,12 +172,12 @@ class At extends P {
|
|
|
172
172
|
const v = B[D.Veda], h = await V(l.LBTC, this._chainId, this.ctx.env);
|
|
173
173
|
if (!h)
|
|
174
174
|
throw c.invalidParameter("token", "Could not get LBTC token info");
|
|
175
|
-
const
|
|
175
|
+
const g = await O({ chainId: this._chainId }).readContract({
|
|
176
176
|
address: h.address,
|
|
177
177
|
abi: h.abi,
|
|
178
178
|
functionName: "allowance",
|
|
179
179
|
args: [p, v.vaultContract.address]
|
|
180
|
-
}), f = new w(s.amount), N = y(f, h.decimals), R = new w(String(
|
|
180
|
+
}), f = new w(s.amount), N = y(f, h.decimals), R = new w(String(g));
|
|
181
181
|
this._needsApproval = N.isGreaterThan(R), this._needsApproval ? (this.emitProgress({
|
|
182
182
|
status: e.NEEDS_APPROVAL,
|
|
183
183
|
steps: { approval: i.PENDING, deploying: i.IDLE }
|
|
@@ -197,7 +197,7 @@ class At extends P {
|
|
|
197
197
|
const s = B[D.Veda], o = await V(l.LBTC, this._chainId, this.ctx.env);
|
|
198
198
|
if (!o)
|
|
199
199
|
throw c.invalidParameter("token", "Could not get LBTC token info");
|
|
200
|
-
const d = new w(this._amount), p =
|
|
200
|
+
const d = new w(this._amount), p = j(y(d, o.decimals)), v = O({ chainId: this._chainId }), h = W({
|
|
201
201
|
provider: t,
|
|
202
202
|
chainId: this._chainId
|
|
203
203
|
}), { request: A } = await v.simulateContract({
|
|
@@ -250,7 +250,7 @@ class At extends P {
|
|
|
250
250
|
});
|
|
251
251
|
}
|
|
252
252
|
validateProtocol(t) {
|
|
253
|
-
if (!
|
|
253
|
+
if (!Ct.routes.some(
|
|
254
254
|
(o) => o.protocols.includes(t) && o.envs.includes(this.ctx.env)
|
|
255
255
|
))
|
|
256
256
|
throw c.invalidParameter(
|
|
@@ -298,10 +298,10 @@ const ft = [
|
|
|
298
298
|
],
|
|
299
299
|
addressSchema: Z
|
|
300
300
|
};
|
|
301
|
-
var
|
|
301
|
+
var C = /* @__PURE__ */ ((n) => (n.IDLE = "idle", n.NEEDS_APPROVAL = "needs-approval", n.READY = "ready", n.BRIDGING = "bridging", n.COMPLETED = "completed", n))(C || {});
|
|
302
302
|
class St extends P {
|
|
303
303
|
constructor(t, s) {
|
|
304
|
-
super(
|
|
304
|
+
super(C.IDLE);
|
|
305
305
|
u(this, "_amount");
|
|
306
306
|
u(this, "_recipient");
|
|
307
307
|
u(this, "_needsApproval", !1);
|
|
@@ -325,27 +325,27 @@ class St extends P {
|
|
|
325
325
|
this._claimData = { data: t, proofSignature: s };
|
|
326
326
|
}
|
|
327
327
|
async prepare(t) {
|
|
328
|
-
return this.assertStatus(
|
|
328
|
+
return this.assertStatus(C.IDLE, "prepare"), this.act(async () => {
|
|
329
329
|
const s = S(this.prepareSchema, t, {
|
|
330
330
|
destChain: this.params.destChain
|
|
331
331
|
});
|
|
332
332
|
this._amount = s.amount, this._recipient = s.recipient, this._needsApproval = !1, this.emitProgress({
|
|
333
|
-
status:
|
|
333
|
+
status: C.READY,
|
|
334
334
|
steps: {
|
|
335
335
|
approval: i.COMPLETE,
|
|
336
336
|
execution: i.IDLE,
|
|
337
337
|
bridging: i.IDLE
|
|
338
338
|
}
|
|
339
339
|
});
|
|
340
|
-
},
|
|
340
|
+
}, C.READY);
|
|
341
341
|
}
|
|
342
342
|
async approve() {
|
|
343
|
-
return this.assertStatus(
|
|
343
|
+
return this.assertStatus(C.NEEDS_APPROVAL, "approve"), this.act(async () => {
|
|
344
344
|
this._needsApproval = !1;
|
|
345
|
-
},
|
|
345
|
+
}, C.READY);
|
|
346
346
|
}
|
|
347
347
|
async execute() {
|
|
348
|
-
if (this.assertStatus(
|
|
348
|
+
if (this.assertStatus(C.READY, "execute"), !this._claimData)
|
|
349
349
|
throw c.missingParameter("claimData");
|
|
350
350
|
return this.act(async () => {
|
|
351
351
|
const t = await this.ctx.getProvider("evm");
|
|
@@ -353,7 +353,7 @@ class St extends P {
|
|
|
353
353
|
throw c.providerMissing(this.params.sourceChain, "evm");
|
|
354
354
|
const s = E(this.params.destChain);
|
|
355
355
|
this.emitProgress({
|
|
356
|
-
status:
|
|
356
|
+
status: C.READY,
|
|
357
357
|
steps: {
|
|
358
358
|
approval: i.COMPLETE,
|
|
359
359
|
execution: i.PENDING,
|
|
@@ -369,14 +369,14 @@ class St extends P {
|
|
|
369
369
|
env: this.ctx.env
|
|
370
370
|
});
|
|
371
371
|
return this._txHash = o, this.emitProgress({
|
|
372
|
-
status:
|
|
372
|
+
status: C.COMPLETED,
|
|
373
373
|
steps: {
|
|
374
374
|
approval: i.COMPLETE,
|
|
375
375
|
execution: i.COMPLETE,
|
|
376
376
|
bridging: i.IDLE
|
|
377
377
|
}
|
|
378
378
|
}), this.emitCompleted(), { txHash: o };
|
|
379
|
-
},
|
|
379
|
+
}, C.COMPLETED);
|
|
380
380
|
}
|
|
381
381
|
get prepareSchema() {
|
|
382
382
|
return x({
|
|
@@ -433,12 +433,12 @@ async function k(n, a, t, s) {
|
|
|
433
433
|
}), p = d.expirationDate ? new Date(Number(d.expirationDate) * 1e3) < /* @__PURE__ */ new Date() : !1, v = d.hasSignature && !p;
|
|
434
434
|
let h = null, A = null;
|
|
435
435
|
if (!v) {
|
|
436
|
-
const
|
|
436
|
+
const g = await G({
|
|
437
437
|
token: s,
|
|
438
438
|
chainId: n,
|
|
439
439
|
env: t
|
|
440
440
|
});
|
|
441
|
-
h = BigInt(
|
|
441
|
+
h = BigInt(g.times(1e8).toFixed(0)), A = g.toFixed(8);
|
|
442
442
|
}
|
|
443
443
|
return {
|
|
444
444
|
requiresAuth: !0,
|
|
@@ -663,17 +663,17 @@ class Mt extends P {
|
|
|
663
663
|
this._account = p;
|
|
664
664
|
const v = E(this.params.sourceChain);
|
|
665
665
|
if (yt(v)) {
|
|
666
|
-
const
|
|
666
|
+
const g = await M(
|
|
667
667
|
l.BTCb,
|
|
668
668
|
v,
|
|
669
669
|
this.ctx.env,
|
|
670
670
|
ht.Adapter
|
|
671
671
|
);
|
|
672
|
-
this._spenderAddress =
|
|
672
|
+
this._spenderAddress = g.address;
|
|
673
673
|
const f = await nt({
|
|
674
674
|
token: l.BTCb,
|
|
675
675
|
owner: p,
|
|
676
|
-
spender:
|
|
676
|
+
spender: g.address,
|
|
677
677
|
chainId: v,
|
|
678
678
|
env: this.ctx.env
|
|
679
679
|
}), N = new w(s.amount);
|
|
@@ -806,10 +806,10 @@ const Ht = I(m.LBTC, [r.prod]), Ft = I(m.LBTC, [
|
|
|
806
806
|
r.stage,
|
|
807
807
|
r.dev,
|
|
808
808
|
r.ibc
|
|
809
|
-
]), Yt =
|
|
809
|
+
]), Yt = Q(
|
|
810
810
|
[m.LBTC, m.BTCb],
|
|
811
811
|
[r.prod]
|
|
812
|
-
), Vt =
|
|
812
|
+
), Vt = Q(
|
|
813
813
|
[m.LBTC, m.BTCb],
|
|
814
814
|
[r.testnet, r.stage, r.dev, r.ibc]
|
|
815
815
|
), qt = {
|
|
@@ -1108,12 +1108,12 @@ class $t extends P {
|
|
|
1108
1108
|
abi: v.lensContract.abi,
|
|
1109
1109
|
functionName: "balanceOf",
|
|
1110
1110
|
args: [p, v.vaultContract.address]
|
|
1111
|
-
}),
|
|
1112
|
-
if (f.isGreaterThan(
|
|
1111
|
+
}), g = q(String(A), v.decimals), f = new w(s.amount);
|
|
1112
|
+
if (f.isGreaterThan(g))
|
|
1113
1113
|
throw new c(
|
|
1114
1114
|
b.INSUFFICIENT_SHARES,
|
|
1115
|
-
`Insufficient vault shares. Requested: ${f.toFixed()}, Available: ${
|
|
1116
|
-
{ requested: f.toFixed(), available:
|
|
1115
|
+
`Insufficient vault shares. Requested: ${f.toFixed()}, Available: ${g.toFixed()}`,
|
|
1116
|
+
{ requested: f.toFixed(), available: g.toFixed() }
|
|
1117
1117
|
);
|
|
1118
1118
|
const N = await h.readContract({
|
|
1119
1119
|
address: v.vaultContract.address,
|
|
@@ -1137,7 +1137,7 @@ class $t extends P {
|
|
|
1137
1137
|
const t = await this.ctx.getProvider("evm");
|
|
1138
1138
|
if (!t)
|
|
1139
1139
|
throw c.providerMissing(this.params.sourceChain, "evm");
|
|
1140
|
-
const s = B[D.Veda], o = new w(this._amount), d =
|
|
1140
|
+
const s = B[D.Veda], o = new w(this._amount), d = j(y(o, s.decimals)), p = O({ chainId: this._chainId }), v = W({
|
|
1141
1141
|
provider: t,
|
|
1142
1142
|
chainId: this._chainId
|
|
1143
1143
|
}), h = this._chainId, { request: A } = await p.simulateContract({
|
|
@@ -1201,7 +1201,7 @@ function Zt(n, a) {
|
|
|
1201
1201
|
function Kt(n, a) {
|
|
1202
1202
|
return new Wt(n, a);
|
|
1203
1203
|
}
|
|
1204
|
-
class
|
|
1204
|
+
class Qt {
|
|
1205
1205
|
constructor(a) {
|
|
1206
1206
|
u(this, "ctx");
|
|
1207
1207
|
this.ctx = pt(a);
|
|
@@ -1340,12 +1340,12 @@ class jt {
|
|
|
1340
1340
|
}
|
|
1341
1341
|
}
|
|
1342
1342
|
function pe(n) {
|
|
1343
|
-
return new
|
|
1343
|
+
return new Qt(n);
|
|
1344
1344
|
}
|
|
1345
1345
|
export {
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1346
|
+
Qt as E,
|
|
1347
|
+
C as a,
|
|
1348
|
+
ue as b,
|
|
1349
1349
|
pe as e
|
|
1350
1350
|
};
|
|
1351
|
-
//# sourceMappingURL=EvmActions-
|
|
1351
|
+
//# sourceMappingURL=EvmActions-DucgT60w.js.map
|