@springmicro/auth 0.1.8 → 0.2.0-alpha.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 +20 -15
- package/dist/Index-652aeb8c-BTQ1rBi7.js +2818 -0
- package/dist/Index-c419311f-BOZhAAW3.js +1054 -0
- package/dist/Web3Auth-hACKSouN.js +32769 -0
- package/dist/alphawallet-B7eovdf-.js +26 -0
- package/dist/apexwallet-ysP20G9D.js +93 -0
- package/dist/atoken-BBnNTzcz.js +27 -0
- package/dist/bifrostwallet-CNNBO92h.js +11 -0
- package/dist/binance-DvPgAzCw.js +14 -0
- package/dist/bitget-DZOUrwgy.js +4 -0
- package/dist/bitpie-C_uxmEzw.js +25 -0
- package/dist/bitski-DpzkHNkv.js +4 -0
- package/dist/blockwallet-BL69cqkA.js +8 -0
- package/dist/brave-DnRzMQYW.js +35 -0
- package/dist/ccip-c78d2f16-DLcRlwod.js +165 -0
- package/dist/coin98wallet-CkFdOvXt.js +4 -0
- package/dist/coinbase-CaGNx5if.js +9 -0
- package/dist/core-9rK8tWud.js +7 -0
- package/dist/defiwallet-0AsgJBSy.js +10 -0
- package/dist/detected-CX_JZaUk.js +6 -0
- package/dist/echooo-CmaetT_Z.js +14 -0
- package/dist/enkrypt-BibtwvK7.js +20 -0
- package/dist/exodus-BxzkDWWP.js +4 -0
- package/dist/fordefi-CvKyVwhI.js +6 -0
- package/dist/foxwallet-D7c_LDTf.js +4 -0
- package/dist/frame-CDfNmjUy.js +7 -0
- package/dist/frontier-DqKNSj2z.js +8 -0
- package/dist/huobiwallet-CxSwqa5L.js +14 -0
- package/dist/hyperpay-nmHE3WqM.js +7 -0
- package/dist/icon-2Zqy7pqQ.js +8 -0
- package/dist/icon-CGWI1Ies.js +43 -0
- package/dist/icon-C_O4nprO.js +9 -0
- package/dist/icon-DbgmZCnU.js +9 -0
- package/dist/icon-cAd7RhSC.js +9 -0
- package/dist/icon-duCa3gfT.js +11 -0
- package/dist/imtoken-yENtOTS3.js +17 -0
- package/dist/index-021f6a62-Zz543EDB.js +2583 -0
- package/dist/index-40a497ea-Bn2mC0r7.js +1010 -0
- package/dist/index-BHkXn9Ss.js +4010 -0
- package/dist/index-BaYEABY7.js +7089 -0
- package/dist/index-BtLU53lm.js +6023 -0
- package/dist/index-CynP9H3X.js +6188 -0
- package/dist/index-Dg8m-Szw.js +31 -0
- package/dist/index-Dt6M8ha9.js +161 -0
- package/dist/index-DtJfAdfq.js +5822 -0
- package/dist/index-klU8YB0c.js +1983 -0
- package/dist/index.d.ts +124 -0
- package/dist/index.js +5 -43
- package/dist/index.umd.cjs +1937 -1
- package/dist/infinitywallet-C8J4FUYw.js +42 -0
- package/dist/kayros-AIrUK1za.js +27 -0
- package/dist/lif3wallet-C5D6r8pg.js +41 -0
- package/dist/liquality-nbCtErVq.js +16 -0
- package/dist/mathwallet-CWkivCXo.js +50 -0
- package/dist/meetone-kKmvI8md.js +13 -0
- package/dist/metamask-BN7yiDV1.js +64 -0
- package/dist/mykey-CQZ6UcLH.js +13 -0
- package/dist/number-BXHWhlom.js +1529 -0
- package/dist/okxwallet-CJLVogh2.js +8 -0
- package/dist/oneInch-CciyZ4Pz.js +72 -0
- package/dist/onekey-Dal8kYjU.js +9 -0
- package/dist/opera-DnKg-TJU.js +24 -0
- package/dist/ownbit-BshJUVuW.js +18 -0
- package/dist/phantom-CJ8dIcov.js +35 -0
- package/dist/rabby-D4thTcd6.js +27 -0
- package/dist/rainbow-mXld6yWV.js +69 -0
- package/dist/roninwallet-ZyYrd-D1.js +9 -0
- package/dist/safeheron-Eg1Jb29V.js +23 -0
- package/dist/safepal-DVIKy94N.js +105 -0
- package/dist/sequence-BS2IbtDg.js +70 -0
- package/dist/stablewallet-jyB079Wb.js +20 -0
- package/dist/status-FrAvQjfn.js +4 -0
- package/dist/subwallet-DMvFqKyY.js +25 -0
- package/dist/talisman-Bp8zUXqB.js +16 -0
- package/dist/tallywallet-B4OS9nIr.js +16 -0
- package/dist/tokenary-C7jjcbQa.js +18 -0
- package/dist/tokenpocket-9ZRPmAFA.js +28 -0
- package/dist/tp-V2em5bdl.js +13 -0
- package/dist/transactionRequest-be6a8ea9-CUKWo5mx.js +1117 -0
- package/dist/trust-gPypS1O7.js +11 -0
- package/dist/xdefi-COVIyGz4.js +38 -0
- package/dist/zeal-DxHbDqm0.js +9 -0
- package/dist/zerion-BfW0UElc.js +8 -0
- package/dist/zodiacpilot-CrId6F4w.js +6 -0
- package/package.json +35 -15
- package/src/auth/config.ts +0 -2
- package/src/components/SignUp.tsx +442 -0
- package/src/components/forms/AgreementModal.tsx +88 -0
- package/src/components/forms/CaptchaController.tsx +94 -0
- package/src/components/forms/CaptchaModal.jsx +171 -0
- package/src/components/forms/CaptchaWidget.jsx +146 -0
- package/src/components/forms/PasswordChecker.ts +88 -0
- package/src/components/forms/SendCodeInput.tsx +149 -0
- package/src/components/forms/SignUpFormItem.tsx +704 -0
- package/src/components/forms/util/application-api.ts +155 -0
- package/src/components/forms/util/auth-api.ts +198 -0
- package/src/components/forms/util/auth-util.tsx +346 -0
- package/src/components/forms/util/core.ts +493 -0
- package/src/components/forms/util/invitation-api.ts +132 -0
- package/src/components/forms/util/provider.tsx +603 -0
- package/src/components/forms/util/user-api.ts +303 -0
- package/src/components/provider/AdfsLoginButton.jsx +38 -0
- package/src/components/provider/AlipayLoginButton.jsx +38 -0
- package/src/components/provider/AppleLoginButton.jsx +38 -0
- package/src/components/provider/AzureADB2CLoginButton.jsx +38 -0
- package/src/components/provider/AzureADLoginButton.jsx +38 -0
- package/src/components/provider/BaiduLoginButton.jsx +38 -0
- package/src/components/provider/BilibiliLoginButton.jsx +37 -0
- package/src/components/provider/CasdoorLoginButton.jsx +38 -0
- package/src/components/provider/DingTalkLoginButton.jsx +37 -0
- package/src/components/provider/DouyinLoginButton.jsx +38 -0
- package/src/components/provider/FacebookLoginButton.jsx +37 -0
- package/src/components/provider/GitHubLoginButton.jsx +37 -0
- package/src/components/provider/GitLabLoginButton.jsx +38 -0
- package/src/components/provider/GiteeLoginButton.jsx +34 -0
- package/src/components/provider/GoogleLoginButton.jsx +68 -0
- package/src/components/provider/InfoflowLoginButton.jsx +38 -0
- package/src/components/provider/LarkLoginButton.jsx +38 -0
- package/src/components/provider/LinkedInLoginButton.jsx +37 -0
- package/src/components/provider/LoginButton.jsx +33 -0
- package/src/components/provider/OktaLoginButton.jsx +38 -0
- package/src/components/provider/Provider.jsx +3 -0
- package/src/components/provider/ProviderButton.jsx +327 -0
- package/src/components/provider/QqLoginButton.jsx +31 -0
- package/src/components/provider/SelfLoginButton.jsx +47 -0
- package/src/components/provider/SlackLoginButton.jsx +38 -0
- package/src/components/provider/SteamLoginButton.jsx +38 -0
- package/src/components/provider/WeComLoginButton.jsx +34 -0
- package/src/components/provider/Web3Auth.jsx +365 -0
- package/src/components/provider/WechatLoginButton.jsx +37 -0
- package/src/components/provider/WeiboLoginButton.jsx +34 -0
- package/src/components/util.tsx +173 -0
- package/src/i18n/en/signup.json +48 -0
- package/src/i18n/index.ts +17 -0
- package/src/index.tsx +6 -1
- package/vite.config.ts +33 -25
|
@@ -0,0 +1,2583 @@
|
|
|
1
|
+
import { s as D, y as I, z as O, i as k, I as ce, A as x, B as g, C as dn, D as pn, k as ue, E as vt, G as hn, J as Dt, K as Re, f as gn, b as wn, e as N, L as mn, M as bn, j as ge, c as yn, p as Qt, N as Ae, O as Y, U as Rt, P as En, F as Ie, T as Ne, t as we, Q as me, h as Cn, R as Bn, a as Mn, o as It, S as Nt, V as Me, W as ie, X as nt, Y as rt, Z as ot, _ as st, $ as it, a0 as at, a1 as ct, a2 as ut, a3 as vn, a4 as At, a5 as Dn, a6 as Qn } from "./transactionRequest-be6a8ea9-CUKWo5mx.js";
|
|
2
|
+
function Rn(e, t = "wei") {
|
|
3
|
+
return vn(e, Dn[t]);
|
|
4
|
+
}
|
|
5
|
+
var In = "AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQ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HtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI";
|
|
6
|
+
const lt = /* @__PURE__ */ new Map([[8217, "apostrophe"], [8260, "fraction slash"], [12539, "middle dot"]]), ft = 4;
|
|
7
|
+
function Nn(e) {
|
|
8
|
+
let t = 0;
|
|
9
|
+
function n() {
|
|
10
|
+
return e[t++] << 8 | e[t++];
|
|
11
|
+
}
|
|
12
|
+
let r = n(), o = 1, s = [0, 1];
|
|
13
|
+
for (let E = 1; E < r; E++)
|
|
14
|
+
s.push(o += n());
|
|
15
|
+
let i = n(), a = t;
|
|
16
|
+
t += i;
|
|
17
|
+
let c = 0, u = 0;
|
|
18
|
+
function A() {
|
|
19
|
+
return c == 0 && (u = u << 8 | e[t++], c = 8), u >> --c & 1;
|
|
20
|
+
}
|
|
21
|
+
const l = 31, f = 2 ** l, d = f >>> 1, h = d >> 1, p = f - 1;
|
|
22
|
+
let w = 0;
|
|
23
|
+
for (let E = 0; E < l; E++) w = w << 1 | A();
|
|
24
|
+
let m = [], C = 0, y = f;
|
|
25
|
+
for (; ; ) {
|
|
26
|
+
let E = Math.floor(((w - C + 1) * o - 1) / y), v = 0, F = r;
|
|
27
|
+
for (; F - v > 1; ) {
|
|
28
|
+
let Q = v + F >>> 1;
|
|
29
|
+
E < s[Q] ? F = Q : v = Q;
|
|
30
|
+
}
|
|
31
|
+
if (v == 0) break;
|
|
32
|
+
m.push(v);
|
|
33
|
+
let B = C + Math.floor(y * s[v] / o), b = C + Math.floor(y * s[v + 1] / o) - 1;
|
|
34
|
+
for (; !((B ^ b) & d); )
|
|
35
|
+
w = w << 1 & p | A(), B = B << 1 & p, b = b << 1 & p | 1;
|
|
36
|
+
for (; B & ~b & h; )
|
|
37
|
+
w = w & d | w << 1 & p >>> 1 | A(), B = B << 1 ^ d, b = (b ^ d) << 1 | d | 1;
|
|
38
|
+
C = B, y = 1 + b - B;
|
|
39
|
+
}
|
|
40
|
+
let M = r - 4;
|
|
41
|
+
return m.map((E) => {
|
|
42
|
+
switch (E - M) {
|
|
43
|
+
case 3:
|
|
44
|
+
return M + 65792 + (e[a++] << 16 | e[a++] << 8 | e[a++]);
|
|
45
|
+
case 2:
|
|
46
|
+
return M + 256 + (e[a++] << 8 | e[a++]);
|
|
47
|
+
case 1:
|
|
48
|
+
return M + e[a++];
|
|
49
|
+
default:
|
|
50
|
+
return E - 1;
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function Pn(e) {
|
|
55
|
+
let t = 0;
|
|
56
|
+
return () => e[t++];
|
|
57
|
+
}
|
|
58
|
+
function Pt(e) {
|
|
59
|
+
return Pn(Nn(xn(e)));
|
|
60
|
+
}
|
|
61
|
+
function xn(e) {
|
|
62
|
+
let t = [];
|
|
63
|
+
[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((o, s) => t[o.charCodeAt(0)] = s);
|
|
64
|
+
let n = e.length, r = new Uint8Array(6 * n >> 3);
|
|
65
|
+
for (let o = 0, s = 0, i = 0, a = 0; o < n; o++)
|
|
66
|
+
a = a << 6 | t[e.charCodeAt(o)], i += 6, i >= 8 && (r[s++] = a >> (i -= 8));
|
|
67
|
+
return r;
|
|
68
|
+
}
|
|
69
|
+
function On(e) {
|
|
70
|
+
return e & 1 ? ~e >> 1 : e >> 1;
|
|
71
|
+
}
|
|
72
|
+
function kn(e, t) {
|
|
73
|
+
let n = Array(e);
|
|
74
|
+
for (let r = 0, o = 0; r < e; r++) n[r] = o += On(t());
|
|
75
|
+
return n;
|
|
76
|
+
}
|
|
77
|
+
function q(e, t = 0) {
|
|
78
|
+
let n = [];
|
|
79
|
+
for (; ; ) {
|
|
80
|
+
let r = e(), o = e();
|
|
81
|
+
if (!o) break;
|
|
82
|
+
t += r;
|
|
83
|
+
for (let s = 0; s < o; s++)
|
|
84
|
+
n.push(t + s);
|
|
85
|
+
t += o + 1;
|
|
86
|
+
}
|
|
87
|
+
return n;
|
|
88
|
+
}
|
|
89
|
+
function xt(e) {
|
|
90
|
+
return $(() => {
|
|
91
|
+
let t = q(e);
|
|
92
|
+
if (t.length) return t;
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
function Ot(e) {
|
|
96
|
+
let t = [];
|
|
97
|
+
for (; ; ) {
|
|
98
|
+
let n = e();
|
|
99
|
+
if (n == 0) break;
|
|
100
|
+
t.push(Fn(n, e));
|
|
101
|
+
}
|
|
102
|
+
for (; ; ) {
|
|
103
|
+
let n = e() - 1;
|
|
104
|
+
if (n < 0) break;
|
|
105
|
+
t.push(Sn(n, e));
|
|
106
|
+
}
|
|
107
|
+
return t.flat();
|
|
108
|
+
}
|
|
109
|
+
function $(e) {
|
|
110
|
+
let t = [];
|
|
111
|
+
for (; ; ) {
|
|
112
|
+
let n = e(t.length);
|
|
113
|
+
if (!n) break;
|
|
114
|
+
t.push(n);
|
|
115
|
+
}
|
|
116
|
+
return t;
|
|
117
|
+
}
|
|
118
|
+
function kt(e, t, n) {
|
|
119
|
+
let r = Array(e).fill().map(() => []);
|
|
120
|
+
for (let o = 0; o < t; o++)
|
|
121
|
+
kn(e, n).forEach((s, i) => r[i].push(s));
|
|
122
|
+
return r;
|
|
123
|
+
}
|
|
124
|
+
function Fn(e, t) {
|
|
125
|
+
let n = 1 + t(), r = t(), o = $(t);
|
|
126
|
+
return kt(o.length, 1 + e, t).flatMap((i, a) => {
|
|
127
|
+
let [c, ...u] = i;
|
|
128
|
+
return Array(o[a]).fill().map((A, l) => {
|
|
129
|
+
let f = l * r;
|
|
130
|
+
return [c + l * n, u.map((d) => d + f)];
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
function Sn(e, t) {
|
|
135
|
+
let n = 1 + t();
|
|
136
|
+
return kt(n, 1 + e, t).map((o) => [o[0], o.slice(1)]);
|
|
137
|
+
}
|
|
138
|
+
function Un(e) {
|
|
139
|
+
let t = [], n = q(e);
|
|
140
|
+
return o(r([]), []), t;
|
|
141
|
+
function r(s) {
|
|
142
|
+
let i = e(), a = $(() => {
|
|
143
|
+
let c = q(e).map((u) => n[u]);
|
|
144
|
+
if (c.length) return r(c);
|
|
145
|
+
});
|
|
146
|
+
return { S: i, B: a, Q: s };
|
|
147
|
+
}
|
|
148
|
+
function o({ S: s, B: i }, a, c) {
|
|
149
|
+
if (!(s & 4 && c === a[a.length - 1])) {
|
|
150
|
+
s & 2 && (c = a[a.length - 1]), s & 1 && t.push(a);
|
|
151
|
+
for (let u of i)
|
|
152
|
+
for (let A of u.Q)
|
|
153
|
+
o(u, [...a, A], c);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
function jn(e) {
|
|
158
|
+
return e.toString(16).toUpperCase().padStart(2, "0");
|
|
159
|
+
}
|
|
160
|
+
function Ft(e) {
|
|
161
|
+
return `{${jn(e)}}`;
|
|
162
|
+
}
|
|
163
|
+
function Hn(e) {
|
|
164
|
+
let t = [];
|
|
165
|
+
for (let n = 0, r = e.length; n < r; ) {
|
|
166
|
+
let o = e.codePointAt(n);
|
|
167
|
+
n += o < 65536 ? 1 : 2, t.push(o);
|
|
168
|
+
}
|
|
169
|
+
return t;
|
|
170
|
+
}
|
|
171
|
+
function z(e) {
|
|
172
|
+
let n = e.length;
|
|
173
|
+
if (n < 4096) return String.fromCodePoint(...e);
|
|
174
|
+
let r = [];
|
|
175
|
+
for (let o = 0; o < n; )
|
|
176
|
+
r.push(String.fromCodePoint(...e.slice(o, o += 4096)));
|
|
177
|
+
return r.join("");
|
|
178
|
+
}
|
|
179
|
+
function zn(e, t) {
|
|
180
|
+
let n = e.length, r = n - t.length;
|
|
181
|
+
for (let o = 0; r == 0 && o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, St = 19, Ut = 21, G = 28, pe = Ut * G, Tn = St * pe, Jn = _ + Tn, Ln = le + St, Vn = fe + Ut, Kn = de + G;
|
|
186
|
+
function Z(e) {
|
|
187
|
+
return e >> 24 & 255;
|
|
188
|
+
}
|
|
189
|
+
function jt(e) {
|
|
190
|
+
return e & 16777215;
|
|
191
|
+
}
|
|
192
|
+
let Pe, dt, xe, ae;
|
|
193
|
+
function Zn() {
|
|
194
|
+
let e = Pt(Gn);
|
|
195
|
+
Pe = new Map(xt(e).flatMap((t, n) => t.map((r) => [r, n + 1 << 24]))), dt = new Set(q(e)), xe = /* @__PURE__ */ new Map(), ae = /* @__PURE__ */ new Map();
|
|
196
|
+
for (let [t, n] of Ot(e)) {
|
|
197
|
+
if (!dt.has(t) && n.length == 2) {
|
|
198
|
+
let [r, o] = n, s = ae.get(r);
|
|
199
|
+
s || (s = /* @__PURE__ */ new Map(), ae.set(r, s)), s.set(o, t);
|
|
200
|
+
}
|
|
201
|
+
xe.set(t, n.reverse());
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
function Ht(e) {
|
|
205
|
+
return e >= _ && e < Jn;
|
|
206
|
+
}
|
|
207
|
+
function Yn(e, t) {
|
|
208
|
+
if (e >= le && e < Ln && t >= fe && t < Vn)
|
|
209
|
+
return _ + (e - le) * pe + (t - fe) * G;
|
|
210
|
+
if (Ht(e) && t > de && t < Kn && (e - _) % G == 0)
|
|
211
|
+
return e + (t - de);
|
|
212
|
+
{
|
|
213
|
+
let n = ae.get(e);
|
|
214
|
+
return n && (n = n.get(t), n) ? n : -1;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
function zt(e) {
|
|
218
|
+
Pe || Zn();
|
|
219
|
+
let t = [], n = [], r = !1;
|
|
220
|
+
function o(s) {
|
|
221
|
+
let i = Pe.get(s);
|
|
222
|
+
i && (r = !0, s |= i), t.push(s);
|
|
223
|
+
}
|
|
224
|
+
for (let s of e)
|
|
225
|
+
for (; ; ) {
|
|
226
|
+
if (s < 128)
|
|
227
|
+
t.push(s);
|
|
228
|
+
else if (Ht(s)) {
|
|
229
|
+
let i = s - _, a = i / pe | 0, c = i % pe / G | 0, u = i % G;
|
|
230
|
+
o(le + a), o(fe + c), u > 0 && o(de + u);
|
|
231
|
+
} else {
|
|
232
|
+
let i = xe.get(s);
|
|
233
|
+
i ? n.push(...i) : o(s);
|
|
234
|
+
}
|
|
235
|
+
if (!n.length) break;
|
|
236
|
+
s = n.pop();
|
|
237
|
+
}
|
|
238
|
+
if (r && t.length > 1) {
|
|
239
|
+
let s = Z(t[0]);
|
|
240
|
+
for (let i = 1; i < t.length; i++) {
|
|
241
|
+
let a = Z(t[i]);
|
|
242
|
+
if (a == 0 || s <= a) {
|
|
243
|
+
s = a;
|
|
244
|
+
continue;
|
|
245
|
+
}
|
|
246
|
+
let c = i - 1;
|
|
247
|
+
for (; ; ) {
|
|
248
|
+
let u = t[c + 1];
|
|
249
|
+
if (t[c + 1] = t[c], t[c] = u, !c || (s = Z(t[--c]), s <= a)) break;
|
|
250
|
+
}
|
|
251
|
+
s = Z(t[i]);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
return t;
|
|
255
|
+
}
|
|
256
|
+
function Wn(e) {
|
|
257
|
+
let t = [], n = [], r = -1, o = 0;
|
|
258
|
+
for (let s of e) {
|
|
259
|
+
let i = Z(s), a = jt(s);
|
|
260
|
+
if (r == -1)
|
|
261
|
+
i == 0 ? r = a : t.push(a);
|
|
262
|
+
else if (o > 0 && o >= i)
|
|
263
|
+
i == 0 ? (t.push(r, ...n), n.length = 0, r = a) : n.push(a), o = i;
|
|
264
|
+
else {
|
|
265
|
+
let c = Yn(r, a);
|
|
266
|
+
c >= 0 ? r = c : o == 0 && i == 0 ? (t.push(r), r = a) : (n.push(a), o = i);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
return r >= 0 && t.push(r, ...n), t;
|
|
270
|
+
}
|
|
271
|
+
function Gt(e) {
|
|
272
|
+
return zt(e).map(jt);
|
|
273
|
+
}
|
|
274
|
+
function Xn(e) {
|
|
275
|
+
return Wn(zt(e));
|
|
276
|
+
}
|
|
277
|
+
const pt = 45, Tt = ".", Jt = 65039, Lt = 1, U = (e) => Array.from(e);
|
|
278
|
+
function ee(e, t) {
|
|
279
|
+
return e.P.has(t) || e.Q.has(t);
|
|
280
|
+
}
|
|
281
|
+
class qn extends Array {
|
|
282
|
+
get is_emoji() {
|
|
283
|
+
return !0;
|
|
284
|
+
}
|
|
285
|
+
// free tagging system
|
|
286
|
+
}
|
|
287
|
+
let Oe, Vt, P, ke, Kt, j, ve, S, Zt, ht, Fe;
|
|
288
|
+
function ze() {
|
|
289
|
+
if (Oe) return;
|
|
290
|
+
let e = Pt(In);
|
|
291
|
+
const t = () => q(e), n = () => new Set(t());
|
|
292
|
+
Oe = new Map(Ot(e)), Vt = n(), P = t(), ke = new Set(t().map((A) => P[A])), P = new Set(P), Kt = n(), n();
|
|
293
|
+
let r = xt(e), o = e();
|
|
294
|
+
const s = () => new Set(t().flatMap((A) => r[A]).concat(t()));
|
|
295
|
+
j = $((A) => {
|
|
296
|
+
let l = $(e).map((f) => f + 96);
|
|
297
|
+
if (l.length) {
|
|
298
|
+
let f = A >= o;
|
|
299
|
+
l[0] -= 32, l = z(l), f && (l = `Restricted[${l}]`);
|
|
300
|
+
let d = s(), h = s(), p = !e();
|
|
301
|
+
return { N: l, P: d, Q: h, M: p, R: f };
|
|
302
|
+
}
|
|
303
|
+
}), ve = n(), S = /* @__PURE__ */ new Map();
|
|
304
|
+
let i = t().concat(U(ve)).sort((A, l) => A - l);
|
|
305
|
+
i.forEach((A, l) => {
|
|
306
|
+
let f = e(), d = i[l] = f ? i[l - f] : { V: [], M: /* @__PURE__ */ new Map() };
|
|
307
|
+
d.V.push(A), ve.has(A) || S.set(A, d);
|
|
308
|
+
});
|
|
309
|
+
for (let { V: A, M: l } of new Set(S.values())) {
|
|
310
|
+
let f = [];
|
|
311
|
+
for (let h of A) {
|
|
312
|
+
let p = j.filter((m) => ee(m, h)), w = f.find(({ G: m }) => p.some((C) => m.has(C)));
|
|
313
|
+
w || (w = { G: /* @__PURE__ */ new Set(), V: [] }, f.push(w)), w.V.push(h), p.forEach((m) => w.G.add(m));
|
|
314
|
+
}
|
|
315
|
+
let d = f.flatMap((h) => U(h.G));
|
|
316
|
+
for (let { G: h, V: p } of f) {
|
|
317
|
+
let w = new Set(d.filter((m) => !h.has(m)));
|
|
318
|
+
for (let m of p)
|
|
319
|
+
l.set(m, w);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
let a = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Set();
|
|
323
|
+
const u = (A) => a.has(A) ? c.add(A) : a.add(A);
|
|
324
|
+
for (let A of j) {
|
|
325
|
+
for (let l of A.P) u(l);
|
|
326
|
+
for (let l of A.Q) u(l);
|
|
327
|
+
}
|
|
328
|
+
for (let A of a)
|
|
329
|
+
!S.has(A) && !c.has(A) && S.set(A, Lt);
|
|
330
|
+
Zt = new Set(U(a).concat(U(Gt(a)))), ht = Un(e).map((A) => qn.from(A)).sort(zn), Fe = /* @__PURE__ */ new Map();
|
|
331
|
+
for (let A of ht) {
|
|
332
|
+
let l = [Fe];
|
|
333
|
+
for (let f of A) {
|
|
334
|
+
let d = l.map((h) => {
|
|
335
|
+
let p = h.get(f);
|
|
336
|
+
return p || (p = /* @__PURE__ */ new Map(), h.set(f, p)), p;
|
|
337
|
+
});
|
|
338
|
+
f === Jt ? l.push(...d) : l = d;
|
|
339
|
+
}
|
|
340
|
+
for (let f of l)
|
|
341
|
+
f.V = A;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
function Ge(e) {
|
|
345
|
+
return (Yt(e) ? "" : `${Te(be([e]))} `) + Ft(e);
|
|
346
|
+
}
|
|
347
|
+
function Te(e) {
|
|
348
|
+
return `"${e}"`;
|
|
349
|
+
}
|
|
350
|
+
function $n(e) {
|
|
351
|
+
if (e.length >= 4 && e[2] == pt && e[3] == pt)
|
|
352
|
+
throw new Error(`invalid label extension: "${z(e.slice(0, 4))}"`);
|
|
353
|
+
}
|
|
354
|
+
function _n(e) {
|
|
355
|
+
for (let n = e.lastIndexOf(95); n > 0; )
|
|
356
|
+
if (e[--n] !== 95)
|
|
357
|
+
throw new Error("underscore allowed only at start");
|
|
358
|
+
}
|
|
359
|
+
function er(e) {
|
|
360
|
+
let t = e[0], n = lt.get(t);
|
|
361
|
+
if (n) throw W(`leading ${n}`);
|
|
362
|
+
let r = e.length, o = -1;
|
|
363
|
+
for (let s = 1; s < r; s++) {
|
|
364
|
+
t = e[s];
|
|
365
|
+
let i = lt.get(t);
|
|
366
|
+
if (i) {
|
|
367
|
+
if (o == s) throw W(`${n} + ${i}`);
|
|
368
|
+
o = s + 1, n = i;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
if (o == r) throw W(`trailing ${n}`);
|
|
372
|
+
}
|
|
373
|
+
function be(e, t = Ft) {
|
|
374
|
+
let n = [];
|
|
375
|
+
tr(e[0]) && n.push("◌");
|
|
376
|
+
let r = 0, o = e.length;
|
|
377
|
+
for (let s = 0; s < o; s++) {
|
|
378
|
+
let i = e[s];
|
|
379
|
+
Yt(i) && (n.push(z(e.slice(r, s))), n.push(t(i)), r = s + 1);
|
|
380
|
+
}
|
|
381
|
+
return n.push(z(e.slice(r, o))), n.join("");
|
|
382
|
+
}
|
|
383
|
+
function tr(e) {
|
|
384
|
+
return ze(), P.has(e);
|
|
385
|
+
}
|
|
386
|
+
function Yt(e) {
|
|
387
|
+
return ze(), Kt.has(e);
|
|
388
|
+
}
|
|
389
|
+
function nr(e) {
|
|
390
|
+
return ir(rr(e, Xn, ur));
|
|
391
|
+
}
|
|
392
|
+
function rr(e, t, n) {
|
|
393
|
+
if (!e) return [];
|
|
394
|
+
ze();
|
|
395
|
+
let r = 0;
|
|
396
|
+
return e.split(Tt).map((o) => {
|
|
397
|
+
let s = Hn(o), i = {
|
|
398
|
+
input: s,
|
|
399
|
+
offset: r
|
|
400
|
+
// codepoint, not substring!
|
|
401
|
+
};
|
|
402
|
+
r += s.length + 1;
|
|
403
|
+
try {
|
|
404
|
+
let a = i.tokens = cr(s, t, n), c = a.length, u;
|
|
405
|
+
if (!c)
|
|
406
|
+
throw new Error("empty label");
|
|
407
|
+
let A = i.output = a.flat();
|
|
408
|
+
if (_n(A), !(i.emoji = c > 1 || a[0].is_emoji) && A.every((f) => f < 128))
|
|
409
|
+
$n(A), u = "ASCII";
|
|
410
|
+
else {
|
|
411
|
+
let f = a.flatMap((d) => d.is_emoji ? [] : d);
|
|
412
|
+
if (!f.length)
|
|
413
|
+
u = "Emoji";
|
|
414
|
+
else {
|
|
415
|
+
if (P.has(A[0])) throw W("leading combining mark");
|
|
416
|
+
for (let p = 1; p < c; p++) {
|
|
417
|
+
let w = a[p];
|
|
418
|
+
if (!w.is_emoji && P.has(w[0]))
|
|
419
|
+
throw W(`emoji + combining mark: "${z(a[p - 1])} + ${be([w[0]])}"`);
|
|
420
|
+
}
|
|
421
|
+
er(A);
|
|
422
|
+
let d = U(new Set(f)), [h] = sr(d);
|
|
423
|
+
ar(h, f), or(h, d), u = h.N;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
i.type = u;
|
|
427
|
+
} catch (a) {
|
|
428
|
+
i.error = a;
|
|
429
|
+
}
|
|
430
|
+
return i;
|
|
431
|
+
});
|
|
432
|
+
}
|
|
433
|
+
function or(e, t) {
|
|
434
|
+
let n, r = [];
|
|
435
|
+
for (let o of t) {
|
|
436
|
+
let s = S.get(o);
|
|
437
|
+
if (s === Lt) return;
|
|
438
|
+
if (s) {
|
|
439
|
+
let i = s.M.get(o);
|
|
440
|
+
if (n = n ? n.filter((a) => i.has(a)) : U(i), !n.length) return;
|
|
441
|
+
} else
|
|
442
|
+
r.push(o);
|
|
443
|
+
}
|
|
444
|
+
if (n) {
|
|
445
|
+
for (let o of n)
|
|
446
|
+
if (r.every((s) => ee(o, s)))
|
|
447
|
+
throw new Error(`whole-script confusable: ${e.N}/${o.N}`);
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
function sr(e) {
|
|
451
|
+
let t = j;
|
|
452
|
+
for (let n of e) {
|
|
453
|
+
let r = t.filter((o) => ee(o, n));
|
|
454
|
+
if (!r.length)
|
|
455
|
+
throw j.some((o) => ee(o, n)) ? Xt(t[0], n) : Wt(n);
|
|
456
|
+
if (t = r, r.length == 1) break;
|
|
457
|
+
}
|
|
458
|
+
return t;
|
|
459
|
+
}
|
|
460
|
+
function ir(e) {
|
|
461
|
+
return e.map(({ input: t, error: n, output: r }) => {
|
|
462
|
+
if (n) {
|
|
463
|
+
let o = n.message;
|
|
464
|
+
throw new Error(e.length == 1 ? o : `Invalid label ${Te(be(t))}: ${o}`);
|
|
465
|
+
}
|
|
466
|
+
return z(r);
|
|
467
|
+
}).join(Tt);
|
|
468
|
+
}
|
|
469
|
+
function Wt(e) {
|
|
470
|
+
return new Error(`disallowed character: ${Ge(e)}`);
|
|
471
|
+
}
|
|
472
|
+
function Xt(e, t) {
|
|
473
|
+
let n = Ge(t), r = j.find((o) => o.P.has(t));
|
|
474
|
+
return r && (n = `${r.N} ${n}`), new Error(`illegal mixture: ${e.N} + ${n}`);
|
|
475
|
+
}
|
|
476
|
+
function W(e) {
|
|
477
|
+
return new Error(`illegal placement: ${e}`);
|
|
478
|
+
}
|
|
479
|
+
function ar(e, t) {
|
|
480
|
+
for (let n of t)
|
|
481
|
+
if (!ee(e, n))
|
|
482
|
+
throw Xt(e, n);
|
|
483
|
+
if (e.M) {
|
|
484
|
+
let n = Gt(t);
|
|
485
|
+
for (let r = 1, o = n.length; r < o; r++)
|
|
486
|
+
if (ke.has(n[r])) {
|
|
487
|
+
let s = r + 1;
|
|
488
|
+
for (let i; s < o && ke.has(i = n[s]); s++)
|
|
489
|
+
for (let a = r; a < s; a++)
|
|
490
|
+
if (n[a] == i)
|
|
491
|
+
throw new Error(`duplicate non-spacing marks: ${Ge(i)}`);
|
|
492
|
+
if (s - r > ft)
|
|
493
|
+
throw new Error(`excessive non-spacing marks: ${Te(be(n.slice(r - 1, s)))} (${s - r}/${ft})`);
|
|
494
|
+
r = s;
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
function cr(e, t, n) {
|
|
499
|
+
let r = [], o = [];
|
|
500
|
+
for (e = e.slice().reverse(); e.length; ) {
|
|
501
|
+
let s = Ar(e);
|
|
502
|
+
if (s)
|
|
503
|
+
o.length && (r.push(t(o)), o = []), r.push(n(s));
|
|
504
|
+
else {
|
|
505
|
+
let i = e.pop();
|
|
506
|
+
if (Zt.has(i))
|
|
507
|
+
o.push(i);
|
|
508
|
+
else {
|
|
509
|
+
let a = Oe.get(i);
|
|
510
|
+
if (a)
|
|
511
|
+
o.push(...a);
|
|
512
|
+
else if (!Vt.has(i))
|
|
513
|
+
throw Wt(i);
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
return o.length && r.push(t(o)), r;
|
|
518
|
+
}
|
|
519
|
+
function ur(e) {
|
|
520
|
+
return e.filter((t) => t != Jt);
|
|
521
|
+
}
|
|
522
|
+
function Ar(e, t) {
|
|
523
|
+
let n = Fe, r, o = e.length;
|
|
524
|
+
for (; o && (n = n.get(e[--o]), !!n); ) {
|
|
525
|
+
let { V: s } = n;
|
|
526
|
+
s && (r = s, e.length = o);
|
|
527
|
+
}
|
|
528
|
+
return r;
|
|
529
|
+
}
|
|
530
|
+
function lr(e) {
|
|
531
|
+
return nr(e);
|
|
532
|
+
}
|
|
533
|
+
const gt = [
|
|
534
|
+
{
|
|
535
|
+
inputs: [
|
|
536
|
+
{
|
|
537
|
+
components: [
|
|
538
|
+
{
|
|
539
|
+
name: "target",
|
|
540
|
+
type: "address"
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
name: "allowFailure",
|
|
544
|
+
type: "bool"
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
name: "callData",
|
|
548
|
+
type: "bytes"
|
|
549
|
+
}
|
|
550
|
+
],
|
|
551
|
+
name: "calls",
|
|
552
|
+
type: "tuple[]"
|
|
553
|
+
}
|
|
554
|
+
],
|
|
555
|
+
name: "aggregate3",
|
|
556
|
+
outputs: [
|
|
557
|
+
{
|
|
558
|
+
components: [
|
|
559
|
+
{
|
|
560
|
+
name: "success",
|
|
561
|
+
type: "bool"
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
name: "returnData",
|
|
565
|
+
type: "bytes"
|
|
566
|
+
}
|
|
567
|
+
],
|
|
568
|
+
name: "returnData",
|
|
569
|
+
type: "tuple[]"
|
|
570
|
+
}
|
|
571
|
+
],
|
|
572
|
+
stateMutability: "view",
|
|
573
|
+
type: "function"
|
|
574
|
+
}
|
|
575
|
+
], qt = [
|
|
576
|
+
{
|
|
577
|
+
inputs: [],
|
|
578
|
+
name: "ResolverNotFound",
|
|
579
|
+
type: "error"
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
inputs: [],
|
|
583
|
+
name: "ResolverWildcardNotSupported",
|
|
584
|
+
type: "error"
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
inputs: [],
|
|
588
|
+
name: "ResolverNotContract",
|
|
589
|
+
type: "error"
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
inputs: [
|
|
593
|
+
{
|
|
594
|
+
name: "returnData",
|
|
595
|
+
type: "bytes"
|
|
596
|
+
}
|
|
597
|
+
],
|
|
598
|
+
name: "ResolverError",
|
|
599
|
+
type: "error"
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
inputs: [
|
|
603
|
+
{
|
|
604
|
+
components: [
|
|
605
|
+
{
|
|
606
|
+
name: "status",
|
|
607
|
+
type: "uint16"
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
name: "message",
|
|
611
|
+
type: "string"
|
|
612
|
+
}
|
|
613
|
+
],
|
|
614
|
+
name: "errors",
|
|
615
|
+
type: "tuple[]"
|
|
616
|
+
}
|
|
617
|
+
],
|
|
618
|
+
name: "HttpError",
|
|
619
|
+
type: "error"
|
|
620
|
+
}
|
|
621
|
+
], $t = [
|
|
622
|
+
...qt,
|
|
623
|
+
{
|
|
624
|
+
name: "resolve",
|
|
625
|
+
type: "function",
|
|
626
|
+
stateMutability: "view",
|
|
627
|
+
inputs: [
|
|
628
|
+
{ name: "name", type: "bytes" },
|
|
629
|
+
{ name: "data", type: "bytes" }
|
|
630
|
+
],
|
|
631
|
+
outputs: [
|
|
632
|
+
{ name: "", type: "bytes" },
|
|
633
|
+
{ name: "address", type: "address" }
|
|
634
|
+
]
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
name: "resolve",
|
|
638
|
+
type: "function",
|
|
639
|
+
stateMutability: "view",
|
|
640
|
+
inputs: [
|
|
641
|
+
{ name: "name", type: "bytes" },
|
|
642
|
+
{ name: "data", type: "bytes" },
|
|
643
|
+
{ name: "gateways", type: "string[]" }
|
|
644
|
+
],
|
|
645
|
+
outputs: [
|
|
646
|
+
{ name: "", type: "bytes" },
|
|
647
|
+
{ name: "address", type: "address" }
|
|
648
|
+
]
|
|
649
|
+
}
|
|
650
|
+
], fr = [
|
|
651
|
+
...qt,
|
|
652
|
+
{
|
|
653
|
+
name: "reverse",
|
|
654
|
+
type: "function",
|
|
655
|
+
stateMutability: "view",
|
|
656
|
+
inputs: [{ type: "bytes", name: "reverseName" }],
|
|
657
|
+
outputs: [
|
|
658
|
+
{ type: "string", name: "resolvedName" },
|
|
659
|
+
{ type: "address", name: "resolvedAddress" },
|
|
660
|
+
{ type: "address", name: "reverseResolver" },
|
|
661
|
+
{ type: "address", name: "resolver" }
|
|
662
|
+
]
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
name: "reverse",
|
|
666
|
+
type: "function",
|
|
667
|
+
stateMutability: "view",
|
|
668
|
+
inputs: [
|
|
669
|
+
{ type: "bytes", name: "reverseName" },
|
|
670
|
+
{ type: "string[]", name: "gateways" }
|
|
671
|
+
],
|
|
672
|
+
outputs: [
|
|
673
|
+
{ type: "string", name: "resolvedName" },
|
|
674
|
+
{ type: "address", name: "resolvedAddress" },
|
|
675
|
+
{ type: "address", name: "reverseResolver" },
|
|
676
|
+
{ type: "address", name: "resolver" }
|
|
677
|
+
]
|
|
678
|
+
}
|
|
679
|
+
], wt = [
|
|
680
|
+
{
|
|
681
|
+
name: "text",
|
|
682
|
+
type: "function",
|
|
683
|
+
stateMutability: "view",
|
|
684
|
+
inputs: [
|
|
685
|
+
{ name: "name", type: "bytes32" },
|
|
686
|
+
{ name: "key", type: "string" }
|
|
687
|
+
],
|
|
688
|
+
outputs: [{ name: "", type: "string" }]
|
|
689
|
+
}
|
|
690
|
+
], mt = [
|
|
691
|
+
{
|
|
692
|
+
name: "addr",
|
|
693
|
+
type: "function",
|
|
694
|
+
stateMutability: "view",
|
|
695
|
+
inputs: [{ name: "name", type: "bytes32" }],
|
|
696
|
+
outputs: [{ name: "", type: "address" }]
|
|
697
|
+
},
|
|
698
|
+
{
|
|
699
|
+
name: "addr",
|
|
700
|
+
type: "function",
|
|
701
|
+
stateMutability: "view",
|
|
702
|
+
inputs: [
|
|
703
|
+
{ name: "name", type: "bytes32" },
|
|
704
|
+
{ name: "coinType", type: "uint256" }
|
|
705
|
+
],
|
|
706
|
+
outputs: [{ name: "", type: "bytes" }]
|
|
707
|
+
}
|
|
708
|
+
];
|
|
709
|
+
function T(e, { includeName: t = !1 } = {}) {
|
|
710
|
+
if (e.type !== "function" && e.type !== "event" && e.type !== "error")
|
|
711
|
+
throw new Br(e.type);
|
|
712
|
+
return `${e.name}(${Je(e.inputs, { includeName: t })})`;
|
|
713
|
+
}
|
|
714
|
+
function Je(e, { includeName: t = !1 } = {}) {
|
|
715
|
+
return e ? e.map((n) => dr(n, { includeName: t })).join(t ? ", " : ",") : "";
|
|
716
|
+
}
|
|
717
|
+
function dr(e, { includeName: t }) {
|
|
718
|
+
return e.type.startsWith("tuple") ? `(${Je(e.components, { includeName: t })})${e.type.slice(5)}` : e.type + (t && e.name ? ` ${e.name}` : "");
|
|
719
|
+
}
|
|
720
|
+
class pr extends g {
|
|
721
|
+
constructor({ data: t, params: n, size: r }) {
|
|
722
|
+
super([`Data size of ${r} bytes is too small for given parameters.`].join(`
|
|
723
|
+
`), {
|
|
724
|
+
metaMessages: [
|
|
725
|
+
`Params: (${Je(n, { includeName: !0 })})`,
|
|
726
|
+
`Data: ${t} (${r} bytes)`
|
|
727
|
+
]
|
|
728
|
+
}), Object.defineProperty(this, "name", {
|
|
729
|
+
enumerable: !0,
|
|
730
|
+
configurable: !0,
|
|
731
|
+
writable: !0,
|
|
732
|
+
value: "AbiDecodingDataSizeTooSmallError"
|
|
733
|
+
}), Object.defineProperty(this, "data", {
|
|
734
|
+
enumerable: !0,
|
|
735
|
+
configurable: !0,
|
|
736
|
+
writable: !0,
|
|
737
|
+
value: void 0
|
|
738
|
+
}), Object.defineProperty(this, "params", {
|
|
739
|
+
enumerable: !0,
|
|
740
|
+
configurable: !0,
|
|
741
|
+
writable: !0,
|
|
742
|
+
value: void 0
|
|
743
|
+
}), Object.defineProperty(this, "size", {
|
|
744
|
+
enumerable: !0,
|
|
745
|
+
configurable: !0,
|
|
746
|
+
writable: !0,
|
|
747
|
+
value: void 0
|
|
748
|
+
}), this.data = t, this.params = n, this.size = r;
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
class Le extends g {
|
|
752
|
+
constructor() {
|
|
753
|
+
super('Cannot decode zero data ("0x") with ABI parameters.'), Object.defineProperty(this, "name", {
|
|
754
|
+
enumerable: !0,
|
|
755
|
+
configurable: !0,
|
|
756
|
+
writable: !0,
|
|
757
|
+
value: "AbiDecodingZeroDataError"
|
|
758
|
+
});
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
class hr extends g {
|
|
762
|
+
constructor({ expectedLength: t, givenLength: n, type: r }) {
|
|
763
|
+
super([
|
|
764
|
+
`ABI encoding array length mismatch for type ${r}.`,
|
|
765
|
+
`Expected length: ${t}`,
|
|
766
|
+
`Given length: ${n}`
|
|
767
|
+
].join(`
|
|
768
|
+
`)), Object.defineProperty(this, "name", {
|
|
769
|
+
enumerable: !0,
|
|
770
|
+
configurable: !0,
|
|
771
|
+
writable: !0,
|
|
772
|
+
value: "AbiEncodingArrayLengthMismatchError"
|
|
773
|
+
});
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
class gr extends g {
|
|
777
|
+
constructor({ expectedSize: t, value: n }) {
|
|
778
|
+
super(`Size of bytes "${n}" (bytes${D(n)}) does not match expected size (bytes${t}).`), Object.defineProperty(this, "name", {
|
|
779
|
+
enumerable: !0,
|
|
780
|
+
configurable: !0,
|
|
781
|
+
writable: !0,
|
|
782
|
+
value: "AbiEncodingBytesSizeMismatchError"
|
|
783
|
+
});
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
class wr extends g {
|
|
787
|
+
constructor({ expectedLength: t, givenLength: n }) {
|
|
788
|
+
super([
|
|
789
|
+
"ABI encoding params/values length mismatch.",
|
|
790
|
+
`Expected length (params): ${t}`,
|
|
791
|
+
`Given length (values): ${n}`
|
|
792
|
+
].join(`
|
|
793
|
+
`)), Object.defineProperty(this, "name", {
|
|
794
|
+
enumerable: !0,
|
|
795
|
+
configurable: !0,
|
|
796
|
+
writable: !0,
|
|
797
|
+
value: "AbiEncodingLengthMismatchError"
|
|
798
|
+
});
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
class _t extends g {
|
|
802
|
+
constructor(t, { docsPath: n }) {
|
|
803
|
+
super([
|
|
804
|
+
`Encoded error signature "${t}" not found on ABI.`,
|
|
805
|
+
"Make sure you are using the correct ABI and that the error exists on it.",
|
|
806
|
+
`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${t}.`
|
|
807
|
+
].join(`
|
|
808
|
+
`), {
|
|
809
|
+
docsPath: n
|
|
810
|
+
}), Object.defineProperty(this, "name", {
|
|
811
|
+
enumerable: !0,
|
|
812
|
+
configurable: !0,
|
|
813
|
+
writable: !0,
|
|
814
|
+
value: "AbiErrorSignatureNotFoundError"
|
|
815
|
+
}), Object.defineProperty(this, "signature", {
|
|
816
|
+
enumerable: !0,
|
|
817
|
+
configurable: !0,
|
|
818
|
+
writable: !0,
|
|
819
|
+
value: void 0
|
|
820
|
+
}), this.signature = t;
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
class he extends g {
|
|
824
|
+
constructor(t, { docsPath: n } = {}) {
|
|
825
|
+
super([
|
|
826
|
+
`Function ${t ? `"${t}" ` : ""}not found on ABI.`,
|
|
827
|
+
"Make sure you are using the correct ABI and that the function exists on it."
|
|
828
|
+
].join(`
|
|
829
|
+
`), {
|
|
830
|
+
docsPath: n
|
|
831
|
+
}), Object.defineProperty(this, "name", {
|
|
832
|
+
enumerable: !0,
|
|
833
|
+
configurable: !0,
|
|
834
|
+
writable: !0,
|
|
835
|
+
value: "AbiFunctionNotFoundError"
|
|
836
|
+
});
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
class mr extends g {
|
|
840
|
+
constructor(t, { docsPath: n }) {
|
|
841
|
+
super([
|
|
842
|
+
`Function "${t}" does not contain any \`outputs\` on ABI.`,
|
|
843
|
+
"Cannot decode function result without knowing what the parameter types are.",
|
|
844
|
+
"Make sure you are using the correct ABI and that the function exists on it."
|
|
845
|
+
].join(`
|
|
846
|
+
`), {
|
|
847
|
+
docsPath: n
|
|
848
|
+
}), Object.defineProperty(this, "name", {
|
|
849
|
+
enumerable: !0,
|
|
850
|
+
configurable: !0,
|
|
851
|
+
writable: !0,
|
|
852
|
+
value: "AbiFunctionOutputsNotFoundError"
|
|
853
|
+
});
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
class br extends g {
|
|
857
|
+
constructor(t, n) {
|
|
858
|
+
super("Found ambiguous types in overloaded ABI items.", {
|
|
859
|
+
metaMessages: [
|
|
860
|
+
`\`${t.type}\` in \`${T(t.abiItem)}\`, and`,
|
|
861
|
+
`\`${n.type}\` in \`${T(n.abiItem)}\``,
|
|
862
|
+
"",
|
|
863
|
+
"These types encode differently and cannot be distinguished at runtime.",
|
|
864
|
+
"Remove one of the ambiguous items in the ABI."
|
|
865
|
+
]
|
|
866
|
+
}), Object.defineProperty(this, "name", {
|
|
867
|
+
enumerable: !0,
|
|
868
|
+
configurable: !0,
|
|
869
|
+
writable: !0,
|
|
870
|
+
value: "AbiItemAmbiguityError"
|
|
871
|
+
});
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
class yr extends g {
|
|
875
|
+
constructor(t, { docsPath: n }) {
|
|
876
|
+
super([
|
|
877
|
+
`Type "${t}" is not a valid encoding type.`,
|
|
878
|
+
"Please provide a valid ABI type."
|
|
879
|
+
].join(`
|
|
880
|
+
`), { docsPath: n }), Object.defineProperty(this, "name", {
|
|
881
|
+
enumerable: !0,
|
|
882
|
+
configurable: !0,
|
|
883
|
+
writable: !0,
|
|
884
|
+
value: "InvalidAbiEncodingType"
|
|
885
|
+
});
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
class Er extends g {
|
|
889
|
+
constructor(t, { docsPath: n }) {
|
|
890
|
+
super([
|
|
891
|
+
`Type "${t}" is not a valid decoding type.`,
|
|
892
|
+
"Please provide a valid ABI type."
|
|
893
|
+
].join(`
|
|
894
|
+
`), { docsPath: n }), Object.defineProperty(this, "name", {
|
|
895
|
+
enumerable: !0,
|
|
896
|
+
configurable: !0,
|
|
897
|
+
writable: !0,
|
|
898
|
+
value: "InvalidAbiDecodingType"
|
|
899
|
+
});
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
class Cr extends g {
|
|
903
|
+
constructor(t) {
|
|
904
|
+
super([`Value "${t}" is not a valid array.`].join(`
|
|
905
|
+
`)), Object.defineProperty(this, "name", {
|
|
906
|
+
enumerable: !0,
|
|
907
|
+
configurable: !0,
|
|
908
|
+
writable: !0,
|
|
909
|
+
value: "InvalidArrayError"
|
|
910
|
+
});
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
class Br extends g {
|
|
914
|
+
constructor(t) {
|
|
915
|
+
super([
|
|
916
|
+
`"${t}" is not a valid definition type.`,
|
|
917
|
+
'Valid types: "function", "event", "error"'
|
|
918
|
+
].join(`
|
|
919
|
+
`)), Object.defineProperty(this, "name", {
|
|
920
|
+
enumerable: !0,
|
|
921
|
+
configurable: !0,
|
|
922
|
+
writable: !0,
|
|
923
|
+
value: "InvalidDefinitionTypeError"
|
|
924
|
+
});
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
function Mr(e, t = {}) {
|
|
928
|
+
typeof t.size < "u" && me(e, { size: t.size });
|
|
929
|
+
const n = N(e, t);
|
|
930
|
+
return Cn(n, t);
|
|
931
|
+
}
|
|
932
|
+
function vr(e, t = {}) {
|
|
933
|
+
let n = e;
|
|
934
|
+
if (typeof t.size < "u" && (me(n, { size: t.size }), n = ge(n)), n.length > 1 || n[0] > 1)
|
|
935
|
+
throw new Bn(n);
|
|
936
|
+
return !!n[0];
|
|
937
|
+
}
|
|
938
|
+
function R(e, t = {}) {
|
|
939
|
+
typeof t.size < "u" && me(e, { size: t.size });
|
|
940
|
+
const n = N(e, t);
|
|
941
|
+
return Mn(n, t);
|
|
942
|
+
}
|
|
943
|
+
function Dr(e, t = {}) {
|
|
944
|
+
let n = e;
|
|
945
|
+
return typeof t.size < "u" && (me(n, { size: t.size }), n = ge(n, { dir: "right" })), new TextDecoder().decode(n);
|
|
946
|
+
}
|
|
947
|
+
function Qr(e, t) {
|
|
948
|
+
if (e.length !== t.length)
|
|
949
|
+
throw new wr({
|
|
950
|
+
expectedLength: e.length,
|
|
951
|
+
givenLength: t.length
|
|
952
|
+
});
|
|
953
|
+
const n = Rr({
|
|
954
|
+
params: e,
|
|
955
|
+
values: t
|
|
956
|
+
}), r = Ke(n);
|
|
957
|
+
return r.length === 0 ? "0x" : r;
|
|
958
|
+
}
|
|
959
|
+
function Rr({ params: e, values: t }) {
|
|
960
|
+
const n = [];
|
|
961
|
+
for (let r = 0; r < e.length; r++)
|
|
962
|
+
n.push(Ve({ param: e[r], value: t[r] }));
|
|
963
|
+
return n;
|
|
964
|
+
}
|
|
965
|
+
function Ve({ param: e, value: t }) {
|
|
966
|
+
const n = Ze(e.type);
|
|
967
|
+
if (n) {
|
|
968
|
+
const [r, o] = n;
|
|
969
|
+
return Nr(t, { length: r, param: { ...e, type: o } });
|
|
970
|
+
}
|
|
971
|
+
if (e.type === "tuple")
|
|
972
|
+
return Fr(t, {
|
|
973
|
+
param: e
|
|
974
|
+
});
|
|
975
|
+
if (e.type === "address")
|
|
976
|
+
return Ir(t);
|
|
977
|
+
if (e.type === "bool")
|
|
978
|
+
return xr(t);
|
|
979
|
+
if (e.type.startsWith("uint") || e.type.startsWith("int")) {
|
|
980
|
+
const r = e.type.startsWith("int");
|
|
981
|
+
return Or(t, { signed: r });
|
|
982
|
+
}
|
|
983
|
+
if (e.type.startsWith("bytes"))
|
|
984
|
+
return Pr(t, { param: e });
|
|
985
|
+
if (e.type === "string")
|
|
986
|
+
return kr(t);
|
|
987
|
+
throw new yr(e.type, {
|
|
988
|
+
docsPath: "/docs/contract/encodeAbiParameters"
|
|
989
|
+
});
|
|
990
|
+
}
|
|
991
|
+
function Ke(e) {
|
|
992
|
+
let t = 0;
|
|
993
|
+
for (let s = 0; s < e.length; s++) {
|
|
994
|
+
const { dynamic: i, encoded: a } = e[s];
|
|
995
|
+
i ? t += 32 : t += D(a);
|
|
996
|
+
}
|
|
997
|
+
const n = [], r = [];
|
|
998
|
+
let o = 0;
|
|
999
|
+
for (let s = 0; s < e.length; s++) {
|
|
1000
|
+
const { dynamic: i, encoded: a } = e[s];
|
|
1001
|
+
i ? (n.push(I(t + o, { size: 32 })), r.push(a), o += D(a)) : n.push(a);
|
|
1002
|
+
}
|
|
1003
|
+
return O([...n, ...r]);
|
|
1004
|
+
}
|
|
1005
|
+
function Ir(e) {
|
|
1006
|
+
if (!k(e))
|
|
1007
|
+
throw new ce({ address: e });
|
|
1008
|
+
return { dynamic: !1, encoded: x(e.toLowerCase()) };
|
|
1009
|
+
}
|
|
1010
|
+
function Nr(e, { length: t, param: n }) {
|
|
1011
|
+
const r = t === null;
|
|
1012
|
+
if (!Array.isArray(e))
|
|
1013
|
+
throw new Cr(e);
|
|
1014
|
+
if (!r && e.length !== t)
|
|
1015
|
+
throw new hr({
|
|
1016
|
+
expectedLength: t,
|
|
1017
|
+
givenLength: e.length,
|
|
1018
|
+
type: `${n.type}[${t}]`
|
|
1019
|
+
});
|
|
1020
|
+
let o = !1;
|
|
1021
|
+
const s = [];
|
|
1022
|
+
for (let i = 0; i < e.length; i++) {
|
|
1023
|
+
const a = Ve({ param: n, value: e[i] });
|
|
1024
|
+
a.dynamic && (o = !0), s.push(a);
|
|
1025
|
+
}
|
|
1026
|
+
if (r || o) {
|
|
1027
|
+
const i = Ke(s);
|
|
1028
|
+
if (r) {
|
|
1029
|
+
const a = I(s.length, { size: 32 });
|
|
1030
|
+
return {
|
|
1031
|
+
dynamic: !0,
|
|
1032
|
+
encoded: s.length > 0 ? O([a, i]) : a
|
|
1033
|
+
};
|
|
1034
|
+
}
|
|
1035
|
+
if (o)
|
|
1036
|
+
return { dynamic: !0, encoded: i };
|
|
1037
|
+
}
|
|
1038
|
+
return {
|
|
1039
|
+
dynamic: !1,
|
|
1040
|
+
encoded: O(s.map(({ encoded: i }) => i))
|
|
1041
|
+
};
|
|
1042
|
+
}
|
|
1043
|
+
function Pr(e, { param: t }) {
|
|
1044
|
+
const [, n] = t.type.split("bytes"), r = D(e);
|
|
1045
|
+
if (!n) {
|
|
1046
|
+
let o = e;
|
|
1047
|
+
return r % 32 !== 0 && (o = x(o, {
|
|
1048
|
+
dir: "right",
|
|
1049
|
+
size: Math.ceil((e.length - 2) / 2 / 32) * 32
|
|
1050
|
+
})), {
|
|
1051
|
+
dynamic: !0,
|
|
1052
|
+
encoded: O([x(I(r, { size: 32 })), o])
|
|
1053
|
+
};
|
|
1054
|
+
}
|
|
1055
|
+
if (r !== Number.parseInt(n))
|
|
1056
|
+
throw new gr({
|
|
1057
|
+
expectedSize: Number.parseInt(n),
|
|
1058
|
+
value: e
|
|
1059
|
+
});
|
|
1060
|
+
return { dynamic: !1, encoded: x(e, { dir: "right" }) };
|
|
1061
|
+
}
|
|
1062
|
+
function xr(e) {
|
|
1063
|
+
if (typeof e != "boolean")
|
|
1064
|
+
throw new g(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);
|
|
1065
|
+
return { dynamic: !1, encoded: x(dn(e)) };
|
|
1066
|
+
}
|
|
1067
|
+
function Or(e, { signed: t }) {
|
|
1068
|
+
return {
|
|
1069
|
+
dynamic: !1,
|
|
1070
|
+
encoded: I(e, {
|
|
1071
|
+
size: 32,
|
|
1072
|
+
signed: t
|
|
1073
|
+
})
|
|
1074
|
+
};
|
|
1075
|
+
}
|
|
1076
|
+
function kr(e) {
|
|
1077
|
+
const t = pn(e), n = Math.ceil(D(t) / 32), r = [];
|
|
1078
|
+
for (let o = 0; o < n; o++)
|
|
1079
|
+
r.push(x(ue(t, o * 32, (o + 1) * 32), {
|
|
1080
|
+
dir: "right"
|
|
1081
|
+
}));
|
|
1082
|
+
return {
|
|
1083
|
+
dynamic: !0,
|
|
1084
|
+
encoded: O([
|
|
1085
|
+
x(I(D(t), { size: 32 })),
|
|
1086
|
+
...r
|
|
1087
|
+
])
|
|
1088
|
+
};
|
|
1089
|
+
}
|
|
1090
|
+
function Fr(e, { param: t }) {
|
|
1091
|
+
let n = !1;
|
|
1092
|
+
const r = [];
|
|
1093
|
+
for (let o = 0; o < t.components.length; o++) {
|
|
1094
|
+
const s = t.components[o], i = Array.isArray(e) ? o : s.name, a = Ve({
|
|
1095
|
+
param: s,
|
|
1096
|
+
value: e[i]
|
|
1097
|
+
});
|
|
1098
|
+
r.push(a), a.dynamic && (n = !0);
|
|
1099
|
+
}
|
|
1100
|
+
return {
|
|
1101
|
+
dynamic: n,
|
|
1102
|
+
encoded: n ? Ke(r) : O(r.map(({ encoded: o }) => o))
|
|
1103
|
+
};
|
|
1104
|
+
}
|
|
1105
|
+
function Ze(e) {
|
|
1106
|
+
const t = e.match(/^(.*)\[(\d+)?\]$/);
|
|
1107
|
+
return t ? (
|
|
1108
|
+
// Return `null` if the array is dynamic.
|
|
1109
|
+
[t[2] ? Number(t[2]) : null, t[1]]
|
|
1110
|
+
) : void 0;
|
|
1111
|
+
}
|
|
1112
|
+
function en(e, t) {
|
|
1113
|
+
const n = typeof t == "string" ? gn(t) : t, r = wn(n);
|
|
1114
|
+
if (D(n) === 0 && e.length > 0)
|
|
1115
|
+
throw new Le();
|
|
1116
|
+
if (D(t) && D(t) < 32)
|
|
1117
|
+
throw new pr({
|
|
1118
|
+
data: typeof t == "string" ? t : N(t),
|
|
1119
|
+
params: e,
|
|
1120
|
+
size: D(t)
|
|
1121
|
+
});
|
|
1122
|
+
let o = 0;
|
|
1123
|
+
const s = [];
|
|
1124
|
+
for (let i = 0; i < e.length; ++i) {
|
|
1125
|
+
const a = e[i];
|
|
1126
|
+
r.setPosition(o);
|
|
1127
|
+
const [c, u] = H(r, a, {
|
|
1128
|
+
staticPosition: 0
|
|
1129
|
+
});
|
|
1130
|
+
o += u, s.push(c);
|
|
1131
|
+
}
|
|
1132
|
+
return s;
|
|
1133
|
+
}
|
|
1134
|
+
function H(e, t, { staticPosition: n }) {
|
|
1135
|
+
const r = Ze(t.type);
|
|
1136
|
+
if (r) {
|
|
1137
|
+
const [o, s] = r;
|
|
1138
|
+
return Ur(e, { ...t, type: s }, { length: o, staticPosition: n });
|
|
1139
|
+
}
|
|
1140
|
+
if (t.type === "tuple")
|
|
1141
|
+
return Gr(e, t, { staticPosition: n });
|
|
1142
|
+
if (t.type === "address")
|
|
1143
|
+
return Sr(e);
|
|
1144
|
+
if (t.type === "bool")
|
|
1145
|
+
return jr(e);
|
|
1146
|
+
if (t.type.startsWith("bytes"))
|
|
1147
|
+
return Hr(e, t, { staticPosition: n });
|
|
1148
|
+
if (t.type.startsWith("uint") || t.type.startsWith("int"))
|
|
1149
|
+
return zr(e, t);
|
|
1150
|
+
if (t.type === "string")
|
|
1151
|
+
return Tr(e, { staticPosition: n });
|
|
1152
|
+
throw new Er(t.type, {
|
|
1153
|
+
docsPath: "/docs/contract/decodeAbiParameters"
|
|
1154
|
+
});
|
|
1155
|
+
}
|
|
1156
|
+
const bt = 32, Se = 32;
|
|
1157
|
+
function Sr(e) {
|
|
1158
|
+
const t = e.readBytes(32);
|
|
1159
|
+
return [mn(N(bn(t, -20))), 32];
|
|
1160
|
+
}
|
|
1161
|
+
function Ur(e, t, { length: n, staticPosition: r }) {
|
|
1162
|
+
if (!n) {
|
|
1163
|
+
const i = R(e.readBytes(Se)), a = r + i, c = a + bt;
|
|
1164
|
+
e.setPosition(a);
|
|
1165
|
+
const u = R(e.readBytes(bt)), A = te(t);
|
|
1166
|
+
let l = 0;
|
|
1167
|
+
const f = [];
|
|
1168
|
+
for (let d = 0; d < u; ++d) {
|
|
1169
|
+
e.setPosition(c + (A ? d * 32 : l));
|
|
1170
|
+
const [h, p] = H(e, t, {
|
|
1171
|
+
staticPosition: c
|
|
1172
|
+
});
|
|
1173
|
+
l += p, f.push(h);
|
|
1174
|
+
}
|
|
1175
|
+
return e.setPosition(r + 32), [f, 32];
|
|
1176
|
+
}
|
|
1177
|
+
if (te(t)) {
|
|
1178
|
+
const i = R(e.readBytes(Se)), a = r + i, c = [];
|
|
1179
|
+
for (let u = 0; u < n; ++u) {
|
|
1180
|
+
e.setPosition(a + u * 32);
|
|
1181
|
+
const [A] = H(e, t, {
|
|
1182
|
+
staticPosition: a
|
|
1183
|
+
});
|
|
1184
|
+
c.push(A);
|
|
1185
|
+
}
|
|
1186
|
+
return e.setPosition(r + 32), [c, 32];
|
|
1187
|
+
}
|
|
1188
|
+
let o = 0;
|
|
1189
|
+
const s = [];
|
|
1190
|
+
for (let i = 0; i < n; ++i) {
|
|
1191
|
+
const [a, c] = H(e, t, {
|
|
1192
|
+
staticPosition: r + o
|
|
1193
|
+
});
|
|
1194
|
+
o += c, s.push(a);
|
|
1195
|
+
}
|
|
1196
|
+
return [s, o];
|
|
1197
|
+
}
|
|
1198
|
+
function jr(e) {
|
|
1199
|
+
return [vr(e.readBytes(32), { size: 32 }), 32];
|
|
1200
|
+
}
|
|
1201
|
+
function Hr(e, t, { staticPosition: n }) {
|
|
1202
|
+
const [r, o] = t.type.split("bytes");
|
|
1203
|
+
if (!o) {
|
|
1204
|
+
const i = R(e.readBytes(32));
|
|
1205
|
+
e.setPosition(n + i);
|
|
1206
|
+
const a = R(e.readBytes(32));
|
|
1207
|
+
if (a === 0)
|
|
1208
|
+
return e.setPosition(n + 32), ["0x", 32];
|
|
1209
|
+
const c = e.readBytes(a);
|
|
1210
|
+
return e.setPosition(n + 32), [N(c), 32];
|
|
1211
|
+
}
|
|
1212
|
+
return [N(e.readBytes(Number.parseInt(o), 32)), 32];
|
|
1213
|
+
}
|
|
1214
|
+
function zr(e, t) {
|
|
1215
|
+
const n = t.type.startsWith("int"), r = Number.parseInt(t.type.split("int")[1] || "256"), o = e.readBytes(32);
|
|
1216
|
+
return [
|
|
1217
|
+
r > 48 ? Mr(o, { signed: n }) : R(o, { signed: n }),
|
|
1218
|
+
32
|
|
1219
|
+
];
|
|
1220
|
+
}
|
|
1221
|
+
function Gr(e, t, { staticPosition: n }) {
|
|
1222
|
+
const r = t.components.length === 0 || t.components.some(({ name: i }) => !i), o = r ? [] : {};
|
|
1223
|
+
let s = 0;
|
|
1224
|
+
if (te(t)) {
|
|
1225
|
+
const i = R(e.readBytes(Se)), a = n + i;
|
|
1226
|
+
for (let c = 0; c < t.components.length; ++c) {
|
|
1227
|
+
const u = t.components[c];
|
|
1228
|
+
e.setPosition(a + s);
|
|
1229
|
+
const [A, l] = H(e, u, {
|
|
1230
|
+
staticPosition: a
|
|
1231
|
+
});
|
|
1232
|
+
s += l, o[r ? c : u == null ? void 0 : u.name] = A;
|
|
1233
|
+
}
|
|
1234
|
+
return e.setPosition(n + 32), [o, 32];
|
|
1235
|
+
}
|
|
1236
|
+
for (let i = 0; i < t.components.length; ++i) {
|
|
1237
|
+
const a = t.components[i], [c, u] = H(e, a, {
|
|
1238
|
+
staticPosition: n
|
|
1239
|
+
});
|
|
1240
|
+
o[r ? i : a == null ? void 0 : a.name] = c, s += u;
|
|
1241
|
+
}
|
|
1242
|
+
return [o, s];
|
|
1243
|
+
}
|
|
1244
|
+
function Tr(e, { staticPosition: t }) {
|
|
1245
|
+
const n = R(e.readBytes(32)), r = t + n;
|
|
1246
|
+
e.setPosition(r);
|
|
1247
|
+
const o = R(e.readBytes(32));
|
|
1248
|
+
if (o === 0)
|
|
1249
|
+
return e.setPosition(t + 32), ["", 32];
|
|
1250
|
+
const s = e.readBytes(o, 32), i = Dr(ge(s));
|
|
1251
|
+
return e.setPosition(t + 32), [i, 32];
|
|
1252
|
+
}
|
|
1253
|
+
function te(e) {
|
|
1254
|
+
var r;
|
|
1255
|
+
const { type: t } = e;
|
|
1256
|
+
if (t === "string" || t === "bytes" || t.endsWith("[]"))
|
|
1257
|
+
return !0;
|
|
1258
|
+
if (t === "tuple")
|
|
1259
|
+
return (r = e.components) == null ? void 0 : r.some(te);
|
|
1260
|
+
const n = Ze(e.type);
|
|
1261
|
+
return !!(n && te({ ...e, type: n[1] }));
|
|
1262
|
+
}
|
|
1263
|
+
const Jr = (e) => Ae(Qt(e));
|
|
1264
|
+
function Lr(e) {
|
|
1265
|
+
return Jr(e);
|
|
1266
|
+
}
|
|
1267
|
+
function Vr(e, t) {
|
|
1268
|
+
const n = e.exec(t);
|
|
1269
|
+
return n == null ? void 0 : n.groups;
|
|
1270
|
+
}
|
|
1271
|
+
const yt = /^tuple(?<array>(\[(\d*)\])*)$/;
|
|
1272
|
+
function Ue(e) {
|
|
1273
|
+
let t = e.type;
|
|
1274
|
+
if (yt.test(e.type) && "components" in e) {
|
|
1275
|
+
t = "(";
|
|
1276
|
+
const n = e.components.length;
|
|
1277
|
+
for (let o = 0; o < n; o++) {
|
|
1278
|
+
const s = e.components[o];
|
|
1279
|
+
t += Ue(s), o < n - 1 && (t += ", ");
|
|
1280
|
+
}
|
|
1281
|
+
const r = Vr(yt, e.type);
|
|
1282
|
+
return t += `)${(r == null ? void 0 : r.array) ?? ""}`, Ue({
|
|
1283
|
+
...e,
|
|
1284
|
+
type: t
|
|
1285
|
+
});
|
|
1286
|
+
}
|
|
1287
|
+
return "indexed" in e && e.indexed && (t = `${t} indexed`), e.name ? `${t} ${e.name}` : t;
|
|
1288
|
+
}
|
|
1289
|
+
function V(e) {
|
|
1290
|
+
let t = "";
|
|
1291
|
+
const n = e.length;
|
|
1292
|
+
for (let r = 0; r < n; r++) {
|
|
1293
|
+
const o = e[r];
|
|
1294
|
+
t += Ue(o), r !== n - 1 && (t += ", ");
|
|
1295
|
+
}
|
|
1296
|
+
return t;
|
|
1297
|
+
}
|
|
1298
|
+
function Kr(e) {
|
|
1299
|
+
return e.type === "function" ? `function ${e.name}(${V(e.inputs)})${e.stateMutability && e.stateMutability !== "nonpayable" ? ` ${e.stateMutability}` : ""}${e.outputs.length ? ` returns (${V(e.outputs)})` : ""}` : e.type === "event" ? `event ${e.name}(${V(e.inputs)})` : e.type === "error" ? `error ${e.name}(${V(e.inputs)})` : e.type === "constructor" ? `constructor(${V(e.inputs)})${e.stateMutability === "payable" ? " payable" : ""}` : e.type === "fallback" ? "fallback()" : "receive() external payable";
|
|
1300
|
+
}
|
|
1301
|
+
function Zr(e) {
|
|
1302
|
+
let t = !0, n = "", r = 0, o = "", s = !1;
|
|
1303
|
+
for (let i = 0; i < e.length; i++) {
|
|
1304
|
+
const a = e[i];
|
|
1305
|
+
if (["(", ")", ","].includes(a) && (t = !0), a === "(" && r++, a === ")" && r--, !!t) {
|
|
1306
|
+
if (r === 0) {
|
|
1307
|
+
if (a === " " && ["event", "function", ""].includes(o))
|
|
1308
|
+
o = "";
|
|
1309
|
+
else if (o += a, a === ")") {
|
|
1310
|
+
s = !0;
|
|
1311
|
+
break;
|
|
1312
|
+
}
|
|
1313
|
+
continue;
|
|
1314
|
+
}
|
|
1315
|
+
if (a === " ") {
|
|
1316
|
+
e[i - 1] !== "," && n !== "," && n !== ",(" && (n = "", t = !1);
|
|
1317
|
+
continue;
|
|
1318
|
+
}
|
|
1319
|
+
o += a, n += a;
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
if (!s)
|
|
1323
|
+
throw new g("Unable to normalize signature.");
|
|
1324
|
+
return o;
|
|
1325
|
+
}
|
|
1326
|
+
const Yr = (e) => {
|
|
1327
|
+
const t = typeof e == "string" ? e : Kr(e);
|
|
1328
|
+
return Zr(t);
|
|
1329
|
+
};
|
|
1330
|
+
function tn(e) {
|
|
1331
|
+
return Lr(Yr(e));
|
|
1332
|
+
}
|
|
1333
|
+
const Wr = tn, Ye = (e) => ue(tn(e), 0, 4);
|
|
1334
|
+
function We(e) {
|
|
1335
|
+
const { abi: t, args: n = [], name: r } = e, o = It(r, { strict: !1 }), s = t.filter((a) => o ? a.type === "function" ? Ye(a) === r : a.type === "event" ? Wr(a) === r : !1 : "name" in a && a.name === r);
|
|
1336
|
+
if (s.length === 0)
|
|
1337
|
+
return;
|
|
1338
|
+
if (s.length === 1)
|
|
1339
|
+
return s[0];
|
|
1340
|
+
let i;
|
|
1341
|
+
for (const a of s) {
|
|
1342
|
+
if (!("inputs" in a))
|
|
1343
|
+
continue;
|
|
1344
|
+
if (!n || n.length === 0) {
|
|
1345
|
+
if (!a.inputs || a.inputs.length === 0)
|
|
1346
|
+
return a;
|
|
1347
|
+
continue;
|
|
1348
|
+
}
|
|
1349
|
+
if (!a.inputs || a.inputs.length === 0 || a.inputs.length !== n.length)
|
|
1350
|
+
continue;
|
|
1351
|
+
if (n.every((u, A) => {
|
|
1352
|
+
const l = "inputs" in a && a.inputs[A];
|
|
1353
|
+
return l ? je(u, l) : !1;
|
|
1354
|
+
})) {
|
|
1355
|
+
if (i && "inputs" in i && i.inputs) {
|
|
1356
|
+
const u = nn(a.inputs, i.inputs, n);
|
|
1357
|
+
if (u)
|
|
1358
|
+
throw new br({
|
|
1359
|
+
abiItem: a,
|
|
1360
|
+
type: u[0]
|
|
1361
|
+
}, {
|
|
1362
|
+
abiItem: i,
|
|
1363
|
+
type: u[1]
|
|
1364
|
+
});
|
|
1365
|
+
}
|
|
1366
|
+
i = a;
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1369
|
+
return i || s[0];
|
|
1370
|
+
}
|
|
1371
|
+
function je(e, t) {
|
|
1372
|
+
const n = typeof e, r = t.type;
|
|
1373
|
+
switch (r) {
|
|
1374
|
+
case "address":
|
|
1375
|
+
return k(e, { strict: !1 });
|
|
1376
|
+
case "bool":
|
|
1377
|
+
return n === "boolean";
|
|
1378
|
+
case "function":
|
|
1379
|
+
return n === "string";
|
|
1380
|
+
case "string":
|
|
1381
|
+
return n === "string";
|
|
1382
|
+
default:
|
|
1383
|
+
return r === "tuple" && "components" in t ? Object.values(t.components).every((o, s) => je(Object.values(e)[s], o)) : /^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r) ? n === "number" || n === "bigint" : /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r) ? n === "string" || e instanceof Uint8Array : /[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r) ? Array.isArray(e) && e.every((o) => je(o, {
|
|
1384
|
+
...t,
|
|
1385
|
+
// Pop off `[]` or `[M]` from end of type
|
|
1386
|
+
type: r.replace(/(\[[0-9]{0,}\])$/, "")
|
|
1387
|
+
})) : !1;
|
|
1388
|
+
}
|
|
1389
|
+
}
|
|
1390
|
+
function nn(e, t, n) {
|
|
1391
|
+
for (const r in e) {
|
|
1392
|
+
const o = e[r], s = t[r];
|
|
1393
|
+
if (o.type === "tuple" && s.type === "tuple" && "components" in o && "components" in s)
|
|
1394
|
+
return nn(o.components, s.components, n[r]);
|
|
1395
|
+
const i = [o.type, s.type];
|
|
1396
|
+
if (i.includes("address") && i.includes("bytes20") ? !0 : i.includes("address") && i.includes("string") ? k(n[r], { strict: !1 }) : i.includes("address") && i.includes("bytes") ? k(n[r], { strict: !1 }) : !1)
|
|
1397
|
+
return i;
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
const De = "/docs/contract/decodeFunctionResult";
|
|
1401
|
+
function ye(e) {
|
|
1402
|
+
const { abi: t, args: n, functionName: r, data: o } = e;
|
|
1403
|
+
let s = t[0];
|
|
1404
|
+
if (r) {
|
|
1405
|
+
const a = We({ abi: t, args: n, name: r });
|
|
1406
|
+
if (!a)
|
|
1407
|
+
throw new he(r, { docsPath: De });
|
|
1408
|
+
s = a;
|
|
1409
|
+
}
|
|
1410
|
+
if (s.type !== "function")
|
|
1411
|
+
throw new he(void 0, { docsPath: De });
|
|
1412
|
+
if (!s.outputs)
|
|
1413
|
+
throw new mr(s.name, { docsPath: De });
|
|
1414
|
+
const i = en(s.outputs, o);
|
|
1415
|
+
if (i && i.length > 1)
|
|
1416
|
+
return i;
|
|
1417
|
+
if (i && i.length === 1)
|
|
1418
|
+
return i[0];
|
|
1419
|
+
}
|
|
1420
|
+
const Et = "/docs/contract/encodeFunctionData";
|
|
1421
|
+
function Xr(e) {
|
|
1422
|
+
const { abi: t, args: n, functionName: r } = e;
|
|
1423
|
+
let o = t[0];
|
|
1424
|
+
if (r) {
|
|
1425
|
+
const s = We({
|
|
1426
|
+
abi: t,
|
|
1427
|
+
args: n,
|
|
1428
|
+
name: r
|
|
1429
|
+
});
|
|
1430
|
+
if (!s)
|
|
1431
|
+
throw new he(r, { docsPath: Et });
|
|
1432
|
+
o = s;
|
|
1433
|
+
}
|
|
1434
|
+
if (o.type !== "function")
|
|
1435
|
+
throw new he(void 0, { docsPath: Et });
|
|
1436
|
+
return {
|
|
1437
|
+
abi: [o],
|
|
1438
|
+
functionName: Ye(T(o))
|
|
1439
|
+
};
|
|
1440
|
+
}
|
|
1441
|
+
function Ee(e) {
|
|
1442
|
+
const { args: t } = e, { abi: n, functionName: r } = (() => {
|
|
1443
|
+
var a;
|
|
1444
|
+
return e.abi.length === 1 && ((a = e.functionName) != null && a.startsWith("0x")) ? e : Xr(e);
|
|
1445
|
+
})(), o = n[0], s = r, i = "inputs" in o && o.inputs ? Qr(o.inputs, t ?? []) : void 0;
|
|
1446
|
+
return yn([s, i ?? "0x"]);
|
|
1447
|
+
}
|
|
1448
|
+
function ne({ blockNumber: e, chain: t, contract: n }) {
|
|
1449
|
+
var o;
|
|
1450
|
+
const r = (o = t == null ? void 0 : t.contracts) == null ? void 0 : o[n];
|
|
1451
|
+
if (!r)
|
|
1452
|
+
throw new Re({
|
|
1453
|
+
chain: t,
|
|
1454
|
+
contract: { name: n }
|
|
1455
|
+
});
|
|
1456
|
+
if (e && r.blockCreated && r.blockCreated > e)
|
|
1457
|
+
throw new Re({
|
|
1458
|
+
blockNumber: e,
|
|
1459
|
+
chain: t,
|
|
1460
|
+
contract: {
|
|
1461
|
+
name: n,
|
|
1462
|
+
blockCreated: r.blockCreated
|
|
1463
|
+
}
|
|
1464
|
+
});
|
|
1465
|
+
return r.address;
|
|
1466
|
+
}
|
|
1467
|
+
const rn = {
|
|
1468
|
+
1: "An `assert` condition failed.",
|
|
1469
|
+
17: "Arithmetic operation resulted in underflow or overflow.",
|
|
1470
|
+
18: "Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",
|
|
1471
|
+
33: "Attempted to convert to an invalid type.",
|
|
1472
|
+
34: "Attempted to access a storage byte array that is incorrectly encoded.",
|
|
1473
|
+
49: "Performed `.pop()` on an empty array",
|
|
1474
|
+
50: "Array index is out of bounds.",
|
|
1475
|
+
65: "Allocated too much memory or created an array which is too large.",
|
|
1476
|
+
81: "Attempted to call a zero-initialized variable of internal function type."
|
|
1477
|
+
}, qr = {
|
|
1478
|
+
inputs: [
|
|
1479
|
+
{
|
|
1480
|
+
name: "message",
|
|
1481
|
+
type: "string"
|
|
1482
|
+
}
|
|
1483
|
+
],
|
|
1484
|
+
name: "Error",
|
|
1485
|
+
type: "error"
|
|
1486
|
+
}, $r = {
|
|
1487
|
+
inputs: [
|
|
1488
|
+
{
|
|
1489
|
+
name: "reason",
|
|
1490
|
+
type: "uint256"
|
|
1491
|
+
}
|
|
1492
|
+
],
|
|
1493
|
+
name: "Panic",
|
|
1494
|
+
type: "error"
|
|
1495
|
+
};
|
|
1496
|
+
function Xe(e) {
|
|
1497
|
+
return typeof e == "string" ? { address: e, type: "json-rpc" } : e;
|
|
1498
|
+
}
|
|
1499
|
+
function _r(e) {
|
|
1500
|
+
const { abi: t, data: n } = e, r = ue(n, 0, 4);
|
|
1501
|
+
if (r === "0x")
|
|
1502
|
+
throw new Le();
|
|
1503
|
+
const s = [...t || [], qr, $r].find((i) => i.type === "error" && r === Ye(T(i)));
|
|
1504
|
+
if (!s)
|
|
1505
|
+
throw new _t(r, {
|
|
1506
|
+
docsPath: "/docs/contract/decodeErrorResult"
|
|
1507
|
+
});
|
|
1508
|
+
return {
|
|
1509
|
+
abiItem: s,
|
|
1510
|
+
args: "inputs" in s && s.inputs && s.inputs.length > 0 ? en(s.inputs, ue(n, 4)) : void 0,
|
|
1511
|
+
errorName: s.name
|
|
1512
|
+
};
|
|
1513
|
+
}
|
|
1514
|
+
const qe = (e, t, n) => JSON.stringify(e, (r, o) => {
|
|
1515
|
+
const s = typeof o == "bigint" ? o.toString() : o;
|
|
1516
|
+
return typeof t == "function" ? t(r, s) : s;
|
|
1517
|
+
}, n);
|
|
1518
|
+
function on({ abiItem: e, args: t, includeFunctionName: n = !0, includeName: r = !1 }) {
|
|
1519
|
+
if ("name" in e && "inputs" in e && e.inputs)
|
|
1520
|
+
return `${n ? e.name : ""}(${e.inputs.map((o, s) => `${r && o.name ? `${o.name}: ` : ""}${typeof t[s] == "object" ? qe(t[s]) : t[s]}`).join(", ")})`;
|
|
1521
|
+
}
|
|
1522
|
+
class eo extends g {
|
|
1523
|
+
constructor({ address: t }) {
|
|
1524
|
+
super(`State for account "${t}" is set multiple times.`), Object.defineProperty(this, "name", {
|
|
1525
|
+
enumerable: !0,
|
|
1526
|
+
configurable: !0,
|
|
1527
|
+
writable: !0,
|
|
1528
|
+
value: "AccountStateConflictError"
|
|
1529
|
+
});
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
class to extends g {
|
|
1533
|
+
constructor() {
|
|
1534
|
+
super("state and stateDiff are set on the same account."), Object.defineProperty(this, "name", {
|
|
1535
|
+
enumerable: !0,
|
|
1536
|
+
configurable: !0,
|
|
1537
|
+
writable: !0,
|
|
1538
|
+
value: "StateAssignmentConflictError"
|
|
1539
|
+
});
|
|
1540
|
+
}
|
|
1541
|
+
}
|
|
1542
|
+
function Ct(e) {
|
|
1543
|
+
return e.reduce((t, { slot: n, value: r }) => `${t} ${n}: ${r}
|
|
1544
|
+
`, "");
|
|
1545
|
+
}
|
|
1546
|
+
function no(e) {
|
|
1547
|
+
return e.reduce((t, { address: n, ...r }) => {
|
|
1548
|
+
let o = `${t} ${n}:
|
|
1549
|
+
`;
|
|
1550
|
+
return r.nonce && (o += ` nonce: ${r.nonce}
|
|
1551
|
+
`), r.balance && (o += ` balance: ${r.balance}
|
|
1552
|
+
`), r.code && (o += ` code: ${r.code}
|
|
1553
|
+
`), r.state && (o += ` state:
|
|
1554
|
+
`, o += Ct(r.state)), r.stateDiff && (o += ` stateDiff:
|
|
1555
|
+
`, o += Ct(r.stateDiff)), o;
|
|
1556
|
+
}, ` State Override:
|
|
1557
|
+
`).slice(0, -1);
|
|
1558
|
+
}
|
|
1559
|
+
class ro extends g {
|
|
1560
|
+
constructor(t, { account: n, docsPath: r, chain: o, data: s, gas: i, gasPrice: a, maxFeePerGas: c, maxPriorityFeePerGas: u, nonce: A, to: l, value: f, stateOverride: d }) {
|
|
1561
|
+
var w;
|
|
1562
|
+
const h = n ? Xe(n) : void 0;
|
|
1563
|
+
let p = Nt({
|
|
1564
|
+
from: h == null ? void 0 : h.address,
|
|
1565
|
+
to: l,
|
|
1566
|
+
value: typeof f < "u" && `${Rn(f)} ${((w = o == null ? void 0 : o.nativeCurrency) == null ? void 0 : w.symbol) || "ETH"}`,
|
|
1567
|
+
data: s,
|
|
1568
|
+
gas: i,
|
|
1569
|
+
gasPrice: typeof a < "u" && `${Me(a)} gwei`,
|
|
1570
|
+
maxFeePerGas: typeof c < "u" && `${Me(c)} gwei`,
|
|
1571
|
+
maxPriorityFeePerGas: typeof u < "u" && `${Me(u)} gwei`,
|
|
1572
|
+
nonce: A
|
|
1573
|
+
});
|
|
1574
|
+
d && (p += `
|
|
1575
|
+
${no(d)}`), super(t.shortMessage, {
|
|
1576
|
+
cause: t,
|
|
1577
|
+
docsPath: r,
|
|
1578
|
+
metaMessages: [
|
|
1579
|
+
...t.metaMessages ? [...t.metaMessages, " "] : [],
|
|
1580
|
+
"Raw Call Arguments:",
|
|
1581
|
+
p
|
|
1582
|
+
].filter(Boolean)
|
|
1583
|
+
}), Object.defineProperty(this, "cause", {
|
|
1584
|
+
enumerable: !0,
|
|
1585
|
+
configurable: !0,
|
|
1586
|
+
writable: !0,
|
|
1587
|
+
value: void 0
|
|
1588
|
+
}), Object.defineProperty(this, "name", {
|
|
1589
|
+
enumerable: !0,
|
|
1590
|
+
configurable: !0,
|
|
1591
|
+
writable: !0,
|
|
1592
|
+
value: "CallExecutionError"
|
|
1593
|
+
}), this.cause = t;
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
class oo extends g {
|
|
1597
|
+
constructor(t, { abi: n, args: r, contractAddress: o, docsPath: s, functionName: i, sender: a }) {
|
|
1598
|
+
const c = We({ abi: n, args: r, name: i }), u = c ? on({
|
|
1599
|
+
abiItem: c,
|
|
1600
|
+
args: r,
|
|
1601
|
+
includeFunctionName: !1,
|
|
1602
|
+
includeName: !1
|
|
1603
|
+
}) : void 0, A = c ? T(c, { includeName: !0 }) : void 0, l = Nt({
|
|
1604
|
+
address: o && Qn(o),
|
|
1605
|
+
function: A,
|
|
1606
|
+
args: u && u !== "()" && `${[...Array((i == null ? void 0 : i.length) ?? 0).keys()].map(() => " ").join("")}${u}`,
|
|
1607
|
+
sender: a
|
|
1608
|
+
});
|
|
1609
|
+
super(t.shortMessage || `An unknown error occurred while executing the contract function "${i}".`, {
|
|
1610
|
+
cause: t,
|
|
1611
|
+
docsPath: s,
|
|
1612
|
+
metaMessages: [
|
|
1613
|
+
...t.metaMessages ? [...t.metaMessages, " "] : [],
|
|
1614
|
+
"Contract Call:",
|
|
1615
|
+
l
|
|
1616
|
+
].filter(Boolean)
|
|
1617
|
+
}), Object.defineProperty(this, "abi", {
|
|
1618
|
+
enumerable: !0,
|
|
1619
|
+
configurable: !0,
|
|
1620
|
+
writable: !0,
|
|
1621
|
+
value: void 0
|
|
1622
|
+
}), Object.defineProperty(this, "args", {
|
|
1623
|
+
enumerable: !0,
|
|
1624
|
+
configurable: !0,
|
|
1625
|
+
writable: !0,
|
|
1626
|
+
value: void 0
|
|
1627
|
+
}), Object.defineProperty(this, "cause", {
|
|
1628
|
+
enumerable: !0,
|
|
1629
|
+
configurable: !0,
|
|
1630
|
+
writable: !0,
|
|
1631
|
+
value: void 0
|
|
1632
|
+
}), Object.defineProperty(this, "contractAddress", {
|
|
1633
|
+
enumerable: !0,
|
|
1634
|
+
configurable: !0,
|
|
1635
|
+
writable: !0,
|
|
1636
|
+
value: void 0
|
|
1637
|
+
}), Object.defineProperty(this, "formattedArgs", {
|
|
1638
|
+
enumerable: !0,
|
|
1639
|
+
configurable: !0,
|
|
1640
|
+
writable: !0,
|
|
1641
|
+
value: void 0
|
|
1642
|
+
}), Object.defineProperty(this, "functionName", {
|
|
1643
|
+
enumerable: !0,
|
|
1644
|
+
configurable: !0,
|
|
1645
|
+
writable: !0,
|
|
1646
|
+
value: void 0
|
|
1647
|
+
}), Object.defineProperty(this, "sender", {
|
|
1648
|
+
enumerable: !0,
|
|
1649
|
+
configurable: !0,
|
|
1650
|
+
writable: !0,
|
|
1651
|
+
value: void 0
|
|
1652
|
+
}), Object.defineProperty(this, "name", {
|
|
1653
|
+
enumerable: !0,
|
|
1654
|
+
configurable: !0,
|
|
1655
|
+
writable: !0,
|
|
1656
|
+
value: "ContractFunctionExecutionError"
|
|
1657
|
+
}), this.abi = n, this.args = r, this.cause = t, this.contractAddress = o, this.functionName = i, this.sender = a;
|
|
1658
|
+
}
|
|
1659
|
+
}
|
|
1660
|
+
class He extends g {
|
|
1661
|
+
constructor({ abi: t, data: n, functionName: r, message: o }) {
|
|
1662
|
+
let s, i, a, c;
|
|
1663
|
+
if (n && n !== "0x")
|
|
1664
|
+
try {
|
|
1665
|
+
i = _r({ abi: t, data: n });
|
|
1666
|
+
const { abiItem: A, errorName: l, args: f } = i;
|
|
1667
|
+
if (l === "Error")
|
|
1668
|
+
c = f[0];
|
|
1669
|
+
else if (l === "Panic") {
|
|
1670
|
+
const [d] = f;
|
|
1671
|
+
c = rn[d];
|
|
1672
|
+
} else {
|
|
1673
|
+
const d = A ? T(A, { includeName: !0 }) : void 0, h = A && f ? on({
|
|
1674
|
+
abiItem: A,
|
|
1675
|
+
args: f,
|
|
1676
|
+
includeFunctionName: !1,
|
|
1677
|
+
includeName: !1
|
|
1678
|
+
}) : void 0;
|
|
1679
|
+
a = [
|
|
1680
|
+
d ? `Error: ${d}` : "",
|
|
1681
|
+
h && h !== "()" ? ` ${[...Array((l == null ? void 0 : l.length) ?? 0).keys()].map(() => " ").join("")}${h}` : ""
|
|
1682
|
+
];
|
|
1683
|
+
}
|
|
1684
|
+
} catch (A) {
|
|
1685
|
+
s = A;
|
|
1686
|
+
}
|
|
1687
|
+
else o && (c = o);
|
|
1688
|
+
let u;
|
|
1689
|
+
s instanceof _t && (u = s.signature, a = [
|
|
1690
|
+
`Unable to decode signature "${u}" as it was not found on the provided ABI.`,
|
|
1691
|
+
"Make sure you are using the correct ABI and that the error exists on it.",
|
|
1692
|
+
`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${u}.`
|
|
1693
|
+
]), super(c && c !== "execution reverted" || u ? [
|
|
1694
|
+
`The contract function "${r}" reverted with the following ${u ? "signature" : "reason"}:`,
|
|
1695
|
+
c || u
|
|
1696
|
+
].join(`
|
|
1697
|
+
`) : `The contract function "${r}" reverted.`, {
|
|
1698
|
+
cause: s,
|
|
1699
|
+
metaMessages: a
|
|
1700
|
+
}), Object.defineProperty(this, "name", {
|
|
1701
|
+
enumerable: !0,
|
|
1702
|
+
configurable: !0,
|
|
1703
|
+
writable: !0,
|
|
1704
|
+
value: "ContractFunctionRevertedError"
|
|
1705
|
+
}), Object.defineProperty(this, "data", {
|
|
1706
|
+
enumerable: !0,
|
|
1707
|
+
configurable: !0,
|
|
1708
|
+
writable: !0,
|
|
1709
|
+
value: void 0
|
|
1710
|
+
}), Object.defineProperty(this, "reason", {
|
|
1711
|
+
enumerable: !0,
|
|
1712
|
+
configurable: !0,
|
|
1713
|
+
writable: !0,
|
|
1714
|
+
value: void 0
|
|
1715
|
+
}), Object.defineProperty(this, "signature", {
|
|
1716
|
+
enumerable: !0,
|
|
1717
|
+
configurable: !0,
|
|
1718
|
+
writable: !0,
|
|
1719
|
+
value: void 0
|
|
1720
|
+
}), this.data = i, this.reason = c, this.signature = u;
|
|
1721
|
+
}
|
|
1722
|
+
}
|
|
1723
|
+
class so extends g {
|
|
1724
|
+
constructor({ functionName: t }) {
|
|
1725
|
+
super(`The contract function "${t}" returned no data ("0x").`, {
|
|
1726
|
+
metaMessages: [
|
|
1727
|
+
"This could be due to any of the following:",
|
|
1728
|
+
` - The contract does not have the function "${t}",`,
|
|
1729
|
+
" - The parameters passed to the contract function may be invalid, or",
|
|
1730
|
+
" - The address is not a contract."
|
|
1731
|
+
]
|
|
1732
|
+
}), Object.defineProperty(this, "name", {
|
|
1733
|
+
enumerable: !0,
|
|
1734
|
+
configurable: !0,
|
|
1735
|
+
writable: !0,
|
|
1736
|
+
value: "ContractFunctionZeroDataError"
|
|
1737
|
+
});
|
|
1738
|
+
}
|
|
1739
|
+
}
|
|
1740
|
+
class sn extends g {
|
|
1741
|
+
constructor({ data: t, message: n }) {
|
|
1742
|
+
super(n || ""), Object.defineProperty(this, "code", {
|
|
1743
|
+
enumerable: !0,
|
|
1744
|
+
configurable: !0,
|
|
1745
|
+
writable: !0,
|
|
1746
|
+
value: 3
|
|
1747
|
+
}), Object.defineProperty(this, "name", {
|
|
1748
|
+
enumerable: !0,
|
|
1749
|
+
configurable: !0,
|
|
1750
|
+
writable: !0,
|
|
1751
|
+
value: "RawContractError"
|
|
1752
|
+
}), Object.defineProperty(this, "data", {
|
|
1753
|
+
enumerable: !0,
|
|
1754
|
+
configurable: !0,
|
|
1755
|
+
writable: !0,
|
|
1756
|
+
value: void 0
|
|
1757
|
+
}), this.data = t;
|
|
1758
|
+
}
|
|
1759
|
+
}
|
|
1760
|
+
function $e(e, t) {
|
|
1761
|
+
var r, o, s, i, a, c;
|
|
1762
|
+
if (!(e instanceof g))
|
|
1763
|
+
return !1;
|
|
1764
|
+
const n = e.walk((u) => u instanceof He);
|
|
1765
|
+
return n instanceof He ? !!(((r = n.data) == null ? void 0 : r.errorName) === "ResolverNotFound" || ((o = n.data) == null ? void 0 : o.errorName) === "ResolverWildcardNotSupported" || ((s = n.data) == null ? void 0 : s.errorName) === "ResolverNotContract" || ((i = n.data) == null ? void 0 : i.errorName) === "ResolverError" || ((a = n.data) == null ? void 0 : a.errorName) === "HttpError" || (c = n.reason) != null && c.includes("Wildcard on non-extended resolvers is not supported") || t === "reverse" && n.reason === rn[50]) : !1;
|
|
1766
|
+
}
|
|
1767
|
+
function an(e) {
|
|
1768
|
+
if (e.length !== 66 || e.indexOf("[") !== 0 || e.indexOf("]") !== 65)
|
|
1769
|
+
return null;
|
|
1770
|
+
const t = `0x${e.slice(1, 65)}`;
|
|
1771
|
+
return It(t) ? t : null;
|
|
1772
|
+
}
|
|
1773
|
+
function X(e) {
|
|
1774
|
+
let t = new Uint8Array(32).fill(0);
|
|
1775
|
+
if (!e)
|
|
1776
|
+
return N(t);
|
|
1777
|
+
const n = e.split(".");
|
|
1778
|
+
for (let r = n.length - 1; r >= 0; r -= 1) {
|
|
1779
|
+
const o = an(n[r]), s = o ? Qt(o) : Ae(Y(n[r]), "bytes");
|
|
1780
|
+
t = Ae(O([t, s]), "bytes");
|
|
1781
|
+
}
|
|
1782
|
+
return N(t);
|
|
1783
|
+
}
|
|
1784
|
+
function io(e) {
|
|
1785
|
+
return `[${e.slice(2)}]`;
|
|
1786
|
+
}
|
|
1787
|
+
function cn(e) {
|
|
1788
|
+
const t = new Uint8Array(32).fill(0);
|
|
1789
|
+
return e ? an(e) || Ae(Y(e)) : N(t);
|
|
1790
|
+
}
|
|
1791
|
+
function re(e) {
|
|
1792
|
+
const t = e.replace(/^\.|\.$/gm, "");
|
|
1793
|
+
if (t.length === 0)
|
|
1794
|
+
return new Uint8Array(1);
|
|
1795
|
+
const n = new Uint8Array(Y(t).byteLength + 2);
|
|
1796
|
+
let r = 0;
|
|
1797
|
+
const o = t.split(".");
|
|
1798
|
+
for (let s = 0; s < o.length; s++) {
|
|
1799
|
+
let i = Y(o[s]);
|
|
1800
|
+
i.byteLength > 255 && (i = Y(io(cn(o[s])))), n[r] = i.length, n.set(i, r + 1), r += i.length + 1;
|
|
1801
|
+
}
|
|
1802
|
+
return n.byteLength !== r + 1 ? n.slice(0, r + 1) : n;
|
|
1803
|
+
}
|
|
1804
|
+
function L(e, t, n) {
|
|
1805
|
+
return (r) => {
|
|
1806
|
+
var o, s;
|
|
1807
|
+
return ((o = e[t.name]) == null ? void 0 : o.call(e, r)) ?? ((s = e[n]) == null ? void 0 : s.call(e, r)) ?? t(e, r);
|
|
1808
|
+
};
|
|
1809
|
+
}
|
|
1810
|
+
class To extends g {
|
|
1811
|
+
constructor({ body: t, details: n, headers: r, status: o, url: s }) {
|
|
1812
|
+
super("HTTP request failed.", {
|
|
1813
|
+
details: n,
|
|
1814
|
+
metaMessages: [
|
|
1815
|
+
o && `Status: ${o}`,
|
|
1816
|
+
`URL: ${vt(s)}`,
|
|
1817
|
+
t && `Request body: ${qe(t)}`
|
|
1818
|
+
].filter(Boolean)
|
|
1819
|
+
}), Object.defineProperty(this, "name", {
|
|
1820
|
+
enumerable: !0,
|
|
1821
|
+
configurable: !0,
|
|
1822
|
+
writable: !0,
|
|
1823
|
+
value: "HttpRequestError"
|
|
1824
|
+
}), Object.defineProperty(this, "body", {
|
|
1825
|
+
enumerable: !0,
|
|
1826
|
+
configurable: !0,
|
|
1827
|
+
writable: !0,
|
|
1828
|
+
value: void 0
|
|
1829
|
+
}), Object.defineProperty(this, "headers", {
|
|
1830
|
+
enumerable: !0,
|
|
1831
|
+
configurable: !0,
|
|
1832
|
+
writable: !0,
|
|
1833
|
+
value: void 0
|
|
1834
|
+
}), Object.defineProperty(this, "status", {
|
|
1835
|
+
enumerable: !0,
|
|
1836
|
+
configurable: !0,
|
|
1837
|
+
writable: !0,
|
|
1838
|
+
value: void 0
|
|
1839
|
+
}), Object.defineProperty(this, "url", {
|
|
1840
|
+
enumerable: !0,
|
|
1841
|
+
configurable: !0,
|
|
1842
|
+
writable: !0,
|
|
1843
|
+
value: void 0
|
|
1844
|
+
}), this.body = t, this.headers = r, this.status = o, this.url = s;
|
|
1845
|
+
}
|
|
1846
|
+
}
|
|
1847
|
+
class ao extends g {
|
|
1848
|
+
constructor({ body: t, error: n, url: r }) {
|
|
1849
|
+
super("RPC Request failed.", {
|
|
1850
|
+
cause: n,
|
|
1851
|
+
details: n.message,
|
|
1852
|
+
metaMessages: [`URL: ${vt(r)}`, `Request body: ${qe(t)}`]
|
|
1853
|
+
}), Object.defineProperty(this, "name", {
|
|
1854
|
+
enumerable: !0,
|
|
1855
|
+
configurable: !0,
|
|
1856
|
+
writable: !0,
|
|
1857
|
+
value: "RpcRequestError"
|
|
1858
|
+
}), Object.defineProperty(this, "code", {
|
|
1859
|
+
enumerable: !0,
|
|
1860
|
+
configurable: !0,
|
|
1861
|
+
writable: !0,
|
|
1862
|
+
value: void 0
|
|
1863
|
+
}), this.code = n.code;
|
|
1864
|
+
}
|
|
1865
|
+
}
|
|
1866
|
+
const co = -1;
|
|
1867
|
+
class uo extends g {
|
|
1868
|
+
constructor(t, { code: n, docsPath: r, metaMessages: o, shortMessage: s }) {
|
|
1869
|
+
super(s, {
|
|
1870
|
+
cause: t,
|
|
1871
|
+
docsPath: r,
|
|
1872
|
+
metaMessages: o || (t == null ? void 0 : t.metaMessages)
|
|
1873
|
+
}), Object.defineProperty(this, "name", {
|
|
1874
|
+
enumerable: !0,
|
|
1875
|
+
configurable: !0,
|
|
1876
|
+
writable: !0,
|
|
1877
|
+
value: "RpcError"
|
|
1878
|
+
}), Object.defineProperty(this, "code", {
|
|
1879
|
+
enumerable: !0,
|
|
1880
|
+
configurable: !0,
|
|
1881
|
+
writable: !0,
|
|
1882
|
+
value: void 0
|
|
1883
|
+
}), this.name = t.name, this.code = t instanceof ao ? t.code : n ?? co;
|
|
1884
|
+
}
|
|
1885
|
+
}
|
|
1886
|
+
class Ce extends uo {
|
|
1887
|
+
constructor(t) {
|
|
1888
|
+
super(t, {
|
|
1889
|
+
code: Ce.code,
|
|
1890
|
+
shortMessage: "An internal error was received."
|
|
1891
|
+
}), Object.defineProperty(this, "name", {
|
|
1892
|
+
enumerable: !0,
|
|
1893
|
+
configurable: !0,
|
|
1894
|
+
writable: !0,
|
|
1895
|
+
value: "InternalRpcError"
|
|
1896
|
+
});
|
|
1897
|
+
}
|
|
1898
|
+
}
|
|
1899
|
+
Object.defineProperty(Ce, "code", {
|
|
1900
|
+
enumerable: !0,
|
|
1901
|
+
configurable: !0,
|
|
1902
|
+
writable: !0,
|
|
1903
|
+
value: -32603
|
|
1904
|
+
});
|
|
1905
|
+
const Ao = 3;
|
|
1906
|
+
function lo(e, { abi: t, address: n, args: r, docsPath: o, functionName: s, sender: i }) {
|
|
1907
|
+
const { code: a, data: c, message: u, shortMessage: A } = e instanceof sn ? e : e instanceof g ? e.walk((f) => "data" in f) || e.walk() : {}, l = e instanceof Le ? new so({ functionName: s }) : [Ao, Ce.code].includes(a) && (c || u || A) ? new He({
|
|
1908
|
+
abi: t,
|
|
1909
|
+
data: typeof c == "object" ? c.data : c,
|
|
1910
|
+
functionName: s,
|
|
1911
|
+
message: A ?? u
|
|
1912
|
+
}) : e;
|
|
1913
|
+
return new oo(l, {
|
|
1914
|
+
abi: t,
|
|
1915
|
+
args: r,
|
|
1916
|
+
contractAddress: n,
|
|
1917
|
+
docsPath: o,
|
|
1918
|
+
functionName: s,
|
|
1919
|
+
sender: i
|
|
1920
|
+
});
|
|
1921
|
+
}
|
|
1922
|
+
const fo = "0x82ad56cb";
|
|
1923
|
+
function po(e, t) {
|
|
1924
|
+
const n = (e.details || "").toLowerCase(), r = e instanceof g ? e.walk((o) => o.code === ie.code) : e;
|
|
1925
|
+
return r instanceof g ? new ie({
|
|
1926
|
+
cause: e,
|
|
1927
|
+
message: r.details
|
|
1928
|
+
}) : ie.nodeMessage.test(n) ? new ie({
|
|
1929
|
+
cause: e,
|
|
1930
|
+
message: e.details
|
|
1931
|
+
}) : Ie.nodeMessage.test(n) ? new Ie({
|
|
1932
|
+
cause: e,
|
|
1933
|
+
maxFeePerGas: t == null ? void 0 : t.maxFeePerGas
|
|
1934
|
+
}) : nt.nodeMessage.test(n) ? new nt({
|
|
1935
|
+
cause: e,
|
|
1936
|
+
maxFeePerGas: t == null ? void 0 : t.maxFeePerGas
|
|
1937
|
+
}) : rt.nodeMessage.test(n) ? new rt({ cause: e, nonce: t == null ? void 0 : t.nonce }) : ot.nodeMessage.test(n) ? new ot({ cause: e, nonce: t == null ? void 0 : t.nonce }) : st.nodeMessage.test(n) ? new st({ cause: e, nonce: t == null ? void 0 : t.nonce }) : it.nodeMessage.test(n) ? new it({ cause: e }) : at.nodeMessage.test(n) ? new at({ cause: e, gas: t == null ? void 0 : t.gas }) : ct.nodeMessage.test(n) ? new ct({ cause: e, gas: t == null ? void 0 : t.gas }) : ut.nodeMessage.test(n) ? new ut({ cause: e }) : Ne.nodeMessage.test(n) ? new Ne({
|
|
1938
|
+
cause: e,
|
|
1939
|
+
maxFeePerGas: t == null ? void 0 : t.maxFeePerGas,
|
|
1940
|
+
maxPriorityFeePerGas: t == null ? void 0 : t.maxPriorityFeePerGas
|
|
1941
|
+
}) : new Rt({
|
|
1942
|
+
cause: e
|
|
1943
|
+
});
|
|
1944
|
+
}
|
|
1945
|
+
function ho(e, { docsPath: t, ...n }) {
|
|
1946
|
+
const r = (() => {
|
|
1947
|
+
const o = po(e, n);
|
|
1948
|
+
return o instanceof Rt ? e : o;
|
|
1949
|
+
})();
|
|
1950
|
+
return new ro(r, {
|
|
1951
|
+
docsPath: t,
|
|
1952
|
+
...n
|
|
1953
|
+
});
|
|
1954
|
+
}
|
|
1955
|
+
function go(e, { format: t }) {
|
|
1956
|
+
if (!t)
|
|
1957
|
+
return {};
|
|
1958
|
+
const n = {};
|
|
1959
|
+
function r(s) {
|
|
1960
|
+
const i = Object.keys(s);
|
|
1961
|
+
for (const a of i)
|
|
1962
|
+
a in e && (n[a] = e[a]), s[a] && typeof s[a] == "object" && !Array.isArray(s[a]) && r(s[a]);
|
|
1963
|
+
}
|
|
1964
|
+
const o = t(e || {});
|
|
1965
|
+
return r(o), n;
|
|
1966
|
+
}
|
|
1967
|
+
const Qe = /* @__PURE__ */ new Map();
|
|
1968
|
+
function wo({ fn: e, id: t, shouldSplitBatch: n, wait: r = 0, sort: o }) {
|
|
1969
|
+
const s = async () => {
|
|
1970
|
+
const A = c();
|
|
1971
|
+
i();
|
|
1972
|
+
const l = A.map(({ args: f }) => f);
|
|
1973
|
+
l.length !== 0 && e(l).then((f) => {
|
|
1974
|
+
var d;
|
|
1975
|
+
o && Array.isArray(f) && f.sort(o);
|
|
1976
|
+
for (let h = 0; h < A.length; h++) {
|
|
1977
|
+
const { pendingPromise: p } = A[h];
|
|
1978
|
+
(d = p.resolve) == null || d.call(p, [f[h], f]);
|
|
1979
|
+
}
|
|
1980
|
+
}).catch((f) => {
|
|
1981
|
+
var d;
|
|
1982
|
+
for (let h = 0; h < A.length; h++) {
|
|
1983
|
+
const { pendingPromise: p } = A[h];
|
|
1984
|
+
(d = p.reject) == null || d.call(p, f);
|
|
1985
|
+
}
|
|
1986
|
+
});
|
|
1987
|
+
}, i = () => Qe.delete(t), a = () => c().map(({ args: A }) => A), c = () => Qe.get(t) || [], u = (A) => Qe.set(t, [...c(), A]);
|
|
1988
|
+
return {
|
|
1989
|
+
flush: i,
|
|
1990
|
+
async schedule(A) {
|
|
1991
|
+
const l = {}, f = new Promise((p, w) => {
|
|
1992
|
+
l.resolve = p, l.reject = w;
|
|
1993
|
+
});
|
|
1994
|
+
return (n == null ? void 0 : n([...a(), A])) && s(), c().length > 0 ? (u({ args: A, pendingPromise: l }), f) : (u({ args: A, pendingPromise: l }), setTimeout(s, r), f);
|
|
1995
|
+
}
|
|
1996
|
+
};
|
|
1997
|
+
}
|
|
1998
|
+
function Bt(e) {
|
|
1999
|
+
if (!(!e || e.length === 0))
|
|
2000
|
+
return e.reduce((t, { slot: n, value: r }) => {
|
|
2001
|
+
if (n.length !== 66)
|
|
2002
|
+
throw new At({
|
|
2003
|
+
size: n.length,
|
|
2004
|
+
targetSize: 66,
|
|
2005
|
+
type: "hex"
|
|
2006
|
+
});
|
|
2007
|
+
if (r.length !== 66)
|
|
2008
|
+
throw new At({
|
|
2009
|
+
size: r.length,
|
|
2010
|
+
targetSize: 66,
|
|
2011
|
+
type: "hex"
|
|
2012
|
+
});
|
|
2013
|
+
return t[n] = r, t;
|
|
2014
|
+
}, {});
|
|
2015
|
+
}
|
|
2016
|
+
function mo(e) {
|
|
2017
|
+
const { balance: t, nonce: n, state: r, stateDiff: o, code: s } = e, i = {};
|
|
2018
|
+
if (s !== void 0 && (i.code = s), t !== void 0 && (i.balance = I(t)), n !== void 0 && (i.nonce = I(n)), r !== void 0 && (i.state = Bt(r)), o !== void 0) {
|
|
2019
|
+
if (i.state)
|
|
2020
|
+
throw new to();
|
|
2021
|
+
i.stateDiff = Bt(o);
|
|
2022
|
+
}
|
|
2023
|
+
return i;
|
|
2024
|
+
}
|
|
2025
|
+
function bo(e) {
|
|
2026
|
+
if (!e)
|
|
2027
|
+
return;
|
|
2028
|
+
const t = {};
|
|
2029
|
+
for (const { address: n, ...r } of e) {
|
|
2030
|
+
if (!k(n, { strict: !1 }))
|
|
2031
|
+
throw new ce({ address: n });
|
|
2032
|
+
if (t[n])
|
|
2033
|
+
throw new eo({ address: n });
|
|
2034
|
+
t[n] = mo(r);
|
|
2035
|
+
}
|
|
2036
|
+
return t;
|
|
2037
|
+
}
|
|
2038
|
+
function yo(e) {
|
|
2039
|
+
const { account: t, gasPrice: n, maxFeePerGas: r, maxPriorityFeePerGas: o, to: s } = e, i = t ? Xe(t) : void 0;
|
|
2040
|
+
if (i && !k(i.address))
|
|
2041
|
+
throw new ce({ address: i.address });
|
|
2042
|
+
if (s && !k(s))
|
|
2043
|
+
throw new ce({ address: s });
|
|
2044
|
+
if (typeof n < "u" && (typeof r < "u" || typeof o < "u"))
|
|
2045
|
+
throw new En();
|
|
2046
|
+
if (r && r > 2n ** 256n - 1n)
|
|
2047
|
+
throw new Ie({ maxFeePerGas: r });
|
|
2048
|
+
if (o && r && o > r)
|
|
2049
|
+
throw new Ne({ maxFeePerGas: r, maxPriorityFeePerGas: o });
|
|
2050
|
+
}
|
|
2051
|
+
async function Eo(e, t) {
|
|
2052
|
+
var M, E, v, F;
|
|
2053
|
+
const { account: n = e.account, batch: r = !!((M = e.batch) != null && M.multicall), blockNumber: o, blockTag: s = "latest", accessList: i, blobs: a, data: c, gas: u, gasPrice: A, maxFeePerBlobGas: l, maxFeePerGas: f, maxPriorityFeePerGas: d, nonce: h, to: p, value: w, stateOverride: m, ...C } = t, y = n ? Xe(n) : void 0;
|
|
2054
|
+
try {
|
|
2055
|
+
yo(t);
|
|
2056
|
+
const b = (o ? I(o) : void 0) || s, Q = bo(m), oe = (F = (v = (E = e.chain) == null ? void 0 : E.formatters) == null ? void 0 : v.transactionRequest) == null ? void 0 : F.format, se = (oe || hn)({
|
|
2057
|
+
// Pick out extra data that might exist on the chain's transaction request type.
|
|
2058
|
+
...go(C, { format: oe }),
|
|
2059
|
+
from: y == null ? void 0 : y.address,
|
|
2060
|
+
accessList: i,
|
|
2061
|
+
blobs: a,
|
|
2062
|
+
data: c,
|
|
2063
|
+
gas: u,
|
|
2064
|
+
gasPrice: A,
|
|
2065
|
+
maxFeePerBlobGas: l,
|
|
2066
|
+
maxFeePerGas: f,
|
|
2067
|
+
maxPriorityFeePerGas: d,
|
|
2068
|
+
nonce: h,
|
|
2069
|
+
to: p,
|
|
2070
|
+
value: w
|
|
2071
|
+
});
|
|
2072
|
+
if (r && Co({ request: se }) && !Q)
|
|
2073
|
+
try {
|
|
2074
|
+
return await Bo(e, {
|
|
2075
|
+
...se,
|
|
2076
|
+
blockNumber: o,
|
|
2077
|
+
blockTag: s
|
|
2078
|
+
});
|
|
2079
|
+
} catch (Be) {
|
|
2080
|
+
if (!(Be instanceof Dt) && !(Be instanceof Re))
|
|
2081
|
+
throw Be;
|
|
2082
|
+
}
|
|
2083
|
+
const tt = await e.request({
|
|
2084
|
+
method: "eth_call",
|
|
2085
|
+
params: Q ? [
|
|
2086
|
+
se,
|
|
2087
|
+
b,
|
|
2088
|
+
Q
|
|
2089
|
+
] : [se, b]
|
|
2090
|
+
});
|
|
2091
|
+
return tt === "0x" ? { data: void 0 } : { data: tt };
|
|
2092
|
+
} catch (B) {
|
|
2093
|
+
const b = Mo(B), { offchainLookup: Q, offchainLookupSignature: oe } = await import("./ccip-c78d2f16-DLcRlwod.js");
|
|
2094
|
+
if (e.ccipRead !== !1 && (b == null ? void 0 : b.slice(0, 10)) === oe && p)
|
|
2095
|
+
return { data: await Q(e, { data: b, to: p }) };
|
|
2096
|
+
throw ho(B, {
|
|
2097
|
+
...t,
|
|
2098
|
+
account: y,
|
|
2099
|
+
chain: e.chain
|
|
2100
|
+
});
|
|
2101
|
+
}
|
|
2102
|
+
}
|
|
2103
|
+
function Co({ request: e }) {
|
|
2104
|
+
const { data: t, to: n, ...r } = e;
|
|
2105
|
+
return !(!t || t.startsWith(fo) || !n || Object.values(r).filter((o) => typeof o < "u").length > 0);
|
|
2106
|
+
}
|
|
2107
|
+
async function Bo(e, t) {
|
|
2108
|
+
var p;
|
|
2109
|
+
const { batchSize: n = 1024, wait: r = 0 } = typeof ((p = e.batch) == null ? void 0 : p.multicall) == "object" ? e.batch.multicall : {}, { blockNumber: o, blockTag: s = "latest", data: i, multicallAddress: a, to: c } = t;
|
|
2110
|
+
let u = a;
|
|
2111
|
+
if (!u) {
|
|
2112
|
+
if (!e.chain)
|
|
2113
|
+
throw new Dt();
|
|
2114
|
+
u = ne({
|
|
2115
|
+
blockNumber: o,
|
|
2116
|
+
chain: e.chain,
|
|
2117
|
+
contract: "multicall3"
|
|
2118
|
+
});
|
|
2119
|
+
}
|
|
2120
|
+
const l = (o ? I(o) : void 0) || s, { schedule: f } = wo({
|
|
2121
|
+
id: `${e.uid}.${l}`,
|
|
2122
|
+
wait: r,
|
|
2123
|
+
shouldSplitBatch(w) {
|
|
2124
|
+
return w.reduce((C, { data: y }) => C + (y.length - 2), 0) > n * 2;
|
|
2125
|
+
},
|
|
2126
|
+
fn: async (w) => {
|
|
2127
|
+
const m = w.map((M) => ({
|
|
2128
|
+
allowFailure: !0,
|
|
2129
|
+
callData: M.data,
|
|
2130
|
+
target: M.to
|
|
2131
|
+
})), C = Ee({
|
|
2132
|
+
abi: gt,
|
|
2133
|
+
args: [m],
|
|
2134
|
+
functionName: "aggregate3"
|
|
2135
|
+
}), y = await e.request({
|
|
2136
|
+
method: "eth_call",
|
|
2137
|
+
params: [
|
|
2138
|
+
{
|
|
2139
|
+
data: C,
|
|
2140
|
+
to: u
|
|
2141
|
+
},
|
|
2142
|
+
l
|
|
2143
|
+
]
|
|
2144
|
+
});
|
|
2145
|
+
return ye({
|
|
2146
|
+
abi: gt,
|
|
2147
|
+
args: [m],
|
|
2148
|
+
functionName: "aggregate3",
|
|
2149
|
+
data: y || "0x"
|
|
2150
|
+
});
|
|
2151
|
+
}
|
|
2152
|
+
}), [{ returnData: d, success: h }] = await f({ data: i, to: c });
|
|
2153
|
+
if (!h)
|
|
2154
|
+
throw new sn({ data: d });
|
|
2155
|
+
return d === "0x" ? { data: void 0 } : { data: d };
|
|
2156
|
+
}
|
|
2157
|
+
function Mo(e) {
|
|
2158
|
+
var n;
|
|
2159
|
+
if (!(e instanceof g))
|
|
2160
|
+
return;
|
|
2161
|
+
const t = e.walk();
|
|
2162
|
+
return typeof (t == null ? void 0 : t.data) == "object" ? (n = t.data) == null ? void 0 : n.data : t.data;
|
|
2163
|
+
}
|
|
2164
|
+
async function J(e, t) {
|
|
2165
|
+
const { abi: n, address: r, args: o, functionName: s, ...i } = t, a = Ee({
|
|
2166
|
+
abi: n,
|
|
2167
|
+
args: o,
|
|
2168
|
+
functionName: s
|
|
2169
|
+
});
|
|
2170
|
+
try {
|
|
2171
|
+
const { data: c } = await L(e, Eo, "call")({
|
|
2172
|
+
...i,
|
|
2173
|
+
data: a,
|
|
2174
|
+
to: r
|
|
2175
|
+
});
|
|
2176
|
+
return ye({
|
|
2177
|
+
abi: n,
|
|
2178
|
+
args: o,
|
|
2179
|
+
functionName: s,
|
|
2180
|
+
data: c || "0x"
|
|
2181
|
+
});
|
|
2182
|
+
} catch (c) {
|
|
2183
|
+
throw lo(c, {
|
|
2184
|
+
abi: n,
|
|
2185
|
+
address: r,
|
|
2186
|
+
args: o,
|
|
2187
|
+
docsPath: "/docs/contract/readContract",
|
|
2188
|
+
functionName: s
|
|
2189
|
+
});
|
|
2190
|
+
}
|
|
2191
|
+
}
|
|
2192
|
+
async function vo(e, { blockNumber: t, blockTag: n, coinType: r, name: o, gatewayUrls: s, strict: i, universalResolverAddress: a }) {
|
|
2193
|
+
let c = a;
|
|
2194
|
+
if (!c) {
|
|
2195
|
+
if (!e.chain)
|
|
2196
|
+
throw new Error("client chain not configured. universalResolverAddress is required.");
|
|
2197
|
+
c = ne({
|
|
2198
|
+
blockNumber: t,
|
|
2199
|
+
chain: e.chain,
|
|
2200
|
+
contract: "ensUniversalResolver"
|
|
2201
|
+
});
|
|
2202
|
+
}
|
|
2203
|
+
try {
|
|
2204
|
+
const u = Ee({
|
|
2205
|
+
abi: mt,
|
|
2206
|
+
functionName: "addr",
|
|
2207
|
+
...r != null ? { args: [X(o), BigInt(r)] } : { args: [X(o)] }
|
|
2208
|
+
}), A = {
|
|
2209
|
+
address: c,
|
|
2210
|
+
abi: $t,
|
|
2211
|
+
functionName: "resolve",
|
|
2212
|
+
args: [we(re(o)), u],
|
|
2213
|
+
blockNumber: t,
|
|
2214
|
+
blockTag: n
|
|
2215
|
+
}, l = L(e, J, "readContract"), f = s ? await l({
|
|
2216
|
+
...A,
|
|
2217
|
+
args: [...A.args, s]
|
|
2218
|
+
}) : await l(A);
|
|
2219
|
+
if (f[0] === "0x")
|
|
2220
|
+
return null;
|
|
2221
|
+
const d = ye({
|
|
2222
|
+
abi: mt,
|
|
2223
|
+
args: r != null ? [X(o), BigInt(r)] : void 0,
|
|
2224
|
+
functionName: "addr",
|
|
2225
|
+
data: f[0]
|
|
2226
|
+
});
|
|
2227
|
+
return d === "0x" || ge(d) === "0x00" ? null : d;
|
|
2228
|
+
} catch (u) {
|
|
2229
|
+
if (i)
|
|
2230
|
+
throw u;
|
|
2231
|
+
if ($e(u, "resolve"))
|
|
2232
|
+
return null;
|
|
2233
|
+
throw u;
|
|
2234
|
+
}
|
|
2235
|
+
}
|
|
2236
|
+
class Do extends g {
|
|
2237
|
+
constructor({ data: t }) {
|
|
2238
|
+
super("Unable to extract image from metadata. The metadata may be malformed or invalid.", {
|
|
2239
|
+
metaMessages: [
|
|
2240
|
+
"- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.",
|
|
2241
|
+
"",
|
|
2242
|
+
`Provided data: ${JSON.stringify(t)}`
|
|
2243
|
+
]
|
|
2244
|
+
}), Object.defineProperty(this, "name", {
|
|
2245
|
+
enumerable: !0,
|
|
2246
|
+
configurable: !0,
|
|
2247
|
+
writable: !0,
|
|
2248
|
+
value: "EnsAvatarInvalidMetadataError"
|
|
2249
|
+
});
|
|
2250
|
+
}
|
|
2251
|
+
}
|
|
2252
|
+
class K extends g {
|
|
2253
|
+
constructor({ reason: t }) {
|
|
2254
|
+
super(`ENS NFT avatar URI is invalid. ${t}`), Object.defineProperty(this, "name", {
|
|
2255
|
+
enumerable: !0,
|
|
2256
|
+
configurable: !0,
|
|
2257
|
+
writable: !0,
|
|
2258
|
+
value: "EnsAvatarInvalidNftUriError"
|
|
2259
|
+
});
|
|
2260
|
+
}
|
|
2261
|
+
}
|
|
2262
|
+
class _e extends g {
|
|
2263
|
+
constructor({ uri: t }) {
|
|
2264
|
+
super(`Unable to resolve ENS avatar URI "${t}". The URI may be malformed, invalid, or does not respond with a valid image.`), Object.defineProperty(this, "name", {
|
|
2265
|
+
enumerable: !0,
|
|
2266
|
+
configurable: !0,
|
|
2267
|
+
writable: !0,
|
|
2268
|
+
value: "EnsAvatarUriResolutionError"
|
|
2269
|
+
});
|
|
2270
|
+
}
|
|
2271
|
+
}
|
|
2272
|
+
class Qo extends g {
|
|
2273
|
+
constructor({ namespace: t }) {
|
|
2274
|
+
super(`ENS NFT avatar namespace "${t}" is not supported. Must be "erc721" or "erc1155".`), Object.defineProperty(this, "name", {
|
|
2275
|
+
enumerable: !0,
|
|
2276
|
+
configurable: !0,
|
|
2277
|
+
writable: !0,
|
|
2278
|
+
value: "EnsAvatarUnsupportedNamespaceError"
|
|
2279
|
+
});
|
|
2280
|
+
}
|
|
2281
|
+
}
|
|
2282
|
+
const Ro = /(?<protocol>https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/, Io = /^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/, No = /^data:([a-zA-Z\-/+]*);base64,([^"].*)/, Po = /^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;
|
|
2283
|
+
async function xo(e) {
|
|
2284
|
+
try {
|
|
2285
|
+
const t = await fetch(e, { method: "HEAD" });
|
|
2286
|
+
if (t.status === 200) {
|
|
2287
|
+
const n = t.headers.get("content-type");
|
|
2288
|
+
return n == null ? void 0 : n.startsWith("image/");
|
|
2289
|
+
}
|
|
2290
|
+
return !1;
|
|
2291
|
+
} catch (t) {
|
|
2292
|
+
return typeof t == "object" && typeof t.response < "u" || !globalThis.hasOwnProperty("Image") ? !1 : new Promise((n) => {
|
|
2293
|
+
const r = new Image();
|
|
2294
|
+
r.onload = () => {
|
|
2295
|
+
n(!0);
|
|
2296
|
+
}, r.onerror = () => {
|
|
2297
|
+
n(!1);
|
|
2298
|
+
}, r.src = e;
|
|
2299
|
+
});
|
|
2300
|
+
}
|
|
2301
|
+
}
|
|
2302
|
+
function Mt(e, t) {
|
|
2303
|
+
return e ? e.endsWith("/") ? e.slice(0, -1) : e : t;
|
|
2304
|
+
}
|
|
2305
|
+
function un({ uri: e, gatewayUrls: t }) {
|
|
2306
|
+
const n = No.test(e);
|
|
2307
|
+
if (n)
|
|
2308
|
+
return { uri: e, isOnChain: !0, isEncoded: n };
|
|
2309
|
+
const r = Mt(t == null ? void 0 : t.ipfs, "https://ipfs.io"), o = Mt(t == null ? void 0 : t.arweave, "https://arweave.net"), s = e.match(Ro), { protocol: i, subpath: a, target: c, subtarget: u = "" } = (s == null ? void 0 : s.groups) || {}, A = i === "ipns:/" || a === "ipns/", l = i === "ipfs:/" || a === "ipfs/" || Io.test(e);
|
|
2310
|
+
if (e.startsWith("http") && !A && !l) {
|
|
2311
|
+
let d = e;
|
|
2312
|
+
return t != null && t.arweave && (d = e.replace(/https:\/\/arweave.net/g, t == null ? void 0 : t.arweave)), { uri: d, isOnChain: !1, isEncoded: !1 };
|
|
2313
|
+
}
|
|
2314
|
+
if ((A || l) && c)
|
|
2315
|
+
return {
|
|
2316
|
+
uri: `${r}/${A ? "ipns" : "ipfs"}/${c}${u}`,
|
|
2317
|
+
isOnChain: !1,
|
|
2318
|
+
isEncoded: !1
|
|
2319
|
+
};
|
|
2320
|
+
if (i === "ar:/" && c)
|
|
2321
|
+
return {
|
|
2322
|
+
uri: `${o}/${c}${u || ""}`,
|
|
2323
|
+
isOnChain: !1,
|
|
2324
|
+
isEncoded: !1
|
|
2325
|
+
};
|
|
2326
|
+
let f = e.replace(Po, "");
|
|
2327
|
+
if (f.startsWith("<svg") && (f = `data:image/svg+xml;base64,${btoa(f)}`), f.startsWith("data:") || f.startsWith("{"))
|
|
2328
|
+
return {
|
|
2329
|
+
uri: f,
|
|
2330
|
+
isOnChain: !0,
|
|
2331
|
+
isEncoded: !1
|
|
2332
|
+
};
|
|
2333
|
+
throw new _e({ uri: e });
|
|
2334
|
+
}
|
|
2335
|
+
function An(e) {
|
|
2336
|
+
if (typeof e != "object" || !("image" in e) && !("image_url" in e) && !("image_data" in e))
|
|
2337
|
+
throw new Do({ data: e });
|
|
2338
|
+
return e.image || e.image_url || e.image_data;
|
|
2339
|
+
}
|
|
2340
|
+
async function Oo({ gatewayUrls: e, uri: t }) {
|
|
2341
|
+
try {
|
|
2342
|
+
const n = await fetch(t).then((o) => o.json());
|
|
2343
|
+
return await et({
|
|
2344
|
+
gatewayUrls: e,
|
|
2345
|
+
uri: An(n)
|
|
2346
|
+
});
|
|
2347
|
+
} catch {
|
|
2348
|
+
throw new _e({ uri: t });
|
|
2349
|
+
}
|
|
2350
|
+
}
|
|
2351
|
+
async function et({ gatewayUrls: e, uri: t }) {
|
|
2352
|
+
const { uri: n, isOnChain: r } = un({ uri: t, gatewayUrls: e });
|
|
2353
|
+
if (r || await xo(n))
|
|
2354
|
+
return n;
|
|
2355
|
+
throw new _e({ uri: t });
|
|
2356
|
+
}
|
|
2357
|
+
function ko(e) {
|
|
2358
|
+
let t = e;
|
|
2359
|
+
t.startsWith("did:nft:") && (t = t.replace("did:nft:", "").replace(/_/g, "/"));
|
|
2360
|
+
const [n, r, o] = t.split("/"), [s, i] = n.split(":"), [a, c] = r.split(":");
|
|
2361
|
+
if (!s || s.toLowerCase() !== "eip155")
|
|
2362
|
+
throw new K({ reason: "Only EIP-155 supported" });
|
|
2363
|
+
if (!i)
|
|
2364
|
+
throw new K({ reason: "Chain ID not found" });
|
|
2365
|
+
if (!c)
|
|
2366
|
+
throw new K({
|
|
2367
|
+
reason: "Contract address not found"
|
|
2368
|
+
});
|
|
2369
|
+
if (!o)
|
|
2370
|
+
throw new K({ reason: "Token ID not found" });
|
|
2371
|
+
if (!a)
|
|
2372
|
+
throw new K({ reason: "ERC namespace not found" });
|
|
2373
|
+
return {
|
|
2374
|
+
chainID: Number.parseInt(i),
|
|
2375
|
+
namespace: a.toLowerCase(),
|
|
2376
|
+
contractAddress: c,
|
|
2377
|
+
tokenID: o
|
|
2378
|
+
};
|
|
2379
|
+
}
|
|
2380
|
+
async function Fo(e, { nft: t }) {
|
|
2381
|
+
if (t.namespace === "erc721")
|
|
2382
|
+
return J(e, {
|
|
2383
|
+
address: t.contractAddress,
|
|
2384
|
+
abi: [
|
|
2385
|
+
{
|
|
2386
|
+
name: "tokenURI",
|
|
2387
|
+
type: "function",
|
|
2388
|
+
stateMutability: "view",
|
|
2389
|
+
inputs: [{ name: "tokenId", type: "uint256" }],
|
|
2390
|
+
outputs: [{ name: "", type: "string" }]
|
|
2391
|
+
}
|
|
2392
|
+
],
|
|
2393
|
+
functionName: "tokenURI",
|
|
2394
|
+
args: [BigInt(t.tokenID)]
|
|
2395
|
+
});
|
|
2396
|
+
if (t.namespace === "erc1155")
|
|
2397
|
+
return J(e, {
|
|
2398
|
+
address: t.contractAddress,
|
|
2399
|
+
abi: [
|
|
2400
|
+
{
|
|
2401
|
+
name: "uri",
|
|
2402
|
+
type: "function",
|
|
2403
|
+
stateMutability: "view",
|
|
2404
|
+
inputs: [{ name: "_id", type: "uint256" }],
|
|
2405
|
+
outputs: [{ name: "", type: "string" }]
|
|
2406
|
+
}
|
|
2407
|
+
],
|
|
2408
|
+
functionName: "uri",
|
|
2409
|
+
args: [BigInt(t.tokenID)]
|
|
2410
|
+
});
|
|
2411
|
+
throw new Qo({ namespace: t.namespace });
|
|
2412
|
+
}
|
|
2413
|
+
async function ln(e, { gatewayUrls: t, record: n }) {
|
|
2414
|
+
return /eip155:/i.test(n) ? So(e, { gatewayUrls: t, record: n }) : et({ uri: n, gatewayUrls: t });
|
|
2415
|
+
}
|
|
2416
|
+
async function So(e, { gatewayUrls: t, record: n }) {
|
|
2417
|
+
const r = ko(n), o = await Fo(e, { nft: r }), { uri: s, isOnChain: i, isEncoded: a } = un({ uri: o, gatewayUrls: t });
|
|
2418
|
+
if (i && (s.includes("data:application/json;base64,") || s.startsWith("{"))) {
|
|
2419
|
+
const u = a ? (
|
|
2420
|
+
// if it is encoded, decode it
|
|
2421
|
+
atob(s.replace("data:application/json;base64,", ""))
|
|
2422
|
+
) : (
|
|
2423
|
+
// if it isn't encoded assume it is a JSON string, but it could be anything (it will error if it is)
|
|
2424
|
+
s
|
|
2425
|
+
), A = JSON.parse(u);
|
|
2426
|
+
return et({ uri: An(A), gatewayUrls: t });
|
|
2427
|
+
}
|
|
2428
|
+
let c = r.tokenID;
|
|
2429
|
+
return r.namespace === "erc1155" && (c = c.replace("0x", "").padStart(64, "0")), Oo({
|
|
2430
|
+
gatewayUrls: t,
|
|
2431
|
+
uri: s.replace(/(?:0x)?{id}/, c)
|
|
2432
|
+
});
|
|
2433
|
+
}
|
|
2434
|
+
async function fn(e, { blockNumber: t, blockTag: n, name: r, key: o, gatewayUrls: s, strict: i, universalResolverAddress: a }) {
|
|
2435
|
+
let c = a;
|
|
2436
|
+
if (!c) {
|
|
2437
|
+
if (!e.chain)
|
|
2438
|
+
throw new Error("client chain not configured. universalResolverAddress is required.");
|
|
2439
|
+
c = ne({
|
|
2440
|
+
blockNumber: t,
|
|
2441
|
+
chain: e.chain,
|
|
2442
|
+
contract: "ensUniversalResolver"
|
|
2443
|
+
});
|
|
2444
|
+
}
|
|
2445
|
+
try {
|
|
2446
|
+
const u = {
|
|
2447
|
+
address: c,
|
|
2448
|
+
abi: $t,
|
|
2449
|
+
functionName: "resolve",
|
|
2450
|
+
args: [
|
|
2451
|
+
we(re(r)),
|
|
2452
|
+
Ee({
|
|
2453
|
+
abi: wt,
|
|
2454
|
+
functionName: "text",
|
|
2455
|
+
args: [X(r), o]
|
|
2456
|
+
})
|
|
2457
|
+
],
|
|
2458
|
+
blockNumber: t,
|
|
2459
|
+
blockTag: n
|
|
2460
|
+
}, A = L(e, J, "readContract"), l = s ? await A({
|
|
2461
|
+
...u,
|
|
2462
|
+
args: [...u.args, s]
|
|
2463
|
+
}) : await A(u);
|
|
2464
|
+
if (l[0] === "0x")
|
|
2465
|
+
return null;
|
|
2466
|
+
const f = ye({
|
|
2467
|
+
abi: wt,
|
|
2468
|
+
functionName: "text",
|
|
2469
|
+
data: l[0]
|
|
2470
|
+
});
|
|
2471
|
+
return f === "" ? null : f;
|
|
2472
|
+
} catch (u) {
|
|
2473
|
+
if (i)
|
|
2474
|
+
throw u;
|
|
2475
|
+
if ($e(u, "resolve"))
|
|
2476
|
+
return null;
|
|
2477
|
+
throw u;
|
|
2478
|
+
}
|
|
2479
|
+
}
|
|
2480
|
+
async function Uo(e, { blockNumber: t, blockTag: n, assetGatewayUrls: r, name: o, gatewayUrls: s, strict: i, universalResolverAddress: a }) {
|
|
2481
|
+
const c = await L(e, fn, "getEnsText")({
|
|
2482
|
+
blockNumber: t,
|
|
2483
|
+
blockTag: n,
|
|
2484
|
+
key: "avatar",
|
|
2485
|
+
name: o,
|
|
2486
|
+
universalResolverAddress: a,
|
|
2487
|
+
gatewayUrls: s,
|
|
2488
|
+
strict: i
|
|
2489
|
+
});
|
|
2490
|
+
if (!c)
|
|
2491
|
+
return null;
|
|
2492
|
+
try {
|
|
2493
|
+
return await ln(e, {
|
|
2494
|
+
record: c,
|
|
2495
|
+
gatewayUrls: r
|
|
2496
|
+
});
|
|
2497
|
+
} catch {
|
|
2498
|
+
return null;
|
|
2499
|
+
}
|
|
2500
|
+
}
|
|
2501
|
+
async function jo(e, { address: t, blockNumber: n, blockTag: r, gatewayUrls: o, strict: s, universalResolverAddress: i }) {
|
|
2502
|
+
let a = i;
|
|
2503
|
+
if (!a) {
|
|
2504
|
+
if (!e.chain)
|
|
2505
|
+
throw new Error("client chain not configured. universalResolverAddress is required.");
|
|
2506
|
+
a = ne({
|
|
2507
|
+
blockNumber: n,
|
|
2508
|
+
chain: e.chain,
|
|
2509
|
+
contract: "ensUniversalResolver"
|
|
2510
|
+
});
|
|
2511
|
+
}
|
|
2512
|
+
const c = `${t.toLowerCase().substring(2)}.addr.reverse`;
|
|
2513
|
+
try {
|
|
2514
|
+
const u = {
|
|
2515
|
+
address: a,
|
|
2516
|
+
abi: fr,
|
|
2517
|
+
functionName: "reverse",
|
|
2518
|
+
args: [we(re(c))],
|
|
2519
|
+
blockNumber: n,
|
|
2520
|
+
blockTag: r
|
|
2521
|
+
}, A = L(e, J, "readContract"), [l, f] = o ? await A({
|
|
2522
|
+
...u,
|
|
2523
|
+
args: [...u.args, o]
|
|
2524
|
+
}) : await A(u);
|
|
2525
|
+
return t.toLowerCase() !== f.toLowerCase() ? null : l;
|
|
2526
|
+
} catch (u) {
|
|
2527
|
+
if (s)
|
|
2528
|
+
throw u;
|
|
2529
|
+
if ($e(u, "reverse"))
|
|
2530
|
+
return null;
|
|
2531
|
+
throw u;
|
|
2532
|
+
}
|
|
2533
|
+
}
|
|
2534
|
+
async function Ho(e, { blockNumber: t, blockTag: n, name: r, universalResolverAddress: o }) {
|
|
2535
|
+
let s = o;
|
|
2536
|
+
if (!s) {
|
|
2537
|
+
if (!e.chain)
|
|
2538
|
+
throw new Error("client chain not configured. universalResolverAddress is required.");
|
|
2539
|
+
s = ne({
|
|
2540
|
+
blockNumber: t,
|
|
2541
|
+
chain: e.chain,
|
|
2542
|
+
contract: "ensUniversalResolver"
|
|
2543
|
+
});
|
|
2544
|
+
}
|
|
2545
|
+
const [i] = await L(e, J, "readContract")({
|
|
2546
|
+
address: s,
|
|
2547
|
+
abi: [
|
|
2548
|
+
{
|
|
2549
|
+
inputs: [{ type: "bytes" }],
|
|
2550
|
+
name: "findResolver",
|
|
2551
|
+
outputs: [{ type: "address" }, { type: "bytes32" }],
|
|
2552
|
+
stateMutability: "view",
|
|
2553
|
+
type: "function"
|
|
2554
|
+
}
|
|
2555
|
+
],
|
|
2556
|
+
functionName: "findResolver",
|
|
2557
|
+
args: [we(re(r))],
|
|
2558
|
+
blockNumber: t,
|
|
2559
|
+
blockTag: n
|
|
2560
|
+
});
|
|
2561
|
+
return i;
|
|
2562
|
+
}
|
|
2563
|
+
var Jo = /* @__PURE__ */ Object.freeze({
|
|
2564
|
+
__proto__: null,
|
|
2565
|
+
normalize: lr,
|
|
2566
|
+
getEnsAddress: vo,
|
|
2567
|
+
getEnsAvatar: Uo,
|
|
2568
|
+
getEnsName: jo,
|
|
2569
|
+
getEnsResolver: Ho,
|
|
2570
|
+
getEnsText: fn,
|
|
2571
|
+
labelhash: cn,
|
|
2572
|
+
namehash: X,
|
|
2573
|
+
parseAvatarRecord: ln,
|
|
2574
|
+
packetToBytes: re
|
|
2575
|
+
});
|
|
2576
|
+
export {
|
|
2577
|
+
To as H,
|
|
2578
|
+
Eo as c,
|
|
2579
|
+
_r as d,
|
|
2580
|
+
Qr as e,
|
|
2581
|
+
Jo as i,
|
|
2582
|
+
qe as s
|
|
2583
|
+
};
|