@pufferfinance/puffer-sdk 1.14.1 → 1.15.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/dist/api/puffer-client-helpers.cjs +1 -1
- package/dist/api/puffer-client-helpers.cjs.map +1 -1
- package/dist/api/puffer-client-helpers.js +86 -86
- package/dist/api/puffer-client-helpers.js.map +1 -1
- package/dist/api/puffer-client.cjs +1 -1
- package/dist/api/puffer-client.js +2 -2
- package/dist/{ccip-DA_MOIPz.js → ccip-DxZd6avE.js} +9 -9
- package/dist/ccip-DxZd6avE.js.map +1 -0
- package/dist/{ccip-BYEwaDSr.cjs → ccip-KTVYuImW.cjs} +2 -2
- package/dist/ccip-KTVYuImW.cjs.map +1 -0
- package/dist/chains/constants.cjs +1 -1
- package/dist/chains/constants.d.ts +3 -0
- package/dist/chains/constants.js +1 -1
- package/dist/constants-Bsa7cnXP.cjs +9 -0
- package/dist/constants-Bsa7cnXP.cjs.map +1 -0
- package/dist/{constants-BDqMRitM.js → constants-DtzphQjb.js} +791 -691
- package/dist/constants-DtzphQjb.js.map +1 -0
- package/dist/contracts/addresses.cjs +1 -1
- package/dist/contracts/addresses.js +1 -1
- package/dist/contracts/handlers/carrot-staking-handler.cjs +1 -1
- package/dist/contracts/handlers/carrot-staking-handler.d.ts +14621 -1572
- package/dist/contracts/handlers/carrot-staking-handler.js +2 -2
- package/dist/contracts/handlers/distributor-handler.cjs +1 -1
- package/dist/contracts/handlers/distributor-handler.d.ts +14732 -8603
- package/dist/contracts/handlers/distributor-handler.js +2 -2
- package/dist/contracts/handlers/erc20-permit-handler.cjs +1 -1
- package/dist/contracts/handlers/erc20-permit-handler.cjs.map +1 -1
- package/dist/contracts/handlers/erc20-permit-handler.d.ts +14905 -17101
- package/dist/contracts/handlers/erc20-permit-handler.js +3 -3
- package/dist/contracts/handlers/erc20-permit-handler.js.map +1 -1
- package/dist/contracts/handlers/l1-reward-manager-handler.cjs +1 -1
- package/dist/contracts/handlers/l1-reward-manager-handler.d.ts +14568 -282
- package/dist/contracts/handlers/l1-reward-manager-handler.js +2 -2
- package/dist/contracts/handlers/l2-reward-manager-handler.cjs +1 -1
- package/dist/contracts/handlers/l2-reward-manager-handler.d.ts +14674 -2283
- package/dist/contracts/handlers/l2-reward-manager-handler.js +2 -2
- package/dist/contracts/handlers/mtw-carrot-handler.cjs +1 -1
- package/dist/contracts/handlers/mtw-carrot-handler.d.ts +14802 -14165
- package/dist/contracts/handlers/mtw-carrot-handler.js +2 -2
- package/dist/contracts/handlers/nucleus-accountant-handler.cjs +1 -1
- package/dist/contracts/handlers/nucleus-accountant-handler.d.ts +14612 -543
- package/dist/contracts/handlers/nucleus-accountant-handler.js +1 -1
- package/dist/contracts/handlers/nucleus-atomic-queue-handler.cjs +1 -1
- package/dist/contracts/handlers/nucleus-atomic-queue-handler.d.ts +14819 -7619
- package/dist/contracts/handlers/nucleus-atomic-queue-handler.js +2 -2
- package/dist/contracts/handlers/nucleus-boring-vault-handler.cjs +1 -1
- package/dist/contracts/handlers/nucleus-boring-vault-handler.d.ts +14665 -3778
- package/dist/contracts/handlers/nucleus-boring-vault-handler.js +2 -2
- package/dist/contracts/handlers/nucleus-teller-handler.cjs +1 -1
- package/dist/contracts/handlers/nucleus-teller-handler.d.ts +14645 -2072
- package/dist/contracts/handlers/nucleus-teller-handler.js +2 -2
- package/dist/contracts/handlers/puf-locker-handler.cjs +1 -1
- package/dist/contracts/handlers/puf-locker-handler.d.ts +14658 -2266
- package/dist/contracts/handlers/puf-locker-handler.js +2 -2
- package/dist/contracts/handlers/puffer-depositor-handler.cjs +1 -1
- package/dist/contracts/handlers/puffer-depositor-handler.d.ts +14801 -11215
- package/dist/contracts/handlers/puffer-depositor-handler.js +2 -2
- package/dist/contracts/handlers/puffer-l2-depositor-handler.cjs +1 -1
- package/dist/contracts/handlers/puffer-l2-depositor-handler.d.ts +14579 -399
- package/dist/contracts/handlers/puffer-l2-depositor-handler.js +2 -2
- package/dist/contracts/handlers/puffer-vault-handler.cjs +1 -1
- package/dist/contracts/handlers/puffer-vault-handler.d.ts +14698 -4510
- package/dist/contracts/handlers/puffer-vault-handler.js +2 -2
- package/dist/contracts/handlers/puffer-withdrawal-manager-handler.cjs +1 -1
- package/dist/contracts/handlers/puffer-withdrawal-manager-handler.d.ts +14610 -1797
- package/dist/contracts/handlers/puffer-withdrawal-manager-handler.js +2 -2
- package/dist/contracts/tokens.cjs +1 -1
- package/dist/contracts/tokens.cjs.map +1 -1
- package/dist/contracts/tokens.d.ts +1 -0
- package/dist/contracts/tokens.js +73 -65
- package/dist/contracts/tokens.js.map +1 -1
- package/dist/contracts/vaults-addresses.cjs +1 -1
- package/dist/contracts/vaults-addresses.js +1 -1
- package/dist/{createWalletClient-L7tR5Gda.cjs → createWalletClient-Cxvyuh55.cjs} +6 -6
- package/dist/createWalletClient-Cxvyuh55.cjs.map +1 -0
- package/dist/{createWalletClient-DMXR-Bug.js → createWalletClient-DveM0zMc.js} +63 -62
- package/dist/createWalletClient-DveM0zMc.js.map +1 -0
- package/dist/{getContract-DXPZJOBy.js → getContract-Ck0plC0s.js} +2 -2
- package/dist/{getContract-Bt9GsQBq.cjs.map → getContract-Ck0plC0s.js.map} +1 -1
- package/dist/{getContract-Bt9GsQBq.cjs → getContract-Z5RjOH18.cjs} +2 -2
- package/dist/getContract-Z5RjOH18.cjs.map +1 -0
- package/dist/main.cjs +1 -1
- package/dist/main.js +1 -1
- package/dist/{secp256k1-D02y6Pc-.js → secp256k1-48Xl94oi.js} +2 -2
- package/dist/{secp256k1-D02y6Pc-.js.map → secp256k1-48Xl94oi.js.map} +1 -1
- package/dist/{secp256k1-q_akf6f-.cjs → secp256k1-BWuyf2aG.cjs} +2 -2
- package/dist/{secp256k1-q_akf6f-.cjs.map → secp256k1-BWuyf2aG.cjs.map} +1 -1
- package/dist/utils/version.cjs +1 -1
- package/dist/utils/version.js +1 -1
- package/dist/{writeContract-BsrMQkg5.js → writeContract-CynQLeZV.js} +7 -7
- package/dist/writeContract-CynQLeZV.js.map +1 -0
- package/dist/{writeContract-Cbrw62uO.cjs → writeContract-D5BxbWBy.cjs} +6 -6
- package/dist/writeContract-D5BxbWBy.cjs.map +1 -0
- package/package.json +2 -2
- package/dist/ccip-BYEwaDSr.cjs.map +0 -1
- package/dist/ccip-DA_MOIPz.js.map +0 -1
- package/dist/constants-5WxIZnbu.cjs +0 -9
- package/dist/constants-5WxIZnbu.cjs.map +0 -1
- package/dist/constants-BDqMRitM.js.map +0 -1
- package/dist/createWalletClient-DMXR-Bug.js.map +0 -1
- package/dist/createWalletClient-L7tR5Gda.cjs.map +0 -1
- package/dist/getContract-DXPZJOBy.js.map +0 -1
- package/dist/writeContract-BsrMQkg5.js.map +0 -1
- package/dist/writeContract-Cbrw62uO.cjs.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
function
|
|
1
|
+
function W(e, { strict: t = !0 } = {}) {
|
|
2
2
|
return !e || typeof e != "string" ? !1 : t ? /^0x[0-9a-fA-F]*$/.test(e) : e.startsWith("0x");
|
|
3
3
|
}
|
|
4
|
-
function
|
|
5
|
-
return
|
|
4
|
+
function P(e) {
|
|
5
|
+
return W(e, { strict: !1 }) ? Math.ceil((e.length - 2) / 2) : e.length;
|
|
6
6
|
}
|
|
7
|
-
const
|
|
7
|
+
const Te = "2.23.13";
|
|
8
8
|
let _ = {
|
|
9
9
|
getDocsUrl: ({ docsBaseUrl: e, docsPath: t = "", docsSlug: s }) => t ? `${e ?? "https://viem.sh"}${t}${s ? `#${s}` : ""}` : void 0,
|
|
10
|
-
version: `viem@${
|
|
10
|
+
version: `viem@${Te}`
|
|
11
11
|
};
|
|
12
12
|
class u extends Error {
|
|
13
13
|
constructor(t, s = {}) {
|
|
@@ -15,11 +15,11 @@ class u extends Error {
|
|
|
15
15
|
const n = (() => {
|
|
16
16
|
var c;
|
|
17
17
|
return s.cause instanceof u ? s.cause.details : (c = s.cause) != null && c.message ? s.cause.message : s.details;
|
|
18
|
-
})(),
|
|
18
|
+
})(), r = s.cause instanceof u && s.cause.docsPath || s.docsPath, i = (a = _.getDocsUrl) == null ? void 0 : a.call(_, { ...s, docsPath: r }), o = [
|
|
19
19
|
t || "An error occurred.",
|
|
20
20
|
"",
|
|
21
21
|
...s.metaMessages ? [...s.metaMessages, ""] : [],
|
|
22
|
-
...
|
|
22
|
+
...i ? [`Docs: ${i}`] : [],
|
|
23
23
|
...n ? [`Details: ${n}`] : [],
|
|
24
24
|
..._.version ? [`Version: ${_.version}`] : []
|
|
25
25
|
].join(`
|
|
@@ -54,163 +54,163 @@ class u extends Error {
|
|
|
54
54
|
configurable: !0,
|
|
55
55
|
writable: !0,
|
|
56
56
|
value: "BaseError"
|
|
57
|
-
}), this.details = n, this.docsPath =
|
|
57
|
+
}), this.details = n, this.docsPath = r, this.metaMessages = s.metaMessages, this.name = s.name ?? this.name, this.shortMessage = t, this.version = Te;
|
|
58
58
|
}
|
|
59
59
|
walk(t) {
|
|
60
|
-
return
|
|
60
|
+
return $e(this, t);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
return t != null && t(e) ? e : e && typeof e == "object" && "cause" in e && e.cause !== void 0 ?
|
|
63
|
+
function $e(e, t) {
|
|
64
|
+
return t != null && t(e) ? e : e && typeof e == "object" && "cause" in e && e.cause !== void 0 ? $e(e.cause, t) : t ? null : e;
|
|
65
65
|
}
|
|
66
|
-
class
|
|
66
|
+
class Ae extends u {
|
|
67
67
|
constructor({ offset: t, position: s, size: n }) {
|
|
68
68
|
super(`Slice ${s === "start" ? "starting" : "ending"} at offset "${t}" is out-of-bounds (size: ${n}).`, { name: "SliceOffsetOutOfBoundsError" });
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
class
|
|
71
|
+
class Ce extends u {
|
|
72
72
|
constructor({ size: t, targetSize: s, type: n }) {
|
|
73
73
|
super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${t}) exceeds padding size (${s}).`, { name: "SizeExceedsPaddingSizeError" });
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
class
|
|
76
|
+
class on extends u {
|
|
77
77
|
constructor({ size: t, targetSize: s, type: n }) {
|
|
78
78
|
super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} is expected to be ${s} ${n} long, but is ${t} ${n} long.`, { name: "InvalidBytesLengthError" });
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
function H(e, { dir: t, size: s = 32 } = {}) {
|
|
82
|
-
return typeof e == "string" ?
|
|
82
|
+
return typeof e == "string" ? ht(e, { dir: t, size: s }) : pt(e, { dir: t, size: s });
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function ht(e, { dir: t, size: s = 32 } = {}) {
|
|
85
85
|
if (s === null)
|
|
86
86
|
return e;
|
|
87
87
|
const n = e.replace("0x", "");
|
|
88
88
|
if (n.length > s * 2)
|
|
89
|
-
throw new
|
|
89
|
+
throw new Ce({
|
|
90
90
|
size: Math.ceil(n.length / 2),
|
|
91
91
|
targetSize: s,
|
|
92
92
|
type: "hex"
|
|
93
93
|
});
|
|
94
94
|
return `0x${n[t === "right" ? "padEnd" : "padStart"](s * 2, "0")}`;
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function pt(e, { dir: t, size: s = 32 } = {}) {
|
|
97
97
|
if (s === null)
|
|
98
98
|
return e;
|
|
99
99
|
if (e.length > s)
|
|
100
|
-
throw new
|
|
100
|
+
throw new Ce({
|
|
101
101
|
size: e.length,
|
|
102
102
|
targetSize: s,
|
|
103
103
|
type: "bytes"
|
|
104
104
|
});
|
|
105
105
|
const n = new Uint8Array(s);
|
|
106
|
-
for (let
|
|
107
|
-
const
|
|
108
|
-
n[
|
|
106
|
+
for (let r = 0; r < s; r++) {
|
|
107
|
+
const i = t === "right";
|
|
108
|
+
n[i ? r : s - r - 1] = e[i ? r : e.length - r - 1];
|
|
109
109
|
}
|
|
110
110
|
return n;
|
|
111
111
|
}
|
|
112
|
-
class
|
|
113
|
-
constructor({ max: t, min: s, signed: n, size:
|
|
114
|
-
super(`Number "${
|
|
112
|
+
class bt extends u {
|
|
113
|
+
constructor({ max: t, min: s, signed: n, size: r, value: i }) {
|
|
114
|
+
super(`Number "${i}" is not in safe ${r ? `${r * 8}-bit ${n ? "signed" : "unsigned"} ` : ""}integer range ${t ? `(${s} to ${t})` : `(above ${s})`}`, { name: "IntegerOutOfRangeError" });
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
class
|
|
117
|
+
class an extends u {
|
|
118
118
|
constructor(t) {
|
|
119
119
|
super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`, {
|
|
120
120
|
name: "InvalidBytesBooleanError"
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
class
|
|
124
|
+
class mt extends u {
|
|
125
125
|
constructor(t) {
|
|
126
126
|
super(`Hex value "${t}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`, { name: "InvalidHexBooleanError" });
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
class
|
|
129
|
+
class xt extends u {
|
|
130
130
|
constructor({ givenSize: t, maxSize: s }) {
|
|
131
131
|
super(`Size cannot exceed ${s} bytes. Given size: ${t} bytes.`, { name: "SizeOverflowError" });
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function C(e, { dir: t = "left" } = {}) {
|
|
135
135
|
let s = typeof e == "string" ? e.replace("0x", "") : e, n = 0;
|
|
136
|
-
for (let
|
|
136
|
+
for (let r = 0; r < s.length - 1 && s[t === "left" ? r : s.length - r - 1].toString() === "0"; r++)
|
|
137
137
|
n++;
|
|
138
138
|
return s = t === "left" ? s.slice(n) : s.slice(0, s.length - n), typeof e == "string" ? (s.length === 1 && t === "right" && (s = `${s}0`), `0x${s.length % 2 === 1 ? `0${s}` : s}`) : s;
|
|
139
139
|
}
|
|
140
|
-
function
|
|
141
|
-
if (
|
|
142
|
-
throw new
|
|
143
|
-
givenSize:
|
|
140
|
+
function S(e, { size: t }) {
|
|
141
|
+
if (P(e) > t)
|
|
142
|
+
throw new xt({
|
|
143
|
+
givenSize: P(e),
|
|
144
144
|
maxSize: t
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function G(e, t = {}) {
|
|
148
148
|
const { signed: s } = t;
|
|
149
|
-
t.size &&
|
|
149
|
+
t.size && S(e, { size: t.size });
|
|
150
150
|
const n = BigInt(e);
|
|
151
151
|
if (!s)
|
|
152
152
|
return n;
|
|
153
|
-
const
|
|
154
|
-
return n <=
|
|
153
|
+
const r = (e.length - 2) / 2, i = (1n << BigInt(r) * 8n - 1n) - 1n;
|
|
154
|
+
return n <= i ? n : n - BigInt(`0x${"f".padStart(r * 2, "f")}`) - 1n;
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function cn(e, t = {}) {
|
|
157
157
|
let s = e;
|
|
158
|
-
if (t.size && (
|
|
158
|
+
if (t.size && (S(s, { size: t.size }), s = C(s)), C(s) === "0x00")
|
|
159
159
|
return !1;
|
|
160
|
-
if (
|
|
160
|
+
if (C(s) === "0x01")
|
|
161
161
|
return !0;
|
|
162
|
-
throw new
|
|
162
|
+
throw new mt(s);
|
|
163
163
|
}
|
|
164
|
-
function
|
|
165
|
-
return Number(
|
|
164
|
+
function J(e, t = {}) {
|
|
165
|
+
return Number(G(e, t));
|
|
166
166
|
}
|
|
167
|
-
const
|
|
168
|
-
function
|
|
169
|
-
return typeof e == "number" || typeof e == "bigint" ?
|
|
167
|
+
const gt = /* @__PURE__ */ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
|
|
168
|
+
function f(e, t = {}) {
|
|
169
|
+
return typeof e == "number" || typeof e == "bigint" ? Fe(e, t) : typeof e == "string" ? Et(e, t) : typeof e == "boolean" ? yt(e, t) : $(e, t);
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function yt(e, t = {}) {
|
|
172
172
|
const s = `0x${Number(e)}`;
|
|
173
|
-
return typeof t.size == "number" ? (
|
|
173
|
+
return typeof t.size == "number" ? (S(s, { size: t.size }), H(s, { size: t.size })) : s;
|
|
174
174
|
}
|
|
175
|
-
function
|
|
175
|
+
function $(e, t = {}) {
|
|
176
176
|
let s = "";
|
|
177
|
-
for (let
|
|
178
|
-
s +=
|
|
177
|
+
for (let r = 0; r < e.length; r++)
|
|
178
|
+
s += gt[e[r]];
|
|
179
179
|
const n = `0x${s}`;
|
|
180
|
-
return typeof t.size == "number" ? (
|
|
181
|
-
}
|
|
182
|
-
function
|
|
183
|
-
const { signed: s, size: n } = t,
|
|
184
|
-
let
|
|
185
|
-
n ? s ?
|
|
186
|
-
const o = typeof
|
|
187
|
-
if (
|
|
180
|
+
return typeof t.size == "number" ? (S(n, { size: t.size }), H(n, { dir: "right", size: t.size })) : n;
|
|
181
|
+
}
|
|
182
|
+
function Fe(e, t = {}) {
|
|
183
|
+
const { signed: s, size: n } = t, r = BigInt(e);
|
|
184
|
+
let i;
|
|
185
|
+
n ? s ? i = (1n << BigInt(n) * 8n - 1n) - 1n : i = 2n ** (BigInt(n) * 8n) - 1n : typeof e == "number" && (i = BigInt(Number.MAX_SAFE_INTEGER));
|
|
186
|
+
const o = typeof i == "bigint" && s ? -i - 1n : 0;
|
|
187
|
+
if (i && r > i || r < o) {
|
|
188
188
|
const c = typeof e == "bigint" ? "n" : "";
|
|
189
|
-
throw new
|
|
190
|
-
max:
|
|
189
|
+
throw new bt({
|
|
190
|
+
max: i ? `${i}${c}` : void 0,
|
|
191
191
|
min: `${o}${c}`,
|
|
192
192
|
signed: s,
|
|
193
193
|
size: n,
|
|
194
194
|
value: `${e}${c}`
|
|
195
195
|
});
|
|
196
196
|
}
|
|
197
|
-
const a = `0x${(s &&
|
|
197
|
+
const a = `0x${(s && r < 0 ? (1n << BigInt(n * 8)) + BigInt(r) : r).toString(16)}`;
|
|
198
198
|
return n ? H(a, { size: n }) : a;
|
|
199
199
|
}
|
|
200
|
-
const
|
|
201
|
-
function
|
|
202
|
-
const s =
|
|
203
|
-
return
|
|
200
|
+
const wt = /* @__PURE__ */ new TextEncoder();
|
|
201
|
+
function Et(e, t = {}) {
|
|
202
|
+
const s = wt.encode(e);
|
|
203
|
+
return $(s, t);
|
|
204
204
|
}
|
|
205
|
-
const
|
|
205
|
+
const Bt = /* @__PURE__ */ new TextEncoder();
|
|
206
206
|
function Ue(e, t = {}) {
|
|
207
|
-
return typeof e == "number" || typeof e == "bigint" ?
|
|
207
|
+
return typeof e == "number" || typeof e == "bigint" ? It(e, t) : typeof e == "boolean" ? Pt(e, t) : W(e) ? U(e, t) : ze(e, t);
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function Pt(e, t = {}) {
|
|
210
210
|
const s = new Uint8Array(1);
|
|
211
|
-
return s[0] = Number(e), typeof t.size == "number" ? (
|
|
211
|
+
return s[0] = Number(e), typeof t.size == "number" ? (S(s, { size: t.size }), H(s, { size: t.size })) : s;
|
|
212
212
|
}
|
|
213
|
-
const
|
|
213
|
+
const y = {
|
|
214
214
|
zero: 48,
|
|
215
215
|
nine: 57,
|
|
216
216
|
A: 65,
|
|
@@ -218,158 +218,158 @@ const x = {
|
|
|
218
218
|
a: 97,
|
|
219
219
|
f: 102
|
|
220
220
|
};
|
|
221
|
-
function
|
|
222
|
-
if (e >=
|
|
223
|
-
return e -
|
|
224
|
-
if (e >=
|
|
225
|
-
return e - (
|
|
226
|
-
if (e >=
|
|
227
|
-
return e - (
|
|
228
|
-
}
|
|
229
|
-
function
|
|
221
|
+
function xe(e) {
|
|
222
|
+
if (e >= y.zero && e <= y.nine)
|
|
223
|
+
return e - y.zero;
|
|
224
|
+
if (e >= y.A && e <= y.F)
|
|
225
|
+
return e - (y.A - 10);
|
|
226
|
+
if (e >= y.a && e <= y.f)
|
|
227
|
+
return e - (y.a - 10);
|
|
228
|
+
}
|
|
229
|
+
function U(e, t = {}) {
|
|
230
230
|
let s = e;
|
|
231
|
-
t.size && (
|
|
231
|
+
t.size && (S(s, { size: t.size }), s = H(s, { dir: "right", size: t.size }));
|
|
232
232
|
let n = s.slice(2);
|
|
233
233
|
n.length % 2 && (n = `0${n}`);
|
|
234
|
-
const
|
|
235
|
-
for (let o = 0, a = 0; o <
|
|
236
|
-
const c =
|
|
234
|
+
const r = n.length / 2, i = new Uint8Array(r);
|
|
235
|
+
for (let o = 0, a = 0; o < r; o++) {
|
|
236
|
+
const c = xe(n.charCodeAt(a++)), l = xe(n.charCodeAt(a++));
|
|
237
237
|
if (c === void 0 || l === void 0)
|
|
238
238
|
throw new u(`Invalid byte sequence ("${n[a - 2]}${n[a - 1]}" in "${n}").`);
|
|
239
|
-
|
|
239
|
+
i[o] = c * 16 + l;
|
|
240
240
|
}
|
|
241
|
-
return
|
|
241
|
+
return i;
|
|
242
242
|
}
|
|
243
|
-
function
|
|
244
|
-
const s =
|
|
245
|
-
return
|
|
243
|
+
function It(e, t) {
|
|
244
|
+
const s = Fe(e, t);
|
|
245
|
+
return U(s);
|
|
246
246
|
}
|
|
247
|
-
function
|
|
248
|
-
const s =
|
|
249
|
-
return typeof t.size == "number" ? (
|
|
247
|
+
function ze(e, t = {}) {
|
|
248
|
+
const s = Bt.encode(e);
|
|
249
|
+
return typeof t.size == "number" ? (S(s, { size: t.size }), H(s, { dir: "right", size: t.size })) : s;
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function Q(e) {
|
|
252
252
|
if (!Number.isSafeInteger(e) || e < 0)
|
|
253
253
|
throw new Error("positive integer expected, got " + e);
|
|
254
254
|
}
|
|
255
|
-
function
|
|
255
|
+
function vt(e) {
|
|
256
256
|
return e instanceof Uint8Array || ArrayBuffer.isView(e) && e.constructor.name === "Uint8Array";
|
|
257
257
|
}
|
|
258
|
-
function
|
|
259
|
-
if (!
|
|
258
|
+
function ee(e, ...t) {
|
|
259
|
+
if (!vt(e))
|
|
260
260
|
throw new Error("Uint8Array expected");
|
|
261
261
|
if (t.length > 0 && !t.includes(e.length))
|
|
262
262
|
throw new Error("Uint8Array expected of length " + t + ", got length=" + e.length);
|
|
263
263
|
}
|
|
264
|
-
function
|
|
264
|
+
function un(e) {
|
|
265
265
|
if (typeof e != "function" || typeof e.create != "function")
|
|
266
266
|
throw new Error("Hash should be wrapped by utils.wrapConstructor");
|
|
267
|
-
|
|
267
|
+
Q(e.outputLen), Q(e.blockLen);
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function Z(e, t = !0) {
|
|
270
270
|
if (e.destroyed)
|
|
271
271
|
throw new Error("Hash instance has been destroyed");
|
|
272
272
|
if (t && e.finished)
|
|
273
273
|
throw new Error("Hash#digest() has already been called");
|
|
274
274
|
}
|
|
275
|
-
function
|
|
276
|
-
|
|
275
|
+
function Se(e, t) {
|
|
276
|
+
ee(e);
|
|
277
277
|
const s = t.outputLen;
|
|
278
278
|
if (e.length < s)
|
|
279
279
|
throw new Error("digestInto() expects output buffer of length at least " + s);
|
|
280
280
|
}
|
|
281
|
-
const
|
|
282
|
-
function
|
|
283
|
-
return t ? { h: Number(e &
|
|
281
|
+
const Y = /* @__PURE__ */ BigInt(2 ** 32 - 1), ge = /* @__PURE__ */ BigInt(32);
|
|
282
|
+
function Tt(e, t = !1) {
|
|
283
|
+
return t ? { h: Number(e & Y), l: Number(e >> ge & Y) } : { h: Number(e >> ge & Y) | 0, l: Number(e & Y) | 0 };
|
|
284
284
|
}
|
|
285
|
-
function
|
|
285
|
+
function $t(e, t = !1) {
|
|
286
286
|
let s = new Uint32Array(e.length), n = new Uint32Array(e.length);
|
|
287
|
-
for (let
|
|
288
|
-
const { h:
|
|
289
|
-
[s[
|
|
287
|
+
for (let r = 0; r < e.length; r++) {
|
|
288
|
+
const { h: i, l: o } = Tt(e[r], t);
|
|
289
|
+
[s[r], n[r]] = [i, o];
|
|
290
290
|
}
|
|
291
291
|
return [s, n];
|
|
292
292
|
}
|
|
293
|
-
const
|
|
293
|
+
const At = (e, t, s) => e << s | t >>> 32 - s, Ct = (e, t, s) => t << s | e >>> 32 - s, Ft = (e, t, s) => t << s - 32 | e >>> 64 - s, Ut = (e, t, s) => e << s - 32 | t >>> 64 - s, L = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0;
|
|
294
294
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
295
|
-
function
|
|
295
|
+
function zt(e) {
|
|
296
296
|
return new Uint32Array(e.buffer, e.byteOffset, Math.floor(e.byteLength / 4));
|
|
297
297
|
}
|
|
298
|
-
function
|
|
298
|
+
function re(e) {
|
|
299
299
|
return new DataView(e.buffer, e.byteOffset, e.byteLength);
|
|
300
300
|
}
|
|
301
|
-
function
|
|
301
|
+
function x(e, t) {
|
|
302
302
|
return e << 32 - t | e >>> t;
|
|
303
303
|
}
|
|
304
|
-
const
|
|
305
|
-
function
|
|
304
|
+
const ye = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
305
|
+
function St(e) {
|
|
306
306
|
return e << 24 & 4278190080 | e << 8 & 16711680 | e >>> 8 & 65280 | e >>> 24 & 255;
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function we(e) {
|
|
309
309
|
for (let t = 0; t < e.length; t++)
|
|
310
|
-
e[t] =
|
|
310
|
+
e[t] = St(e[t]);
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function kt(e) {
|
|
313
313
|
if (typeof e != "string")
|
|
314
314
|
throw new Error("utf8ToBytes expected string, got " + typeof e);
|
|
315
315
|
return new Uint8Array(new TextEncoder().encode(e));
|
|
316
316
|
}
|
|
317
|
-
function
|
|
318
|
-
return typeof e == "string" && (e =
|
|
317
|
+
function ae(e) {
|
|
318
|
+
return typeof e == "string" && (e = kt(e)), ee(e), e;
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function ln(...e) {
|
|
321
321
|
let t = 0;
|
|
322
322
|
for (let n = 0; n < e.length; n++) {
|
|
323
|
-
const
|
|
324
|
-
|
|
323
|
+
const r = e[n];
|
|
324
|
+
ee(r), t += r.length;
|
|
325
325
|
}
|
|
326
326
|
const s = new Uint8Array(t);
|
|
327
|
-
for (let n = 0,
|
|
328
|
-
const
|
|
329
|
-
s.set(
|
|
327
|
+
for (let n = 0, r = 0; n < e.length; n++) {
|
|
328
|
+
const i = e[n];
|
|
329
|
+
s.set(i, r), r += i.length;
|
|
330
330
|
}
|
|
331
331
|
return s;
|
|
332
332
|
}
|
|
333
|
-
class
|
|
333
|
+
class ke {
|
|
334
334
|
// Safe version that clones internal state
|
|
335
335
|
clone() {
|
|
336
336
|
return this._cloneInto();
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
-
function
|
|
340
|
-
const t = (n) => e().update(
|
|
339
|
+
function Le(e) {
|
|
340
|
+
const t = (n) => e().update(ae(n)).digest(), s = e();
|
|
341
341
|
return t.outputLen = s.outputLen, t.blockLen = s.blockLen, t.create = () => e(), t;
|
|
342
342
|
}
|
|
343
|
-
function
|
|
344
|
-
if (
|
|
345
|
-
return
|
|
346
|
-
if (
|
|
347
|
-
return
|
|
343
|
+
function dn(e = 32) {
|
|
344
|
+
if (L && typeof L.getRandomValues == "function")
|
|
345
|
+
return L.getRandomValues(new Uint8Array(e));
|
|
346
|
+
if (L && typeof L.randomBytes == "function")
|
|
347
|
+
return L.randomBytes(e);
|
|
348
348
|
throw new Error("crypto.getRandomValues must be defined");
|
|
349
349
|
}
|
|
350
|
-
const
|
|
350
|
+
const Ge = [], He = [], Oe = [], Lt = /* @__PURE__ */ BigInt(0), V = /* @__PURE__ */ BigInt(1), Gt = /* @__PURE__ */ BigInt(2), Ht = /* @__PURE__ */ BigInt(7), Ot = /* @__PURE__ */ BigInt(256), Nt = /* @__PURE__ */ BigInt(113);
|
|
351
351
|
for (let e = 0, t = V, s = 1, n = 0; e < 24; e++) {
|
|
352
|
-
[s, n] = [n, (2 * s + 3 * n) % 5],
|
|
353
|
-
let
|
|
354
|
-
for (let
|
|
355
|
-
t = (t << V ^ (t >>
|
|
356
|
-
|
|
357
|
-
}
|
|
358
|
-
const [
|
|
359
|
-
function
|
|
352
|
+
[s, n] = [n, (2 * s + 3 * n) % 5], Ge.push(2 * (5 * n + s)), He.push((e + 1) * (e + 2) / 2 % 64);
|
|
353
|
+
let r = Lt;
|
|
354
|
+
for (let i = 0; i < 7; i++)
|
|
355
|
+
t = (t << V ^ (t >> Ht) * Nt) % Ot, t & Gt && (r ^= V << (V << /* @__PURE__ */ BigInt(i)) - V);
|
|
356
|
+
Oe.push(r);
|
|
357
|
+
}
|
|
358
|
+
const [Mt, _t] = /* @__PURE__ */ $t(Oe, !0), Ee = (e, t, s) => s > 32 ? Ft(e, t, s) : At(e, t, s), Be = (e, t, s) => s > 32 ? Ut(e, t, s) : Ct(e, t, s);
|
|
359
|
+
function Vt(e, t = 24) {
|
|
360
360
|
const s = new Uint32Array(10);
|
|
361
361
|
for (let n = 24 - t; n < 24; n++) {
|
|
362
362
|
for (let o = 0; o < 10; o++)
|
|
363
363
|
s[o] = e[o] ^ e[o + 10] ^ e[o + 20] ^ e[o + 30] ^ e[o + 40];
|
|
364
364
|
for (let o = 0; o < 10; o += 2) {
|
|
365
|
-
const a = (o + 8) % 10, c = (o + 2) % 10, l = s[c], h = s[c + 1],
|
|
365
|
+
const a = (o + 8) % 10, c = (o + 2) % 10, l = s[c], h = s[c + 1], d = Ee(l, h, 1) ^ s[a], b = Be(l, h, 1) ^ s[a + 1];
|
|
366
366
|
for (let p = 0; p < 50; p += 10)
|
|
367
|
-
e[o + p] ^=
|
|
367
|
+
e[o + p] ^= d, e[o + p + 1] ^= b;
|
|
368
368
|
}
|
|
369
|
-
let
|
|
369
|
+
let r = e[2], i = e[3];
|
|
370
370
|
for (let o = 0; o < 24; o++) {
|
|
371
|
-
const a =
|
|
372
|
-
|
|
371
|
+
const a = He[o], c = Ee(r, i, a), l = Be(r, i, a), h = Ge[o];
|
|
372
|
+
r = e[h], i = e[h + 1], e[h] = c, e[h + 1] = l;
|
|
373
373
|
}
|
|
374
374
|
for (let o = 0; o < 50; o += 10) {
|
|
375
375
|
for (let a = 0; a < 10; a++)
|
|
@@ -377,29 +377,29 @@ function Ot(e, t = 24) {
|
|
|
377
377
|
for (let a = 0; a < 10; a++)
|
|
378
378
|
e[o + a] ^= ~s[(a + 2) % 10] & s[(a + 4) % 10];
|
|
379
379
|
}
|
|
380
|
-
e[0] ^=
|
|
380
|
+
e[0] ^= Mt[n], e[1] ^= _t[n];
|
|
381
381
|
}
|
|
382
382
|
s.fill(0);
|
|
383
383
|
}
|
|
384
|
-
class
|
|
384
|
+
class ce extends ke {
|
|
385
385
|
// NOTE: we accept arguments in bytes instead of bits here.
|
|
386
|
-
constructor(t, s, n,
|
|
387
|
-
if (super(), this.blockLen = t, this.suffix = s, this.outputLen = n, this.enableXOF =
|
|
386
|
+
constructor(t, s, n, r = !1, i = 24) {
|
|
387
|
+
if (super(), this.blockLen = t, this.suffix = s, this.outputLen = n, this.enableXOF = r, this.rounds = i, this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, Q(n), 0 >= this.blockLen || this.blockLen >= 200)
|
|
388
388
|
throw new Error("Sha3 supports only keccak-f1600 function");
|
|
389
|
-
this.state = new Uint8Array(200), this.state32 =
|
|
389
|
+
this.state = new Uint8Array(200), this.state32 = zt(this.state);
|
|
390
390
|
}
|
|
391
391
|
keccak() {
|
|
392
|
-
|
|
392
|
+
ye || we(this.state32), Vt(this.state32, this.rounds), ye || we(this.state32), this.posOut = 0, this.pos = 0;
|
|
393
393
|
}
|
|
394
394
|
update(t) {
|
|
395
|
-
|
|
395
|
+
Z(this);
|
|
396
396
|
const { blockLen: s, state: n } = this;
|
|
397
|
-
t =
|
|
398
|
-
const
|
|
399
|
-
for (let
|
|
400
|
-
const o = Math.min(s - this.pos,
|
|
397
|
+
t = ae(t);
|
|
398
|
+
const r = t.length;
|
|
399
|
+
for (let i = 0; i < r; ) {
|
|
400
|
+
const o = Math.min(s - this.pos, r - i);
|
|
401
401
|
for (let a = 0; a < o; a++)
|
|
402
|
-
n[this.pos++] ^= t[
|
|
402
|
+
n[this.pos++] ^= t[i++];
|
|
403
403
|
this.pos === s && this.keccak();
|
|
404
404
|
}
|
|
405
405
|
return this;
|
|
@@ -408,16 +408,16 @@ class ae extends Le {
|
|
|
408
408
|
if (this.finished)
|
|
409
409
|
return;
|
|
410
410
|
this.finished = !0;
|
|
411
|
-
const { state: t, suffix: s, pos: n, blockLen:
|
|
412
|
-
t[n] ^= s, (s & 128) !== 0 && n ===
|
|
411
|
+
const { state: t, suffix: s, pos: n, blockLen: r } = this;
|
|
412
|
+
t[n] ^= s, (s & 128) !== 0 && n === r - 1 && this.keccak(), t[r - 1] ^= 128, this.keccak();
|
|
413
413
|
}
|
|
414
414
|
writeInto(t) {
|
|
415
|
-
|
|
415
|
+
Z(this, !1), ee(t), this.finish();
|
|
416
416
|
const s = this.state, { blockLen: n } = this;
|
|
417
|
-
for (let
|
|
417
|
+
for (let r = 0, i = t.length; r < i; ) {
|
|
418
418
|
this.posOut >= n && this.keccak();
|
|
419
|
-
const o = Math.min(n - this.posOut,
|
|
420
|
-
t.set(s.subarray(this.posOut, this.posOut + o),
|
|
419
|
+
const o = Math.min(n - this.posOut, i - r);
|
|
420
|
+
t.set(s.subarray(this.posOut, this.posOut + o), r), this.posOut += o, r += o;
|
|
421
421
|
}
|
|
422
422
|
return t;
|
|
423
423
|
}
|
|
@@ -427,10 +427,10 @@ class ae extends Le {
|
|
|
427
427
|
return this.writeInto(t);
|
|
428
428
|
}
|
|
429
429
|
xof(t) {
|
|
430
|
-
return
|
|
430
|
+
return Q(t), this.xofInto(new Uint8Array(t));
|
|
431
431
|
}
|
|
432
432
|
digestInto(t) {
|
|
433
|
-
if (
|
|
433
|
+
if (Se(t, this), this.finished)
|
|
434
434
|
throw new Error("digest() was already called");
|
|
435
435
|
return this.writeInto(t), this.destroy(), t;
|
|
436
436
|
}
|
|
@@ -441,16 +441,16 @@ class ae extends Le {
|
|
|
441
441
|
this.destroyed = !0, this.state.fill(0);
|
|
442
442
|
}
|
|
443
443
|
_cloneInto(t) {
|
|
444
|
-
const { blockLen: s, suffix: n, outputLen:
|
|
445
|
-
return t || (t = new
|
|
444
|
+
const { blockLen: s, suffix: n, outputLen: r, rounds: i, enableXOF: o } = this;
|
|
445
|
+
return t || (t = new ce(s, n, r, o, i)), t.state32.set(this.state32), t.pos = this.pos, t.posOut = this.posOut, t.finished = this.finished, t.rounds = i, t.suffix = n, t.outputLen = r, t.enableXOF = o, t.destroyed = this.destroyed, t;
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
|
-
const
|
|
449
|
-
function
|
|
450
|
-
const s = t || "hex", n =
|
|
451
|
-
return s === "bytes" ? n :
|
|
448
|
+
const Dt = (e, t, s) => Le(() => new ce(t, e, s)), jt = /* @__PURE__ */ Dt(1, 136, 256 / 8);
|
|
449
|
+
function Rt(e, t) {
|
|
450
|
+
const s = t || "hex", n = jt(W(e, { strict: !1 }) ? Ue(e) : e);
|
|
451
|
+
return s === "bytes" ? n : f(n);
|
|
452
452
|
}
|
|
453
|
-
class
|
|
453
|
+
class I extends u {
|
|
454
454
|
constructor({ address: t }) {
|
|
455
455
|
super(`Address "${t}" is invalid.`, {
|
|
456
456
|
metaMessages: [
|
|
@@ -461,7 +461,7 @@ class P extends u {
|
|
|
461
461
|
});
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
|
-
class
|
|
464
|
+
class Ne extends Map {
|
|
465
465
|
constructor(t) {
|
|
466
466
|
super(), Object.defineProperty(this, "maxSize", {
|
|
467
467
|
enumerable: !0,
|
|
@@ -482,96 +482,96 @@ class Oe extends Map {
|
|
|
482
482
|
return this;
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
|
-
const ie = /* @__PURE__ */ new
|
|
486
|
-
function
|
|
485
|
+
const ie = /* @__PURE__ */ new Ne(8192);
|
|
486
|
+
function Me(e, t) {
|
|
487
487
|
if (ie.has(`${e}.${t}`))
|
|
488
488
|
return ie.get(`${e}.${t}`);
|
|
489
|
-
const s = e.substring(2).toLowerCase(), n =
|
|
489
|
+
const s = e.substring(2).toLowerCase(), n = Rt(ze(s), "bytes"), r = s.split("");
|
|
490
490
|
for (let o = 0; o < 40; o += 2)
|
|
491
|
-
n[o >> 1] >> 4 >= 8 &&
|
|
492
|
-
const
|
|
493
|
-
return ie.set(`${e}.${t}`,
|
|
491
|
+
n[o >> 1] >> 4 >= 8 && r[o] && (r[o] = r[o].toUpperCase()), (n[o >> 1] & 15) >= 8 && r[o + 1] && (r[o + 1] = r[o + 1].toUpperCase());
|
|
492
|
+
const i = `0x${r.join("")}`;
|
|
493
|
+
return ie.set(`${e}.${t}`, i), i;
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function fn(e, t) {
|
|
496
496
|
if (!v(e, { strict: !1 }))
|
|
497
|
-
throw new
|
|
498
|
-
return
|
|
497
|
+
throw new I({ address: e });
|
|
498
|
+
return Me(e, t);
|
|
499
499
|
}
|
|
500
|
-
const
|
|
500
|
+
const Kt = /^0x[a-fA-F0-9]{40}$/, oe = /* @__PURE__ */ new Ne(8192);
|
|
501
501
|
function v(e, t) {
|
|
502
502
|
const { strict: s = !0 } = t ?? {}, n = `${e}.${s}`;
|
|
503
|
-
if (
|
|
504
|
-
return
|
|
505
|
-
const
|
|
506
|
-
return
|
|
503
|
+
if (oe.has(n))
|
|
504
|
+
return oe.get(n);
|
|
505
|
+
const r = Kt.test(e) ? e.toLowerCase() === e ? !0 : s ? Me(e) === e : !0 : !1;
|
|
506
|
+
return oe.set(n, r), r;
|
|
507
507
|
}
|
|
508
|
-
function
|
|
509
|
-
return typeof e[0] == "string" ? O(e) :
|
|
508
|
+
function hn(e) {
|
|
509
|
+
return typeof e[0] == "string" ? O(e) : Wt(e);
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function Wt(e) {
|
|
512
512
|
let t = 0;
|
|
513
|
-
for (const
|
|
514
|
-
t +=
|
|
513
|
+
for (const r of e)
|
|
514
|
+
t += r.length;
|
|
515
515
|
const s = new Uint8Array(t);
|
|
516
516
|
let n = 0;
|
|
517
|
-
for (const
|
|
518
|
-
s.set(
|
|
517
|
+
for (const r of e)
|
|
518
|
+
s.set(r, n), n += r.length;
|
|
519
519
|
return s;
|
|
520
520
|
}
|
|
521
521
|
function O(e) {
|
|
522
522
|
return `0x${e.reduce((t, s) => t + s.replace("0x", ""), "")}`;
|
|
523
523
|
}
|
|
524
|
-
function
|
|
525
|
-
return
|
|
524
|
+
function Xt(e, t, s, { strict: n } = {}) {
|
|
525
|
+
return W(e, { strict: !1 }) ? Yt(e, t, s, {
|
|
526
526
|
strict: n
|
|
527
|
-
}) :
|
|
527
|
+
}) : qt(e, t, s, {
|
|
528
528
|
strict: n
|
|
529
529
|
});
|
|
530
530
|
}
|
|
531
|
-
function
|
|
532
|
-
if (typeof t == "number" && t > 0 && t >
|
|
533
|
-
throw new
|
|
531
|
+
function _e(e, t) {
|
|
532
|
+
if (typeof t == "number" && t > 0 && t > P(e) - 1)
|
|
533
|
+
throw new Ae({
|
|
534
534
|
offset: t,
|
|
535
535
|
position: "start",
|
|
536
|
-
size:
|
|
536
|
+
size: P(e)
|
|
537
537
|
});
|
|
538
538
|
}
|
|
539
|
-
function
|
|
540
|
-
if (typeof t == "number" && typeof s == "number" &&
|
|
541
|
-
throw new
|
|
539
|
+
function Ve(e, t, s) {
|
|
540
|
+
if (typeof t == "number" && typeof s == "number" && P(e) !== s - t)
|
|
541
|
+
throw new Ae({
|
|
542
542
|
offset: s,
|
|
543
543
|
position: "end",
|
|
544
|
-
size:
|
|
544
|
+
size: P(e)
|
|
545
545
|
});
|
|
546
546
|
}
|
|
547
|
-
function
|
|
548
|
-
|
|
549
|
-
const
|
|
550
|
-
return n &&
|
|
547
|
+
function qt(e, t, s, { strict: n } = {}) {
|
|
548
|
+
_e(e, t);
|
|
549
|
+
const r = e.slice(t, s);
|
|
550
|
+
return n && Ve(r, t, s), r;
|
|
551
551
|
}
|
|
552
|
-
function
|
|
553
|
-
|
|
554
|
-
const
|
|
555
|
-
return n &&
|
|
552
|
+
function Yt(e, t, s, { strict: n } = {}) {
|
|
553
|
+
_e(e, t);
|
|
554
|
+
const r = `0x${e.replace("0x", "").slice((t ?? 0) * 2, (s ?? e.length) * 2)}`;
|
|
555
|
+
return n && Ve(r, t, s), r;
|
|
556
556
|
}
|
|
557
|
-
class
|
|
557
|
+
class Pe extends u {
|
|
558
558
|
constructor({ offset: t }) {
|
|
559
559
|
super(`Offset \`${t}\` cannot be negative.`, {
|
|
560
560
|
name: "NegativeOffsetError"
|
|
561
561
|
});
|
|
562
562
|
}
|
|
563
563
|
}
|
|
564
|
-
class
|
|
564
|
+
class Jt extends u {
|
|
565
565
|
constructor({ length: t, position: s }) {
|
|
566
566
|
super(`Position \`${s}\` is out of bounds (\`0 < position < ${t}\`).`, { name: "PositionOutOfBoundsError" });
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
class
|
|
569
|
+
class Qt extends u {
|
|
570
570
|
constructor({ count: t, limit: s }) {
|
|
571
571
|
super(`Recursive read limit of \`${s}\` exceeded (recursive read count: \`${t}\`).`, { name: "RecursiveReadLimitExceededError" });
|
|
572
572
|
}
|
|
573
573
|
}
|
|
574
|
-
const
|
|
574
|
+
const Zt = {
|
|
575
575
|
bytes: new Uint8Array(),
|
|
576
576
|
dataView: new DataView(new ArrayBuffer(0)),
|
|
577
577
|
position: 0,
|
|
@@ -580,21 +580,21 @@ const qt = {
|
|
|
580
580
|
recursiveReadLimit: Number.POSITIVE_INFINITY,
|
|
581
581
|
assertReadLimit() {
|
|
582
582
|
if (this.recursiveReadCount >= this.recursiveReadLimit)
|
|
583
|
-
throw new
|
|
583
|
+
throw new Qt({
|
|
584
584
|
count: this.recursiveReadCount + 1,
|
|
585
585
|
limit: this.recursiveReadLimit
|
|
586
586
|
});
|
|
587
587
|
},
|
|
588
588
|
assertPosition(e) {
|
|
589
589
|
if (e < 0 || e > this.bytes.length - 1)
|
|
590
|
-
throw new
|
|
590
|
+
throw new Jt({
|
|
591
591
|
length: this.bytes.length,
|
|
592
592
|
position: e
|
|
593
593
|
});
|
|
594
594
|
},
|
|
595
595
|
decrementPosition(e) {
|
|
596
596
|
if (e < 0)
|
|
597
|
-
throw new
|
|
597
|
+
throw new Pe({ offset: e });
|
|
598
598
|
const t = this.position - e;
|
|
599
599
|
this.assertPosition(t), this.position = t;
|
|
600
600
|
},
|
|
@@ -603,7 +603,7 @@ const qt = {
|
|
|
603
603
|
},
|
|
604
604
|
incrementPosition(e) {
|
|
605
605
|
if (e < 0)
|
|
606
|
-
throw new
|
|
606
|
+
throw new Pe({ offset: e });
|
|
607
607
|
const t = this.position + e;
|
|
608
608
|
this.assertPosition(t), this.position = t;
|
|
609
609
|
},
|
|
@@ -693,39 +693,39 @@ const qt = {
|
|
|
693
693
|
this.positionReadCount.set(this.position, e + 1), e > 0 && this.recursiveReadCount++;
|
|
694
694
|
}
|
|
695
695
|
};
|
|
696
|
-
function
|
|
697
|
-
const s = Object.create(
|
|
696
|
+
function De(e, { recursiveReadLimit: t = 8192 } = {}) {
|
|
697
|
+
const s = Object.create(Zt);
|
|
698
698
|
return s.bytes = e, s.dataView = new DataView(e.buffer, e.byteOffset, e.byteLength), s.positionReadCount = /* @__PURE__ */ new Map(), s.recursiveReadLimit = t, s;
|
|
699
699
|
}
|
|
700
|
-
const
|
|
700
|
+
const es = {
|
|
701
701
|
gwei: 9,
|
|
702
702
|
wei: 18
|
|
703
|
-
},
|
|
703
|
+
}, ts = {
|
|
704
704
|
ether: -9,
|
|
705
705
|
wei: 9
|
|
706
706
|
};
|
|
707
|
-
function
|
|
707
|
+
function je(e, t) {
|
|
708
708
|
let s = e.toString();
|
|
709
709
|
const n = s.startsWith("-");
|
|
710
710
|
n && (s = s.slice(1)), s = s.padStart(t, "0");
|
|
711
|
-
let [
|
|
711
|
+
let [r, i] = [
|
|
712
712
|
s.slice(0, s.length - t),
|
|
713
713
|
s.slice(s.length - t)
|
|
714
714
|
];
|
|
715
|
-
return
|
|
715
|
+
return i = i.replace(/(0+)$/, ""), `${n ? "-" : ""}${r || "0"}${i ? `.${i}` : ""}`;
|
|
716
716
|
}
|
|
717
|
-
function
|
|
718
|
-
return
|
|
717
|
+
function ss(e, t = "wei") {
|
|
718
|
+
return je(e, es[t]);
|
|
719
719
|
}
|
|
720
720
|
function F(e, t = "wei") {
|
|
721
|
-
return
|
|
721
|
+
return je(e, ts[t]);
|
|
722
722
|
}
|
|
723
|
-
function
|
|
724
|
-
const t = Object.entries(e).map(([n,
|
|
725
|
-
return t.map(([n,
|
|
723
|
+
function Re(e) {
|
|
724
|
+
const t = Object.entries(e).map(([n, r]) => r === void 0 || r === !1 ? null : [n, r]).filter(Boolean), s = t.reduce((n, [r]) => Math.max(n, r.length), 0);
|
|
725
|
+
return t.map(([n, r]) => ` ${`${n}:`.padEnd(s + 1)} ${r}`).join(`
|
|
726
726
|
`);
|
|
727
727
|
}
|
|
728
|
-
class
|
|
728
|
+
class pn extends u {
|
|
729
729
|
constructor() {
|
|
730
730
|
super([
|
|
731
731
|
"Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.",
|
|
@@ -734,20 +734,20 @@ class un extends u {
|
|
|
734
734
|
`), { name: "FeeConflictError" });
|
|
735
735
|
}
|
|
736
736
|
}
|
|
737
|
-
class
|
|
737
|
+
class ns extends u {
|
|
738
738
|
constructor({ v: t }) {
|
|
739
739
|
super(`Invalid \`v\` value "${t}". Expected 27 or 28.`, {
|
|
740
740
|
name: "InvalidLegacyVError"
|
|
741
741
|
});
|
|
742
742
|
}
|
|
743
743
|
}
|
|
744
|
-
class
|
|
744
|
+
class rs extends u {
|
|
745
745
|
constructor({ transaction: t }) {
|
|
746
746
|
super("Cannot infer a transaction type from provided transaction.", {
|
|
747
747
|
metaMessages: [
|
|
748
748
|
"Provided Transaction:",
|
|
749
749
|
"{",
|
|
750
|
-
|
|
750
|
+
Re(t),
|
|
751
751
|
"}",
|
|
752
752
|
"",
|
|
753
753
|
"To infer the type, either provide:",
|
|
@@ -762,20 +762,20 @@ class es extends u {
|
|
|
762
762
|
});
|
|
763
763
|
}
|
|
764
764
|
}
|
|
765
|
-
class
|
|
765
|
+
class is extends u {
|
|
766
766
|
constructor({ storageKey: t }) {
|
|
767
767
|
super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length - 2) / 2)} bytes.`, { name: "InvalidStorageKeySizeError" });
|
|
768
768
|
}
|
|
769
769
|
}
|
|
770
|
-
class
|
|
771
|
-
constructor(t, { account: s, docsPath: n, chain:
|
|
772
|
-
var
|
|
773
|
-
const p =
|
|
774
|
-
chain:
|
|
770
|
+
class bn extends u {
|
|
771
|
+
constructor(t, { account: s, docsPath: n, chain: r, data: i, gas: o, gasPrice: a, maxFeePerGas: c, maxPriorityFeePerGas: l, nonce: h, to: d, value: b }) {
|
|
772
|
+
var w;
|
|
773
|
+
const p = Re({
|
|
774
|
+
chain: r && `${r == null ? void 0 : r.name} (id: ${r == null ? void 0 : r.id})`,
|
|
775
775
|
from: s == null ? void 0 : s.address,
|
|
776
|
-
to:
|
|
777
|
-
value: typeof b < "u" && `${
|
|
778
|
-
data:
|
|
776
|
+
to: d,
|
|
777
|
+
value: typeof b < "u" && `${ss(b)} ${((w = r == null ? void 0 : r.nativeCurrency) == null ? void 0 : w.symbol) || "ETH"}`,
|
|
778
|
+
data: i,
|
|
779
779
|
gas: o,
|
|
780
780
|
gasPrice: typeof a < "u" && `${F(a)} gwei`,
|
|
781
781
|
maxFeePerGas: typeof c < "u" && `${F(c)} gwei`,
|
|
@@ -799,54 +799,54 @@ class ln extends u {
|
|
|
799
799
|
}), this.cause = t;
|
|
800
800
|
}
|
|
801
801
|
}
|
|
802
|
-
class
|
|
803
|
-
constructor({ blockHash: t, blockNumber: s, blockTag: n, hash:
|
|
802
|
+
class mn extends u {
|
|
803
|
+
constructor({ blockHash: t, blockNumber: s, blockTag: n, hash: r, index: i }) {
|
|
804
804
|
let o = "Transaction";
|
|
805
|
-
n &&
|
|
805
|
+
n && i !== void 0 && (o = `Transaction at block time "${n}" at index "${i}"`), t && i !== void 0 && (o = `Transaction at block hash "${t}" at index "${i}"`), s && i !== void 0 && (o = `Transaction at block number "${s}" at index "${i}"`), r && (o = `Transaction with hash "${r}"`), super(`${o} could not be found.`, {
|
|
806
806
|
name: "TransactionNotFoundError"
|
|
807
807
|
});
|
|
808
808
|
}
|
|
809
809
|
}
|
|
810
|
-
class
|
|
810
|
+
class xn extends u {
|
|
811
811
|
constructor({ hash: t }) {
|
|
812
812
|
super(`Transaction receipt with hash "${t}" could not be found. The Transaction may not be processed on a block yet.`, {
|
|
813
813
|
name: "TransactionReceiptNotFoundError"
|
|
814
814
|
});
|
|
815
815
|
}
|
|
816
816
|
}
|
|
817
|
-
class
|
|
817
|
+
class gn extends u {
|
|
818
818
|
constructor({ hash: t }) {
|
|
819
819
|
super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`, { name: "WaitForTransactionReceiptTimeoutError" });
|
|
820
820
|
}
|
|
821
821
|
}
|
|
822
|
-
function
|
|
823
|
-
const s =
|
|
824
|
-
return s.encode(n), t === "hex" ?
|
|
822
|
+
function z(e, t = "hex") {
|
|
823
|
+
const s = Ke(e), n = De(new Uint8Array(s.length));
|
|
824
|
+
return s.encode(n), t === "hex" ? $(n.bytes) : n.bytes;
|
|
825
825
|
}
|
|
826
|
-
function
|
|
827
|
-
return Array.isArray(e) ?
|
|
826
|
+
function Ke(e) {
|
|
827
|
+
return Array.isArray(e) ? os(e.map((t) => Ke(t))) : as(e);
|
|
828
828
|
}
|
|
829
|
-
function
|
|
830
|
-
const t = e.reduce((
|
|
829
|
+
function os(e) {
|
|
830
|
+
const t = e.reduce((r, i) => r + i.length, 0), s = We(t);
|
|
831
831
|
return {
|
|
832
832
|
length: t <= 55 ? 1 + t : 1 + s + t,
|
|
833
|
-
encode(
|
|
834
|
-
t <= 55 ?
|
|
835
|
-
for (const { encode:
|
|
836
|
-
r
|
|
833
|
+
encode(r) {
|
|
834
|
+
t <= 55 ? r.pushByte(192 + t) : (r.pushByte(247 + s), s === 1 ? r.pushUint8(t) : s === 2 ? r.pushUint16(t) : s === 3 ? r.pushUint24(t) : r.pushUint32(t));
|
|
835
|
+
for (const { encode: i } of e)
|
|
836
|
+
i(r);
|
|
837
837
|
}
|
|
838
838
|
};
|
|
839
839
|
}
|
|
840
|
-
function
|
|
841
|
-
const t = typeof e == "string" ?
|
|
840
|
+
function as(e) {
|
|
841
|
+
const t = typeof e == "string" ? U(e) : e, s = We(t.length);
|
|
842
842
|
return {
|
|
843
843
|
length: t.length === 1 && t[0] < 128 ? 1 : t.length <= 55 ? 1 + t.length : 1 + s + t.length,
|
|
844
|
-
encode(
|
|
845
|
-
t.length === 1 && t[0] < 128 ?
|
|
844
|
+
encode(r) {
|
|
845
|
+
t.length === 1 && t[0] < 128 ? r.pushBytes(t) : t.length <= 55 ? (r.pushByte(128 + t.length), r.pushBytes(t)) : (r.pushByte(183 + s), s === 1 ? r.pushUint8(t.length) : s === 2 ? r.pushUint16(t.length) : s === 3 ? r.pushUint24(t.length) : r.pushUint32(t.length), r.pushBytes(t));
|
|
846
846
|
}
|
|
847
847
|
};
|
|
848
848
|
}
|
|
849
|
-
function
|
|
849
|
+
function We(e) {
|
|
850
850
|
if (e < 2 ** 8)
|
|
851
851
|
return 1;
|
|
852
852
|
if (e < 2 ** 16)
|
|
@@ -857,29 +857,29 @@ function Ke(e) {
|
|
|
857
857
|
return 4;
|
|
858
858
|
throw new u("Length is too large.");
|
|
859
859
|
}
|
|
860
|
-
class
|
|
860
|
+
class Xe extends u {
|
|
861
861
|
constructor({ cause: t, message: s } = {}) {
|
|
862
|
-
var
|
|
863
|
-
const n = (
|
|
862
|
+
var r;
|
|
863
|
+
const n = (r = s == null ? void 0 : s.replace("execution reverted: ", "")) == null ? void 0 : r.replace("execution reverted", "");
|
|
864
864
|
super(`Execution reverted ${n ? `with reason: ${n}` : "for an unknown reason"}.`, {
|
|
865
865
|
cause: t,
|
|
866
866
|
name: "ExecutionRevertedError"
|
|
867
867
|
});
|
|
868
868
|
}
|
|
869
869
|
}
|
|
870
|
-
Object.defineProperty(
|
|
870
|
+
Object.defineProperty(Xe, "code", {
|
|
871
871
|
enumerable: !0,
|
|
872
872
|
configurable: !0,
|
|
873
873
|
writable: !0,
|
|
874
874
|
value: 3
|
|
875
875
|
});
|
|
876
|
-
Object.defineProperty(
|
|
876
|
+
Object.defineProperty(Xe, "nodeMessage", {
|
|
877
877
|
enumerable: !0,
|
|
878
878
|
configurable: !0,
|
|
879
879
|
writable: !0,
|
|
880
880
|
value: /execution reverted/
|
|
881
881
|
});
|
|
882
|
-
class
|
|
882
|
+
class te extends u {
|
|
883
883
|
constructor({ cause: t, maxFeePerGas: s } = {}) {
|
|
884
884
|
super(`The fee cap (\`maxFeePerGas\`${s ? ` = ${F(s)} gwei` : ""}) cannot be higher than the maximum allowed value (2^256-1).`, {
|
|
885
885
|
cause: t,
|
|
@@ -887,13 +887,13 @@ class ee extends u {
|
|
|
887
887
|
});
|
|
888
888
|
}
|
|
889
889
|
}
|
|
890
|
-
Object.defineProperty(
|
|
890
|
+
Object.defineProperty(te, "nodeMessage", {
|
|
891
891
|
enumerable: !0,
|
|
892
892
|
configurable: !0,
|
|
893
893
|
writable: !0,
|
|
894
894
|
value: /max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/
|
|
895
895
|
});
|
|
896
|
-
class
|
|
896
|
+
class cs extends u {
|
|
897
897
|
constructor({ cause: t, maxFeePerGas: s } = {}) {
|
|
898
898
|
super(`The fee cap (\`maxFeePerGas\`${s ? ` = ${F(s)}` : ""} gwei) cannot be lower than the block base fee.`, {
|
|
899
899
|
cause: t,
|
|
@@ -901,24 +901,24 @@ class is extends u {
|
|
|
901
901
|
});
|
|
902
902
|
}
|
|
903
903
|
}
|
|
904
|
-
Object.defineProperty(
|
|
904
|
+
Object.defineProperty(cs, "nodeMessage", {
|
|
905
905
|
enumerable: !0,
|
|
906
906
|
configurable: !0,
|
|
907
907
|
writable: !0,
|
|
908
908
|
value: /max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/
|
|
909
909
|
});
|
|
910
|
-
class
|
|
910
|
+
class us extends u {
|
|
911
911
|
constructor({ cause: t, nonce: s } = {}) {
|
|
912
912
|
super(`Nonce provided for the transaction ${s ? `(${s}) ` : ""}is higher than the next one expected.`, { cause: t, name: "NonceTooHighError" });
|
|
913
913
|
}
|
|
914
914
|
}
|
|
915
|
-
Object.defineProperty(
|
|
915
|
+
Object.defineProperty(us, "nodeMessage", {
|
|
916
916
|
enumerable: !0,
|
|
917
917
|
configurable: !0,
|
|
918
918
|
writable: !0,
|
|
919
919
|
value: /nonce too high/
|
|
920
920
|
});
|
|
921
|
-
class
|
|
921
|
+
class ls extends u {
|
|
922
922
|
constructor({ cause: t, nonce: s } = {}) {
|
|
923
923
|
super([
|
|
924
924
|
`Nonce provided for the transaction ${s ? `(${s}) ` : ""}is lower than the current nonce of the account.`,
|
|
@@ -927,24 +927,24 @@ class os extends u {
|
|
|
927
927
|
`), { cause: t, name: "NonceTooLowError" });
|
|
928
928
|
}
|
|
929
929
|
}
|
|
930
|
-
Object.defineProperty(
|
|
930
|
+
Object.defineProperty(ls, "nodeMessage", {
|
|
931
931
|
enumerable: !0,
|
|
932
932
|
configurable: !0,
|
|
933
933
|
writable: !0,
|
|
934
934
|
value: /nonce too low|transaction already imported|already known/
|
|
935
935
|
});
|
|
936
|
-
class
|
|
936
|
+
class ds extends u {
|
|
937
937
|
constructor({ cause: t, nonce: s } = {}) {
|
|
938
938
|
super(`Nonce provided for the transaction ${s ? `(${s}) ` : ""}exceeds the maximum allowed nonce.`, { cause: t, name: "NonceMaxValueError" });
|
|
939
939
|
}
|
|
940
940
|
}
|
|
941
|
-
Object.defineProperty(
|
|
941
|
+
Object.defineProperty(ds, "nodeMessage", {
|
|
942
942
|
enumerable: !0,
|
|
943
943
|
configurable: !0,
|
|
944
944
|
writable: !0,
|
|
945
945
|
value: /nonce has max value/
|
|
946
946
|
});
|
|
947
|
-
class
|
|
947
|
+
class fs extends u {
|
|
948
948
|
constructor({ cause: t } = {}) {
|
|
949
949
|
super([
|
|
950
950
|
"The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."
|
|
@@ -965,13 +965,13 @@ class cs extends u {
|
|
|
965
965
|
});
|
|
966
966
|
}
|
|
967
967
|
}
|
|
968
|
-
Object.defineProperty(
|
|
968
|
+
Object.defineProperty(fs, "nodeMessage", {
|
|
969
969
|
enumerable: !0,
|
|
970
970
|
configurable: !0,
|
|
971
971
|
writable: !0,
|
|
972
972
|
value: /insufficient funds|exceeds transaction sender account balance/
|
|
973
973
|
});
|
|
974
|
-
class
|
|
974
|
+
class hs extends u {
|
|
975
975
|
constructor({ cause: t, gas: s } = {}) {
|
|
976
976
|
super(`The amount of gas ${s ? `(${s}) ` : ""}provided for the transaction exceeds the limit allowed for the block.`, {
|
|
977
977
|
cause: t,
|
|
@@ -979,13 +979,13 @@ class us extends u {
|
|
|
979
979
|
});
|
|
980
980
|
}
|
|
981
981
|
}
|
|
982
|
-
Object.defineProperty(
|
|
982
|
+
Object.defineProperty(hs, "nodeMessage", {
|
|
983
983
|
enumerable: !0,
|
|
984
984
|
configurable: !0,
|
|
985
985
|
writable: !0,
|
|
986
986
|
value: /intrinsic gas too high|gas limit reached/
|
|
987
987
|
});
|
|
988
|
-
class
|
|
988
|
+
class ps extends u {
|
|
989
989
|
constructor({ cause: t, gas: s } = {}) {
|
|
990
990
|
super(`The amount of gas ${s ? `(${s}) ` : ""}provided for the transaction is too low.`, {
|
|
991
991
|
cause: t,
|
|
@@ -993,13 +993,13 @@ class ls extends u {
|
|
|
993
993
|
});
|
|
994
994
|
}
|
|
995
995
|
}
|
|
996
|
-
Object.defineProperty(
|
|
996
|
+
Object.defineProperty(ps, "nodeMessage", {
|
|
997
997
|
enumerable: !0,
|
|
998
998
|
configurable: !0,
|
|
999
999
|
writable: !0,
|
|
1000
1000
|
value: /intrinsic gas too low/
|
|
1001
1001
|
});
|
|
1002
|
-
class
|
|
1002
|
+
class bs extends u {
|
|
1003
1003
|
constructor({ cause: t }) {
|
|
1004
1004
|
super("The transaction type is not supported for this chain.", {
|
|
1005
1005
|
cause: t,
|
|
@@ -1007,13 +1007,13 @@ class fs extends u {
|
|
|
1007
1007
|
});
|
|
1008
1008
|
}
|
|
1009
1009
|
}
|
|
1010
|
-
Object.defineProperty(
|
|
1010
|
+
Object.defineProperty(bs, "nodeMessage", {
|
|
1011
1011
|
enumerable: !0,
|
|
1012
1012
|
configurable: !0,
|
|
1013
1013
|
writable: !0,
|
|
1014
1014
|
value: /transaction type not valid/
|
|
1015
1015
|
});
|
|
1016
|
-
class
|
|
1016
|
+
class qe extends u {
|
|
1017
1017
|
constructor({ cause: t, maxPriorityFeePerGas: s, maxFeePerGas: n } = {}) {
|
|
1018
1018
|
super([
|
|
1019
1019
|
`The provided tip (\`maxPriorityFeePerGas\`${s ? ` = ${F(s)} gwei` : ""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n ? ` = ${F(n)} gwei` : ""}).`
|
|
@@ -1024,13 +1024,13 @@ class Xe extends u {
|
|
|
1024
1024
|
});
|
|
1025
1025
|
}
|
|
1026
1026
|
}
|
|
1027
|
-
Object.defineProperty(
|
|
1027
|
+
Object.defineProperty(qe, "nodeMessage", {
|
|
1028
1028
|
enumerable: !0,
|
|
1029
1029
|
configurable: !0,
|
|
1030
1030
|
writable: !0,
|
|
1031
1031
|
value: /max priority fee per gas higher than max fee per gas|tip higher than fee cap/
|
|
1032
1032
|
});
|
|
1033
|
-
class
|
|
1033
|
+
class yn extends u {
|
|
1034
1034
|
constructor({ cause: t }) {
|
|
1035
1035
|
super(`An error occurred while executing: ${t == null ? void 0 : t.shortMessage}`, {
|
|
1036
1036
|
cause: t,
|
|
@@ -1038,49 +1038,49 @@ class pn extends u {
|
|
|
1038
1038
|
});
|
|
1039
1039
|
}
|
|
1040
1040
|
}
|
|
1041
|
-
function
|
|
1041
|
+
function ue(e, t) {
|
|
1042
1042
|
return ({ exclude: s, format: n }) => ({
|
|
1043
1043
|
exclude: s,
|
|
1044
|
-
format: (
|
|
1045
|
-
const
|
|
1044
|
+
format: (r) => {
|
|
1045
|
+
const i = t(r);
|
|
1046
1046
|
if (s)
|
|
1047
1047
|
for (const o of s)
|
|
1048
|
-
delete
|
|
1048
|
+
delete i[o];
|
|
1049
1049
|
return {
|
|
1050
|
-
...
|
|
1051
|
-
...n(
|
|
1050
|
+
...i,
|
|
1051
|
+
...n(r)
|
|
1052
1052
|
};
|
|
1053
1053
|
},
|
|
1054
1054
|
type: e
|
|
1055
1055
|
});
|
|
1056
1056
|
}
|
|
1057
|
-
const
|
|
1057
|
+
const le = 2n ** 256n - 1n, Ye = {
|
|
1058
1058
|
"0x0": "legacy",
|
|
1059
1059
|
"0x1": "eip2930",
|
|
1060
1060
|
"0x2": "eip1559",
|
|
1061
1061
|
"0x3": "eip4844",
|
|
1062
1062
|
"0x4": "eip7702"
|
|
1063
1063
|
};
|
|
1064
|
-
function
|
|
1064
|
+
function de(e) {
|
|
1065
1065
|
const t = {
|
|
1066
1066
|
...e,
|
|
1067
1067
|
blockHash: e.blockHash ? e.blockHash : null,
|
|
1068
1068
|
blockNumber: e.blockNumber ? BigInt(e.blockNumber) : null,
|
|
1069
|
-
chainId: e.chainId ?
|
|
1069
|
+
chainId: e.chainId ? J(e.chainId) : void 0,
|
|
1070
1070
|
gas: e.gas ? BigInt(e.gas) : void 0,
|
|
1071
1071
|
gasPrice: e.gasPrice ? BigInt(e.gasPrice) : void 0,
|
|
1072
1072
|
maxFeePerBlobGas: e.maxFeePerBlobGas ? BigInt(e.maxFeePerBlobGas) : void 0,
|
|
1073
1073
|
maxFeePerGas: e.maxFeePerGas ? BigInt(e.maxFeePerGas) : void 0,
|
|
1074
1074
|
maxPriorityFeePerGas: e.maxPriorityFeePerGas ? BigInt(e.maxPriorityFeePerGas) : void 0,
|
|
1075
|
-
nonce: e.nonce ?
|
|
1075
|
+
nonce: e.nonce ? J(e.nonce) : void 0,
|
|
1076
1076
|
to: e.to ? e.to : null,
|
|
1077
1077
|
transactionIndex: e.transactionIndex ? Number(e.transactionIndex) : null,
|
|
1078
|
-
type: e.type ?
|
|
1078
|
+
type: e.type ? Ye[e.type] : void 0,
|
|
1079
1079
|
typeHex: e.type ? e.type : void 0,
|
|
1080
1080
|
value: e.value ? BigInt(e.value) : void 0,
|
|
1081
1081
|
v: e.v ? BigInt(e.v) : void 0
|
|
1082
1082
|
};
|
|
1083
|
-
return e.authorizationList && (t.authorizationList =
|
|
1083
|
+
return e.authorizationList && (t.authorizationList = xs(e.authorizationList)), t.yParity = (() => {
|
|
1084
1084
|
if (e.yParity)
|
|
1085
1085
|
return Number(e.yParity);
|
|
1086
1086
|
if (typeof t.v == "bigint") {
|
|
@@ -1093,8 +1093,8 @@ function le(e) {
|
|
|
1093
1093
|
}
|
|
1094
1094
|
})(), t.type === "legacy" && (delete t.accessList, delete t.maxFeePerBlobGas, delete t.maxFeePerGas, delete t.maxPriorityFeePerGas, delete t.yParity), t.type === "eip2930" && (delete t.maxFeePerBlobGas, delete t.maxFeePerGas, delete t.maxPriorityFeePerGas), t.type === "eip1559" && delete t.maxFeePerBlobGas, t;
|
|
1095
1095
|
}
|
|
1096
|
-
const
|
|
1097
|
-
function
|
|
1096
|
+
const ms = /* @__PURE__ */ ue("transaction", de);
|
|
1097
|
+
function xs(e) {
|
|
1098
1098
|
return e.map((t) => ({
|
|
1099
1099
|
contractAddress: t.address,
|
|
1100
1100
|
chainId: Number(t.chainId),
|
|
@@ -1104,8 +1104,8 @@ function hs(e) {
|
|
|
1104
1104
|
yParity: Number(t.yParity)
|
|
1105
1105
|
}));
|
|
1106
1106
|
}
|
|
1107
|
-
function
|
|
1108
|
-
const t = (e.transactions ?? []).map((s) => typeof s == "string" ? s :
|
|
1107
|
+
function gs(e) {
|
|
1108
|
+
const t = (e.transactions ?? []).map((s) => typeof s == "string" ? s : de(s));
|
|
1109
1109
|
return {
|
|
1110
1110
|
...e,
|
|
1111
1111
|
baseFeePerGas: e.baseFeePerGas ? BigInt(e.baseFeePerGas) : null,
|
|
@@ -1124,70 +1124,70 @@ function ps(e) {
|
|
|
1124
1124
|
totalDifficulty: e.totalDifficulty ? BigInt(e.totalDifficulty) : null
|
|
1125
1125
|
};
|
|
1126
1126
|
}
|
|
1127
|
-
const
|
|
1128
|
-
function Ye(e) {
|
|
1129
|
-
const { kzg: t } = e, s = e.to ?? (typeof e.blobs[0] == "string" ? "hex" : "bytes"), n = typeof e.blobs[0] == "string" ? e.blobs.map((r) => A(r)) : e.blobs, i = [];
|
|
1130
|
-
for (const r of n)
|
|
1131
|
-
i.push(Uint8Array.from(t.blobToKzgCommitment(r)));
|
|
1132
|
-
return s === "bytes" ? i : i.map((r) => I(r));
|
|
1133
|
-
}
|
|
1127
|
+
const ys = /* @__PURE__ */ ue("block", gs);
|
|
1134
1128
|
function Je(e) {
|
|
1135
|
-
const { kzg: t } = e, s = e.to ?? (typeof e.blobs[0] == "string" ? "hex" : "bytes"), n = typeof e.blobs[0] == "string" ? e.blobs.map((
|
|
1129
|
+
const { kzg: t } = e, s = e.to ?? (typeof e.blobs[0] == "string" ? "hex" : "bytes"), n = typeof e.blobs[0] == "string" ? e.blobs.map((i) => U(i)) : e.blobs, r = [];
|
|
1130
|
+
for (const i of n)
|
|
1131
|
+
r.push(Uint8Array.from(t.blobToKzgCommitment(i)));
|
|
1132
|
+
return s === "bytes" ? r : r.map((i) => $(i));
|
|
1133
|
+
}
|
|
1134
|
+
function Qe(e) {
|
|
1135
|
+
const { kzg: t } = e, s = e.to ?? (typeof e.blobs[0] == "string" ? "hex" : "bytes"), n = typeof e.blobs[0] == "string" ? e.blobs.map((o) => U(o)) : e.blobs, r = typeof e.commitments[0] == "string" ? e.commitments.map((o) => U(o)) : e.commitments, i = [];
|
|
1136
1136
|
for (let o = 0; o < n.length; o++) {
|
|
1137
|
-
const a = n[o], c =
|
|
1138
|
-
|
|
1137
|
+
const a = n[o], c = r[o];
|
|
1138
|
+
i.push(Uint8Array.from(t.computeBlobKzgProof(a, c)));
|
|
1139
1139
|
}
|
|
1140
|
-
return s === "bytes" ?
|
|
1140
|
+
return s === "bytes" ? i : i.map((o) => $(o));
|
|
1141
1141
|
}
|
|
1142
|
-
function
|
|
1142
|
+
function ws(e, t, s, n) {
|
|
1143
1143
|
if (typeof e.setBigUint64 == "function")
|
|
1144
1144
|
return e.setBigUint64(t, s, n);
|
|
1145
|
-
const
|
|
1145
|
+
const r = BigInt(32), i = BigInt(4294967295), o = Number(s >> r & i), a = Number(s & i), c = n ? 4 : 0, l = n ? 0 : 4;
|
|
1146
1146
|
e.setUint32(t + c, o, n), e.setUint32(t + l, a, n);
|
|
1147
1147
|
}
|
|
1148
|
-
function
|
|
1148
|
+
function Es(e, t, s) {
|
|
1149
1149
|
return e & t ^ ~e & s;
|
|
1150
1150
|
}
|
|
1151
|
-
function
|
|
1151
|
+
function Bs(e, t, s) {
|
|
1152
1152
|
return e & t ^ e & s ^ t & s;
|
|
1153
1153
|
}
|
|
1154
|
-
class
|
|
1155
|
-
constructor(t, s, n,
|
|
1156
|
-
super(), this.blockLen = t, this.outputLen = s, this.padOffset = n, this.isLE =
|
|
1154
|
+
class Ps extends ke {
|
|
1155
|
+
constructor(t, s, n, r) {
|
|
1156
|
+
super(), this.blockLen = t, this.outputLen = s, this.padOffset = n, this.isLE = r, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(t), this.view = re(this.buffer);
|
|
1157
1157
|
}
|
|
1158
1158
|
update(t) {
|
|
1159
|
-
|
|
1160
|
-
const { view: s, buffer: n, blockLen:
|
|
1161
|
-
t =
|
|
1162
|
-
const
|
|
1163
|
-
for (let o = 0; o <
|
|
1164
|
-
const a = Math.min(
|
|
1165
|
-
if (a ===
|
|
1166
|
-
const c =
|
|
1167
|
-
for (;
|
|
1159
|
+
Z(this);
|
|
1160
|
+
const { view: s, buffer: n, blockLen: r } = this;
|
|
1161
|
+
t = ae(t);
|
|
1162
|
+
const i = t.length;
|
|
1163
|
+
for (let o = 0; o < i; ) {
|
|
1164
|
+
const a = Math.min(r - this.pos, i - o);
|
|
1165
|
+
if (a === r) {
|
|
1166
|
+
const c = re(t);
|
|
1167
|
+
for (; r <= i - o; o += r)
|
|
1168
1168
|
this.process(c, o);
|
|
1169
1169
|
continue;
|
|
1170
1170
|
}
|
|
1171
|
-
n.set(t.subarray(o, o + a), this.pos), this.pos += a, o += a, this.pos ===
|
|
1171
|
+
n.set(t.subarray(o, o + a), this.pos), this.pos += a, o += a, this.pos === r && (this.process(s, 0), this.pos = 0);
|
|
1172
1172
|
}
|
|
1173
1173
|
return this.length += t.length, this.roundClean(), this;
|
|
1174
1174
|
}
|
|
1175
1175
|
digestInto(t) {
|
|
1176
|
-
|
|
1177
|
-
const { buffer: s, view: n, blockLen:
|
|
1176
|
+
Z(this), Se(t, this), this.finished = !0;
|
|
1177
|
+
const { buffer: s, view: n, blockLen: r, isLE: i } = this;
|
|
1178
1178
|
let { pos: o } = this;
|
|
1179
|
-
s[o++] = 128, this.buffer.subarray(o).fill(0), this.padOffset >
|
|
1180
|
-
for (let
|
|
1181
|
-
s[
|
|
1182
|
-
|
|
1183
|
-
const a =
|
|
1179
|
+
s[o++] = 128, this.buffer.subarray(o).fill(0), this.padOffset > r - o && (this.process(n, 0), o = 0);
|
|
1180
|
+
for (let d = o; d < r; d++)
|
|
1181
|
+
s[d] = 0;
|
|
1182
|
+
ws(n, r - 8, BigInt(this.length * 8), i), this.process(n, 0);
|
|
1183
|
+
const a = re(t), c = this.outputLen;
|
|
1184
1184
|
if (c % 4)
|
|
1185
1185
|
throw new Error("_sha2: outputLen should be aligned to 32bit");
|
|
1186
1186
|
const l = c / 4, h = this.get();
|
|
1187
1187
|
if (l > h.length)
|
|
1188
1188
|
throw new Error("_sha2: outputLen bigger than state");
|
|
1189
|
-
for (let
|
|
1190
|
-
a.setUint32(4 *
|
|
1189
|
+
for (let d = 0; d < l; d++)
|
|
1190
|
+
a.setUint32(4 * d, h[d], i);
|
|
1191
1191
|
}
|
|
1192
1192
|
digest() {
|
|
1193
1193
|
const { buffer: t, outputLen: s } = this;
|
|
@@ -1197,11 +1197,11 @@ class ys extends Le {
|
|
|
1197
1197
|
}
|
|
1198
1198
|
_cloneInto(t) {
|
|
1199
1199
|
t || (t = new this.constructor()), t.set(...this.get());
|
|
1200
|
-
const { blockLen: s, buffer: n, length:
|
|
1201
|
-
return t.length =
|
|
1200
|
+
const { blockLen: s, buffer: n, length: r, finished: i, destroyed: o, pos: a } = this;
|
|
1201
|
+
return t.length = r, t.pos = a, t.finished = i, t.destroyed = o, r % s && t.buffer.set(n), t;
|
|
1202
1202
|
}
|
|
1203
1203
|
}
|
|
1204
|
-
const
|
|
1204
|
+
const Is = /* @__PURE__ */ new Uint32Array([
|
|
1205
1205
|
1116352408,
|
|
1206
1206
|
1899447441,
|
|
1207
1207
|
3049323471,
|
|
@@ -1266,7 +1266,7 @@ const ws = /* @__PURE__ */ new Uint32Array([
|
|
|
1266
1266
|
2756734187,
|
|
1267
1267
|
3204031479,
|
|
1268
1268
|
3329325298
|
|
1269
|
-
]),
|
|
1269
|
+
]), E = /* @__PURE__ */ new Uint32Array([
|
|
1270
1270
|
1779033703,
|
|
1271
1271
|
3144134277,
|
|
1272
1272
|
1013904242,
|
|
@@ -1275,62 +1275,62 @@ const ws = /* @__PURE__ */ new Uint32Array([
|
|
|
1275
1275
|
2600822924,
|
|
1276
1276
|
528734635,
|
|
1277
1277
|
1541459225
|
|
1278
|
-
]),
|
|
1279
|
-
class
|
|
1278
|
+
]), B = /* @__PURE__ */ new Uint32Array(64);
|
|
1279
|
+
class vs extends Ps {
|
|
1280
1280
|
constructor() {
|
|
1281
|
-
super(64, 32, 8, !1), this.A =
|
|
1281
|
+
super(64, 32, 8, !1), this.A = E[0] | 0, this.B = E[1] | 0, this.C = E[2] | 0, this.D = E[3] | 0, this.E = E[4] | 0, this.F = E[5] | 0, this.G = E[6] | 0, this.H = E[7] | 0;
|
|
1282
1282
|
}
|
|
1283
1283
|
get() {
|
|
1284
|
-
const { A: t, B: s, C: n, D:
|
|
1285
|
-
return [t, s, n,
|
|
1284
|
+
const { A: t, B: s, C: n, D: r, E: i, F: o, G: a, H: c } = this;
|
|
1285
|
+
return [t, s, n, r, i, o, a, c];
|
|
1286
1286
|
}
|
|
1287
1287
|
// prettier-ignore
|
|
1288
|
-
set(t, s, n,
|
|
1289
|
-
this.A = t | 0, this.B = s | 0, this.C = n | 0, this.D =
|
|
1288
|
+
set(t, s, n, r, i, o, a, c) {
|
|
1289
|
+
this.A = t | 0, this.B = s | 0, this.C = n | 0, this.D = r | 0, this.E = i | 0, this.F = o | 0, this.G = a | 0, this.H = c | 0;
|
|
1290
1290
|
}
|
|
1291
1291
|
process(t, s) {
|
|
1292
|
-
for (let
|
|
1293
|
-
|
|
1294
|
-
for (let
|
|
1295
|
-
const b =
|
|
1296
|
-
|
|
1292
|
+
for (let d = 0; d < 16; d++, s += 4)
|
|
1293
|
+
B[d] = t.getUint32(s, !1);
|
|
1294
|
+
for (let d = 16; d < 64; d++) {
|
|
1295
|
+
const b = B[d - 15], p = B[d - 2], w = x(b, 7) ^ x(b, 18) ^ b >>> 3, k = x(p, 17) ^ x(p, 19) ^ p >>> 10;
|
|
1296
|
+
B[d] = k + B[d - 7] + w + B[d - 16] | 0;
|
|
1297
1297
|
}
|
|
1298
|
-
let { A: n, B:
|
|
1299
|
-
for (let
|
|
1300
|
-
const b =
|
|
1301
|
-
h = l, l = c, c = a, a = o + p | 0, o =
|
|
1298
|
+
let { A: n, B: r, C: i, D: o, E: a, F: c, G: l, H: h } = this;
|
|
1299
|
+
for (let d = 0; d < 64; d++) {
|
|
1300
|
+
const b = x(a, 6) ^ x(a, 11) ^ x(a, 25), p = h + b + Es(a, c, l) + Is[d] + B[d] | 0, k = (x(n, 2) ^ x(n, 13) ^ x(n, 22)) + Bs(n, r, i) | 0;
|
|
1301
|
+
h = l, l = c, c = a, a = o + p | 0, o = i, i = r, r = n, n = p + k | 0;
|
|
1302
1302
|
}
|
|
1303
|
-
n = n + this.A | 0,
|
|
1303
|
+
n = n + this.A | 0, r = r + this.B | 0, i = i + this.C | 0, o = o + this.D | 0, a = a + this.E | 0, c = c + this.F | 0, l = l + this.G | 0, h = h + this.H | 0, this.set(n, r, i, o, a, c, l, h);
|
|
1304
1304
|
}
|
|
1305
1305
|
roundClean() {
|
|
1306
|
-
|
|
1306
|
+
B.fill(0);
|
|
1307
1307
|
}
|
|
1308
1308
|
destroy() {
|
|
1309
1309
|
this.set(0, 0, 0, 0, 0, 0, 0, 0), this.buffer.fill(0);
|
|
1310
1310
|
}
|
|
1311
1311
|
}
|
|
1312
|
-
const
|
|
1313
|
-
function
|
|
1314
|
-
return
|
|
1312
|
+
const Ts = /* @__PURE__ */ Le(() => new vs());
|
|
1313
|
+
function $s(e, t) {
|
|
1314
|
+
return Ts(W(e, { strict: !1 }) ? Ue(e) : e);
|
|
1315
1315
|
}
|
|
1316
|
-
function
|
|
1317
|
-
const { commitment: t, version: s = 1 } = e, n = e.to ?? (typeof t == "string" ? "hex" : "bytes"),
|
|
1318
|
-
return
|
|
1316
|
+
function As(e) {
|
|
1317
|
+
const { commitment: t, version: s = 1 } = e, n = e.to ?? (typeof t == "string" ? "hex" : "bytes"), r = $s(t);
|
|
1318
|
+
return r.set([s], 0), n === "bytes" ? r : $(r);
|
|
1319
1319
|
}
|
|
1320
|
-
function
|
|
1321
|
-
const { commitments: t, version: s } = e, n = e.to ?? (typeof t[0] == "string" ? "hex" : "bytes"),
|
|
1322
|
-
for (const
|
|
1323
|
-
|
|
1324
|
-
commitment:
|
|
1320
|
+
function Cs(e) {
|
|
1321
|
+
const { commitments: t, version: s } = e, n = e.to ?? (typeof t[0] == "string" ? "hex" : "bytes"), r = [];
|
|
1322
|
+
for (const i of t)
|
|
1323
|
+
r.push(As({
|
|
1324
|
+
commitment: i,
|
|
1325
1325
|
to: n,
|
|
1326
1326
|
version: s
|
|
1327
1327
|
}));
|
|
1328
|
-
return
|
|
1328
|
+
return r;
|
|
1329
1329
|
}
|
|
1330
|
-
const
|
|
1330
|
+
const Ie = 6, Ze = 32, fe = 4096, et = Ze * fe, ve = et * Ie - // terminator byte (0x80).
|
|
1331
1331
|
1 - // zero byte (0x00) appended to each field element.
|
|
1332
|
-
1 * fe *
|
|
1333
|
-
class
|
|
1332
|
+
1 * fe * Ie, tt = 1;
|
|
1333
|
+
class Fs extends u {
|
|
1334
1334
|
constructor({ maxSize: t, size: s }) {
|
|
1335
1335
|
super("Blob size is too large.", {
|
|
1336
1336
|
metaMessages: [`Max: ${t} bytes`, `Given: ${s} bytes`],
|
|
@@ -1338,12 +1338,12 @@ class Ts extends u {
|
|
|
1338
1338
|
});
|
|
1339
1339
|
}
|
|
1340
1340
|
}
|
|
1341
|
-
class
|
|
1341
|
+
class st extends u {
|
|
1342
1342
|
constructor() {
|
|
1343
1343
|
super("Blob data must not be empty.", { name: "EmptyBlobError" });
|
|
1344
1344
|
}
|
|
1345
1345
|
}
|
|
1346
|
-
class
|
|
1346
|
+
class Us extends u {
|
|
1347
1347
|
constructor({ hash: t, size: s }) {
|
|
1348
1348
|
super(`Versioned hash "${t}" size is invalid.`, {
|
|
1349
1349
|
metaMessages: ["Expected: 32", `Received: ${s}`],
|
|
@@ -1351,54 +1351,54 @@ class $s extends u {
|
|
|
1351
1351
|
});
|
|
1352
1352
|
}
|
|
1353
1353
|
}
|
|
1354
|
-
class
|
|
1354
|
+
class zs extends u {
|
|
1355
1355
|
constructor({ hash: t, version: s }) {
|
|
1356
1356
|
super(`Versioned hash "${t}" version is invalid.`, {
|
|
1357
1357
|
metaMessages: [
|
|
1358
|
-
`Expected: ${
|
|
1358
|
+
`Expected: ${tt}`,
|
|
1359
1359
|
`Received: ${s}`
|
|
1360
1360
|
],
|
|
1361
1361
|
name: "InvalidVersionedHashVersionError"
|
|
1362
1362
|
});
|
|
1363
1363
|
}
|
|
1364
1364
|
}
|
|
1365
|
-
function
|
|
1366
|
-
const t = e.to ?? (typeof e.data == "string" ? "hex" : "bytes"), s = typeof e.data == "string" ?
|
|
1365
|
+
function Ss(e) {
|
|
1366
|
+
const t = e.to ?? (typeof e.data == "string" ? "hex" : "bytes"), s = typeof e.data == "string" ? U(e.data) : e.data, n = P(s);
|
|
1367
1367
|
if (!n)
|
|
1368
|
-
throw new
|
|
1368
|
+
throw new st();
|
|
1369
1369
|
if (n > ve)
|
|
1370
|
-
throw new
|
|
1370
|
+
throw new Fs({
|
|
1371
1371
|
maxSize: ve,
|
|
1372
1372
|
size: n
|
|
1373
1373
|
});
|
|
1374
|
-
const
|
|
1375
|
-
let
|
|
1376
|
-
for (;
|
|
1377
|
-
const a =
|
|
1374
|
+
const r = [];
|
|
1375
|
+
let i = !0, o = 0;
|
|
1376
|
+
for (; i; ) {
|
|
1377
|
+
const a = De(new Uint8Array(et));
|
|
1378
1378
|
let c = 0;
|
|
1379
1379
|
for (; c < fe; ) {
|
|
1380
|
-
const l = s.slice(o, o + (
|
|
1380
|
+
const l = s.slice(o, o + (Ze - 1));
|
|
1381
1381
|
if (a.pushByte(0), a.pushBytes(l), l.length < 31) {
|
|
1382
|
-
a.pushByte(128),
|
|
1382
|
+
a.pushByte(128), i = !1;
|
|
1383
1383
|
break;
|
|
1384
1384
|
}
|
|
1385
1385
|
c++, o += 31;
|
|
1386
1386
|
}
|
|
1387
|
-
|
|
1387
|
+
r.push(a);
|
|
1388
1388
|
}
|
|
1389
|
-
return t === "bytes" ?
|
|
1389
|
+
return t === "bytes" ? r.map((a) => a.bytes) : r.map((a) => $(a.bytes));
|
|
1390
1390
|
}
|
|
1391
|
-
function
|
|
1392
|
-
const { data: t, kzg: s, to: n } = e,
|
|
1393
|
-
for (let c = 0; c <
|
|
1391
|
+
function ks(e) {
|
|
1392
|
+
const { data: t, kzg: s, to: n } = e, r = e.blobs ?? Ss({ data: t, to: n }), i = e.commitments ?? Je({ blobs: r, kzg: s, to: n }), o = e.proofs ?? Qe({ blobs: r, commitments: i, kzg: s, to: n }), a = [];
|
|
1393
|
+
for (let c = 0; c < r.length; c++)
|
|
1394
1394
|
a.push({
|
|
1395
|
-
blob:
|
|
1396
|
-
commitment:
|
|
1395
|
+
blob: r[c],
|
|
1396
|
+
commitment: i[c],
|
|
1397
1397
|
proof: o[c]
|
|
1398
1398
|
});
|
|
1399
1399
|
return a;
|
|
1400
1400
|
}
|
|
1401
|
-
function
|
|
1401
|
+
function Ls(e) {
|
|
1402
1402
|
if (e.type)
|
|
1403
1403
|
return e.type;
|
|
1404
1404
|
if (typeof e.authorizationList < "u")
|
|
@@ -1409,9 +1409,9 @@ function Cs(e) {
|
|
|
1409
1409
|
return "eip1559";
|
|
1410
1410
|
if (typeof e.gasPrice < "u")
|
|
1411
1411
|
return typeof e.accessList < "u" ? "eip2930" : "legacy";
|
|
1412
|
-
throw new
|
|
1412
|
+
throw new rs({ transaction: e });
|
|
1413
1413
|
}
|
|
1414
|
-
function
|
|
1414
|
+
function Gs(e, { args: t, eventName: s } = {}) {
|
|
1415
1415
|
return {
|
|
1416
1416
|
...e,
|
|
1417
1417
|
blockHash: e.blockHash ? e.blockHash : null,
|
|
@@ -1422,7 +1422,7 @@ function zs(e, { args: t, eventName: s } = {}) {
|
|
|
1422
1422
|
...s ? { args: t, eventName: s } : {}
|
|
1423
1423
|
};
|
|
1424
1424
|
}
|
|
1425
|
-
class
|
|
1425
|
+
class wn extends u {
|
|
1426
1426
|
constructor({ blockNumber: t, chain: s, contract: n }) {
|
|
1427
1427
|
super(`Chain "${s.name}" does not support contract "${n.name}".`, {
|
|
1428
1428
|
metaMessages: [
|
|
@@ -1437,7 +1437,7 @@ class bn extends u {
|
|
|
1437
1437
|
});
|
|
1438
1438
|
}
|
|
1439
1439
|
}
|
|
1440
|
-
class
|
|
1440
|
+
class En extends u {
|
|
1441
1441
|
constructor({ chain: t, currentChainId: s }) {
|
|
1442
1442
|
super(`The current chain of the wallet (id: ${s}) does not match the target chain for the transaction (id: ${t.id} – ${t.name}).`, {
|
|
1443
1443
|
metaMessages: [
|
|
@@ -1448,7 +1448,7 @@ class mn extends u {
|
|
|
1448
1448
|
});
|
|
1449
1449
|
}
|
|
1450
1450
|
}
|
|
1451
|
-
class
|
|
1451
|
+
class Bn extends u {
|
|
1452
1452
|
constructor() {
|
|
1453
1453
|
super([
|
|
1454
1454
|
"No chain was provided to the request.",
|
|
@@ -1459,19 +1459,19 @@ class xn extends u {
|
|
|
1459
1459
|
});
|
|
1460
1460
|
}
|
|
1461
1461
|
}
|
|
1462
|
-
class
|
|
1462
|
+
class Pn extends u {
|
|
1463
1463
|
constructor() {
|
|
1464
1464
|
super("No chain was provided to the Client.", {
|
|
1465
1465
|
name: "ClientChainNotConfiguredError"
|
|
1466
1466
|
});
|
|
1467
1467
|
}
|
|
1468
1468
|
}
|
|
1469
|
-
class
|
|
1469
|
+
class se extends u {
|
|
1470
1470
|
constructor({ chainId: t }) {
|
|
1471
1471
|
super(typeof t == "number" ? `Chain ID "${t}" is invalid.` : "Chain ID is invalid.", { name: "InvalidChainIdError" });
|
|
1472
1472
|
}
|
|
1473
1473
|
}
|
|
1474
|
-
function
|
|
1474
|
+
function g(e) {
|
|
1475
1475
|
return {
|
|
1476
1476
|
formatters: void 0,
|
|
1477
1477
|
fees: void 0,
|
|
@@ -1479,11 +1479,11 @@ function z(e) {
|
|
|
1479
1479
|
...e
|
|
1480
1480
|
};
|
|
1481
1481
|
}
|
|
1482
|
-
const
|
|
1482
|
+
const Hs = {
|
|
1483
1483
|
"0x0": "reverted",
|
|
1484
1484
|
"0x1": "success"
|
|
1485
1485
|
};
|
|
1486
|
-
function
|
|
1486
|
+
function Os(e) {
|
|
1487
1487
|
const t = {
|
|
1488
1488
|
...e,
|
|
1489
1489
|
blockNumber: e.blockNumber ? BigInt(e.blockNumber) : null,
|
|
@@ -1491,223 +1491,223 @@ function Ss(e) {
|
|
|
1491
1491
|
cumulativeGasUsed: e.cumulativeGasUsed ? BigInt(e.cumulativeGasUsed) : null,
|
|
1492
1492
|
effectiveGasPrice: e.effectiveGasPrice ? BigInt(e.effectiveGasPrice) : null,
|
|
1493
1493
|
gasUsed: e.gasUsed ? BigInt(e.gasUsed) : null,
|
|
1494
|
-
logs: e.logs ? e.logs.map((s) =>
|
|
1494
|
+
logs: e.logs ? e.logs.map((s) => Gs(s)) : null,
|
|
1495
1495
|
to: e.to ? e.to : null,
|
|
1496
|
-
transactionIndex: e.transactionIndex ?
|
|
1497
|
-
status: e.status ?
|
|
1498
|
-
type: e.type ?
|
|
1496
|
+
transactionIndex: e.transactionIndex ? J(e.transactionIndex) : null,
|
|
1497
|
+
status: e.status ? Hs[e.status] : null,
|
|
1498
|
+
type: e.type ? Ye[e.type] || e.type : null
|
|
1499
1499
|
};
|
|
1500
1500
|
return e.blobGasPrice && (t.blobGasPrice = BigInt(e.blobGasPrice)), e.blobGasUsed && (t.blobGasUsed = BigInt(e.blobGasUsed)), t;
|
|
1501
1501
|
}
|
|
1502
|
-
const
|
|
1503
|
-
function
|
|
1502
|
+
const Ns = /* @__PURE__ */ ue("transactionReceipt", Os);
|
|
1503
|
+
function Ms(e) {
|
|
1504
1504
|
const { authorizationList: t } = e;
|
|
1505
1505
|
if (t)
|
|
1506
1506
|
for (const s of t) {
|
|
1507
|
-
const { contractAddress: n, chainId:
|
|
1507
|
+
const { contractAddress: n, chainId: r } = s;
|
|
1508
1508
|
if (!v(n))
|
|
1509
|
-
throw new
|
|
1510
|
-
if (
|
|
1511
|
-
throw new
|
|
1509
|
+
throw new I({ address: n });
|
|
1510
|
+
if (r < 0)
|
|
1511
|
+
throw new se({ chainId: r });
|
|
1512
1512
|
}
|
|
1513
|
-
|
|
1513
|
+
he(e);
|
|
1514
1514
|
}
|
|
1515
|
-
function
|
|
1515
|
+
function _s(e) {
|
|
1516
1516
|
const { blobVersionedHashes: t } = e;
|
|
1517
1517
|
if (t) {
|
|
1518
1518
|
if (t.length === 0)
|
|
1519
|
-
throw new
|
|
1519
|
+
throw new st();
|
|
1520
1520
|
for (const s of t) {
|
|
1521
|
-
const n =
|
|
1521
|
+
const n = P(s), r = J(Xt(s, 0, 1));
|
|
1522
1522
|
if (n !== 32)
|
|
1523
|
-
throw new
|
|
1524
|
-
if (
|
|
1525
|
-
throw new
|
|
1523
|
+
throw new Us({ hash: s, size: n });
|
|
1524
|
+
if (r !== tt)
|
|
1525
|
+
throw new zs({
|
|
1526
1526
|
hash: s,
|
|
1527
|
-
version:
|
|
1527
|
+
version: r
|
|
1528
1528
|
});
|
|
1529
1529
|
}
|
|
1530
1530
|
}
|
|
1531
|
-
|
|
1531
|
+
he(e);
|
|
1532
1532
|
}
|
|
1533
|
-
function
|
|
1534
|
-
const { chainId: t, maxPriorityFeePerGas: s, maxFeePerGas: n, to:
|
|
1533
|
+
function he(e) {
|
|
1534
|
+
const { chainId: t, maxPriorityFeePerGas: s, maxFeePerGas: n, to: r } = e;
|
|
1535
1535
|
if (t <= 0)
|
|
1536
|
-
throw new
|
|
1537
|
-
if (
|
|
1538
|
-
throw new
|
|
1539
|
-
if (n && n >
|
|
1540
|
-
throw new
|
|
1536
|
+
throw new se({ chainId: t });
|
|
1537
|
+
if (r && !v(r))
|
|
1538
|
+
throw new I({ address: r });
|
|
1539
|
+
if (n && n > le)
|
|
1540
|
+
throw new te({ maxFeePerGas: n });
|
|
1541
1541
|
if (s && n && s > n)
|
|
1542
|
-
throw new
|
|
1542
|
+
throw new qe({ maxFeePerGas: n, maxPriorityFeePerGas: s });
|
|
1543
1543
|
}
|
|
1544
|
-
function
|
|
1545
|
-
const { chainId: t, maxPriorityFeePerGas: s, gasPrice: n, maxFeePerGas:
|
|
1544
|
+
function Vs(e) {
|
|
1545
|
+
const { chainId: t, maxPriorityFeePerGas: s, gasPrice: n, maxFeePerGas: r, to: i } = e;
|
|
1546
1546
|
if (t <= 0)
|
|
1547
|
-
throw new
|
|
1548
|
-
if (
|
|
1549
|
-
throw new
|
|
1550
|
-
if (s ||
|
|
1547
|
+
throw new se({ chainId: t });
|
|
1548
|
+
if (i && !v(i))
|
|
1549
|
+
throw new I({ address: i });
|
|
1550
|
+
if (s || r)
|
|
1551
1551
|
throw new u("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");
|
|
1552
|
-
if (n && n >
|
|
1553
|
-
throw new
|
|
1552
|
+
if (n && n > le)
|
|
1553
|
+
throw new te({ maxFeePerGas: n });
|
|
1554
1554
|
}
|
|
1555
|
-
function
|
|
1556
|
-
const { chainId: t, maxPriorityFeePerGas: s, gasPrice: n, maxFeePerGas:
|
|
1557
|
-
if (
|
|
1558
|
-
throw new
|
|
1555
|
+
function Ds(e) {
|
|
1556
|
+
const { chainId: t, maxPriorityFeePerGas: s, gasPrice: n, maxFeePerGas: r, to: i } = e;
|
|
1557
|
+
if (i && !v(i))
|
|
1558
|
+
throw new I({ address: i });
|
|
1559
1559
|
if (typeof t < "u" && t <= 0)
|
|
1560
|
-
throw new
|
|
1561
|
-
if (s ||
|
|
1560
|
+
throw new se({ chainId: t });
|
|
1561
|
+
if (s || r)
|
|
1562
1562
|
throw new u("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");
|
|
1563
|
-
if (n && n >
|
|
1564
|
-
throw new
|
|
1563
|
+
if (n && n > le)
|
|
1564
|
+
throw new te({ maxFeePerGas: n });
|
|
1565
1565
|
}
|
|
1566
|
-
function
|
|
1566
|
+
function js(e) {
|
|
1567
1567
|
if (!e || e.length === 0)
|
|
1568
1568
|
return [];
|
|
1569
1569
|
const t = [];
|
|
1570
1570
|
for (const s of e) {
|
|
1571
|
-
const { contractAddress: n, chainId:
|
|
1571
|
+
const { contractAddress: n, chainId: r, nonce: i, ...o } = s;
|
|
1572
1572
|
t.push([
|
|
1573
|
-
|
|
1573
|
+
r ? f(r) : "0x",
|
|
1574
1574
|
n,
|
|
1575
|
-
|
|
1576
|
-
...
|
|
1575
|
+
i ? f(i) : "0x",
|
|
1576
|
+
...X({}, o)
|
|
1577
1577
|
]);
|
|
1578
1578
|
}
|
|
1579
1579
|
return t;
|
|
1580
1580
|
}
|
|
1581
|
-
function
|
|
1581
|
+
function ne(e) {
|
|
1582
1582
|
if (!e || e.length === 0)
|
|
1583
1583
|
return [];
|
|
1584
1584
|
const t = [];
|
|
1585
1585
|
for (let s = 0; s < e.length; s++) {
|
|
1586
|
-
const { address: n, storageKeys:
|
|
1587
|
-
for (let
|
|
1588
|
-
if (i
|
|
1589
|
-
throw new
|
|
1586
|
+
const { address: n, storageKeys: r } = e[s];
|
|
1587
|
+
for (let i = 0; i < r.length; i++)
|
|
1588
|
+
if (r[i].length - 2 !== 64)
|
|
1589
|
+
throw new is({ storageKey: r[i] });
|
|
1590
1590
|
if (!v(n, { strict: !1 }))
|
|
1591
|
-
throw new
|
|
1592
|
-
t.push([n,
|
|
1591
|
+
throw new I({ address: n });
|
|
1592
|
+
t.push([n, r]);
|
|
1593
1593
|
}
|
|
1594
1594
|
return t;
|
|
1595
1595
|
}
|
|
1596
|
-
function
|
|
1597
|
-
const s =
|
|
1598
|
-
return s === "eip1559" ?
|
|
1596
|
+
function Rs(e, t) {
|
|
1597
|
+
const s = Ls(e);
|
|
1598
|
+
return s === "eip1559" ? Xs(e, t) : s === "eip2930" ? qs(e, t) : s === "eip4844" ? Ws(e, t) : s === "eip7702" ? Ks(e, t) : Ys(e, t);
|
|
1599
1599
|
}
|
|
1600
|
-
function
|
|
1601
|
-
const { authorizationList: s, chainId: n, gas:
|
|
1602
|
-
|
|
1603
|
-
const b =
|
|
1600
|
+
function Ks(e, t) {
|
|
1601
|
+
const { authorizationList: s, chainId: n, gas: r, nonce: i, to: o, value: a, maxFeePerGas: c, maxPriorityFeePerGas: l, accessList: h, data: d } = e;
|
|
1602
|
+
Ms(e);
|
|
1603
|
+
const b = ne(h), p = js(s);
|
|
1604
1604
|
return O([
|
|
1605
1605
|
"0x04",
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
l ?
|
|
1610
|
-
c ?
|
|
1611
|
-
|
|
1606
|
+
z([
|
|
1607
|
+
f(n),
|
|
1608
|
+
i ? f(i) : "0x",
|
|
1609
|
+
l ? f(l) : "0x",
|
|
1610
|
+
c ? f(c) : "0x",
|
|
1611
|
+
r ? f(r) : "0x",
|
|
1612
1612
|
o ?? "0x",
|
|
1613
|
-
a ?
|
|
1614
|
-
|
|
1613
|
+
a ? f(a) : "0x",
|
|
1614
|
+
d ?? "0x",
|
|
1615
1615
|
b,
|
|
1616
1616
|
p,
|
|
1617
|
-
...
|
|
1617
|
+
...X(e, t)
|
|
1618
1618
|
])
|
|
1619
1619
|
]);
|
|
1620
1620
|
}
|
|
1621
|
-
function
|
|
1622
|
-
const { chainId: s, gas: n, nonce:
|
|
1623
|
-
|
|
1621
|
+
function Ws(e, t) {
|
|
1622
|
+
const { chainId: s, gas: n, nonce: r, to: i, value: o, maxFeePerBlobGas: a, maxFeePerGas: c, maxPriorityFeePerGas: l, accessList: h, data: d } = e;
|
|
1623
|
+
_s(e);
|
|
1624
1624
|
let b = e.blobVersionedHashes, p = e.sidecars;
|
|
1625
1625
|
if (e.blobs && (typeof b > "u" || typeof p > "u")) {
|
|
1626
|
-
const
|
|
1627
|
-
blobs:
|
|
1628
|
-
kzg:
|
|
1626
|
+
const A = typeof e.blobs[0] == "string" ? e.blobs : e.blobs.map((M) => $(M)), q = e.kzg, N = Je({
|
|
1627
|
+
blobs: A,
|
|
1628
|
+
kzg: q
|
|
1629
1629
|
});
|
|
1630
|
-
if (typeof b > "u" && (b =
|
|
1630
|
+
if (typeof b > "u" && (b = Cs({
|
|
1631
1631
|
commitments: N
|
|
1632
1632
|
})), typeof p > "u") {
|
|
1633
|
-
const M =
|
|
1634
|
-
p =
|
|
1633
|
+
const M = Qe({ blobs: A, commitments: N, kzg: q });
|
|
1634
|
+
p = ks({ blobs: A, commitments: N, proofs: M });
|
|
1635
1635
|
}
|
|
1636
1636
|
}
|
|
1637
|
-
const
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
l ?
|
|
1641
|
-
c ?
|
|
1642
|
-
n ?
|
|
1643
|
-
|
|
1644
|
-
o ?
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
a ?
|
|
1637
|
+
const w = ne(h), k = [
|
|
1638
|
+
f(s),
|
|
1639
|
+
r ? f(r) : "0x",
|
|
1640
|
+
l ? f(l) : "0x",
|
|
1641
|
+
c ? f(c) : "0x",
|
|
1642
|
+
n ? f(n) : "0x",
|
|
1643
|
+
i ?? "0x",
|
|
1644
|
+
o ? f(o) : "0x",
|
|
1645
|
+
d ?? "0x",
|
|
1646
|
+
w,
|
|
1647
|
+
a ? f(a) : "0x",
|
|
1648
1648
|
b ?? [],
|
|
1649
|
-
...
|
|
1650
|
-
],
|
|
1649
|
+
...X(e, t)
|
|
1650
|
+
], pe = [], be = [], me = [];
|
|
1651
1651
|
if (p)
|
|
1652
|
-
for (let
|
|
1653
|
-
const { blob:
|
|
1654
|
-
|
|
1652
|
+
for (let A = 0; A < p.length; A++) {
|
|
1653
|
+
const { blob: q, commitment: N, proof: M } = p[A];
|
|
1654
|
+
pe.push(q), be.push(N), me.push(M);
|
|
1655
1655
|
}
|
|
1656
1656
|
return O([
|
|
1657
1657
|
"0x03",
|
|
1658
1658
|
// If sidecars are enabled, envelope turns into a "wrapper":
|
|
1659
|
-
|
|
1659
|
+
z(p ? [k, pe, be, me] : k)
|
|
1660
1660
|
]);
|
|
1661
1661
|
}
|
|
1662
|
-
function
|
|
1663
|
-
const { chainId: s, gas: n, nonce:
|
|
1664
|
-
|
|
1665
|
-
const
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
c ?
|
|
1669
|
-
a ?
|
|
1670
|
-
n ?
|
|
1671
|
-
|
|
1672
|
-
o ?
|
|
1662
|
+
function Xs(e, t) {
|
|
1663
|
+
const { chainId: s, gas: n, nonce: r, to: i, value: o, maxFeePerGas: a, maxPriorityFeePerGas: c, accessList: l, data: h } = e;
|
|
1664
|
+
he(e);
|
|
1665
|
+
const d = ne(l), b = [
|
|
1666
|
+
f(s),
|
|
1667
|
+
r ? f(r) : "0x",
|
|
1668
|
+
c ? f(c) : "0x",
|
|
1669
|
+
a ? f(a) : "0x",
|
|
1670
|
+
n ? f(n) : "0x",
|
|
1671
|
+
i ?? "0x",
|
|
1672
|
+
o ? f(o) : "0x",
|
|
1673
1673
|
h ?? "0x",
|
|
1674
|
-
|
|
1675
|
-
...
|
|
1674
|
+
d,
|
|
1675
|
+
...X(e, t)
|
|
1676
1676
|
];
|
|
1677
1677
|
return O([
|
|
1678
1678
|
"0x02",
|
|
1679
|
-
|
|
1679
|
+
z(b)
|
|
1680
1680
|
]);
|
|
1681
1681
|
}
|
|
1682
|
-
function
|
|
1683
|
-
const { chainId: s, gas: n, data:
|
|
1684
|
-
|
|
1685
|
-
const h =
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
l ?
|
|
1689
|
-
n ?
|
|
1682
|
+
function qs(e, t) {
|
|
1683
|
+
const { chainId: s, gas: n, data: r, nonce: i, to: o, value: a, accessList: c, gasPrice: l } = e;
|
|
1684
|
+
Vs(e);
|
|
1685
|
+
const h = ne(c), d = [
|
|
1686
|
+
f(s),
|
|
1687
|
+
i ? f(i) : "0x",
|
|
1688
|
+
l ? f(l) : "0x",
|
|
1689
|
+
n ? f(n) : "0x",
|
|
1690
1690
|
o ?? "0x",
|
|
1691
|
-
a ?
|
|
1692
|
-
|
|
1691
|
+
a ? f(a) : "0x",
|
|
1692
|
+
r ?? "0x",
|
|
1693
1693
|
h,
|
|
1694
|
-
...
|
|
1694
|
+
...X(e, t)
|
|
1695
1695
|
];
|
|
1696
1696
|
return O([
|
|
1697
1697
|
"0x01",
|
|
1698
|
-
|
|
1698
|
+
z(d)
|
|
1699
1699
|
]);
|
|
1700
1700
|
}
|
|
1701
|
-
function
|
|
1702
|
-
const { chainId: s = 0, gas: n, data:
|
|
1703
|
-
|
|
1701
|
+
function Ys(e, t) {
|
|
1702
|
+
const { chainId: s = 0, gas: n, data: r, nonce: i, to: o, value: a, gasPrice: c } = e;
|
|
1703
|
+
Ds(e);
|
|
1704
1704
|
let l = [
|
|
1705
|
-
|
|
1706
|
-
c ?
|
|
1707
|
-
n ?
|
|
1705
|
+
i ? f(i) : "0x",
|
|
1706
|
+
c ? f(c) : "0x",
|
|
1707
|
+
n ? f(n) : "0x",
|
|
1708
1708
|
o ?? "0x",
|
|
1709
|
-
a ?
|
|
1710
|
-
|
|
1709
|
+
a ? f(a) : "0x",
|
|
1710
|
+
r ?? "0x"
|
|
1711
1711
|
];
|
|
1712
1712
|
if (t) {
|
|
1713
1713
|
const h = (() => {
|
|
@@ -1717,35 +1717,35 @@ function Ks(e, t) {
|
|
|
1717
1717
|
return BigInt(s * 2) + BigInt(35n + t.v - 27n);
|
|
1718
1718
|
const p = 27n + (t.v === 27n ? 0n : 1n);
|
|
1719
1719
|
if (t.v !== p)
|
|
1720
|
-
throw new
|
|
1720
|
+
throw new ns({ v: t.v });
|
|
1721
1721
|
return p;
|
|
1722
|
-
})(),
|
|
1722
|
+
})(), d = C(t.r), b = C(t.s);
|
|
1723
1723
|
l = [
|
|
1724
1724
|
...l,
|
|
1725
|
-
|
|
1726
|
-
|
|
1725
|
+
f(h),
|
|
1726
|
+
d === "0x00" ? "0x" : d,
|
|
1727
1727
|
b === "0x00" ? "0x" : b
|
|
1728
1728
|
];
|
|
1729
1729
|
} else s > 0 && (l = [
|
|
1730
1730
|
...l,
|
|
1731
|
-
|
|
1731
|
+
f(s),
|
|
1732
1732
|
"0x",
|
|
1733
1733
|
"0x"
|
|
1734
1734
|
]);
|
|
1735
|
-
return
|
|
1735
|
+
return z(l);
|
|
1736
1736
|
}
|
|
1737
|
-
function
|
|
1738
|
-
const s = t ?? e, { v: n, yParity:
|
|
1737
|
+
function X(e, t) {
|
|
1738
|
+
const s = t ?? e, { v: n, yParity: r } = s;
|
|
1739
1739
|
if (typeof s.r > "u")
|
|
1740
1740
|
return [];
|
|
1741
1741
|
if (typeof s.s > "u")
|
|
1742
1742
|
return [];
|
|
1743
|
-
if (typeof n > "u" && typeof
|
|
1743
|
+
if (typeof n > "u" && typeof r > "u")
|
|
1744
1744
|
return [];
|
|
1745
|
-
const
|
|
1746
|
-
return [typeof
|
|
1745
|
+
const i = C(s.r), o = C(s.s);
|
|
1746
|
+
return [typeof r == "number" ? r ? f(1) : "0x" : n === 0n ? "0x" : n === 1n ? f(1) : n === 27n ? "0x" : f(1), i === "0x00" ? "0x" : i, o === "0x00" ? "0x" : o];
|
|
1747
1747
|
}
|
|
1748
|
-
const
|
|
1748
|
+
const Js = {
|
|
1749
1749
|
gasPriceOracle: { address: "0x420000000000000000000000000000000000000F" },
|
|
1750
1750
|
l1Block: { address: "0x4200000000000000000000000000000000000015" },
|
|
1751
1751
|
l2CrossDomainMessenger: {
|
|
@@ -1756,77 +1756,127 @@ const Ws = {
|
|
|
1756
1756
|
l2ToL1MessagePasser: {
|
|
1757
1757
|
address: "0x4200000000000000000000000000000000000016"
|
|
1758
1758
|
}
|
|
1759
|
-
},
|
|
1760
|
-
block: /* @__PURE__ */
|
|
1759
|
+
}, Qs = {
|
|
1760
|
+
block: /* @__PURE__ */ ys({
|
|
1761
1761
|
format(e) {
|
|
1762
1762
|
var s;
|
|
1763
1763
|
return {
|
|
1764
1764
|
transactions: (s = e.transactions) == null ? void 0 : s.map((n) => {
|
|
1765
1765
|
if (typeof n == "string")
|
|
1766
1766
|
return n;
|
|
1767
|
-
const
|
|
1768
|
-
return
|
|
1767
|
+
const r = de(n);
|
|
1768
|
+
return r.typeHex === "0x7e" && (r.isSystemTx = n.isSystemTx, r.mint = n.mint ? G(n.mint) : void 0, r.sourceHash = n.sourceHash, r.type = "deposit"), r;
|
|
1769
1769
|
}),
|
|
1770
1770
|
stateRoot: e.stateRoot
|
|
1771
1771
|
};
|
|
1772
1772
|
}
|
|
1773
1773
|
}),
|
|
1774
|
-
transaction: /* @__PURE__ */
|
|
1774
|
+
transaction: /* @__PURE__ */ ms({
|
|
1775
1775
|
format(e) {
|
|
1776
1776
|
const t = {};
|
|
1777
|
-
return e.type === "0x7e" && (t.isSystemTx = e.isSystemTx, t.mint = e.mint ?
|
|
1777
|
+
return e.type === "0x7e" && (t.isSystemTx = e.isSystemTx, t.mint = e.mint ? G(e.mint) : void 0, t.sourceHash = e.sourceHash, t.type = "deposit"), t;
|
|
1778
1778
|
}
|
|
1779
1779
|
}),
|
|
1780
|
-
transactionReceipt: /* @__PURE__ */
|
|
1780
|
+
transactionReceipt: /* @__PURE__ */ Ns({
|
|
1781
1781
|
format(e) {
|
|
1782
1782
|
return {
|
|
1783
|
-
l1GasPrice: e.l1GasPrice ?
|
|
1784
|
-
l1GasUsed: e.l1GasUsed ?
|
|
1785
|
-
l1Fee: e.l1Fee ?
|
|
1783
|
+
l1GasPrice: e.l1GasPrice ? G(e.l1GasPrice) : null,
|
|
1784
|
+
l1GasUsed: e.l1GasUsed ? G(e.l1GasUsed) : null,
|
|
1785
|
+
l1Fee: e.l1Fee ? G(e.l1Fee) : null,
|
|
1786
1786
|
l1FeeScalar: e.l1FeeScalar ? Number(e.l1FeeScalar) : null
|
|
1787
1787
|
};
|
|
1788
1788
|
}
|
|
1789
1789
|
})
|
|
1790
1790
|
};
|
|
1791
|
-
function
|
|
1792
|
-
return
|
|
1791
|
+
function Zs(e, t) {
|
|
1792
|
+
return sn(e) ? tn(e) : Rs(e, t);
|
|
1793
1793
|
}
|
|
1794
|
-
const
|
|
1795
|
-
transaction:
|
|
1794
|
+
const en = {
|
|
1795
|
+
transaction: Zs
|
|
1796
1796
|
};
|
|
1797
|
-
function
|
|
1798
|
-
|
|
1799
|
-
const { sourceHash: t, data: s, from: n, gas:
|
|
1797
|
+
function tn(e) {
|
|
1798
|
+
nn(e);
|
|
1799
|
+
const { sourceHash: t, data: s, from: n, gas: r, isSystemTx: i, mint: o, to: a, value: c } = e, l = [
|
|
1800
1800
|
t,
|
|
1801
1801
|
n,
|
|
1802
1802
|
a ?? "0x",
|
|
1803
|
-
o ?
|
|
1804
|
-
c ?
|
|
1805
|
-
|
|
1806
|
-
|
|
1803
|
+
o ? f(o) : "0x",
|
|
1804
|
+
c ? f(c) : "0x",
|
|
1805
|
+
r ? f(r) : "0x",
|
|
1806
|
+
i ? "0x1" : "0x",
|
|
1807
1807
|
s ?? "0x"
|
|
1808
1808
|
];
|
|
1809
1809
|
return O([
|
|
1810
1810
|
"0x7e",
|
|
1811
|
-
|
|
1811
|
+
z(l)
|
|
1812
1812
|
]);
|
|
1813
1813
|
}
|
|
1814
|
-
function
|
|
1814
|
+
function sn(e) {
|
|
1815
1815
|
return e.type === "deposit" || typeof e.sourceHash < "u";
|
|
1816
1816
|
}
|
|
1817
|
-
function
|
|
1817
|
+
function nn(e) {
|
|
1818
1818
|
const { from: t, to: s } = e;
|
|
1819
1819
|
if (t && !v(t))
|
|
1820
|
-
throw new
|
|
1820
|
+
throw new I({ address: t });
|
|
1821
1821
|
if (s && !v(s))
|
|
1822
|
-
throw new
|
|
1823
|
-
}
|
|
1824
|
-
const
|
|
1825
|
-
contracts:
|
|
1826
|
-
formatters:
|
|
1827
|
-
serializers:
|
|
1828
|
-
},
|
|
1829
|
-
|
|
1822
|
+
throw new I({ address: s });
|
|
1823
|
+
}
|
|
1824
|
+
const T = {
|
|
1825
|
+
contracts: Js,
|
|
1826
|
+
formatters: Qs,
|
|
1827
|
+
serializers: en
|
|
1828
|
+
}, rn = 42161, nt = /* @__PURE__ */ g({
|
|
1829
|
+
id: 33139,
|
|
1830
|
+
name: "Ape Chain",
|
|
1831
|
+
nativeCurrency: {
|
|
1832
|
+
name: "ApeCoin",
|
|
1833
|
+
symbol: "APE",
|
|
1834
|
+
decimals: 18
|
|
1835
|
+
},
|
|
1836
|
+
rpcUrls: {
|
|
1837
|
+
default: {
|
|
1838
|
+
http: ["https://rpc.apechain.com/http"],
|
|
1839
|
+
webSocket: ["wss://rpc.apechain.com/ws"]
|
|
1840
|
+
}
|
|
1841
|
+
},
|
|
1842
|
+
blockExplorers: {
|
|
1843
|
+
default: {
|
|
1844
|
+
name: "Apescan",
|
|
1845
|
+
url: "https://apescan.io",
|
|
1846
|
+
apiUrl: "https://api.apescan.io/api"
|
|
1847
|
+
}
|
|
1848
|
+
},
|
|
1849
|
+
contracts: {
|
|
1850
|
+
multicall3: {
|
|
1851
|
+
address: "0xcA11bde05977b3631167028862bE2a173976CA11",
|
|
1852
|
+
blockCreated: 20889
|
|
1853
|
+
}
|
|
1854
|
+
},
|
|
1855
|
+
sourceId: rn
|
|
1856
|
+
}), rt = /* @__PURE__ */ g({
|
|
1857
|
+
id: 42161,
|
|
1858
|
+
name: "Arbitrum One",
|
|
1859
|
+
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
1860
|
+
rpcUrls: {
|
|
1861
|
+
default: {
|
|
1862
|
+
http: ["https://arb1.arbitrum.io/rpc"]
|
|
1863
|
+
}
|
|
1864
|
+
},
|
|
1865
|
+
blockExplorers: {
|
|
1866
|
+
default: {
|
|
1867
|
+
name: "Arbiscan",
|
|
1868
|
+
url: "https://arbiscan.io",
|
|
1869
|
+
apiUrl: "https://api.arbiscan.io/api"
|
|
1870
|
+
}
|
|
1871
|
+
},
|
|
1872
|
+
contracts: {
|
|
1873
|
+
multicall3: {
|
|
1874
|
+
address: "0xca11bde05977b3631167028862be2a173976ca11",
|
|
1875
|
+
blockCreated: 7654707
|
|
1876
|
+
}
|
|
1877
|
+
}
|
|
1878
|
+
}), D = 1, it = /* @__PURE__ */ g({
|
|
1879
|
+
...T,
|
|
1830
1880
|
id: 8453,
|
|
1831
1881
|
name: "Base",
|
|
1832
1882
|
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
@@ -1843,7 +1893,7 @@ const G = {
|
|
|
1843
1893
|
}
|
|
1844
1894
|
},
|
|
1845
1895
|
contracts: {
|
|
1846
|
-
...
|
|
1896
|
+
...T.contracts,
|
|
1847
1897
|
disputeGameFactory: {
|
|
1848
1898
|
[D]: {
|
|
1849
1899
|
address: "0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"
|
|
@@ -1872,8 +1922,8 @@ const G = {
|
|
|
1872
1922
|
}
|
|
1873
1923
|
},
|
|
1874
1924
|
sourceId: D
|
|
1875
|
-
}), j = 11155111,
|
|
1876
|
-
...
|
|
1925
|
+
}), j = 11155111, ot = /* @__PURE__ */ g({
|
|
1926
|
+
...T,
|
|
1877
1927
|
id: 84532,
|
|
1878
1928
|
network: "base-sepolia",
|
|
1879
1929
|
name: "Base Sepolia",
|
|
@@ -1891,7 +1941,7 @@ const G = {
|
|
|
1891
1941
|
}
|
|
1892
1942
|
},
|
|
1893
1943
|
contracts: {
|
|
1894
|
-
...
|
|
1944
|
+
...T.contracts,
|
|
1895
1945
|
disputeGameFactory: {
|
|
1896
1946
|
[j]: {
|
|
1897
1947
|
address: "0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1"
|
|
@@ -1921,7 +1971,7 @@ const G = {
|
|
|
1921
1971
|
},
|
|
1922
1972
|
testnet: !0,
|
|
1923
1973
|
sourceId: j
|
|
1924
|
-
}),
|
|
1974
|
+
}), at = /* @__PURE__ */ g({
|
|
1925
1975
|
id: 56,
|
|
1926
1976
|
name: "BNB Smart Chain",
|
|
1927
1977
|
nativeCurrency: {
|
|
@@ -1930,7 +1980,7 @@ const G = {
|
|
|
1930
1980
|
symbol: "BNB"
|
|
1931
1981
|
},
|
|
1932
1982
|
rpcUrls: {
|
|
1933
|
-
default: { http: ["https://rpc.
|
|
1983
|
+
default: { http: ["https://56.rpc.thirdweb.com"] }
|
|
1934
1984
|
},
|
|
1935
1985
|
blockExplorers: {
|
|
1936
1986
|
default: {
|
|
@@ -1945,7 +1995,7 @@ const G = {
|
|
|
1945
1995
|
blockCreated: 15921452
|
|
1946
1996
|
}
|
|
1947
1997
|
}
|
|
1948
|
-
}),
|
|
1998
|
+
}), ct = /* @__PURE__ */ g({
|
|
1949
1999
|
id: 17e3,
|
|
1950
2000
|
name: "Holesky",
|
|
1951
2001
|
nativeCurrency: { name: "Holesky Ether", symbol: "ETH", decimals: 18 },
|
|
@@ -1976,7 +2026,7 @@ const G = {
|
|
|
1976
2026
|
}
|
|
1977
2027
|
},
|
|
1978
2028
|
testnet: !0
|
|
1979
|
-
}),
|
|
2029
|
+
}), ut = /* @__PURE__ */ g({
|
|
1980
2030
|
id: 1,
|
|
1981
2031
|
name: "Ethereum",
|
|
1982
2032
|
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
@@ -2005,8 +2055,8 @@ const G = {
|
|
|
2005
2055
|
blockCreated: 14353601
|
|
2006
2056
|
}
|
|
2007
2057
|
}
|
|
2008
|
-
}), R = 11155111,
|
|
2009
|
-
...
|
|
2058
|
+
}), R = 11155111, lt = /* @__PURE__ */ g({
|
|
2059
|
+
...T,
|
|
2010
2060
|
id: 11155420,
|
|
2011
2061
|
name: "OP Sepolia",
|
|
2012
2062
|
nativeCurrency: { name: "Sepolia Ether", symbol: "ETH", decimals: 18 },
|
|
@@ -2023,7 +2073,7 @@ const G = {
|
|
|
2023
2073
|
}
|
|
2024
2074
|
},
|
|
2025
2075
|
contracts: {
|
|
2026
|
-
...
|
|
2076
|
+
...T.contracts,
|
|
2027
2077
|
disputeGameFactory: {
|
|
2028
2078
|
[R]: {
|
|
2029
2079
|
address: "0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1"
|
|
@@ -2051,7 +2101,7 @@ const G = {
|
|
|
2051
2101
|
},
|
|
2052
2102
|
testnet: !0,
|
|
2053
2103
|
sourceId: R
|
|
2054
|
-
}),
|
|
2104
|
+
}), dt = /* @__PURE__ */ g({
|
|
2055
2105
|
id: 11155111,
|
|
2056
2106
|
name: "Sepolia",
|
|
2057
2107
|
nativeCurrency: { name: "Sepolia Ether", symbol: "ETH", decimals: 18 },
|
|
@@ -2079,96 +2129,146 @@ const G = {
|
|
|
2079
2129
|
}
|
|
2080
2130
|
},
|
|
2081
2131
|
testnet: !0
|
|
2132
|
+
}), K = 1, ft = /* @__PURE__ */ g({
|
|
2133
|
+
...T,
|
|
2134
|
+
id: 1868,
|
|
2135
|
+
name: "Soneium Mainnet",
|
|
2136
|
+
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
2137
|
+
rpcUrls: {
|
|
2138
|
+
default: {
|
|
2139
|
+
http: ["https://rpc.soneium.org"]
|
|
2140
|
+
}
|
|
2141
|
+
},
|
|
2142
|
+
blockExplorers: {
|
|
2143
|
+
default: {
|
|
2144
|
+
name: "Blockscout",
|
|
2145
|
+
url: "https://soneium.blockscout.com",
|
|
2146
|
+
apiUrl: "https://soneium.blockscout.com/api"
|
|
2147
|
+
}
|
|
2148
|
+
},
|
|
2149
|
+
contracts: {
|
|
2150
|
+
...T.contracts,
|
|
2151
|
+
disputeGameFactory: {
|
|
2152
|
+
[K]: {
|
|
2153
|
+
address: "0x512a3d2c7a43bd9261d2b8e8c9c70d4bd4d503c0"
|
|
2154
|
+
}
|
|
2155
|
+
},
|
|
2156
|
+
l2OutputOracle: {
|
|
2157
|
+
[K]: {
|
|
2158
|
+
address: "0x0000000000000000000000000000000000000000"
|
|
2159
|
+
}
|
|
2160
|
+
},
|
|
2161
|
+
portal: {
|
|
2162
|
+
[K]: {
|
|
2163
|
+
address: "0x88e529a6ccd302c948689cd5156c83d4614fae92",
|
|
2164
|
+
blockCreated: 7061266
|
|
2165
|
+
}
|
|
2166
|
+
},
|
|
2167
|
+
l1StandardBridge: {
|
|
2168
|
+
[K]: {
|
|
2169
|
+
address: "0xeb9bf100225c214efc3e7c651ebbadcf85177607",
|
|
2170
|
+
blockCreated: 7061266
|
|
2171
|
+
}
|
|
2172
|
+
},
|
|
2173
|
+
multicall3: {
|
|
2174
|
+
address: "0xcA11bde05977b3631167028862bE2a173976CA11",
|
|
2175
|
+
blockCreated: 1
|
|
2176
|
+
}
|
|
2177
|
+
},
|
|
2178
|
+
sourceId: K
|
|
2082
2179
|
});
|
|
2083
|
-
var
|
|
2084
|
-
const
|
|
2085
|
-
[
|
|
2086
|
-
[
|
|
2087
|
-
[
|
|
2088
|
-
[
|
|
2089
|
-
[
|
|
2090
|
-
[
|
|
2091
|
-
[
|
|
2180
|
+
var m = ((e) => (e[e.Mainnet = ut.id] = "Mainnet", e[e.Holesky = ct.id] = "Holesky", e[e.Base = it.id] = "Base", e[e.Bsc = at.id] = "Bsc", e[e.Arbitrum = rt.id] = "Arbitrum", e[e.ApeChain = nt.id] = "ApeChain", e[e.Soneium = ft.id] = "Soneium", e[e.Sepolia = dt.id] = "Sepolia", e[e.OptimismSepolia = lt.id] = "OptimismSepolia", e[e.BaseSepolia = ot.id] = "BaseSepolia", e))(m || {});
|
|
2181
|
+
const In = {
|
|
2182
|
+
[m.Mainnet]: ut,
|
|
2183
|
+
[m.Holesky]: ct,
|
|
2184
|
+
[m.Base]: it,
|
|
2185
|
+
[m.Bsc]: at,
|
|
2186
|
+
[m.Arbitrum]: rt,
|
|
2187
|
+
[m.ApeChain]: nt,
|
|
2188
|
+
[m.Soneium]: ft,
|
|
2189
|
+
[m.Sepolia]: dt,
|
|
2190
|
+
[m.OptimismSepolia]: lt,
|
|
2191
|
+
[m.BaseSepolia]: ot
|
|
2092
2192
|
};
|
|
2093
2193
|
export {
|
|
2094
|
-
|
|
2095
|
-
A,
|
|
2194
|
+
pn as $,
|
|
2195
|
+
U as A,
|
|
2096
2196
|
u as B,
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2197
|
+
m as C,
|
|
2198
|
+
De as D,
|
|
2199
|
+
Xe as E,
|
|
2200
|
+
Me as F,
|
|
2201
|
+
qt as G,
|
|
2202
|
+
ke as H,
|
|
2203
|
+
I,
|
|
2204
|
+
Re as J,
|
|
2105
2205
|
F as K,
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
an,
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2206
|
+
ss as L,
|
|
2207
|
+
f as M,
|
|
2208
|
+
z as N,
|
|
2209
|
+
te as O,
|
|
2210
|
+
cs as P,
|
|
2211
|
+
us as Q,
|
|
2212
|
+
ls as R,
|
|
2213
|
+
ds as S,
|
|
2214
|
+
fs as T,
|
|
2215
|
+
hs as U,
|
|
2216
|
+
In as V,
|
|
2217
|
+
ps as W,
|
|
2218
|
+
bs as X,
|
|
2219
|
+
qe as Y,
|
|
2220
|
+
yn as Z,
|
|
2221
|
+
on as _,
|
|
2222
|
+
un as a,
|
|
2223
|
+
le as a0,
|
|
2224
|
+
gs as a1,
|
|
2225
|
+
Je as a2,
|
|
2226
|
+
Cs as a3,
|
|
2227
|
+
Qe as a4,
|
|
2228
|
+
ks as a5,
|
|
2229
|
+
Ls as a6,
|
|
2230
|
+
Jt as a7,
|
|
2231
|
+
Gs as a8,
|
|
2232
|
+
wn as a9,
|
|
2233
|
+
Pn as aa,
|
|
2234
|
+
Bn as ab,
|
|
2235
|
+
En as ac,
|
|
2236
|
+
bn as ad,
|
|
2237
|
+
Ne as ae,
|
|
2238
|
+
ze as af,
|
|
2239
|
+
Yt as ag,
|
|
2240
|
+
mn as ah,
|
|
2241
|
+
de as ai,
|
|
2242
|
+
xn as aj,
|
|
2243
|
+
Os as ak,
|
|
2244
|
+
jt as al,
|
|
2245
|
+
cn as am,
|
|
2246
|
+
fn as an,
|
|
2247
|
+
gn as ao,
|
|
2248
|
+
Z as b,
|
|
2249
|
+
hn as c,
|
|
2250
|
+
ee as d,
|
|
2251
|
+
ln as e,
|
|
2252
|
+
P as f,
|
|
2153
2253
|
Ue as g,
|
|
2154
2254
|
v as h,
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2255
|
+
W as i,
|
|
2256
|
+
yt as j,
|
|
2257
|
+
Rt as k,
|
|
2258
|
+
bt as l,
|
|
2259
|
+
Et as m,
|
|
2260
|
+
Fe as n,
|
|
2261
|
+
Xt as o,
|
|
2262
|
+
ht as p,
|
|
2163
2263
|
O as q,
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2264
|
+
dn as r,
|
|
2265
|
+
Ts as s,
|
|
2266
|
+
ae as t,
|
|
2267
|
+
S as u,
|
|
2268
|
+
$ as v,
|
|
2269
|
+
J as w,
|
|
2270
|
+
C as x,
|
|
2271
|
+
an as y,
|
|
2272
|
+
G as z
|
|
2173
2273
|
};
|
|
2174
|
-
//# sourceMappingURL=constants-
|
|
2274
|
+
//# sourceMappingURL=constants-DtzphQjb.js.map
|