@wormhole-foundation/wormhole-connect 3.0.0-beta.7-development → 3.0.0-beta.9-development
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/main.js +48 -48
- package/dist/src/config/tokens.d.ts +0 -1
- package/dist/src/config/tokens.d.ts.map +1 -1
- package/dist/src/contexts/TokensContext.d.ts.map +1 -1
- package/dist/src/utils/errors.d.ts +1 -0
- package/dist/src/utils/errors.d.ts.map +1 -1
- package/dist/src/views/v2/Bridge/WalletConnector/Sidebar.d.ts.map +1 -1
- package/dist/src/views/v2/Redeem/TransactionDetails/index.d.ts.map +1 -1
- package/lib/{account-QG_Hi4er.js → account-BSFuCEgk.js} +1 -1
- package/lib/{account-BK8xMTUI.mjs → account-y1ICRMSr.mjs} +1 -1
- package/lib/{address-B-_yHNB2.js → address-BwcXVurJ.js} +1 -1
- package/lib/{address-CNhzoegm.js → address-D8qNQEOW.js} +1 -1
- package/lib/{address-BWXkejmE.mjs → address-DaoiwqzU.mjs} +1 -1
- package/lib/{address-RcMobNYE.js → address-DnSRsubO.js} +7 -7
- package/lib/{address-CBux52Na.mjs → address-DqsMcbcT.mjs} +612 -588
- package/lib/{address-DKHa7TFU.mjs → address-S7wMItHX.mjs} +1 -1
- package/lib/{aptos-9aq-5gkF.mjs → aptos-CSVdIYqJ.mjs} +3 -3
- package/lib/{aptos-XxKO9242.js → aptos-C_j04MF5.js} +1 -1
- package/lib/{aptos-C180o9od.mjs → aptos-C_sLjrbm.mjs} +15 -15
- package/lib/{aptos-BZ2mcuTd.js → aptos-ma6bumqy.js} +2 -2
- package/lib/{base64-Dmj19Uvu.mjs → base64-B2xumR3a.mjs} +3 -2
- package/lib/{base64-BfY07bq5.js → base64-a1Dr6hMt.js} +1 -1
- package/lib/{blake2b-CgbIfNRX.mjs → blake2b-CR50AGep.mjs} +1 -1
- package/lib/{blake2b-CoM94_cH.js → blake2b-Dkm1d7Wp.js} +1 -1
- package/lib/{browser-ponyfill-BAEAyXvw.js → browser-ponyfill-BTt_ELXG.js} +1 -1
- package/lib/{browser-ponyfill-BecG2Lnb.mjs → browser-ponyfill-uCX78ltK.mjs} +1 -1
- package/lib/{ccip-CUqskd5M.mjs → ccip-69mFHkV9.mjs} +1 -1
- package/lib/{ccip-oytFtCzk.js → ccip-BFyWlloE.js} +1 -1
- package/lib/{chain-itK5uGYL.js → chain-Cio41-Lr.js} +1 -1
- package/lib/{chain-sKZNJgPZ.mjs → chain-DbmG-oEQ.mjs} +1 -1
- package/lib/{chunk-IMTC3J2M-DKLPKqnP.mjs → chunk-IMTC3J2M-CmFt3nz5.mjs} +137 -135
- package/lib/chunk-IMTC3J2M-NMBEZ4p8.js +471 -0
- package/lib/{constants-DrDsewBe.mjs → constants-JcrZQeMq.mjs} +3 -3
- package/lib/{constants-Bmrui4ZY.js → constants-lsjPx3va.js} +1 -1
- package/lib/{contract-MJZ8ZoSX.js → contract-CcVq6MSa.js} +1 -1
- package/lib/{contract-BVaUamai.mjs → contract-DrK81GRi.mjs} +109 -109
- package/lib/create-BtJgfMdJ.mjs +18 -0
- package/lib/{create-DO_-1_Hb.js → create-Q6N34YQz.js} +1 -1
- package/lib/{evm-IjnSHeSg.mjs → evm--hXXT-db.mjs} +9 -9
- package/lib/{evm-C-aa4dBG.mjs → evm-BBqhcxFC.mjs} +83 -83
- package/lib/{evm-D_r84vhS.js → evm-CNq2zXwl.js} +3 -3
- package/lib/{evm-ZSzF-61X.js → evm-l0300AWS.js} +2 -2
- package/lib/executor.js +470 -1
- package/lib/executor.mjs +7106 -560
- package/lib/hosted.js +1 -1
- package/lib/hosted.mjs +1 -1
- package/lib/{index-aA-2Ygs3.mjs → index-98w8rrCe.mjs} +1 -1
- package/lib/{index-Bb8InrQU.mjs → index-9dr91dtY.mjs} +2 -2
- package/lib/{index-DNaxNpBa.js → index-BABC5__9.js} +1 -1
- package/lib/{index-CapdlI6H.js → index-BAjc-UZH.js} +1 -1
- package/lib/{index-Cx-ODuWg.mjs → index-BN-aj3dN.mjs} +4 -4
- package/lib/{index-BeQ668oT.js → index-BV7XVrd8.js} +1 -1
- package/lib/{index-CKaF7Gzs.mjs → index-BbUxOO56.mjs} +14 -14
- package/lib/{index-D3cDkU4S.js → index-BfPE3vDw.js} +1 -1
- package/lib/{index-Batb-GTa.mjs → index-BlCHxlUD.mjs} +5 -5
- package/lib/{index-CZYUYK5K.js → index-BnCQiOiA.js} +1 -1
- package/lib/{index-CsdQttEt.mjs → index-BqmCeCU_.mjs} +5 -5
- package/lib/{index-Ce0EI1tW.mjs → index-BtrXSq3R.mjs} +5 -5
- package/lib/{index-CE0rxdUf.js → index-C-ORpsiU.js} +1 -1
- package/lib/{index-DyE-3pz1.js → index-C0un9IYm.js} +1 -1
- package/lib/{index-DdvRmaTh.mjs → index-C4HPXgbm.mjs} +7 -7
- package/lib/{index-DgIxcujP.mjs → index-COkYtNvE.mjs} +36 -36
- package/lib/{index-CLy98PXT.mjs → index-COs6VyCx.mjs} +13 -13
- package/lib/{index-43m4zMem.js → index-COsUDXFI.js} +1 -1
- package/lib/{index-B36we0ml.mjs → index-CUYHyKgr.mjs} +7 -7
- package/lib/{index-BcAXCy1h.js → index-CUyxr8OX.js} +1 -1
- package/lib/{index-DDBLdcME.mjs → index-CX0qxE9A.mjs} +11 -11
- package/lib/{index-C2Pe6i5V.js → index-CiFTvTwg.js} +1 -1
- package/lib/{index-DNcx7dMI.mjs → index-CofxOTyV.mjs} +5 -5
- package/lib/{index-BGqRY1Ww.js → index-CsR_y9ji.js} +1 -1
- package/lib/{index-CA5XKv-J.js → index-CuoxLyOv.js} +1 -1
- package/lib/{index-DRCX2iXw.js → index-CvEfOpn2.js} +1 -1
- package/lib/{index-CV3K6bKD.js → index-Cxwfq1al.js} +1 -1
- package/lib/{index-CjroDahP.mjs → index-D0tl0B36.mjs} +2 -2
- package/lib/{index-f_27F6WX.js → index-D4KtQtgE.js} +1 -1
- package/lib/{index-D2o0FZvZ.js → index-D74ZE0n9.js} +1 -1
- package/lib/{index-DkZjpCle.js → index-DLFGcXjy.js} +1 -1
- package/lib/{index-07cEoDZD.mjs → index-DNvr2HlM.mjs} +13 -13
- package/lib/{index-Cu7gFSJv.mjs → index-DPfKYdEf.mjs} +1 -1
- package/lib/{index-Bogu114a.js → index-Db3GFx2x.js} +1 -1
- package/lib/{index-Dt-63Ecw.js → index-DbJV-Hi3.js} +1 -1
- package/lib/{index-B-S6avdv.js → index-DebLDCcs.js} +1 -1
- package/lib/{index-DC1ot7tO.js → index-DjbQ-yfQ.js} +1 -1
- package/lib/{index-Cry2AYTm.mjs → index-DsKRmXnW.mjs} +3 -3
- package/lib/{index-FCA-cXcS.js → index-DtUeWT1n.js} +1 -1
- package/lib/{index-DyvQhGPY.mjs → index-DtfwfGsA.mjs} +2 -2
- package/lib/{index-DDBdrN7Y.mjs → index-DvozGHS-.mjs} +7070 -7093
- package/lib/{index-Cyo0tNu5.mjs → index-Dx7nqevs.mjs} +2 -2
- package/lib/{index-Blzzdktm.js → index-LJw0S70V.js} +1 -1
- package/lib/{index-rAnJYuJr.mjs → index-Nh2mSVy3.mjs} +9 -9
- package/lib/{index-B5XhLD_L.mjs → index-S_O9ybUy.mjs} +5 -5
- package/lib/{index-CIhJm6vf.js → index-S_dcknx7.js} +86 -86
- package/lib/{index-Dsaj5lf_.js → index-U1ceHkB6.js} +1 -1
- package/lib/{index-BUlzgqNa.mjs → index-Yp3NfcfI.mjs} +4 -4
- package/lib/{index-DRleG63r.mjs → index-Z48MvcFr.mjs} +1 -1
- package/lib/{index-B9hin5U8.mjs → index-ejTR4WLF.mjs} +5 -5
- package/lib/{index-BUfjw4S2.mjs → index-kyD2rWx8.mjs} +11 -11
- package/lib/{index-BL4H4RbP.js → index-lG1-neJv.js} +1 -1
- package/lib/{index-CuDLHfKb.mjs → index-sz4KACqf.mjs} +5 -5
- package/lib/{index-dpkTW-H8.js → index-vIUqmO0o.js} +1 -1
- package/lib/{index.es-MXzok_Dp.js → index.es-C4RhqFy8.js} +2 -2
- package/lib/{index.es-C6ziEcYX.mjs → index.es-D5O0G4Af.mjs} +7 -7
- package/lib/index.js +1 -1
- package/lib/index.mjs +1 -1
- package/lib/mayan.js +1 -1
- package/lib/mayan.mjs +10 -10
- package/lib/{mint-C3SdQH_S.mjs → mint-CKsi-DrV.mjs} +2 -2
- package/lib/{mint-BxtkCWBh.js → mint-DNcbNuI1.js} +1 -1
- package/lib/ntt.js +1 -1
- package/lib/ntt.mjs +10 -10
- package/lib/{platform-Czq0KkFa.mjs → platform-BCxJ-CNM.mjs} +7 -7
- package/lib/{platform-CG_VHRJU.js → platform-BqUizEYV.js} +1 -1
- package/lib/{platform-CUeBR_i4.mjs → platform-CB3TPh7I.mjs} +17 -17
- package/lib/{platform-CyTWPtDR.js → platform-CGIgJRY3.js} +1 -1
- package/lib/{platform-PNwsacZi.js → platform-D7pe3gG2.js} +1 -1
- package/lib/{platform-Droe0nZu.mjs → platform-DTVt42uH.mjs} +4 -4
- package/lib/provider-jsonrpc-DYBOGqdj.js +1 -0
- package/lib/{provider-jsonrpc-CVWSLk8g.mjs → provider-jsonrpc-MOE1VIOF.mjs} +155 -155
- package/lib/{sha3-BMK6V2DM.mjs → sha3-BZUtvEPh.mjs} +1 -1
- package/lib/{sha3-uufRWTnZ.js → sha3-c6o5MDKC.js} +1 -1
- package/lib/{signer-L9IdBy4K.js → signer-BAFbrQDv.js} +1 -1
- package/lib/{signer-CYkXKdE1.mjs → signer-CwtXMDcn.mjs} +25 -25
- package/lib/solana-Cg0N1W8e.js +1 -0
- package/lib/{solana-iU2xZ6yu.js → solana-DIO5mbHM.js} +1 -1
- package/lib/{solana-CE7DDmW7.mjs → solana-Dr5BmG1x.mjs} +6 -6
- package/lib/solana-mJ922Ek9.mjs +18 -0
- package/lib/{solanaEmbed.esm-BtaI5pum.mjs → solanaEmbed.esm-C4t2kCSL.mjs} +3 -3
- package/lib/{solanaEmbed.esm-DUsdVcC-.js → solanaEmbed.esm-D0xXx6VI.js} +1 -1
- package/lib/src/config/tokens.d.ts +0 -1
- package/lib/src/config/tokens.d.ts.map +1 -1
- package/lib/src/contexts/TokensContext.d.ts.map +1 -1
- package/lib/src/utils/errors.d.ts +1 -0
- package/lib/src/utils/errors.d.ts.map +1 -1
- package/lib/src/views/v2/Bridge/WalletConnector/Sidebar.d.ts.map +1 -1
- package/lib/src/views/v2/Redeem/TransactionDetails/index.d.ts.map +1 -1
- package/lib/{sui-BIE_b_7o.mjs → sui-AbsMI4yt.mjs} +3 -3
- package/lib/{sui-CNPKXqM6.js → sui-BSJIqJNt.js} +1 -1
- package/lib/{sui-Dva2w10T.js → sui-Bzh8kAZm.js} +1 -1
- package/lib/{sui-BJsKaZg2.mjs → sui-CZTSBdD4.mjs} +16 -16
- package/lib/{tokens-D4usSvOD.js → tokens-BUeRxOcP.js} +1 -1
- package/lib/{tokens-CQnhplD_.mjs → tokens-Vm--egzg.mjs} +4 -4
- package/lib/{units-CPUigdwl.js → units-LPlUOt3D.js} +1 -1
- package/lib/{units-YkCOGDr9.mjs → units-b10-QTSu.mjs} +28 -28
- package/lib/{unsignedTransaction-C0WXQMmv.mjs → unsignedTransaction-BJw0T6uN.mjs} +28 -28
- package/lib/{unsignedTransaction-DFUF8DSp.js → unsignedTransaction-CIkLJt6N.js} +1 -1
- package/lib/{web3-B3Usc-Qj.mjs → web3-BHuP7CTp.mjs} +7 -7
- package/lib/{web3-CjTx3huW.js → web3-SO_UBSxv.js} +1 -1
- package/package.json +2 -2
- package/lib/chunk-IMTC3J2M-D-un3eDX.js +0 -471
- package/lib/create-CQ6n4Ga8.mjs +0 -18
- package/lib/provider-jsonrpc-1gjszS3Q.js +0 -1
- package/lib/solana-BRQmi9BN.js +0 -1
- package/lib/solana-Bs7_C3BS.mjs +0 -18
|
@@ -13,11 +13,11 @@ var He = (s, t, e, n) => ({
|
|
|
13
13
|
return h(s, t, n);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import {
|
|
16
|
+
import { bJ as p, bM as w, bB as S, bS as fn, bI as b, bA as oe, bO as Kn, bH as St, bP as j, bN as Le, ag as zt, cc as hn, ca as Jt, ay as Pe, ac as pt, bZ as ce, bR as It, cd as Wn, at as Yn, bK as Oe, ce as Xn, cb as dn, bL as Kt } from "./address-DqsMcbcT.mjs";
|
|
17
17
|
const pe = BigInt(0), J = BigInt(1), ve = 9007199254740991;
|
|
18
18
|
function Zn(s, t) {
|
|
19
19
|
const e = ge(s, "value"), n = BigInt(ut(t, "width"));
|
|
20
|
-
if (
|
|
20
|
+
if (w(e >> n === pe, "overflow", "NUMERIC_FAULT", {
|
|
21
21
|
operation: "fromTwos",
|
|
22
22
|
fault: "overflow",
|
|
23
23
|
value: s
|
|
@@ -31,7 +31,7 @@ function Qn(s, t) {
|
|
|
31
31
|
let e = gt(s, "value");
|
|
32
32
|
const n = BigInt(ut(t, "width")), r = J << n - J;
|
|
33
33
|
if (e < pe) {
|
|
34
|
-
e = -e,
|
|
34
|
+
e = -e, w(e <= r, "too low", "NUMERIC_FAULT", {
|
|
35
35
|
operation: "toTwos",
|
|
36
36
|
fault: "overflow",
|
|
37
37
|
value: s
|
|
@@ -39,7 +39,7 @@ function Qn(s, t) {
|
|
|
39
39
|
const i = (J << n) - J;
|
|
40
40
|
return (~e & i) + J;
|
|
41
41
|
} else
|
|
42
|
-
|
|
42
|
+
w(e < r, "too high", "NUMERIC_FAULT", {
|
|
43
43
|
operation: "toTwos",
|
|
44
44
|
fault: "overflow",
|
|
45
45
|
value: s
|
|
@@ -69,7 +69,7 @@ function gt(s, t) {
|
|
|
69
69
|
}
|
|
70
70
|
function ge(s, t) {
|
|
71
71
|
const e = gt(s, t);
|
|
72
|
-
return
|
|
72
|
+
return w(e >= pe, "unsigned value cannot be negative", "NUMERIC_FAULT", {
|
|
73
73
|
fault: "overflow",
|
|
74
74
|
operation: "getUint",
|
|
75
75
|
value: s
|
|
@@ -111,7 +111,7 @@ function gn(s, t) {
|
|
|
111
111
|
n.length % 2 && (n = "0" + n);
|
|
112
112
|
else {
|
|
113
113
|
const r = ut(t, "width");
|
|
114
|
-
for (
|
|
114
|
+
for (w(r * 2 >= n.length, `value exceeds width (${r} bytes)`, "NUMERIC_FAULT", {
|
|
115
115
|
operation: "toBeHex",
|
|
116
116
|
fault: "overflow",
|
|
117
117
|
value: s
|
|
@@ -155,7 +155,7 @@ class jn {
|
|
|
155
155
|
*/
|
|
156
156
|
u(this, "emitter");
|
|
157
157
|
P(this, Ft);
|
|
158
|
-
E(this, Ft, e),
|
|
158
|
+
E(this, Ft, e), b(this, { emitter: t, filter: n });
|
|
159
159
|
}
|
|
160
160
|
/**
|
|
161
161
|
* Unregister the triggered listener for future events.
|
|
@@ -237,7 +237,7 @@ function rr(s, t) {
|
|
|
237
237
|
}
|
|
238
238
|
return n;
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function wn(s, t) {
|
|
241
241
|
p(typeof s == "string", "invalid string value", "str", s), t != null && (Kn(t), s = s.normalize(t));
|
|
242
242
|
let e = [];
|
|
243
243
|
for (let n = 0; n < s.length; n++) {
|
|
@@ -263,21 +263,21 @@ function sr(s) {
|
|
|
263
263
|
function ir(s, t) {
|
|
264
264
|
return sr(rr(s, t));
|
|
265
265
|
}
|
|
266
|
-
const F = 32, Te = new Uint8Array(F), ar = ["then"], te = {},
|
|
267
|
-
function
|
|
268
|
-
return
|
|
266
|
+
const F = 32, Te = new Uint8Array(F), ar = ["then"], te = {}, bn = /* @__PURE__ */ new WeakMap();
|
|
267
|
+
function wt(s) {
|
|
268
|
+
return bn.get(s);
|
|
269
269
|
}
|
|
270
270
|
function Je(s, t) {
|
|
271
|
-
|
|
271
|
+
bn.set(s, t);
|
|
272
272
|
}
|
|
273
273
|
function Vt(s, t) {
|
|
274
274
|
const e = new Error(`deferred error during ABI decoding triggered accessing ${s}`);
|
|
275
275
|
throw e.error = t, e;
|
|
276
276
|
}
|
|
277
277
|
function Re(s, t, e) {
|
|
278
|
-
return s.indexOf(null) >= 0 ? t.map((n, r) => n instanceof _t ? Re(
|
|
278
|
+
return s.indexOf(null) >= 0 ? t.map((n, r) => n instanceof _t ? Re(wt(n), n, e) : n) : s.reduce((n, r, i) => {
|
|
279
279
|
let a = t.getValue(r);
|
|
280
|
-
return r in n || (e && a instanceof _t && (a = Re(
|
|
280
|
+
return r in n || (e && a instanceof _t && (a = Re(wt(a), a, e)), n[r] = a), n;
|
|
281
281
|
}, {});
|
|
282
282
|
}
|
|
283
283
|
var Lt;
|
|
@@ -327,7 +327,7 @@ const Bt = class Bt extends Array {
|
|
|
327
327
|
return Reflect.get(l, f, d);
|
|
328
328
|
}
|
|
329
329
|
});
|
|
330
|
-
return Je(c,
|
|
330
|
+
return Je(c, wt(this)), c;
|
|
331
331
|
}
|
|
332
332
|
/**
|
|
333
333
|
* Returns the Result as a normal Array. If %%deep%%, any children
|
|
@@ -351,8 +351,8 @@ const Bt = class Bt extends Array {
|
|
|
351
351
|
* any outstanding deferred errors.
|
|
352
352
|
*/
|
|
353
353
|
toObject(e) {
|
|
354
|
-
const n =
|
|
355
|
-
return n.reduce((r, i, a) => (
|
|
354
|
+
const n = wt(this);
|
|
355
|
+
return n.reduce((r, i, a) => (w(i != null, `value at index ${a} unnamed`, "UNSUPPORTED_OPERATION", {
|
|
356
356
|
operation: "toObject()"
|
|
357
357
|
}), Re(n, this, e)), {});
|
|
358
358
|
}
|
|
@@ -361,7 +361,7 @@ const Bt = class Bt extends Array {
|
|
|
361
361
|
*/
|
|
362
362
|
slice(e, n) {
|
|
363
363
|
e == null && (e = 0), e < 0 && (e += this.length, e < 0 && (e = 0)), n == null && (n = this.length), n < 0 && (n += this.length, n < 0 && (n = 0)), n > this.length && (n = this.length);
|
|
364
|
-
const r =
|
|
364
|
+
const r = wt(this), i = [], a = [];
|
|
365
365
|
for (let o = e; o < n; o++)
|
|
366
366
|
i.push(this[o]), a.push(r[o]);
|
|
367
367
|
return new Bt(te, i, a);
|
|
@@ -370,7 +370,7 @@ const Bt = class Bt extends Array {
|
|
|
370
370
|
* @_ignore
|
|
371
371
|
*/
|
|
372
372
|
filter(e, n) {
|
|
373
|
-
const r =
|
|
373
|
+
const r = wt(this), i = [], a = [];
|
|
374
374
|
for (let o = 0; o < this.length; o++) {
|
|
375
375
|
const c = this[o];
|
|
376
376
|
c instanceof Error && Vt(`index ${o}`, c), e.call(n, c, o, this) && (i.push(c), a.push(r[o]));
|
|
@@ -397,7 +397,7 @@ const Bt = class Bt extends Array {
|
|
|
397
397
|
* accessible by name.
|
|
398
398
|
*/
|
|
399
399
|
getValue(e) {
|
|
400
|
-
const n =
|
|
400
|
+
const n = wt(this).indexOf(e);
|
|
401
401
|
if (n === -1)
|
|
402
402
|
return;
|
|
403
403
|
const r = this[n];
|
|
@@ -415,7 +415,7 @@ Lt = new WeakMap();
|
|
|
415
415
|
let _t = Bt;
|
|
416
416
|
function Ke(s) {
|
|
417
417
|
let t = yn(s);
|
|
418
|
-
return
|
|
418
|
+
return w(t.length <= F, "value out-of-bounds", "BUFFER_OVERRUN", { buffer: t, length: F, offset: t.length }), t.length !== F && (t = j(St([Te.slice(t.length % F), t]))), t;
|
|
419
419
|
}
|
|
420
420
|
class lt {
|
|
421
421
|
constructor(t, e, n, r) {
|
|
@@ -432,7 +432,7 @@ class lt {
|
|
|
432
432
|
// - Dynamic: bytes, string, address[], tuple(boolean[]), etc.
|
|
433
433
|
// - Not Dynamic: address, uint256, boolean[3], tuple(address, uint8)
|
|
434
434
|
u(this, "dynamic");
|
|
435
|
-
|
|
435
|
+
b(this, { name: t, type: e, localName: n, dynamic: r }, {
|
|
436
436
|
name: "string",
|
|
437
437
|
type: "string",
|
|
438
438
|
localName: "string",
|
|
@@ -497,7 +497,7 @@ const _e = class _e {
|
|
|
497
497
|
P(this, Nt);
|
|
498
498
|
P(this, Pt);
|
|
499
499
|
P(this, ft);
|
|
500
|
-
|
|
500
|
+
b(this, { allowLoose: !!e }), E(this, D, j(t)), E(this, Nt, 0), E(this, Pt, null), E(this, ft, n ?? 1024), E(this, M, 0);
|
|
501
501
|
}
|
|
502
502
|
get data() {
|
|
503
503
|
return S(h(this, D));
|
|
@@ -533,7 +533,7 @@ D = new WeakMap(), M = new WeakMap(), Nt = new WeakMap(), Pt = new WeakMap(), ft
|
|
|
533
533
|
var e;
|
|
534
534
|
if (h(this, Pt))
|
|
535
535
|
return T(e = h(this, Pt), At, Ie).call(e, t);
|
|
536
|
-
E(this, Nt, h(this, Nt) + t),
|
|
536
|
+
E(this, Nt, h(this, Nt) + t), w(h(this, ft) < 1 || h(this, Nt) <= h(this, ft) * this.dataLength, `compressed ABI data exceeds inflation ratio of ${h(this, ft)} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`, "BUFFER_OVERRUN", {
|
|
537
537
|
buffer: j(h(this, D)),
|
|
538
538
|
offset: h(this, M),
|
|
539
539
|
length: t,
|
|
@@ -544,7 +544,7 @@ D = new WeakMap(), M = new WeakMap(), Nt = new WeakMap(), Pt = new WeakMap(), ft
|
|
|
544
544
|
});
|
|
545
545
|
}, En = function(t, e, n) {
|
|
546
546
|
let r = Math.ceil(e / F) * F;
|
|
547
|
-
return h(this, M) + r > h(this, D).length && (this.allowLoose && n && h(this, M) + e <= h(this, D).length ? r = e :
|
|
547
|
+
return h(this, M) + r > h(this, D).length && (this.allowLoose && n && h(this, M) + e <= h(this, D).length ? r = e : w(!1, "data out-of-bounds", "BUFFER_OVERRUN", {
|
|
548
548
|
buffer: j(h(this, D)),
|
|
549
549
|
length: h(this, D).length,
|
|
550
550
|
offset: h(this, M) + r
|
|
@@ -579,7 +579,7 @@ const nt = class nt {
|
|
|
579
579
|
* @_ignore:
|
|
580
580
|
*/
|
|
581
581
|
u(this, "_typedSymbol");
|
|
582
|
-
r == null && (r = null), Le(et, t, "Typed"),
|
|
582
|
+
r == null && (r = null), Le(et, t, "Typed"), b(this, { _typedSymbol: We, type: e, value: n }), E(this, Ot, r), this.format();
|
|
583
583
|
}
|
|
584
584
|
/**
|
|
585
585
|
* Format the type as a Human-Readable type.
|
|
@@ -1353,7 +1353,7 @@ function xn(s, t, e) {
|
|
|
1353
1353
|
let c = {};
|
|
1354
1354
|
n = t.map((l) => {
|
|
1355
1355
|
const f = l.localName;
|
|
1356
|
-
return
|
|
1356
|
+
return w(f, "cannot encode object for signature with missing names", "INVALID_ARGUMENT", { argument: "values", info: { coder: l }, value: e }), w(!c[f], "cannot encode object for signature with duplicate names", "INVALID_ARGUMENT", { argument: "values", info: { coder: l }, value: e }), c[f] = !0, e[f];
|
|
1357
1357
|
});
|
|
1358
1358
|
} else
|
|
1359
1359
|
p(!1, "invalid tuple value", "tuple", e);
|
|
@@ -1408,7 +1408,7 @@ class ur extends lt {
|
|
|
1408
1408
|
super("array", i, r, a);
|
|
1409
1409
|
u(this, "coder");
|
|
1410
1410
|
u(this, "length");
|
|
1411
|
-
|
|
1411
|
+
b(this, { coder: e, length: n });
|
|
1412
1412
|
}
|
|
1413
1413
|
defaultValue() {
|
|
1414
1414
|
const e = this.coder.defaultValue(), n = [];
|
|
@@ -1428,7 +1428,7 @@ class ur extends lt {
|
|
|
1428
1428
|
}
|
|
1429
1429
|
decode(e) {
|
|
1430
1430
|
let n = this.length;
|
|
1431
|
-
n === -1 && (n = e.readIndex(),
|
|
1431
|
+
n === -1 && (n = e.readIndex(), w(n * F <= e.dataLength, "insufficient data length", "BUFFER_OVERRUN", { buffer: e.bytes, offset: n * F, length: e.dataLength }));
|
|
1432
1432
|
let r = [];
|
|
1433
1433
|
for (let i = 0; i < n; i++)
|
|
1434
1434
|
r.push(new cr(this.coder));
|
|
@@ -1479,7 +1479,7 @@ class hr extends lt {
|
|
|
1479
1479
|
let r = "bytes" + String(e);
|
|
1480
1480
|
super(r, r, n, !1);
|
|
1481
1481
|
u(this, "size");
|
|
1482
|
-
|
|
1482
|
+
b(this, { size: e }, { size: "number" });
|
|
1483
1483
|
}
|
|
1484
1484
|
defaultValue() {
|
|
1485
1485
|
return "0x0000000000000000000000000000000000000000000000000000000000000000".substring(0, 2 + this.size * 2);
|
|
@@ -1508,13 +1508,13 @@ class pr extends lt {
|
|
|
1508
1508
|
}
|
|
1509
1509
|
}
|
|
1510
1510
|
const gr = BigInt(0), yr = BigInt(1), mr = BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
|
|
1511
|
-
class
|
|
1511
|
+
class wr extends lt {
|
|
1512
1512
|
constructor(e, n, r) {
|
|
1513
1513
|
const i = (n ? "int" : "uint") + e * 8;
|
|
1514
1514
|
super(i, i, r, !1);
|
|
1515
1515
|
u(this, "size");
|
|
1516
1516
|
u(this, "signed");
|
|
1517
|
-
|
|
1517
|
+
b(this, { size: e, signed: n }, { size: "number", signed: "boolean" });
|
|
1518
1518
|
}
|
|
1519
1519
|
defaultValue() {
|
|
1520
1520
|
return 0;
|
|
@@ -1532,7 +1532,7 @@ class br extends lt {
|
|
|
1532
1532
|
return this.signed && (n = Zn(n, this.size * 8)), n;
|
|
1533
1533
|
}
|
|
1534
1534
|
}
|
|
1535
|
-
class
|
|
1535
|
+
class br extends Pn {
|
|
1536
1536
|
constructor(t) {
|
|
1537
1537
|
super("string", t);
|
|
1538
1538
|
}
|
|
@@ -1540,7 +1540,7 @@ class wr extends Pn {
|
|
|
1540
1540
|
return "";
|
|
1541
1541
|
}
|
|
1542
1542
|
encode(t, e) {
|
|
1543
|
-
return super.encode(t,
|
|
1543
|
+
return super.encode(t, wn(C.dereference(e, "string")));
|
|
1544
1544
|
}
|
|
1545
1545
|
decode(t) {
|
|
1546
1546
|
return ir(super.decode(t));
|
|
@@ -1556,7 +1556,7 @@ class ee extends lt {
|
|
|
1556
1556
|
const a = "tuple(" + i.join(",") + ")";
|
|
1557
1557
|
super("tuple", a, n, r);
|
|
1558
1558
|
u(this, "coders");
|
|
1559
|
-
|
|
1559
|
+
b(this, { coders: Object.freeze(e.slice()) });
|
|
1560
1560
|
}
|
|
1561
1561
|
defaultValue() {
|
|
1562
1562
|
const e = [];
|
|
@@ -1581,7 +1581,7 @@ class ee extends lt {
|
|
|
1581
1581
|
}
|
|
1582
1582
|
}
|
|
1583
1583
|
function Wt(s) {
|
|
1584
|
-
return Pe(
|
|
1584
|
+
return Pe(wn(s));
|
|
1585
1585
|
}
|
|
1586
1586
|
function xe(s, t) {
|
|
1587
1587
|
return {
|
|
@@ -1876,7 +1876,7 @@ const H = class H {
|
|
|
1876
1876
|
throw new Error("");
|
|
1877
1877
|
} else if (a != null)
|
|
1878
1878
|
throw new Error("");
|
|
1879
|
-
|
|
1879
|
+
b(this, {
|
|
1880
1880
|
name: e,
|
|
1881
1881
|
type: n,
|
|
1882
1882
|
baseType: r,
|
|
@@ -2101,7 +2101,7 @@ class Rt {
|
|
|
2101
2101
|
* The inputs for the fragment.
|
|
2102
2102
|
*/
|
|
2103
2103
|
u(this, "inputs");
|
|
2104
|
-
Le(t, R, "Fragment"), n = Object.freeze(n.slice()),
|
|
2104
|
+
Le(t, R, "Fragment"), n = Object.freeze(n.slice()), b(this, { type: e, inputs: n });
|
|
2105
2105
|
}
|
|
2106
2106
|
/**
|
|
2107
2107
|
* Creates a new **Fragment** for %%obj%%, wich can be any supported
|
|
@@ -2147,7 +2147,7 @@ class Rt {
|
|
|
2147
2147
|
case "struct":
|
|
2148
2148
|
return vt.from(t);
|
|
2149
2149
|
}
|
|
2150
|
-
|
|
2150
|
+
w(!1, `unsupported type: ${t.type}`, "UNSUPPORTED_OPERATION", {
|
|
2151
2151
|
operation: "Fragment.from"
|
|
2152
2152
|
});
|
|
2153
2153
|
}
|
|
@@ -2194,7 +2194,7 @@ class me extends Rt {
|
|
|
2194
2194
|
* The name of the fragment.
|
|
2195
2195
|
*/
|
|
2196
2196
|
u(this, "name");
|
|
2197
|
-
p(typeof r == "string" && r.match(kn), "invalid identifier", "name", r), i = Object.freeze(i.slice()),
|
|
2197
|
+
p(typeof r == "string" && r.match(kn), "invalid identifier", "name", r), i = Object.freeze(i.slice()), b(this, { name: r });
|
|
2198
2198
|
}
|
|
2199
2199
|
}
|
|
2200
2200
|
function Yt(s, t) {
|
|
@@ -2258,7 +2258,7 @@ class Q extends me {
|
|
|
2258
2258
|
* Whether this event is anonymous.
|
|
2259
2259
|
*/
|
|
2260
2260
|
u(this, "anonymous");
|
|
2261
|
-
Object.defineProperty(this, G, { value: qe }),
|
|
2261
|
+
Object.defineProperty(this, G, { value: qe }), b(this, { anonymous: i });
|
|
2262
2262
|
}
|
|
2263
2263
|
/**
|
|
2264
2264
|
* The Event topic hash.
|
|
@@ -2326,13 +2326,13 @@ class at extends Rt {
|
|
|
2326
2326
|
* The recommended gas limit for deployment or ``null``.
|
|
2327
2327
|
*/
|
|
2328
2328
|
u(this, "gas");
|
|
2329
|
-
Object.defineProperty(this, G, { value: je }),
|
|
2329
|
+
Object.defineProperty(this, G, { value: je }), b(this, { payable: i, gas: a });
|
|
2330
2330
|
}
|
|
2331
2331
|
/**
|
|
2332
2332
|
* Returns a string representation of this constructor as %%format%%.
|
|
2333
2333
|
*/
|
|
2334
2334
|
format(e) {
|
|
2335
|
-
if (
|
|
2335
|
+
if (w(e != null && e !== "sighash", "cannot format a constructor for sighash", "UNSUPPORTED_OPERATION", { operation: "format(sighash)" }), e === "json")
|
|
2336
2336
|
return JSON.stringify({
|
|
2337
2337
|
type: "constructor",
|
|
2338
2338
|
stateMutability: this.payable ? "payable" : "undefined",
|
|
@@ -2377,7 +2377,7 @@ class rt extends Rt {
|
|
|
2377
2377
|
* If the function can be sent value during invocation.
|
|
2378
2378
|
*/
|
|
2379
2379
|
u(this, "payable");
|
|
2380
|
-
Object.defineProperty(this, G, { value: tn }),
|
|
2380
|
+
Object.defineProperty(this, G, { value: tn }), b(this, { payable: r });
|
|
2381
2381
|
}
|
|
2382
2382
|
/**
|
|
2383
2383
|
* Returns a string representation of this fallback as %%format%%.
|
|
@@ -2460,7 +2460,7 @@ class q extends me {
|
|
|
2460
2460
|
* The recommended gas limit to send when calling this function.
|
|
2461
2461
|
*/
|
|
2462
2462
|
u(this, "gas");
|
|
2463
|
-
Object.defineProperty(this, G, { value: en }), a = Object.freeze(a.slice()),
|
|
2463
|
+
Object.defineProperty(this, G, { value: en }), a = Object.freeze(a.slice()), b(this, { constant: r === "view" || r === "pure", gas: o, outputs: a, payable: r === "payable", stateMutability: r });
|
|
2464
2464
|
}
|
|
2465
2465
|
/**
|
|
2466
2466
|
* The Function selector.
|
|
@@ -2688,7 +2688,7 @@ ht = new WeakSet(), Ut = function(t) {
|
|
|
2688
2688
|
case "bool":
|
|
2689
2689
|
return new lr(t.name);
|
|
2690
2690
|
case "string":
|
|
2691
|
-
return new
|
|
2691
|
+
return new br(t.name);
|
|
2692
2692
|
case "bytes":
|
|
2693
2693
|
return new fr(t.name);
|
|
2694
2694
|
case "":
|
|
@@ -2697,7 +2697,7 @@ ht = new WeakSet(), Ut = function(t) {
|
|
|
2697
2697
|
let e = t.type.match(Cr);
|
|
2698
2698
|
if (e) {
|
|
2699
2699
|
let n = parseInt(e[2] || "256");
|
|
2700
|
-
return p(n !== 0 && n <= 256 && n % 8 === 0, "invalid " + e[1] + " bit length", "param", t), new
|
|
2700
|
+
return p(n !== 0 && n <= 256 && n % 8 === 0, "invalid " + e[1] + " bit length", "param", t), new wr(n / 8, e[1] === "int", t.name);
|
|
2701
2701
|
}
|
|
2702
2702
|
if (e = t.type.match(Sr), e) {
|
|
2703
2703
|
let n = parseInt(e[1]);
|
|
@@ -2732,7 +2732,7 @@ class Lr {
|
|
|
2732
2732
|
*/
|
|
2733
2733
|
u(this, "args");
|
|
2734
2734
|
const r = t.name, i = t.format();
|
|
2735
|
-
|
|
2735
|
+
b(this, {
|
|
2736
2736
|
fragment: t,
|
|
2737
2737
|
name: r,
|
|
2738
2738
|
signature: i,
|
|
@@ -2771,7 +2771,7 @@ class Dr {
|
|
|
2771
2771
|
*/
|
|
2772
2772
|
u(this, "value");
|
|
2773
2773
|
const i = t.name, a = t.format();
|
|
2774
|
-
|
|
2774
|
+
b(this, {
|
|
2775
2775
|
fragment: t,
|
|
2776
2776
|
name: i,
|
|
2777
2777
|
args: n,
|
|
@@ -2807,7 +2807,7 @@ class $r {
|
|
|
2807
2807
|
*/
|
|
2808
2808
|
u(this, "selector");
|
|
2809
2809
|
const r = t.name, i = t.format();
|
|
2810
|
-
|
|
2810
|
+
b(this, {
|
|
2811
2811
|
fragment: t,
|
|
2812
2812
|
name: r,
|
|
2813
2813
|
args: n,
|
|
@@ -2829,7 +2829,7 @@ class sn {
|
|
|
2829
2829
|
* @_ignore:
|
|
2830
2830
|
*/
|
|
2831
2831
|
u(this, "_isIndexed");
|
|
2832
|
-
|
|
2832
|
+
b(this, { hash: t, _isIndexed: !0 });
|
|
2833
2833
|
}
|
|
2834
2834
|
/**
|
|
2835
2835
|
* Returns ``true`` if %%value%% is an **Indexed**.
|
|
@@ -2869,7 +2869,7 @@ const an = {
|
|
|
2869
2869
|
}
|
|
2870
2870
|
};
|
|
2871
2871
|
var Y, X, Z, B, tt, ie, ae;
|
|
2872
|
-
const
|
|
2872
|
+
const bt = class bt {
|
|
2873
2873
|
/**
|
|
2874
2874
|
* Create a new Interface for the %%fragments%%.
|
|
2875
2875
|
*/
|
|
@@ -2905,7 +2905,7 @@ const wt = class wt {
|
|
|
2905
2905
|
} catch (o) {
|
|
2906
2906
|
console.log(`[Warning] Invalid Fragment ${JSON.stringify(a)}:`, o.message);
|
|
2907
2907
|
}
|
|
2908
|
-
|
|
2908
|
+
b(this, {
|
|
2909
2909
|
fragments: Object.freeze(n)
|
|
2910
2910
|
});
|
|
2911
2911
|
let r = null, i = !1;
|
|
@@ -2917,7 +2917,7 @@ const wt = class wt {
|
|
|
2917
2917
|
console.log("duplicate definition - constructor");
|
|
2918
2918
|
return;
|
|
2919
2919
|
}
|
|
2920
|
-
|
|
2920
|
+
b(this, { deploy: a });
|
|
2921
2921
|
return;
|
|
2922
2922
|
case "fallback":
|
|
2923
2923
|
a.inputs.length === 0 ? i = !0 : (p(!r || a.payable !== r.payable, "conflicting fallback fragments", `fragments[${o}]`, a), r = a, i = r.payable);
|
|
@@ -2936,9 +2936,9 @@ const wt = class wt {
|
|
|
2936
2936
|
}
|
|
2937
2937
|
const l = a.format();
|
|
2938
2938
|
c.has(l) || c.set(l, a);
|
|
2939
|
-
}), this.deploy ||
|
|
2939
|
+
}), this.deploy || b(this, {
|
|
2940
2940
|
deploy: at.from("constructor()")
|
|
2941
|
-
}),
|
|
2941
|
+
}), b(this, { fallback: r, receive: i });
|
|
2942
2942
|
}
|
|
2943
2943
|
/**
|
|
2944
2944
|
* Returns the entire Human-Readable ABI, as an array of
|
|
@@ -3228,7 +3228,7 @@ const wt = class wt {
|
|
|
3228
3228
|
} catch {
|
|
3229
3229
|
n = "could not decode result data";
|
|
3230
3230
|
}
|
|
3231
|
-
|
|
3231
|
+
w(!1, n, "BAD_DATA", {
|
|
3232
3232
|
value: S(r),
|
|
3233
3233
|
info: { method: t.name, signature: t.format() }
|
|
3234
3234
|
});
|
|
@@ -3307,7 +3307,7 @@ const wt = class wt {
|
|
|
3307
3307
|
const i = this.getEvent(t);
|
|
3308
3308
|
p(i, "unknown event", "eventFragment", t), t = i;
|
|
3309
3309
|
}
|
|
3310
|
-
|
|
3310
|
+
w(e.length <= t.inputs.length, `too many arguments for ${t.format()}`, "UNEXPECTED_ARGUMENT", { count: e.length, expectedCount: t.inputs.length });
|
|
3311
3311
|
const n = [];
|
|
3312
3312
|
t.anonymous || n.push(t.topicHash);
|
|
3313
3313
|
const r = (i, a) => i.type === "string" ? Wt(a) : i.type === "bytes" ? Pe(S(a)) : (i.type === "bool" && typeof a == "boolean" ? a = a ? "0x01" : "0x00" : i.type.match(/^u?int/) ? a = gn(a) : i.type.match(/^bytes/) ? a = Wn(a, 32) : i.type === "address" && h(this, B).encode(["address"], [a]), Yn(S(a), 32));
|
|
@@ -3431,7 +3431,7 @@ const wt = class wt {
|
|
|
3431
3431
|
* a JSON-encoded ABI or any Human-Readable ABI format.
|
|
3432
3432
|
*/
|
|
3433
3433
|
static from(t) {
|
|
3434
|
-
return t instanceof
|
|
3434
|
+
return t instanceof bt ? t : typeof t == "string" ? new bt(JSON.parse(t)) : typeof t.formatJson == "function" ? new bt(t.formatJson()) : typeof t.format == "function" ? new bt(t.format("json")) : new bt(t);
|
|
3435
3435
|
}
|
|
3436
3436
|
};
|
|
3437
3437
|
Y = new WeakMap(), X = new WeakMap(), Z = new WeakMap(), B = new WeakMap(), tt = new WeakSet(), // Find a function definition by any means necessary (unless it is ambiguous)
|
|
@@ -3528,7 +3528,7 @@ ae = function(t, e, n) {
|
|
|
3528
3528
|
const r = h(this, X).get(Q.from(t).format());
|
|
3529
3529
|
return r || null;
|
|
3530
3530
|
};
|
|
3531
|
-
let Be =
|
|
3531
|
+
let Be = bt;
|
|
3532
3532
|
const Bn = BigInt(0);
|
|
3533
3533
|
function Ct(s) {
|
|
3534
3534
|
return s ?? null;
|
|
@@ -3569,7 +3569,7 @@ class rs {
|
|
|
3569
3569
|
* This will be ``null`` on legacy networks (i.e. [pre-EIP-1559](link-eip-1559))
|
|
3570
3570
|
*/
|
|
3571
3571
|
u(this, "maxPriorityFeePerGas");
|
|
3572
|
-
|
|
3572
|
+
b(this, {
|
|
3573
3573
|
gasPrice: Ct(t),
|
|
3574
3574
|
maxFeePerGas: Ct(e),
|
|
3575
3575
|
maxPriorityFeePerGas: Ct(n)
|
|
@@ -3706,7 +3706,7 @@ class ss {
|
|
|
3706
3706
|
*/
|
|
3707
3707
|
u(this, "baseFeePerGas");
|
|
3708
3708
|
P(this, it);
|
|
3709
|
-
E(this, it, t.transactions.map((n) => typeof n != "string" ? new le(n, e) : n)),
|
|
3709
|
+
E(this, it, t.transactions.map((n) => typeof n != "string" ? new le(n, e) : n)), b(this, {
|
|
3710
3710
|
provider: e,
|
|
3711
3711
|
hash: Ct(t.hash),
|
|
3712
3712
|
number: t.number,
|
|
@@ -3744,7 +3744,7 @@ class ss {
|
|
|
3744
3744
|
*/
|
|
3745
3745
|
get prefetchedTransactions() {
|
|
3746
3746
|
const t = h(this, it).slice();
|
|
3747
|
-
return t.length === 0 ? [] : (
|
|
3747
|
+
return t.length === 0 ? [] : (w(typeof t[0] == "object", "transactions were not prefetched with block request", "UNSUPPORTED_OPERATION", {
|
|
3748
3748
|
operation: "transactionResponses()"
|
|
3749
3749
|
}), t);
|
|
3750
3750
|
}
|
|
@@ -3862,7 +3862,7 @@ class ss {
|
|
|
3862
3862
|
}
|
|
3863
3863
|
}
|
|
3864
3864
|
it = new WeakMap();
|
|
3865
|
-
class
|
|
3865
|
+
class we {
|
|
3866
3866
|
/**
|
|
3867
3867
|
* @_ignore:
|
|
3868
3868
|
*/
|
|
@@ -3923,7 +3923,7 @@ class be {
|
|
|
3923
3923
|
u(this, "transactionIndex");
|
|
3924
3924
|
this.provider = e;
|
|
3925
3925
|
const n = Object.freeze(t.topics.slice());
|
|
3926
|
-
|
|
3926
|
+
b(this, {
|
|
3927
3927
|
transactionHash: t.transactionHash,
|
|
3928
3928
|
blockHash: t.blockHash,
|
|
3929
3929
|
blockNumber: t.blockNumber,
|
|
@@ -3958,14 +3958,14 @@ class be {
|
|
|
3958
3958
|
*/
|
|
3959
3959
|
async getBlock() {
|
|
3960
3960
|
const t = await this.provider.getBlock(this.blockHash);
|
|
3961
|
-
return
|
|
3961
|
+
return w(!!t, "failed to find transaction", "UNKNOWN_ERROR", {}), t;
|
|
3962
3962
|
}
|
|
3963
3963
|
/**
|
|
3964
3964
|
* Returns the transaction that this log occurred in.
|
|
3965
3965
|
*/
|
|
3966
3966
|
async getTransaction() {
|
|
3967
3967
|
const t = await this.provider.getTransaction(this.transactionHash);
|
|
3968
|
-
return
|
|
3968
|
+
return w(!!t, "failed to find transaction", "UNKNOWN_ERROR", {}), t;
|
|
3969
3969
|
}
|
|
3970
3970
|
/**
|
|
3971
3971
|
* Returns the transaction receipt fot the transaction that this
|
|
@@ -3973,7 +3973,7 @@ class be {
|
|
|
3973
3973
|
*/
|
|
3974
3974
|
async getTransactionReceipt() {
|
|
3975
3975
|
const t = await this.provider.getTransactionReceipt(this.transactionHash);
|
|
3976
|
-
return
|
|
3976
|
+
return w(!!t, "failed to find transaction receipt", "UNKNOWN_ERROR", {}), t;
|
|
3977
3977
|
}
|
|
3978
3978
|
/**
|
|
3979
3979
|
* @_ignore:
|
|
@@ -4084,9 +4084,9 @@ class _r {
|
|
|
4084
4084
|
*/
|
|
4085
4085
|
u(this, "root");
|
|
4086
4086
|
P(this, Zt);
|
|
4087
|
-
E(this, Zt, Object.freeze(t.logs.map((r) => new
|
|
4087
|
+
E(this, Zt, Object.freeze(t.logs.map((r) => new we(r, e))));
|
|
4088
4088
|
let n = Bn;
|
|
4089
|
-
t.effectiveGasPrice != null ? n = t.effectiveGasPrice : t.gasPrice != null && (n = t.gasPrice),
|
|
4089
|
+
t.effectiveGasPrice != null ? n = t.effectiveGasPrice : t.gasPrice != null && (n = t.gasPrice), b(this, {
|
|
4090
4090
|
provider: e,
|
|
4091
4091
|
to: t.to,
|
|
4092
4092
|
from: t.from,
|
|
@@ -4213,7 +4213,7 @@ class _r {
|
|
|
4213
4213
|
* @_ignore:
|
|
4214
4214
|
*/
|
|
4215
4215
|
reorderedEvent(t) {
|
|
4216
|
-
return
|
|
4216
|
+
return w(!t || t.isMined(), "unmined 'other' transction cannot be orphaned", "UNSUPPORTED_OPERATION", { operation: "reorderedEvent(other)" }), Sn(this, t);
|
|
4217
4217
|
}
|
|
4218
4218
|
}
|
|
4219
4219
|
Zt = new WeakMap();
|
|
@@ -4452,7 +4452,7 @@ const Ve = class Ve {
|
|
|
4452
4452
|
if (_ == null || g - _.blockNumber + 1 < n)
|
|
4453
4453
|
return;
|
|
4454
4454
|
let mt = "replaced";
|
|
4455
|
-
O.data === this.data && O.to === this.to && O.value === this.value ? mt = "repriced" : O.data === "0x" && O.from === O.to && O.value === Bn && (mt = "cancelled"),
|
|
4455
|
+
O.data === this.data && O.to === this.to && O.value === this.value ? mt = "repriced" : O.data === "0x" && O.from === O.to && O.value === Bn && (mt = "cancelled"), w(!1, "transaction was replaced", "TRANSACTION_REPLACED", {
|
|
4456
4456
|
cancelled: mt === "replaced" || mt === "cancelled",
|
|
4457
4457
|
reason: mt,
|
|
4458
4458
|
replacement: O.replaceableTransaction(i),
|
|
@@ -4466,7 +4466,7 @@ const Ve = class Ve {
|
|
|
4466
4466
|
}, l = (g) => {
|
|
4467
4467
|
if (g == null || g.status !== 0)
|
|
4468
4468
|
return g;
|
|
4469
|
-
|
|
4469
|
+
w(!1, "transaction execution reverted", "CALL_EXCEPTION", {
|
|
4470
4470
|
action: "sendTransaction",
|
|
4471
4471
|
data: null,
|
|
4472
4472
|
reason: null,
|
|
@@ -4588,14 +4588,14 @@ const Ve = class Ve {
|
|
|
4588
4588
|
* that evict this transaction.
|
|
4589
4589
|
*/
|
|
4590
4590
|
removedEvent() {
|
|
4591
|
-
return
|
|
4591
|
+
return w(this.isMined(), "unmined transaction canot be orphaned", "UNSUPPORTED_OPERATION", { operation: "removeEvent()" }), Cn(this);
|
|
4592
4592
|
}
|
|
4593
4593
|
/**
|
|
4594
4594
|
* Returns a filter which can be used to listen for orphan events
|
|
4595
4595
|
* that re-order this event against %%other%%.
|
|
4596
4596
|
*/
|
|
4597
4597
|
reorderedEvent(t) {
|
|
4598
|
-
return
|
|
4598
|
+
return w(this.isMined(), "unmined transaction canot be orphaned", "UNSUPPORTED_OPERATION", { operation: "removeEvent()" }), w(!t || t.isMined(), "unmined 'other' transaction canot be orphaned", "UNSUPPORTED_OPERATION", { operation: "removeEvent()" }), Sn(this, t);
|
|
4599
4599
|
}
|
|
4600
4600
|
/**
|
|
4601
4601
|
* Returns a new TransactionResponse instance which has the ability to
|
|
@@ -4634,7 +4634,7 @@ function Mr(s) {
|
|
|
4634
4634
|
index: s.index
|
|
4635
4635
|
} };
|
|
4636
4636
|
}
|
|
4637
|
-
class De extends
|
|
4637
|
+
class De extends we {
|
|
4638
4638
|
/**
|
|
4639
4639
|
* @_ignore:
|
|
4640
4640
|
*/
|
|
@@ -4653,7 +4653,7 @@ class De extends be {
|
|
|
4653
4653
|
*/
|
|
4654
4654
|
u(this, "args");
|
|
4655
4655
|
const i = n.decodeEventLog(r, e.data, e.topics);
|
|
4656
|
-
|
|
4656
|
+
b(this, { args: i, fragment: r, interface: n });
|
|
4657
4657
|
}
|
|
4658
4658
|
/**
|
|
4659
4659
|
* The name of the event.
|
|
@@ -4668,7 +4668,7 @@ class De extends be {
|
|
|
4668
4668
|
return this.fragment.format();
|
|
4669
4669
|
}
|
|
4670
4670
|
}
|
|
4671
|
-
class Fn extends
|
|
4671
|
+
class Fn extends we {
|
|
4672
4672
|
/**
|
|
4673
4673
|
* @_ignore:
|
|
4674
4674
|
*/
|
|
@@ -4678,7 +4678,7 @@ class Fn extends be {
|
|
|
4678
4678
|
* The error encounted when trying to decode the log.
|
|
4679
4679
|
*/
|
|
4680
4680
|
u(this, "error");
|
|
4681
|
-
|
|
4681
|
+
b(this, { error: n });
|
|
4682
4682
|
}
|
|
4683
4683
|
}
|
|
4684
4684
|
var Gt;
|
|
@@ -4744,7 +4744,7 @@ class Ln extends jn {
|
|
|
4744
4744
|
* The log with no matching events.
|
|
4745
4745
|
*/
|
|
4746
4746
|
u(this, "log");
|
|
4747
|
-
|
|
4747
|
+
b(this, { log: i });
|
|
4748
4748
|
}
|
|
4749
4749
|
/**
|
|
4750
4750
|
* Resolves to the block the event occured in.
|
|
@@ -4772,7 +4772,7 @@ class zr extends Ln {
|
|
|
4772
4772
|
constructor(t, e, n, r, i) {
|
|
4773
4773
|
super(t, e, n, new De(i, t.interface, r));
|
|
4774
4774
|
const a = t.interface.decodeEventLog(r, this.log.data, this.log.topics);
|
|
4775
|
-
|
|
4775
|
+
b(this, { args: a, fragment: r });
|
|
4776
4776
|
}
|
|
4777
4777
|
/**
|
|
4778
4778
|
* The event name.
|
|
@@ -4794,7 +4794,7 @@ function Dn(s) {
|
|
|
4794
4794
|
function $n(s) {
|
|
4795
4795
|
return s && typeof s.estimateGas == "function";
|
|
4796
4796
|
}
|
|
4797
|
-
function
|
|
4797
|
+
function be(s) {
|
|
4798
4798
|
return s && typeof s.resolveName == "function";
|
|
4799
4799
|
}
|
|
4800
4800
|
function Gn(s) {
|
|
@@ -4802,7 +4802,7 @@ function Gn(s) {
|
|
|
4802
4802
|
}
|
|
4803
4803
|
function _n(s) {
|
|
4804
4804
|
if (s != null) {
|
|
4805
|
-
if (
|
|
4805
|
+
if (be(s))
|
|
4806
4806
|
return s;
|
|
4807
4807
|
if (s.provider)
|
|
4808
4808
|
return s.provider;
|
|
@@ -4813,9 +4813,9 @@ class Jr {
|
|
|
4813
4813
|
constructor(t, e, n) {
|
|
4814
4814
|
P(this, qt);
|
|
4815
4815
|
u(this, "fragment");
|
|
4816
|
-
if (
|
|
4816
|
+
if (b(this, { fragment: e }), e.inputs.length < n.length)
|
|
4817
4817
|
throw new Error("too many arguments");
|
|
4818
|
-
const r = kt(t.runner, "resolveName"), i =
|
|
4818
|
+
const r = kt(t.runner, "resolveName"), i = be(r) ? r : null;
|
|
4819
4819
|
E(this, qt, async function() {
|
|
4820
4820
|
const a = await Promise.all(e.inputs.map((o, c) => n[c] == null ? null : o.walkAsync(n[c], (f, d) => f === "address" ? Array.isArray(d) ? Promise.all(d.map((g) => Kt(g, i))) : Kt(d, i) : d)));
|
|
4821
4821
|
return t.interface.encodeFilterTopics(e, a);
|
|
@@ -4839,7 +4839,7 @@ async function Vn(s, t) {
|
|
|
4839
4839
|
return p(n.to == null || (t || []).indexOf("to") >= 0, "cannot override to", "overrides.to", n.to), p(n.data == null || (t || []).indexOf("data") >= 0, "cannot override data", "overrides.data", n.data), n.from && (n.from = n.from), n;
|
|
4840
4840
|
}
|
|
4841
4841
|
async function Kr(s, t, e) {
|
|
4842
|
-
const n = kt(s, "resolveName"), r =
|
|
4842
|
+
const n = kt(s, "resolveName"), r = be(n) ? n : null;
|
|
4843
4843
|
return await Promise.all(t.map((i, a) => i.walkAsync(e[a], (o, c) => (c = C.dereference(c, o), o === "address" ? Kt(c, r) : c))));
|
|
4844
4844
|
}
|
|
4845
4845
|
function Wr(s) {
|
|
@@ -4852,7 +4852,7 @@ function Wr(s) {
|
|
|
4852
4852
|
return p(d || l, "cannot send value to non-payable fallback", "overrides.value", o.value), p(c.fallback || f, "cannot send data to receive-only contract", "overrides.data", o.data), o;
|
|
4853
4853
|
}, e = async function(a) {
|
|
4854
4854
|
const o = kt(s.runner, "call");
|
|
4855
|
-
|
|
4855
|
+
w(Dn(o), "contract runner does not support calling", "UNSUPPORTED_OPERATION", { operation: "call" });
|
|
4856
4856
|
const c = await t(a);
|
|
4857
4857
|
try {
|
|
4858
4858
|
return await o.call(c);
|
|
@@ -4861,14 +4861,14 @@ function Wr(s) {
|
|
|
4861
4861
|
}
|
|
4862
4862
|
}, n = async function(a) {
|
|
4863
4863
|
const o = s.runner;
|
|
4864
|
-
|
|
4864
|
+
w(Gn(o), "contract runner does not support sending transactions", "UNSUPPORTED_OPERATION", { operation: "sendTransaction" });
|
|
4865
4865
|
const c = await o.sendTransaction(await t(a)), l = Et(s.runner);
|
|
4866
4866
|
return new $e(s.interface, l, c);
|
|
4867
4867
|
}, r = async function(a) {
|
|
4868
4868
|
const o = kt(s.runner, "estimateGas");
|
|
4869
|
-
return
|
|
4869
|
+
return w($n(o), "contract runner does not support gas estimation", "UNSUPPORTED_OPERATION", { operation: "estimateGas" }), await o.estimateGas(await t(a));
|
|
4870
4870
|
}, i = async (a) => await n(a);
|
|
4871
|
-
return
|
|
4871
|
+
return b(i, {
|
|
4872
4872
|
_contract: s,
|
|
4873
4873
|
estimateGas: r,
|
|
4874
4874
|
populateTransaction: t,
|
|
@@ -4879,7 +4879,7 @@ function Wr(s) {
|
|
|
4879
4879
|
function Yr(s, t) {
|
|
4880
4880
|
const e = function(...l) {
|
|
4881
4881
|
const f = s.interface.getFunction(t, l);
|
|
4882
|
-
return
|
|
4882
|
+
return w(f, "no matching fragment", "UNSUPPORTED_OPERATION", {
|
|
4883
4883
|
operation: "fragment",
|
|
4884
4884
|
info: { key: t, args: l }
|
|
4885
4885
|
}), f;
|
|
@@ -4898,15 +4898,15 @@ function Yr(s, t) {
|
|
|
4898
4898
|
return f.length === 1 ? f[0] : f;
|
|
4899
4899
|
}, i = async function(...l) {
|
|
4900
4900
|
const f = s.runner;
|
|
4901
|
-
|
|
4901
|
+
w(Gn(f), "contract runner does not support sending transactions", "UNSUPPORTED_OPERATION", { operation: "sendTransaction" });
|
|
4902
4902
|
const d = await f.sendTransaction(await n(...l)), g = Et(s.runner);
|
|
4903
4903
|
return new $e(s.interface, g, d);
|
|
4904
4904
|
}, a = async function(...l) {
|
|
4905
4905
|
const f = kt(s.runner, "estimateGas");
|
|
4906
|
-
return
|
|
4906
|
+
return w($n(f), "contract runner does not support gas estimation", "UNSUPPORTED_OPERATION", { operation: "estimateGas" }), await f.estimateGas(await n(...l));
|
|
4907
4907
|
}, o = async function(...l) {
|
|
4908
4908
|
const f = kt(s.runner, "call");
|
|
4909
|
-
|
|
4909
|
+
w(Dn(f), "contract runner does not support calling", "UNSUPPORTED_OPERATION", { operation: "call" });
|
|
4910
4910
|
const d = await n(...l);
|
|
4911
4911
|
let g = "0x";
|
|
4912
4912
|
try {
|
|
@@ -4917,7 +4917,7 @@ function Yr(s, t) {
|
|
|
4917
4917
|
const m = e(...l);
|
|
4918
4918
|
return s.interface.decodeFunctionResult(m, g);
|
|
4919
4919
|
}, c = async (...l) => e(...l).constant ? await r(...l) : await i(...l);
|
|
4920
|
-
return
|
|
4920
|
+
return b(c, {
|
|
4921
4921
|
name: s.interface.getFunctionName(t),
|
|
4922
4922
|
_contract: s,
|
|
4923
4923
|
_key: t,
|
|
@@ -4932,7 +4932,7 @@ function Yr(s, t) {
|
|
|
4932
4932
|
enumerable: !0,
|
|
4933
4933
|
get: () => {
|
|
4934
4934
|
const l = s.interface.getFunction(t);
|
|
4935
|
-
return
|
|
4935
|
+
return w(l, "no matching fragment", "UNSUPPORTED_OPERATION", {
|
|
4936
4936
|
operation: "fragment",
|
|
4937
4937
|
info: { key: t }
|
|
4938
4938
|
}), l;
|
|
@@ -4942,14 +4942,14 @@ function Yr(s, t) {
|
|
|
4942
4942
|
function Xr(s, t) {
|
|
4943
4943
|
const e = function(...r) {
|
|
4944
4944
|
const i = s.interface.getEvent(t, r);
|
|
4945
|
-
return
|
|
4945
|
+
return w(i, "no matching fragment", "UNSUPPORTED_OPERATION", {
|
|
4946
4946
|
operation: "fragment",
|
|
4947
4947
|
info: { key: t, args: r }
|
|
4948
4948
|
}), i;
|
|
4949
4949
|
}, n = function(...r) {
|
|
4950
4950
|
return new Jr(s, e(...r), r);
|
|
4951
4951
|
};
|
|
4952
|
-
return
|
|
4952
|
+
return b(n, {
|
|
4953
4953
|
name: s.interface.getEventName(t),
|
|
4954
4954
|
_contract: s,
|
|
4955
4955
|
_key: t,
|
|
@@ -4959,7 +4959,7 @@ function Xr(s, t) {
|
|
|
4959
4959
|
enumerable: !0,
|
|
4960
4960
|
get: () => {
|
|
4961
4961
|
const r = s.interface.getEvent(t);
|
|
4962
|
-
return
|
|
4962
|
+
return w(r, "no matching fragment", "UNSUPPORTED_OPERATION", {
|
|
4963
4963
|
operation: "fragment",
|
|
4964
4964
|
info: { key: t }
|
|
4965
4965
|
}), r;
|
|
@@ -5005,7 +5005,7 @@ async function Mt(s, t) {
|
|
|
5005
5005
|
}
|
|
5006
5006
|
async function un(s, t, e) {
|
|
5007
5007
|
const n = Et(s.runner);
|
|
5008
|
-
|
|
5008
|
+
w(n, "contract runner does not support subscribing", "UNSUPPORTED_OPERATION", { operation: t });
|
|
5009
5009
|
const { fragment: r, tag: i, topics: a } = await Ge(s, e), { addr: o, subs: c } = V(s);
|
|
5010
5010
|
let l = c.get(i);
|
|
5011
5011
|
if (!l) {
|
|
@@ -5103,7 +5103,7 @@ const Ht = class Ht {
|
|
|
5103
5103
|
u(this, "fallback");
|
|
5104
5104
|
p(typeof t == "string" || Xn(t), "invalid value for Contract target", "target", t), n == null && (n = null);
|
|
5105
5105
|
const i = Be.from(e);
|
|
5106
|
-
|
|
5106
|
+
b(this, { target: t, runner: n, interface: i }), Object.defineProperty(this, fe, { value: {} });
|
|
5107
5107
|
let a, o = null, c = null;
|
|
5108
5108
|
if (r) {
|
|
5109
5109
|
const d = Et(n);
|
|
@@ -5115,7 +5115,7 @@ const Ht = class Ht {
|
|
|
5115
5115
|
o = t, a = Promise.resolve(t);
|
|
5116
5116
|
else {
|
|
5117
5117
|
const d = kt(n, "resolveName");
|
|
5118
|
-
if (!
|
|
5118
|
+
if (!be(d))
|
|
5119
5119
|
throw ce("contract runner does not support name resolution", "UNSUPPORTED_OPERATION", {
|
|
5120
5120
|
operation: "resolveName"
|
|
5121
5121
|
});
|
|
@@ -5147,7 +5147,7 @@ const Ht = class Ht {
|
|
|
5147
5147
|
},
|
|
5148
5148
|
has: (d, g) => ne.indexOf(g) >= 0 ? Reflect.has(d, g) : Reflect.has(d, g) || this.interface.hasEvent(String(g))
|
|
5149
5149
|
});
|
|
5150
|
-
return
|
|
5150
|
+
return b(this, { filters: f }), b(this, {
|
|
5151
5151
|
fallback: i.receive || i.fallback ? Wr(this) : null
|
|
5152
5152
|
}), new Proxy(this, {
|
|
5153
5153
|
get: (d, g, m) => {
|
|
@@ -5188,7 +5188,7 @@ const Ht = class Ht {
|
|
|
5188
5188
|
*/
|
|
5189
5189
|
async getDeployedCode() {
|
|
5190
5190
|
const t = Et(this.runner);
|
|
5191
|
-
|
|
5191
|
+
w(t, "runner does not support .provider", "UNSUPPORTED_OPERATION", { operation: "getDeployedCode" });
|
|
5192
5192
|
const e = await t.getCode(await this.getAddress());
|
|
5193
5193
|
return e === "0x" ? null : e;
|
|
5194
5194
|
}
|
|
@@ -5203,7 +5203,7 @@ const Ht = class Ht {
|
|
|
5203
5203
|
if (await this.getDeployedCode() != null)
|
|
5204
5204
|
return this;
|
|
5205
5205
|
const n = Et(this.runner);
|
|
5206
|
-
return
|
|
5206
|
+
return w(n != null, "contract runner does not support .provider", "UNSUPPORTED_OPERATION", { operation: "waitForDeployment" }), new Promise((r, i) => {
|
|
5207
5207
|
const a = async () => {
|
|
5208
5208
|
try {
|
|
5209
5209
|
if (await this.getDeployedCode() != null)
|
|
@@ -5270,7 +5270,7 @@ const Ht = class Ht {
|
|
|
5270
5270
|
async queryFilter(t, e, n) {
|
|
5271
5271
|
e == null && (e = 0), n == null && (n = "latest");
|
|
5272
5272
|
const { addr: r, addrPromise: i } = V(this), a = r || await i, { fragment: o, topics: c } = await Ge(this, t), l = { address: a, topics: c, fromBlock: e, toBlock: n }, f = Et(this.runner);
|
|
5273
|
-
return
|
|
5273
|
+
return w(f, "contract runner does not have a provider", "UNSUPPORTED_OPERATION", { operation: "queryFilter" }), (await f.getLogs(l)).map((d) => {
|
|
5274
5274
|
let g = o;
|
|
5275
5275
|
if (g == null)
|
|
5276
5276
|
try {
|
|
@@ -5283,7 +5283,7 @@ const Ht = class Ht {
|
|
|
5283
5283
|
} catch (m) {
|
|
5284
5284
|
return new Fn(d, m);
|
|
5285
5285
|
}
|
|
5286
|
-
return new
|
|
5286
|
+
return new we(d, f);
|
|
5287
5287
|
});
|
|
5288
5288
|
}
|
|
5289
5289
|
/**
|
|
@@ -5413,9 +5413,9 @@ export {
|
|
|
5413
5413
|
jn as E,
|
|
5414
5414
|
rs as F,
|
|
5415
5415
|
Be as I,
|
|
5416
|
-
|
|
5416
|
+
we as L,
|
|
5417
5417
|
_r as T,
|
|
5418
|
-
|
|
5418
|
+
wn as a,
|
|
5419
5419
|
pn as b,
|
|
5420
5420
|
Gr as c,
|
|
5421
5421
|
yn as d,
|