@pufferfinance/puffer-sdk 1.12.2 → 1.13.1
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 +70 -65
- package/dist/api/puffer-client-helpers.js.map +1 -1
- package/dist/api/puffer-client.cjs +1 -1
- package/dist/api/puffer-client.cjs.map +1 -1
- package/dist/api/puffer-client.d.ts +3 -0
- package/dist/api/puffer-client.js +20 -13
- package/dist/api/puffer-client.js.map +1 -1
- package/dist/{ccip-BO_b9tFc.cjs → ccip-C0xwQhXU.cjs} +2 -2
- package/dist/ccip-C0xwQhXU.cjs.map +1 -0
- package/dist/{ccip-DLDO0_x2.js → ccip-K-z2PL4P.js} +3 -3
- package/dist/ccip-K-z2PL4P.js.map +1 -0
- package/dist/chains/constants.cjs +1 -1
- package/dist/chains/constants.js +1 -1
- package/dist/constants-BcPRVxdH.cjs +9 -0
- package/dist/constants-BcPRVxdH.cjs.map +1 -0
- package/dist/{constants-BjRNQpT2.js → constants-CH7Tz5jz.js} +745 -694
- package/dist/constants-CH7Tz5jz.js.map +1 -0
- package/dist/contracts/abis/l1-reward-manager-abis.cjs +1 -1
- package/dist/contracts/abis/l1-reward-manager-abis.d.ts +527 -1
- package/dist/contracts/abis/l1-reward-manager-abis.js +1 -1
- package/dist/contracts/abis/l2-reward-manager-abis.cjs +1 -1
- package/dist/contracts/abis/l2-reward-manager-abis.d.ts +1416 -1
- package/dist/contracts/abis/l2-reward-manager-abis.js +1 -1
- package/dist/contracts/abis/mainnet/Distributor.cjs +2 -0
- package/dist/contracts/abis/mainnet/Distributor.cjs.map +1 -0
- package/dist/contracts/abis/mainnet/Distributor.d.ts +618 -0
- package/dist/contracts/abis/mainnet/Distributor.js +492 -0
- package/dist/contracts/abis/mainnet/Distributor.js.map +1 -0
- package/dist/contracts/abis/nucleus-accountant-abis.cjs +1 -1
- package/dist/contracts/abis/nucleus-accountant-abis.d.ts +2 -1
- package/dist/contracts/abis/nucleus-accountant-abis.js +1 -1
- package/dist/contracts/abis/nucleus-atomic-queue-abis.cjs +1 -1
- package/dist/contracts/abis/nucleus-atomic-queue-abis.d.ts +2 -1
- package/dist/contracts/abis/nucleus-atomic-queue-abis.js +1 -1
- package/dist/contracts/abis/nucleus-boring-vault-abis.cjs +1 -1
- package/dist/contracts/abis/nucleus-boring-vault-abis.d.ts +2 -1
- package/dist/contracts/abis/nucleus-boring-vault-abis.js +1 -1
- package/dist/contracts/abis/nucleus-teller-abis.cjs +1 -1
- package/dist/contracts/abis/nucleus-teller-abis.d.ts +2 -1
- package/dist/contracts/abis/nucleus-teller-abis.js +1 -1
- package/dist/contracts/abis/puf-locker-abis.cjs +1 -1
- package/dist/contracts/abis/puf-locker-abis.d.ts +484 -1
- package/dist/contracts/abis/puf-locker-abis.js +1 -1
- package/dist/contracts/abis/puffer-depositor-abis.cjs +1 -1
- package/dist/contracts/abis/puffer-depositor-abis.d.ts +663 -2
- package/dist/contracts/abis/puffer-depositor-abis.js +1 -1
- package/dist/contracts/abis/puffer-vault-abis.cjs +1 -1
- package/dist/contracts/abis/puffer-vault-abis.d.ts +4 -2
- package/dist/contracts/abis/puffer-vault-abis.js +1 -1
- package/dist/contracts/abis/puffer-withdrawal-manager-abis.cjs +1 -1
- package/dist/contracts/abis/puffer-withdrawal-manager-abis.d.ts +514 -1
- package/dist/contracts/abis/puffer-withdrawal-manager-abis.js +1 -1
- package/dist/contracts/addresses.cjs +1 -1
- package/dist/contracts/addresses.cjs.map +1 -1
- package/dist/contracts/addresses.d.ts +7 -13
- package/dist/contracts/addresses.js +6 -5
- package/dist/contracts/addresses.js.map +1 -1
- package/dist/contracts/handlers/carrot-staking-handler.cjs +1 -1
- package/dist/contracts/handlers/carrot-staking-handler.js +2 -2
- package/dist/contracts/handlers/distributor-handler.cjs +2 -0
- package/dist/contracts/handlers/distributor-handler.cjs.map +1 -0
- package/dist/contracts/handlers/distributor-handler.js +318 -0
- package/dist/contracts/handlers/distributor-handler.js.map +1 -0
- 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 +17101 -14898
- 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.js +2 -2
- package/dist/contracts/handlers/l2-reward-manager-handler.cjs +1 -1
- 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.js +2 -2
- package/dist/contracts/handlers/nucleus-accountant-handler.cjs +1 -1
- 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.cjs.map +1 -1
- package/dist/contracts/handlers/nucleus-atomic-queue-handler.d.ts +7619 -14812
- package/dist/contracts/handlers/nucleus-atomic-queue-handler.js +2 -2
- package/dist/contracts/handlers/nucleus-atomic-queue-handler.js.map +1 -1
- package/dist/contracts/handlers/nucleus-boring-vault-handler.cjs +1 -1
- 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.js +2 -2
- package/dist/contracts/handlers/puf-locker-handler.cjs +1 -1
- package/dist/contracts/handlers/puf-locker-handler.cjs.map +1 -1
- package/dist/contracts/handlers/puf-locker-handler.js +2 -2
- package/dist/contracts/handlers/puf-locker-handler.js.map +1 -1
- package/dist/contracts/handlers/puffer-depositor-handler.cjs +1 -1
- package/dist/contracts/handlers/puffer-depositor-handler.d.ts +11215 -14794
- 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.js +2 -2
- package/dist/contracts/handlers/puffer-vault-handler.cjs +1 -1
- 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.js +2 -2
- package/dist/contracts/tokens.cjs +1 -1
- package/dist/contracts/tokens.js +1 -1
- package/dist/contracts/vaults-addresses.cjs +1 -1
- package/dist/contracts/vaults-addresses.d.ts +5 -4
- package/dist/contracts/vaults-addresses.js +1 -1
- package/dist/createWalletClient-DNLhBkOd.js +3289 -0
- package/dist/createWalletClient-DNLhBkOd.js.map +1 -0
- package/dist/createWalletClient-Di5of07E.cjs +6 -0
- package/dist/createWalletClient-Di5of07E.cjs.map +1 -0
- package/dist/{getContract-CezEyDf-.js → getContract-6ajhFbP2.js} +2 -2
- package/dist/getContract-6ajhFbP2.js.map +1 -0
- package/dist/{getContract-3QbyfZBF.cjs → getContract-ChPFzc5y.cjs} +2 -2
- package/dist/{getContract-CezEyDf-.js.map → getContract-ChPFzc5y.cjs.map} +1 -1
- package/dist/main.cjs +1 -1
- package/dist/main.d.ts +1 -0
- package/dist/main.js +13 -11
- package/dist/main.js.map +1 -1
- package/dist/secp256k1-B8plqpXf.cjs +2 -0
- package/dist/secp256k1-B8plqpXf.cjs.map +1 -0
- package/dist/secp256k1-Ev0s9Yr6.js +1340 -0
- package/dist/secp256k1-Ev0s9Yr6.js.map +1 -0
- package/dist/utils/version.cjs +1 -1
- package/dist/utils/version.js +1 -1
- package/dist/writeContract-BatuNuTe.cjs +32 -0
- package/dist/writeContract-BatuNuTe.cjs.map +1 -0
- package/dist/{writeContract-ChuHpJLC.js → writeContract-CjcOEtWX.js} +822 -763
- package/dist/writeContract-CjcOEtWX.js.map +1 -0
- package/package.json +15 -15
- package/dist/ccip-BO_b9tFc.cjs.map +0 -1
- package/dist/ccip-DLDO0_x2.js.map +0 -1
- package/dist/constants-BjRNQpT2.js.map +0 -1
- package/dist/constants-DA2xUb9r.cjs +0 -9
- package/dist/constants-DA2xUb9r.cjs.map +0 -1
- package/dist/contracts/handlers/carrot-staking-handler.d.ts +0 -15063
- package/dist/contracts/handlers/l1-reward-manager-handler.d.ts +0 -15107
- package/dist/contracts/handlers/l2-reward-manager-handler.d.ts +0 -15353
- package/dist/contracts/handlers/mtw-carrot-handler.d.ts +0 -15293
- package/dist/contracts/handlers/nucleus-accountant-handler.d.ts +0 -15126
- package/dist/contracts/handlers/nucleus-boring-vault-handler.d.ts +0 -15284
- package/dist/contracts/handlers/nucleus-teller-handler.d.ts +0 -15201
- package/dist/contracts/handlers/puf-locker-handler.d.ts +0 -15116
- package/dist/contracts/handlers/puffer-l2-depositor-handler.d.ts +0 -14969
- package/dist/contracts/handlers/puffer-vault-handler.d.ts +0 -17452
- package/dist/contracts/handlers/puffer-withdrawal-manager-handler.d.ts +0 -15111
- package/dist/createWalletClient-BuLYysrp.cjs +0 -4
- package/dist/createWalletClient-BuLYysrp.cjs.map +0 -1
- package/dist/createWalletClient-DNcW-ENe.js +0 -2028
- package/dist/createWalletClient-DNcW-ENe.js.map +0 -1
- package/dist/getContract-3QbyfZBF.cjs.map +0 -1
- package/dist/secp256k1-3OC5y4qp.js +0 -1579
- package/dist/secp256k1-3OC5y4qp.js.map +0 -1
- package/dist/secp256k1-bcahnPX9.cjs +0 -2
- package/dist/secp256k1-bcahnPX9.cjs.map +0 -1
- package/dist/writeContract-ChuHpJLC.js.map +0 -1
- package/dist/writeContract-D97dSJQe.cjs +0 -32
- package/dist/writeContract-D97dSJQe.cjs.map +0 -1
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _(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
4
|
function P(e) {
|
|
5
|
-
return
|
|
5
|
+
return _(e, { strict: !1 }) ? Math.ceil((e.length - 2) / 2) : e.length;
|
|
6
6
|
}
|
|
7
|
-
const
|
|
8
|
-
let
|
|
9
|
-
getDocsUrl: ({ docsBaseUrl: e, docsPath: t = "", docsSlug:
|
|
10
|
-
version: `viem@${
|
|
7
|
+
const Be = "2.23.6";
|
|
8
|
+
let O = {
|
|
9
|
+
getDocsUrl: ({ docsBaseUrl: e, docsPath: t = "", docsSlug: n }) => t ? `${e ?? "https://viem.sh"}${t}${n ? `#${n}` : ""}` : void 0,
|
|
10
|
+
version: `viem@${Be}`
|
|
11
11
|
};
|
|
12
12
|
class u extends Error {
|
|
13
|
-
constructor(t,
|
|
13
|
+
constructor(t, n = {}) {
|
|
14
14
|
var a;
|
|
15
|
-
const
|
|
15
|
+
const s = (() => {
|
|
16
16
|
var c;
|
|
17
|
-
return
|
|
18
|
-
})(), i =
|
|
17
|
+
return n.cause instanceof u ? n.cause.details : (c = n.cause) != null && c.message ? n.cause.message : n.details;
|
|
18
|
+
})(), i = n.cause instanceof u && n.cause.docsPath || n.docsPath, r = (a = O.getDocsUrl) == null ? void 0 : a.call(O, { ...n, docsPath: i }), o = [
|
|
19
19
|
t || "An error occurred.",
|
|
20
20
|
"",
|
|
21
|
-
...
|
|
21
|
+
...n.metaMessages ? [...n.metaMessages, ""] : [],
|
|
22
22
|
...r ? [`Docs: ${r}`] : [],
|
|
23
|
-
...
|
|
24
|
-
...
|
|
23
|
+
...s ? [`Details: ${s}`] : [],
|
|
24
|
+
...O.version ? [`Version: ${O.version}`] : []
|
|
25
25
|
].join(`
|
|
26
26
|
`);
|
|
27
|
-
super(o,
|
|
27
|
+
super(o, n.cause ? { cause: n.cause } : void 0), Object.defineProperty(this, "details", {
|
|
28
28
|
enumerable: !0,
|
|
29
29
|
configurable: !0,
|
|
30
30
|
writable: !0,
|
|
@@ -54,161 +54,161 @@ class u extends Error {
|
|
|
54
54
|
configurable: !0,
|
|
55
55
|
writable: !0,
|
|
56
56
|
value: "BaseError"
|
|
57
|
-
}), this.details =
|
|
57
|
+
}), this.details = s, this.docsPath = i, this.metaMessages = n.metaMessages, this.name = n.name ?? this.name, this.shortMessage = t, this.version = Be;
|
|
58
58
|
}
|
|
59
59
|
walk(t) {
|
|
60
|
-
return
|
|
60
|
+
return Ie(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 Ie(e, t) {
|
|
64
|
+
return t != null && t(e) ? e : e && typeof e == "object" && "cause" in e && e.cause !== void 0 ? Ie(e.cause, t) : t ? null : e;
|
|
65
65
|
}
|
|
66
|
-
class
|
|
67
|
-
constructor({ offset: t, position:
|
|
68
|
-
super(`Slice ${
|
|
66
|
+
class ve extends u {
|
|
67
|
+
constructor({ offset: t, position: n, size: s }) {
|
|
68
|
+
super(`Slice ${n === "start" ? "starting" : "ending"} at offset "${t}" is out-of-bounds (size: ${s}).`, { name: "SliceOffsetOutOfBoundsError" });
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
class
|
|
72
|
-
constructor({ size: t, targetSize:
|
|
73
|
-
super(`${
|
|
71
|
+
class Te extends u {
|
|
72
|
+
constructor({ size: t, targetSize: n, type: s }) {
|
|
73
|
+
super(`${s.charAt(0).toUpperCase()}${s.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`, { name: "SizeExceedsPaddingSizeError" });
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
class
|
|
77
|
-
constructor({ size: t, targetSize:
|
|
78
|
-
super(`${
|
|
76
|
+
class Yn extends u {
|
|
77
|
+
constructor({ size: t, targetSize: n, type: s }) {
|
|
78
|
+
super(`${s.charAt(0).toUpperCase()}${s.slice(1).toLowerCase()} is expected to be ${n} ${s} long, but is ${t} ${s} long.`, { name: "InvalidBytesLengthError" });
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
return typeof e == "string" ?
|
|
81
|
+
function G(e, { dir: t, size: n = 32 } = {}) {
|
|
82
|
+
return typeof e == "string" ? it(e, { dir: t, size: n }) : rt(e, { dir: t, size: n });
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
if (
|
|
84
|
+
function it(e, { dir: t, size: n = 32 } = {}) {
|
|
85
|
+
if (n === null)
|
|
86
86
|
return e;
|
|
87
|
-
const
|
|
88
|
-
if (
|
|
89
|
-
throw new
|
|
90
|
-
size: Math.ceil(
|
|
91
|
-
targetSize:
|
|
87
|
+
const s = e.replace("0x", "");
|
|
88
|
+
if (s.length > n * 2)
|
|
89
|
+
throw new Te({
|
|
90
|
+
size: Math.ceil(s.length / 2),
|
|
91
|
+
targetSize: n,
|
|
92
92
|
type: "hex"
|
|
93
93
|
});
|
|
94
|
-
return `0x${
|
|
94
|
+
return `0x${s[t === "right" ? "padEnd" : "padStart"](n * 2, "0")}`;
|
|
95
95
|
}
|
|
96
|
-
function
|
|
97
|
-
if (
|
|
96
|
+
function rt(e, { dir: t, size: n = 32 } = {}) {
|
|
97
|
+
if (n === null)
|
|
98
98
|
return e;
|
|
99
|
-
if (e.length >
|
|
100
|
-
throw new
|
|
99
|
+
if (e.length > n)
|
|
100
|
+
throw new Te({
|
|
101
101
|
size: e.length,
|
|
102
|
-
targetSize:
|
|
102
|
+
targetSize: n,
|
|
103
103
|
type: "bytes"
|
|
104
104
|
});
|
|
105
|
-
const
|
|
106
|
-
for (let i = 0; i <
|
|
105
|
+
const s = new Uint8Array(n);
|
|
106
|
+
for (let i = 0; i < n; i++) {
|
|
107
107
|
const r = t === "right";
|
|
108
|
-
|
|
108
|
+
s[r ? i : n - i - 1] = e[r ? i : e.length - i - 1];
|
|
109
109
|
}
|
|
110
|
-
return
|
|
110
|
+
return s;
|
|
111
111
|
}
|
|
112
|
-
class
|
|
113
|
-
constructor({ max: t, min:
|
|
114
|
-
super(`Number "${r}" is not in safe ${i ? `${i * 8}-bit ${
|
|
112
|
+
class ot extends u {
|
|
113
|
+
constructor({ max: t, min: n, signed: s, size: i, value: r }) {
|
|
114
|
+
super(`Number "${r}" is not in safe ${i ? `${i * 8}-bit ${s ? "signed" : "unsigned"} ` : ""}integer range ${t ? `(${n} to ${t})` : `(above ${n})`}`, { name: "IntegerOutOfRangeError" });
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
class
|
|
117
|
+
class Jn 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 at 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
|
|
130
|
-
constructor({ givenSize: t, maxSize:
|
|
131
|
-
super(`Size cannot exceed ${
|
|
129
|
+
class ct extends u {
|
|
130
|
+
constructor({ givenSize: t, maxSize: n }) {
|
|
131
|
+
super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`, { name: "SizeOverflowError" });
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
function T(e, { dir: t = "left" } = {}) {
|
|
135
|
-
let
|
|
136
|
-
for (let i = 0; i <
|
|
137
|
-
|
|
138
|
-
return
|
|
135
|
+
let n = typeof e == "string" ? e.replace("0x", "") : e, s = 0;
|
|
136
|
+
for (let i = 0; i < n.length - 1 && n[t === "left" ? i : n.length - i - 1].toString() === "0"; i++)
|
|
137
|
+
s++;
|
|
138
|
+
return n = t === "left" ? n.slice(s) : n.slice(0, n.length - s), typeof e == "string" ? (n.length === 1 && t === "right" && (n = `${n}0`), `0x${n.length % 2 === 1 ? `0${n}` : n}`) : n;
|
|
139
139
|
}
|
|
140
140
|
function U(e, { size: t }) {
|
|
141
141
|
if (P(e) > t)
|
|
142
|
-
throw new
|
|
142
|
+
throw new ct({
|
|
143
143
|
givenSize: P(e),
|
|
144
144
|
maxSize: t
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
|
-
function
|
|
148
|
-
const { signed:
|
|
147
|
+
function L(e, t = {}) {
|
|
148
|
+
const { signed: n } = t;
|
|
149
149
|
t.size && U(e, { size: t.size });
|
|
150
|
-
const
|
|
151
|
-
if (!
|
|
152
|
-
return
|
|
150
|
+
const s = BigInt(e);
|
|
151
|
+
if (!n)
|
|
152
|
+
return s;
|
|
153
153
|
const i = (e.length - 2) / 2, r = (1n << BigInt(i) * 8n - 1n) - 1n;
|
|
154
|
-
return
|
|
154
|
+
return s <= r ? s : s - BigInt(`0x${"f".padStart(i * 2, "f")}`) - 1n;
|
|
155
155
|
}
|
|
156
|
-
function
|
|
157
|
-
let
|
|
158
|
-
if (t.size && (U(
|
|
156
|
+
function Qn(e, t = {}) {
|
|
157
|
+
let n = e;
|
|
158
|
+
if (t.size && (U(n, { size: t.size }), n = T(n)), T(n) === "0x00")
|
|
159
159
|
return !1;
|
|
160
|
-
if (T(
|
|
160
|
+
if (T(n) === "0x01")
|
|
161
161
|
return !0;
|
|
162
|
-
throw new
|
|
162
|
+
throw new at(n);
|
|
163
163
|
}
|
|
164
|
-
function
|
|
165
|
-
return Number(
|
|
164
|
+
function K(e, t = {}) {
|
|
165
|
+
return Number(L(e, t));
|
|
166
166
|
}
|
|
167
|
-
const
|
|
167
|
+
const ut = /* @__PURE__ */ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
|
|
168
168
|
function d(e, t = {}) {
|
|
169
|
-
return typeof e == "number" || typeof e == "bigint" ?
|
|
169
|
+
return typeof e == "number" || typeof e == "bigint" ? $e(e, t) : typeof e == "string" ? dt(e, t) : typeof e == "boolean" ? ft(e, t) : I(e, t);
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
const
|
|
173
|
-
return typeof t.size == "number" ? (U(
|
|
171
|
+
function ft(e, t = {}) {
|
|
172
|
+
const n = `0x${Number(e)}`;
|
|
173
|
+
return typeof t.size == "number" ? (U(n, { size: t.size }), G(n, { size: t.size })) : n;
|
|
174
174
|
}
|
|
175
175
|
function I(e, t = {}) {
|
|
176
|
-
let
|
|
176
|
+
let n = "";
|
|
177
177
|
for (let i = 0; i < e.length; i++)
|
|
178
|
-
|
|
179
|
-
const
|
|
180
|
-
return typeof t.size == "number" ? (U(
|
|
178
|
+
n += ut[e[i]];
|
|
179
|
+
const s = `0x${n}`;
|
|
180
|
+
return typeof t.size == "number" ? (U(s, { size: t.size }), G(s, { dir: "right", size: t.size })) : s;
|
|
181
181
|
}
|
|
182
|
-
function
|
|
183
|
-
const { signed:
|
|
182
|
+
function $e(e, t = {}) {
|
|
183
|
+
const { signed: n, size: s } = t, i = BigInt(e);
|
|
184
184
|
let r;
|
|
185
|
-
|
|
186
|
-
const o = typeof r == "bigint" &&
|
|
185
|
+
s ? n ? r = (1n << BigInt(s) * 8n - 1n) - 1n : r = 2n ** (BigInt(s) * 8n) - 1n : typeof e == "number" && (r = BigInt(Number.MAX_SAFE_INTEGER));
|
|
186
|
+
const o = typeof r == "bigint" && n ? -r - 1n : 0;
|
|
187
187
|
if (r && i > r || i < o) {
|
|
188
188
|
const c = typeof e == "bigint" ? "n" : "";
|
|
189
|
-
throw new
|
|
189
|
+
throw new ot({
|
|
190
190
|
max: r ? `${r}${c}` : void 0,
|
|
191
191
|
min: `${o}${c}`,
|
|
192
|
-
signed:
|
|
193
|
-
size:
|
|
192
|
+
signed: n,
|
|
193
|
+
size: s,
|
|
194
194
|
value: `${e}${c}`
|
|
195
195
|
});
|
|
196
196
|
}
|
|
197
|
-
const a = `0x${(
|
|
198
|
-
return
|
|
197
|
+
const a = `0x${(n && i < 0 ? (1n << BigInt(s * 8)) + BigInt(i) : i).toString(16)}`;
|
|
198
|
+
return s ? G(a, { size: s }) : a;
|
|
199
199
|
}
|
|
200
|
-
const
|
|
201
|
-
function
|
|
202
|
-
const
|
|
203
|
-
return I(
|
|
200
|
+
const lt = /* @__PURE__ */ new TextEncoder();
|
|
201
|
+
function dt(e, t = {}) {
|
|
202
|
+
const n = lt.encode(e);
|
|
203
|
+
return I(n, t);
|
|
204
204
|
}
|
|
205
|
-
const
|
|
206
|
-
function
|
|
207
|
-
return typeof e == "number" || typeof e == "bigint" ?
|
|
205
|
+
const ht = /* @__PURE__ */ new TextEncoder();
|
|
206
|
+
function ze(e, t = {}) {
|
|
207
|
+
return typeof e == "number" || typeof e == "bigint" ? bt(e, t) : typeof e == "boolean" ? pt(e, t) : _(e) ? z(e, t) : Ae(e, t);
|
|
208
208
|
}
|
|
209
|
-
function
|
|
210
|
-
const
|
|
211
|
-
return
|
|
209
|
+
function pt(e, t = {}) {
|
|
210
|
+
const n = new Uint8Array(1);
|
|
211
|
+
return n[0] = Number(e), typeof t.size == "number" ? (U(n, { size: t.size }), G(n, { size: t.size })) : n;
|
|
212
212
|
}
|
|
213
213
|
const m = {
|
|
214
214
|
zero: 48,
|
|
@@ -218,7 +218,7 @@ const m = {
|
|
|
218
218
|
a: 97,
|
|
219
219
|
f: 102
|
|
220
220
|
};
|
|
221
|
-
function
|
|
221
|
+
function he(e) {
|
|
222
222
|
if (e >= m.zero && e <= m.nine)
|
|
223
223
|
return e - m.zero;
|
|
224
224
|
if (e >= m.A && e <= m.F)
|
|
@@ -227,143 +227,180 @@ function le(e) {
|
|
|
227
227
|
return e - (m.a - 10);
|
|
228
228
|
}
|
|
229
229
|
function z(e, t = {}) {
|
|
230
|
-
let
|
|
231
|
-
t.size && (U(
|
|
232
|
-
let
|
|
233
|
-
|
|
234
|
-
const i =
|
|
230
|
+
let n = e;
|
|
231
|
+
t.size && (U(n, { size: t.size }), n = G(n, { dir: "right", size: t.size }));
|
|
232
|
+
let s = n.slice(2);
|
|
233
|
+
s.length % 2 && (s = `0${s}`);
|
|
234
|
+
const i = s.length / 2, r = new Uint8Array(i);
|
|
235
235
|
for (let o = 0, a = 0; o < i; o++) {
|
|
236
|
-
const c =
|
|
236
|
+
const c = he(s.charCodeAt(a++)), f = he(s.charCodeAt(a++));
|
|
237
237
|
if (c === void 0 || f === void 0)
|
|
238
|
-
throw new u(`Invalid byte sequence ("${
|
|
238
|
+
throw new u(`Invalid byte sequence ("${s[a - 2]}${s[a - 1]}" in "${s}").`);
|
|
239
239
|
r[o] = c * 16 + f;
|
|
240
240
|
}
|
|
241
241
|
return r;
|
|
242
242
|
}
|
|
243
|
-
function
|
|
244
|
-
const
|
|
245
|
-
return z(
|
|
243
|
+
function bt(e, t) {
|
|
244
|
+
const n = $e(e, t);
|
|
245
|
+
return z(n);
|
|
246
246
|
}
|
|
247
|
-
function
|
|
248
|
-
const
|
|
249
|
-
return typeof t.size == "number" ? (U(
|
|
247
|
+
function Ae(e, t = {}) {
|
|
248
|
+
const n = ht.encode(e);
|
|
249
|
+
return typeof t.size == "number" ? (U(n, { size: t.size }), G(n, { dir: "right", size: t.size })) : n;
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function W(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 xt(e) {
|
|
256
256
|
return e instanceof Uint8Array || ArrayBuffer.isView(e) && e.constructor.name === "Uint8Array";
|
|
257
257
|
}
|
|
258
|
-
function
|
|
259
|
-
if (!
|
|
258
|
+
function q(e, ...t) {
|
|
259
|
+
if (!xt(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 Zn(e) {
|
|
265
|
+
if (typeof e != "function" || typeof e.create != "function")
|
|
266
|
+
throw new Error("Hash should be wrapped by utils.wrapConstructor");
|
|
267
|
+
W(e.outputLen), W(e.blockLen);
|
|
268
|
+
}
|
|
269
|
+
function X(e, t = !0) {
|
|
265
270
|
if (e.destroyed)
|
|
266
271
|
throw new Error("Hash instance has been destroyed");
|
|
267
272
|
if (t && e.finished)
|
|
268
273
|
throw new Error("Hash#digest() has already been called");
|
|
269
274
|
}
|
|
270
|
-
function
|
|
271
|
-
|
|
272
|
-
const
|
|
273
|
-
if (e.length <
|
|
274
|
-
throw new Error("digestInto() expects output buffer of length at least " +
|
|
275
|
-
}
|
|
276
|
-
const D = /* @__PURE__ */ BigInt(2 ** 32 - 1), he = /* @__PURE__ */ BigInt(32);
|
|
277
|
-
function xt(e, t = !1) {
|
|
278
|
-
return t ? { h: Number(e & D), l: Number(e >> he & D) } : { h: Number(e >> he & D) | 0, l: Number(e & D) | 0 };
|
|
275
|
+
function Ue(e, t) {
|
|
276
|
+
q(e);
|
|
277
|
+
const n = t.outputLen;
|
|
278
|
+
if (e.length < n)
|
|
279
|
+
throw new Error("digestInto() expects output buffer of length at least " + n);
|
|
279
280
|
}
|
|
281
|
+
const R = /* @__PURE__ */ BigInt(2 ** 32 - 1), pe = /* @__PURE__ */ BigInt(32);
|
|
280
282
|
function mt(e, t = !1) {
|
|
281
|
-
|
|
283
|
+
return t ? { h: Number(e & R), l: Number(e >> pe & R) } : { h: Number(e >> pe & R) | 0, l: Number(e & R) | 0 };
|
|
284
|
+
}
|
|
285
|
+
function gt(e, t = !1) {
|
|
286
|
+
let n = new Uint32Array(e.length), s = new Uint32Array(e.length);
|
|
282
287
|
for (let i = 0; i < e.length; i++) {
|
|
283
|
-
const { h: r, l: o } =
|
|
284
|
-
[
|
|
288
|
+
const { h: r, l: o } = mt(e[i], t);
|
|
289
|
+
[n[i], s[i]] = [r, o];
|
|
285
290
|
}
|
|
286
|
-
return [
|
|
291
|
+
return [n, s];
|
|
287
292
|
}
|
|
288
|
-
const
|
|
293
|
+
const yt = (e, t, n) => e << n | t >>> 32 - n, wt = (e, t, n) => t << n | e >>> 32 - n, Pt = (e, t, n) => t << n - 32 | e >>> 64 - n, Et = (e, t, n) => e << n - 32 | t >>> 64 - n, F = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0;
|
|
289
294
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
295
|
+
function Bt(e) {
|
|
296
|
+
return new Uint32Array(e.buffer, e.byteOffset, Math.floor(e.byteLength / 4));
|
|
297
|
+
}
|
|
298
|
+
function ee(e) {
|
|
299
|
+
return new DataView(e.buffer, e.byteOffset, e.byteLength);
|
|
300
|
+
}
|
|
301
|
+
function x(e, t) {
|
|
302
|
+
return e << 32 - t | e >>> t;
|
|
294
303
|
}
|
|
304
|
+
const be = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
295
305
|
function It(e) {
|
|
306
|
+
return e << 24 & 4278190080 | e << 8 & 16711680 | e >>> 8 & 65280 | e >>> 24 & 255;
|
|
307
|
+
}
|
|
308
|
+
function xe(e) {
|
|
309
|
+
for (let t = 0; t < e.length; t++)
|
|
310
|
+
e[t] = It(e[t]);
|
|
311
|
+
}
|
|
312
|
+
function vt(e) {
|
|
296
313
|
if (typeof e != "string")
|
|
297
314
|
throw new Error("utf8ToBytes expected string, got " + typeof e);
|
|
298
315
|
return new Uint8Array(new TextEncoder().encode(e));
|
|
299
316
|
}
|
|
300
|
-
function
|
|
301
|
-
return typeof e == "string" && (e =
|
|
317
|
+
function se(e) {
|
|
318
|
+
return typeof e == "string" && (e = vt(e)), q(e), e;
|
|
302
319
|
}
|
|
303
|
-
|
|
320
|
+
function es(...e) {
|
|
321
|
+
let t = 0;
|
|
322
|
+
for (let s = 0; s < e.length; s++) {
|
|
323
|
+
const i = e[s];
|
|
324
|
+
q(i), t += i.length;
|
|
325
|
+
}
|
|
326
|
+
const n = new Uint8Array(t);
|
|
327
|
+
for (let s = 0, i = 0; s < e.length; s++) {
|
|
328
|
+
const r = e[s];
|
|
329
|
+
n.set(r, i), i += r.length;
|
|
330
|
+
}
|
|
331
|
+
return n;
|
|
332
|
+
}
|
|
333
|
+
class Ce {
|
|
304
334
|
// Safe version that clones internal state
|
|
305
335
|
clone() {
|
|
306
336
|
return this._cloneInto();
|
|
307
337
|
}
|
|
308
338
|
}
|
|
309
|
-
function
|
|
310
|
-
const t = (
|
|
311
|
-
return t.outputLen =
|
|
339
|
+
function Fe(e) {
|
|
340
|
+
const t = (s) => e().update(se(s)).digest(), n = e();
|
|
341
|
+
return t.outputLen = n.outputLen, t.blockLen = n.blockLen, t.create = () => e(), t;
|
|
312
342
|
}
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
343
|
+
function ts(e = 32) {
|
|
344
|
+
if (F && typeof F.getRandomValues == "function")
|
|
345
|
+
return F.getRandomValues(new Uint8Array(e));
|
|
346
|
+
if (F && typeof F.randomBytes == "function")
|
|
347
|
+
return F.randomBytes(e);
|
|
348
|
+
throw new Error("crypto.getRandomValues must be defined");
|
|
349
|
+
}
|
|
350
|
+
const Le = [], Ge = [], Se = [], Tt = /* @__PURE__ */ BigInt(0), N = /* @__PURE__ */ BigInt(1), $t = /* @__PURE__ */ BigInt(2), zt = /* @__PURE__ */ BigInt(7), At = /* @__PURE__ */ BigInt(256), Ut = /* @__PURE__ */ BigInt(113);
|
|
351
|
+
for (let e = 0, t = N, n = 1, s = 0; e < 24; e++) {
|
|
352
|
+
[n, s] = [s, (2 * n + 3 * s) % 5], Le.push(2 * (5 * s + n)), Ge.push((e + 1) * (e + 2) / 2 % 64);
|
|
353
|
+
let i = Tt;
|
|
317
354
|
for (let r = 0; r < 7; r++)
|
|
318
|
-
t = (t <<
|
|
319
|
-
|
|
355
|
+
t = (t << N ^ (t >> zt) * Ut) % At, t & $t && (i ^= N << (N << /* @__PURE__ */ BigInt(r)) - N);
|
|
356
|
+
Se.push(i);
|
|
320
357
|
}
|
|
321
|
-
const [
|
|
322
|
-
function
|
|
323
|
-
const
|
|
324
|
-
for (let
|
|
358
|
+
const [Ct, Ft] = /* @__PURE__ */ gt(Se, !0), me = (e, t, n) => n > 32 ? Pt(e, t, n) : yt(e, t, n), ge = (e, t, n) => n > 32 ? Et(e, t, n) : wt(e, t, n);
|
|
359
|
+
function Lt(e, t = 24) {
|
|
360
|
+
const n = new Uint32Array(10);
|
|
361
|
+
for (let s = 24 - t; s < 24; s++) {
|
|
325
362
|
for (let o = 0; o < 10; o++)
|
|
326
|
-
|
|
363
|
+
n[o] = e[o] ^ e[o + 10] ^ e[o + 20] ^ e[o + 30] ^ e[o + 40];
|
|
327
364
|
for (let o = 0; o < 10; o += 2) {
|
|
328
|
-
const a = (o + 8) % 10, c = (o + 2) % 10, f =
|
|
365
|
+
const a = (o + 8) % 10, c = (o + 2) % 10, f = n[c], h = n[c + 1], l = me(f, h, 1) ^ n[a], b = ge(f, h, 1) ^ n[a + 1];
|
|
329
366
|
for (let p = 0; p < 50; p += 10)
|
|
330
367
|
e[o + p] ^= l, e[o + p + 1] ^= b;
|
|
331
368
|
}
|
|
332
369
|
let i = e[2], r = e[3];
|
|
333
370
|
for (let o = 0; o < 24; o++) {
|
|
334
|
-
const a =
|
|
371
|
+
const a = Ge[o], c = me(i, r, a), f = ge(i, r, a), h = Le[o];
|
|
335
372
|
i = e[h], r = e[h + 1], e[h] = c, e[h + 1] = f;
|
|
336
373
|
}
|
|
337
374
|
for (let o = 0; o < 50; o += 10) {
|
|
338
375
|
for (let a = 0; a < 10; a++)
|
|
339
|
-
|
|
376
|
+
n[a] = e[o + a];
|
|
340
377
|
for (let a = 0; a < 10; a++)
|
|
341
|
-
e[o + a] ^= ~
|
|
378
|
+
e[o + a] ^= ~n[(a + 2) % 10] & n[(a + 4) % 10];
|
|
342
379
|
}
|
|
343
|
-
e[0] ^=
|
|
380
|
+
e[0] ^= Ct[s], e[1] ^= Ft[s];
|
|
344
381
|
}
|
|
345
|
-
|
|
382
|
+
n.fill(0);
|
|
346
383
|
}
|
|
347
|
-
class
|
|
384
|
+
class ie extends Ce {
|
|
348
385
|
// NOTE: we accept arguments in bytes instead of bits here.
|
|
349
|
-
constructor(t,
|
|
350
|
-
if (super(), this.blockLen = t, this.suffix =
|
|
386
|
+
constructor(t, n, s, i = !1, r = 24) {
|
|
387
|
+
if (super(), this.blockLen = t, this.suffix = n, this.outputLen = s, this.enableXOF = i, this.rounds = r, this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, W(s), 0 >= this.blockLen || this.blockLen >= 200)
|
|
351
388
|
throw new Error("Sha3 supports only keccak-f1600 function");
|
|
352
|
-
this.state = new Uint8Array(200), this.state32 =
|
|
389
|
+
this.state = new Uint8Array(200), this.state32 = Bt(this.state);
|
|
353
390
|
}
|
|
354
391
|
keccak() {
|
|
355
|
-
|
|
392
|
+
be || xe(this.state32), Lt(this.state32, this.rounds), be || xe(this.state32), this.posOut = 0, this.pos = 0;
|
|
356
393
|
}
|
|
357
394
|
update(t) {
|
|
358
|
-
|
|
359
|
-
const { blockLen:
|
|
360
|
-
t =
|
|
395
|
+
X(this);
|
|
396
|
+
const { blockLen: n, state: s } = this;
|
|
397
|
+
t = se(t);
|
|
361
398
|
const i = t.length;
|
|
362
399
|
for (let r = 0; r < i; ) {
|
|
363
|
-
const o = Math.min(
|
|
400
|
+
const o = Math.min(n - this.pos, i - r);
|
|
364
401
|
for (let a = 0; a < o; a++)
|
|
365
|
-
|
|
366
|
-
this.pos ===
|
|
402
|
+
s[this.pos++] ^= t[r++];
|
|
403
|
+
this.pos === n && this.keccak();
|
|
367
404
|
}
|
|
368
405
|
return this;
|
|
369
406
|
}
|
|
@@ -371,16 +408,16 @@ class se extends Ue {
|
|
|
371
408
|
if (this.finished)
|
|
372
409
|
return;
|
|
373
410
|
this.finished = !0;
|
|
374
|
-
const { state: t, suffix:
|
|
375
|
-
t[
|
|
411
|
+
const { state: t, suffix: n, pos: s, blockLen: i } = this;
|
|
412
|
+
t[s] ^= n, (n & 128) !== 0 && s === i - 1 && this.keccak(), t[i - 1] ^= 128, this.keccak();
|
|
376
413
|
}
|
|
377
414
|
writeInto(t) {
|
|
378
|
-
|
|
379
|
-
const
|
|
415
|
+
X(this, !1), q(t), this.finish();
|
|
416
|
+
const n = this.state, { blockLen: s } = this;
|
|
380
417
|
for (let i = 0, r = t.length; i < r; ) {
|
|
381
|
-
this.posOut >=
|
|
382
|
-
const o = Math.min(
|
|
383
|
-
t.set(
|
|
418
|
+
this.posOut >= s && this.keccak();
|
|
419
|
+
const o = Math.min(s - this.posOut, r - i);
|
|
420
|
+
t.set(n.subarray(this.posOut, this.posOut + o), i), this.posOut += o, i += o;
|
|
384
421
|
}
|
|
385
422
|
return t;
|
|
386
423
|
}
|
|
@@ -390,10 +427,10 @@ class se extends Ue {
|
|
|
390
427
|
return this.writeInto(t);
|
|
391
428
|
}
|
|
392
429
|
xof(t) {
|
|
393
|
-
return
|
|
430
|
+
return W(t), this.xofInto(new Uint8Array(t));
|
|
394
431
|
}
|
|
395
432
|
digestInto(t) {
|
|
396
|
-
if (
|
|
433
|
+
if (Ue(t, this), this.finished)
|
|
397
434
|
throw new Error("digest() was already called");
|
|
398
435
|
return this.writeInto(t), this.destroy(), t;
|
|
399
436
|
}
|
|
@@ -404,14 +441,14 @@ class se extends Ue {
|
|
|
404
441
|
this.destroyed = !0, this.state.fill(0);
|
|
405
442
|
}
|
|
406
443
|
_cloneInto(t) {
|
|
407
|
-
const { blockLen:
|
|
408
|
-
return t || (t = new
|
|
444
|
+
const { blockLen: n, suffix: s, outputLen: i, rounds: r, enableXOF: o } = this;
|
|
445
|
+
return t || (t = new ie(n, s, i, o, r)), t.state32.set(this.state32), t.pos = this.pos, t.posOut = this.posOut, t.finished = this.finished, t.rounds = r, t.suffix = s, t.outputLen = i, t.enableXOF = o, t.destroyed = this.destroyed, t;
|
|
409
446
|
}
|
|
410
447
|
}
|
|
411
|
-
const
|
|
412
|
-
function
|
|
413
|
-
const
|
|
414
|
-
return
|
|
448
|
+
const Gt = (e, t, n) => Fe(() => new ie(t, e, n)), St = /* @__PURE__ */ Gt(1, 136, 256 / 8);
|
|
449
|
+
function kt(e, t) {
|
|
450
|
+
const n = t || "hex", s = St(_(e, { strict: !1 }) ? ze(e) : e);
|
|
451
|
+
return n === "bytes" ? s : d(s);
|
|
415
452
|
}
|
|
416
453
|
class E extends u {
|
|
417
454
|
constructor({ address: t }) {
|
|
@@ -424,7 +461,7 @@ class E extends u {
|
|
|
424
461
|
});
|
|
425
462
|
}
|
|
426
463
|
}
|
|
427
|
-
class
|
|
464
|
+
class ke extends Map {
|
|
428
465
|
constructor(t) {
|
|
429
466
|
super(), Object.defineProperty(this, "maxSize", {
|
|
430
467
|
enumerable: !0,
|
|
@@ -434,107 +471,107 @@ class Se extends Map {
|
|
|
434
471
|
}), this.maxSize = t;
|
|
435
472
|
}
|
|
436
473
|
get(t) {
|
|
437
|
-
const
|
|
438
|
-
return super.has(t) &&
|
|
474
|
+
const n = super.get(t);
|
|
475
|
+
return super.has(t) && n !== void 0 && (this.delete(t), super.set(t, n)), n;
|
|
439
476
|
}
|
|
440
|
-
set(t,
|
|
441
|
-
if (super.set(t,
|
|
442
|
-
const
|
|
443
|
-
|
|
477
|
+
set(t, n) {
|
|
478
|
+
if (super.set(t, n), this.maxSize && this.size > this.maxSize) {
|
|
479
|
+
const s = this.keys().next().value;
|
|
480
|
+
s && this.delete(s);
|
|
444
481
|
}
|
|
445
482
|
return this;
|
|
446
483
|
}
|
|
447
484
|
}
|
|
448
|
-
const
|
|
485
|
+
const te = /* @__PURE__ */ new ke(8192);
|
|
449
486
|
function He(e, t) {
|
|
450
|
-
if (
|
|
451
|
-
return
|
|
452
|
-
const
|
|
487
|
+
if (te.has(`${e}.${t}`))
|
|
488
|
+
return te.get(`${e}.${t}`);
|
|
489
|
+
const n = e.substring(2).toLowerCase(), s = kt(Ae(n), "bytes"), i = n.split("");
|
|
453
490
|
for (let o = 0; o < 40; o += 2)
|
|
454
|
-
|
|
491
|
+
s[o >> 1] >> 4 >= 8 && i[o] && (i[o] = i[o].toUpperCase()), (s[o >> 1] & 15) >= 8 && i[o + 1] && (i[o + 1] = i[o + 1].toUpperCase());
|
|
455
492
|
const r = `0x${i.join("")}`;
|
|
456
|
-
return
|
|
493
|
+
return te.set(`${e}.${t}`, r), r;
|
|
457
494
|
}
|
|
458
|
-
function
|
|
495
|
+
function ns(e, t) {
|
|
459
496
|
if (!B(e, { strict: !1 }))
|
|
460
497
|
throw new E({ address: e });
|
|
461
498
|
return He(e, t);
|
|
462
499
|
}
|
|
463
|
-
const Ht = /^0x[a-fA-F0-9]{40}$/,
|
|
500
|
+
const Ht = /^0x[a-fA-F0-9]{40}$/, ne = /* @__PURE__ */ new ke(8192);
|
|
464
501
|
function B(e, t) {
|
|
465
|
-
const { strict:
|
|
466
|
-
if (
|
|
467
|
-
return
|
|
468
|
-
const i = Ht.test(e) ? e.toLowerCase() === e ? !0 :
|
|
469
|
-
return
|
|
502
|
+
const { strict: n = !0 } = t ?? {}, s = `${e}.${n}`;
|
|
503
|
+
if (ne.has(s))
|
|
504
|
+
return ne.get(s);
|
|
505
|
+
const i = Ht.test(e) ? e.toLowerCase() === e ? !0 : n ? He(e) === e : !0 : !1;
|
|
506
|
+
return ne.set(s, i), i;
|
|
470
507
|
}
|
|
471
|
-
function
|
|
472
|
-
return typeof e[0] == "string" ?
|
|
508
|
+
function ss(e) {
|
|
509
|
+
return typeof e[0] == "string" ? S(e) : Ot(e);
|
|
473
510
|
}
|
|
474
|
-
function
|
|
511
|
+
function Ot(e) {
|
|
475
512
|
let t = 0;
|
|
476
513
|
for (const i of e)
|
|
477
514
|
t += i.length;
|
|
478
|
-
const
|
|
479
|
-
let
|
|
515
|
+
const n = new Uint8Array(t);
|
|
516
|
+
let s = 0;
|
|
480
517
|
for (const i of e)
|
|
481
|
-
|
|
482
|
-
return
|
|
518
|
+
n.set(i, s), s += i.length;
|
|
519
|
+
return n;
|
|
483
520
|
}
|
|
484
|
-
function
|
|
485
|
-
return `0x${e.reduce((t,
|
|
521
|
+
function S(e) {
|
|
522
|
+
return `0x${e.reduce((t, n) => t + n.replace("0x", ""), "")}`;
|
|
486
523
|
}
|
|
487
|
-
function
|
|
488
|
-
return
|
|
489
|
-
strict:
|
|
490
|
-
}) :
|
|
491
|
-
strict:
|
|
524
|
+
function Nt(e, t, n, { strict: s } = {}) {
|
|
525
|
+
return _(e, { strict: !1 }) ? Vt(e, t, n, {
|
|
526
|
+
strict: s
|
|
527
|
+
}) : Mt(e, t, n, {
|
|
528
|
+
strict: s
|
|
492
529
|
});
|
|
493
530
|
}
|
|
494
|
-
function
|
|
531
|
+
function Oe(e, t) {
|
|
495
532
|
if (typeof t == "number" && t > 0 && t > P(e) - 1)
|
|
496
|
-
throw new
|
|
533
|
+
throw new ve({
|
|
497
534
|
offset: t,
|
|
498
535
|
position: "start",
|
|
499
536
|
size: P(e)
|
|
500
537
|
});
|
|
501
538
|
}
|
|
502
|
-
function
|
|
503
|
-
if (typeof t == "number" && typeof
|
|
504
|
-
throw new
|
|
505
|
-
offset:
|
|
539
|
+
function Ne(e, t, n) {
|
|
540
|
+
if (typeof t == "number" && typeof n == "number" && P(e) !== n - t)
|
|
541
|
+
throw new ve({
|
|
542
|
+
offset: n,
|
|
506
543
|
position: "end",
|
|
507
544
|
size: P(e)
|
|
508
545
|
});
|
|
509
546
|
}
|
|
510
|
-
function
|
|
511
|
-
|
|
512
|
-
const i = e.slice(t,
|
|
513
|
-
return
|
|
547
|
+
function Mt(e, t, n, { strict: s } = {}) {
|
|
548
|
+
Oe(e, t);
|
|
549
|
+
const i = e.slice(t, n);
|
|
550
|
+
return s && Ne(i, t, n), i;
|
|
514
551
|
}
|
|
515
|
-
function
|
|
516
|
-
|
|
517
|
-
const i = `0x${e.replace("0x", "").slice((t ?? 0) * 2, (
|
|
518
|
-
return
|
|
552
|
+
function Vt(e, t, n, { strict: s } = {}) {
|
|
553
|
+
Oe(e, t);
|
|
554
|
+
const i = `0x${e.replace("0x", "").slice((t ?? 0) * 2, (n ?? e.length) * 2)}`;
|
|
555
|
+
return s && Ne(i, t, n), i;
|
|
519
556
|
}
|
|
520
|
-
class
|
|
557
|
+
class ye extends u {
|
|
521
558
|
constructor({ offset: t }) {
|
|
522
559
|
super(`Offset \`${t}\` cannot be negative.`, {
|
|
523
560
|
name: "NegativeOffsetError"
|
|
524
561
|
});
|
|
525
562
|
}
|
|
526
563
|
}
|
|
527
|
-
class
|
|
528
|
-
constructor({ length: t, position:
|
|
529
|
-
super(`Position \`${
|
|
564
|
+
class _t extends u {
|
|
565
|
+
constructor({ length: t, position: n }) {
|
|
566
|
+
super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`, { name: "PositionOutOfBoundsError" });
|
|
530
567
|
}
|
|
531
568
|
}
|
|
532
|
-
class
|
|
533
|
-
constructor({ count: t, limit:
|
|
534
|
-
super(`Recursive read limit of \`${
|
|
569
|
+
class jt extends u {
|
|
570
|
+
constructor({ count: t, limit: n }) {
|
|
571
|
+
super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`, { name: "RecursiveReadLimitExceededError" });
|
|
535
572
|
}
|
|
536
573
|
}
|
|
537
|
-
const
|
|
574
|
+
const Dt = {
|
|
538
575
|
bytes: new Uint8Array(),
|
|
539
576
|
dataView: new DataView(new ArrayBuffer(0)),
|
|
540
577
|
position: 0,
|
|
@@ -543,21 +580,21 @@ const jt = {
|
|
|
543
580
|
recursiveReadLimit: Number.POSITIVE_INFINITY,
|
|
544
581
|
assertReadLimit() {
|
|
545
582
|
if (this.recursiveReadCount >= this.recursiveReadLimit)
|
|
546
|
-
throw new
|
|
583
|
+
throw new jt({
|
|
547
584
|
count: this.recursiveReadCount + 1,
|
|
548
585
|
limit: this.recursiveReadLimit
|
|
549
586
|
});
|
|
550
587
|
},
|
|
551
588
|
assertPosition(e) {
|
|
552
589
|
if (e < 0 || e > this.bytes.length - 1)
|
|
553
|
-
throw new
|
|
590
|
+
throw new _t({
|
|
554
591
|
length: this.bytes.length,
|
|
555
592
|
position: e
|
|
556
593
|
});
|
|
557
594
|
},
|
|
558
595
|
decrementPosition(e) {
|
|
559
596
|
if (e < 0)
|
|
560
|
-
throw new
|
|
597
|
+
throw new ye({ offset: e });
|
|
561
598
|
const t = this.position - e;
|
|
562
599
|
this.assertPosition(t), this.position = t;
|
|
563
600
|
},
|
|
@@ -566,7 +603,7 @@ const jt = {
|
|
|
566
603
|
},
|
|
567
604
|
incrementPosition(e) {
|
|
568
605
|
if (e < 0)
|
|
569
|
-
throw new
|
|
606
|
+
throw new ye({ offset: e });
|
|
570
607
|
const t = this.position + e;
|
|
571
608
|
this.assertPosition(t), this.position = t;
|
|
572
609
|
},
|
|
@@ -575,8 +612,8 @@ const jt = {
|
|
|
575
612
|
return this.assertPosition(t), this.bytes[t];
|
|
576
613
|
},
|
|
577
614
|
inspectBytes(e, t) {
|
|
578
|
-
const
|
|
579
|
-
return this.assertPosition(
|
|
615
|
+
const n = t ?? this.position;
|
|
616
|
+
return this.assertPosition(n + e - 1), this.bytes.subarray(n, n + e);
|
|
580
617
|
},
|
|
581
618
|
inspectUint8(e) {
|
|
582
619
|
const t = e ?? this.position;
|
|
@@ -619,8 +656,8 @@ const jt = {
|
|
|
619
656
|
},
|
|
620
657
|
readBytes(e, t) {
|
|
621
658
|
this.assertReadLimit(), this._touch();
|
|
622
|
-
const
|
|
623
|
-
return this.position += t ?? e,
|
|
659
|
+
const n = this.inspectBytes(e);
|
|
660
|
+
return this.position += t ?? e, n;
|
|
624
661
|
},
|
|
625
662
|
readUint8() {
|
|
626
663
|
this.assertReadLimit(), this._touch();
|
|
@@ -656,39 +693,39 @@ const jt = {
|
|
|
656
693
|
this.positionReadCount.set(this.position, e + 1), e > 0 && this.recursiveReadCount++;
|
|
657
694
|
}
|
|
658
695
|
};
|
|
659
|
-
function
|
|
660
|
-
const
|
|
661
|
-
return
|
|
696
|
+
function Me(e, { recursiveReadLimit: t = 8192 } = {}) {
|
|
697
|
+
const n = Object.create(Dt);
|
|
698
|
+
return n.bytes = e, n.dataView = new DataView(e.buffer, e.byteOffset, e.byteLength), n.positionReadCount = /* @__PURE__ */ new Map(), n.recursiveReadLimit = t, n;
|
|
662
699
|
}
|
|
663
|
-
const
|
|
700
|
+
const Rt = {
|
|
664
701
|
gwei: 9,
|
|
665
702
|
wei: 18
|
|
666
|
-
},
|
|
703
|
+
}, Kt = {
|
|
667
704
|
ether: -9,
|
|
668
705
|
wei: 9
|
|
669
706
|
};
|
|
670
|
-
function
|
|
671
|
-
let
|
|
672
|
-
const
|
|
673
|
-
|
|
707
|
+
function Ve(e, t) {
|
|
708
|
+
let n = e.toString();
|
|
709
|
+
const s = n.startsWith("-");
|
|
710
|
+
s && (n = n.slice(1)), n = n.padStart(t, "0");
|
|
674
711
|
let [i, r] = [
|
|
675
|
-
|
|
676
|
-
|
|
712
|
+
n.slice(0, n.length - t),
|
|
713
|
+
n.slice(n.length - t)
|
|
677
714
|
];
|
|
678
|
-
return r = r.replace(/(0+)$/, ""), `${
|
|
715
|
+
return r = r.replace(/(0+)$/, ""), `${s ? "-" : ""}${i || "0"}${r ? `.${r}` : ""}`;
|
|
679
716
|
}
|
|
680
|
-
function
|
|
681
|
-
return
|
|
717
|
+
function Wt(e, t = "wei") {
|
|
718
|
+
return Ve(e, Rt[t]);
|
|
682
719
|
}
|
|
683
720
|
function $(e, t = "wei") {
|
|
684
|
-
return
|
|
721
|
+
return Ve(e, Kt[t]);
|
|
685
722
|
}
|
|
686
|
-
function
|
|
687
|
-
const t = Object.entries(e).map(([
|
|
688
|
-
return t.map(([
|
|
723
|
+
function _e(e) {
|
|
724
|
+
const t = Object.entries(e).map(([s, i]) => i === void 0 || i === !1 ? null : [s, i]).filter(Boolean), n = t.reduce((s, [i]) => Math.max(s, i.length), 0);
|
|
725
|
+
return t.map(([s, i]) => ` ${`${s}:`.padEnd(n + 1)} ${i}`).join(`
|
|
689
726
|
`);
|
|
690
727
|
}
|
|
691
|
-
class
|
|
728
|
+
class is extends u {
|
|
692
729
|
constructor() {
|
|
693
730
|
super([
|
|
694
731
|
"Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.",
|
|
@@ -697,20 +734,20 @@ class Zs extends u {
|
|
|
697
734
|
`), { name: "FeeConflictError" });
|
|
698
735
|
}
|
|
699
736
|
}
|
|
700
|
-
class
|
|
737
|
+
class Xt extends u {
|
|
701
738
|
constructor({ v: t }) {
|
|
702
739
|
super(`Invalid \`v\` value "${t}". Expected 27 or 28.`, {
|
|
703
740
|
name: "InvalidLegacyVError"
|
|
704
741
|
});
|
|
705
742
|
}
|
|
706
743
|
}
|
|
707
|
-
class
|
|
744
|
+
class qt extends u {
|
|
708
745
|
constructor({ transaction: t }) {
|
|
709
746
|
super("Cannot infer a transaction type from provided transaction.", {
|
|
710
747
|
metaMessages: [
|
|
711
748
|
"Provided Transaction:",
|
|
712
749
|
"{",
|
|
713
|
-
|
|
750
|
+
_e(t),
|
|
714
751
|
"}",
|
|
715
752
|
"",
|
|
716
753
|
"To infer the type, either provide:",
|
|
@@ -725,19 +762,19 @@ class Xt extends u {
|
|
|
725
762
|
});
|
|
726
763
|
}
|
|
727
764
|
}
|
|
728
|
-
class
|
|
765
|
+
class Yt extends u {
|
|
729
766
|
constructor({ storageKey: t }) {
|
|
730
767
|
super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length - 2) / 2)} bytes.`, { name: "InvalidStorageKeySizeError" });
|
|
731
768
|
}
|
|
732
769
|
}
|
|
733
|
-
class
|
|
734
|
-
constructor(t, { account:
|
|
770
|
+
class rs extends u {
|
|
771
|
+
constructor(t, { account: n, docsPath: s, chain: i, data: r, gas: o, gasPrice: a, maxFeePerGas: c, maxPriorityFeePerGas: f, nonce: h, to: l, value: b }) {
|
|
735
772
|
var g;
|
|
736
|
-
const p =
|
|
773
|
+
const p = _e({
|
|
737
774
|
chain: i && `${i == null ? void 0 : i.name} (id: ${i == null ? void 0 : i.id})`,
|
|
738
|
-
from:
|
|
775
|
+
from: n == null ? void 0 : n.address,
|
|
739
776
|
to: l,
|
|
740
|
-
value: typeof b < "u" && `${
|
|
777
|
+
value: typeof b < "u" && `${Wt(b)} ${((g = i == null ? void 0 : i.nativeCurrency) == null ? void 0 : g.symbol) || "ETH"}`,
|
|
741
778
|
data: r,
|
|
742
779
|
gas: o,
|
|
743
780
|
gasPrice: typeof a < "u" && `${$(a)} gwei`,
|
|
@@ -747,7 +784,7 @@ class en extends u {
|
|
|
747
784
|
});
|
|
748
785
|
super(t.shortMessage, {
|
|
749
786
|
cause: t,
|
|
750
|
-
docsPath:
|
|
787
|
+
docsPath: s,
|
|
751
788
|
metaMessages: [
|
|
752
789
|
...t.metaMessages ? [...t.metaMessages, " "] : [],
|
|
753
790
|
"Request Arguments:",
|
|
@@ -762,54 +799,54 @@ class en extends u {
|
|
|
762
799
|
}), this.cause = t;
|
|
763
800
|
}
|
|
764
801
|
}
|
|
765
|
-
class
|
|
766
|
-
constructor({ blockHash: t, blockNumber:
|
|
802
|
+
class os extends u {
|
|
803
|
+
constructor({ blockHash: t, blockNumber: n, blockTag: s, hash: i, index: r }) {
|
|
767
804
|
let o = "Transaction";
|
|
768
|
-
|
|
805
|
+
s && r !== void 0 && (o = `Transaction at block time "${s}" at index "${r}"`), t && r !== void 0 && (o = `Transaction at block hash "${t}" at index "${r}"`), n && r !== void 0 && (o = `Transaction at block number "${n}" at index "${r}"`), i && (o = `Transaction with hash "${i}"`), super(`${o} could not be found.`, {
|
|
769
806
|
name: "TransactionNotFoundError"
|
|
770
807
|
});
|
|
771
808
|
}
|
|
772
809
|
}
|
|
773
|
-
class
|
|
810
|
+
class as extends u {
|
|
774
811
|
constructor({ hash: t }) {
|
|
775
812
|
super(`Transaction receipt with hash "${t}" could not be found. The Transaction may not be processed on a block yet.`, {
|
|
776
813
|
name: "TransactionReceiptNotFoundError"
|
|
777
814
|
});
|
|
778
815
|
}
|
|
779
816
|
}
|
|
780
|
-
class
|
|
817
|
+
class cs extends u {
|
|
781
818
|
constructor({ hash: t }) {
|
|
782
819
|
super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`, { name: "WaitForTransactionReceiptTimeoutError" });
|
|
783
820
|
}
|
|
784
821
|
}
|
|
785
822
|
function A(e, t = "hex") {
|
|
786
|
-
const
|
|
787
|
-
return
|
|
823
|
+
const n = je(e), s = Me(new Uint8Array(n.length));
|
|
824
|
+
return n.encode(s), t === "hex" ? I(s.bytes) : s.bytes;
|
|
788
825
|
}
|
|
789
|
-
function
|
|
790
|
-
return Array.isArray(e) ?
|
|
826
|
+
function je(e) {
|
|
827
|
+
return Array.isArray(e) ? Jt(e.map((t) => je(t))) : Qt(e);
|
|
791
828
|
}
|
|
792
|
-
function
|
|
793
|
-
const t = e.reduce((i, r) => i + r.length, 0),
|
|
829
|
+
function Jt(e) {
|
|
830
|
+
const t = e.reduce((i, r) => i + r.length, 0), n = De(t);
|
|
794
831
|
return {
|
|
795
|
-
length: t <= 55 ? 1 + t : 1 +
|
|
832
|
+
length: t <= 55 ? 1 + t : 1 + n + t,
|
|
796
833
|
encode(i) {
|
|
797
|
-
t <= 55 ? i.pushByte(192 + t) : (i.pushByte(247 +
|
|
834
|
+
t <= 55 ? i.pushByte(192 + t) : (i.pushByte(247 + n), n === 1 ? i.pushUint8(t) : n === 2 ? i.pushUint16(t) : n === 3 ? i.pushUint24(t) : i.pushUint32(t));
|
|
798
835
|
for (const { encode: r } of e)
|
|
799
836
|
r(i);
|
|
800
837
|
}
|
|
801
838
|
};
|
|
802
839
|
}
|
|
803
|
-
function
|
|
804
|
-
const t = typeof e == "string" ? z(e) : e,
|
|
840
|
+
function Qt(e) {
|
|
841
|
+
const t = typeof e == "string" ? z(e) : e, n = De(t.length);
|
|
805
842
|
return {
|
|
806
|
-
length: t.length === 1 && t[0] < 128 ? 1 : t.length <= 55 ? 1 + t.length : 1 +
|
|
843
|
+
length: t.length === 1 && t[0] < 128 ? 1 : t.length <= 55 ? 1 + t.length : 1 + n + t.length,
|
|
807
844
|
encode(i) {
|
|
808
|
-
t.length === 1 && t[0] < 128 ? i.pushBytes(t) : t.length <= 55 ? (i.pushByte(128 + t.length), i.pushBytes(t)) : (i.pushByte(183 +
|
|
845
|
+
t.length === 1 && t[0] < 128 ? i.pushBytes(t) : t.length <= 55 ? (i.pushByte(128 + t.length), i.pushBytes(t)) : (i.pushByte(183 + n), n === 1 ? i.pushUint8(t.length) : n === 2 ? i.pushUint16(t.length) : n === 3 ? i.pushUint24(t.length) : i.pushUint32(t.length), i.pushBytes(t));
|
|
809
846
|
}
|
|
810
847
|
};
|
|
811
848
|
}
|
|
812
|
-
function
|
|
849
|
+
function De(e) {
|
|
813
850
|
if (e < 2 ** 8)
|
|
814
851
|
return 1;
|
|
815
852
|
if (e < 2 ** 16)
|
|
@@ -820,94 +857,94 @@ function je(e) {
|
|
|
820
857
|
return 4;
|
|
821
858
|
throw new u("Length is too large.");
|
|
822
859
|
}
|
|
823
|
-
class
|
|
824
|
-
constructor({ cause: t, message:
|
|
860
|
+
class Re extends u {
|
|
861
|
+
constructor({ cause: t, message: n } = {}) {
|
|
825
862
|
var i;
|
|
826
|
-
const
|
|
827
|
-
super(`Execution reverted ${
|
|
863
|
+
const s = (i = n == null ? void 0 : n.replace("execution reverted: ", "")) == null ? void 0 : i.replace("execution reverted", "");
|
|
864
|
+
super(`Execution reverted ${s ? `with reason: ${s}` : "for an unknown reason"}.`, {
|
|
828
865
|
cause: t,
|
|
829
866
|
name: "ExecutionRevertedError"
|
|
830
867
|
});
|
|
831
868
|
}
|
|
832
869
|
}
|
|
833
|
-
Object.defineProperty(
|
|
870
|
+
Object.defineProperty(Re, "code", {
|
|
834
871
|
enumerable: !0,
|
|
835
872
|
configurable: !0,
|
|
836
873
|
writable: !0,
|
|
837
874
|
value: 3
|
|
838
875
|
});
|
|
839
|
-
Object.defineProperty(
|
|
876
|
+
Object.defineProperty(Re, "nodeMessage", {
|
|
840
877
|
enumerable: !0,
|
|
841
878
|
configurable: !0,
|
|
842
879
|
writable: !0,
|
|
843
880
|
value: /execution reverted/
|
|
844
881
|
});
|
|
845
|
-
class
|
|
846
|
-
constructor({ cause: t, maxFeePerGas:
|
|
847
|
-
super(`The fee cap (\`maxFeePerGas\`${
|
|
882
|
+
class Y extends u {
|
|
883
|
+
constructor({ cause: t, maxFeePerGas: n } = {}) {
|
|
884
|
+
super(`The fee cap (\`maxFeePerGas\`${n ? ` = ${$(n)} gwei` : ""}) cannot be higher than the maximum allowed value (2^256-1).`, {
|
|
848
885
|
cause: t,
|
|
849
886
|
name: "FeeCapTooHighError"
|
|
850
887
|
});
|
|
851
888
|
}
|
|
852
889
|
}
|
|
853
|
-
Object.defineProperty(
|
|
890
|
+
Object.defineProperty(Y, "nodeMessage", {
|
|
854
891
|
enumerable: !0,
|
|
855
892
|
configurable: !0,
|
|
856
893
|
writable: !0,
|
|
857
894
|
value: /max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/
|
|
858
895
|
});
|
|
859
|
-
class
|
|
860
|
-
constructor({ cause: t, maxFeePerGas:
|
|
861
|
-
super(`The fee cap (\`maxFeePerGas\`${
|
|
896
|
+
class Zt extends u {
|
|
897
|
+
constructor({ cause: t, maxFeePerGas: n } = {}) {
|
|
898
|
+
super(`The fee cap (\`maxFeePerGas\`${n ? ` = ${$(n)}` : ""} gwei) cannot be lower than the block base fee.`, {
|
|
862
899
|
cause: t,
|
|
863
900
|
name: "FeeCapTooLowError"
|
|
864
901
|
});
|
|
865
902
|
}
|
|
866
903
|
}
|
|
867
|
-
Object.defineProperty(
|
|
904
|
+
Object.defineProperty(Zt, "nodeMessage", {
|
|
868
905
|
enumerable: !0,
|
|
869
906
|
configurable: !0,
|
|
870
907
|
writable: !0,
|
|
871
908
|
value: /max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/
|
|
872
909
|
});
|
|
873
|
-
class
|
|
874
|
-
constructor({ cause: t, nonce:
|
|
875
|
-
super(`Nonce provided for the transaction ${
|
|
910
|
+
class en extends u {
|
|
911
|
+
constructor({ cause: t, nonce: n } = {}) {
|
|
912
|
+
super(`Nonce provided for the transaction ${n ? `(${n}) ` : ""}is higher than the next one expected.`, { cause: t, name: "NonceTooHighError" });
|
|
876
913
|
}
|
|
877
914
|
}
|
|
878
|
-
Object.defineProperty(
|
|
915
|
+
Object.defineProperty(en, "nodeMessage", {
|
|
879
916
|
enumerable: !0,
|
|
880
917
|
configurable: !0,
|
|
881
918
|
writable: !0,
|
|
882
919
|
value: /nonce too high/
|
|
883
920
|
});
|
|
884
|
-
class
|
|
885
|
-
constructor({ cause: t, nonce:
|
|
921
|
+
class tn extends u {
|
|
922
|
+
constructor({ cause: t, nonce: n } = {}) {
|
|
886
923
|
super([
|
|
887
|
-
`Nonce provided for the transaction ${
|
|
924
|
+
`Nonce provided for the transaction ${n ? `(${n}) ` : ""}is lower than the current nonce of the account.`,
|
|
888
925
|
"Try increasing the nonce or find the latest nonce with `getTransactionCount`."
|
|
889
926
|
].join(`
|
|
890
927
|
`), { cause: t, name: "NonceTooLowError" });
|
|
891
928
|
}
|
|
892
929
|
}
|
|
893
|
-
Object.defineProperty(
|
|
930
|
+
Object.defineProperty(tn, "nodeMessage", {
|
|
894
931
|
enumerable: !0,
|
|
895
932
|
configurable: !0,
|
|
896
933
|
writable: !0,
|
|
897
934
|
value: /nonce too low|transaction already imported|already known/
|
|
898
935
|
});
|
|
899
|
-
class
|
|
900
|
-
constructor({ cause: t, nonce:
|
|
901
|
-
super(`Nonce provided for the transaction ${
|
|
936
|
+
class nn extends u {
|
|
937
|
+
constructor({ cause: t, nonce: n } = {}) {
|
|
938
|
+
super(`Nonce provided for the transaction ${n ? `(${n}) ` : ""}exceeds the maximum allowed nonce.`, { cause: t, name: "NonceMaxValueError" });
|
|
902
939
|
}
|
|
903
940
|
}
|
|
904
|
-
Object.defineProperty(
|
|
941
|
+
Object.defineProperty(nn, "nodeMessage", {
|
|
905
942
|
enumerable: !0,
|
|
906
943
|
configurable: !0,
|
|
907
944
|
writable: !0,
|
|
908
945
|
value: /nonce has max value/
|
|
909
946
|
});
|
|
910
|
-
class
|
|
947
|
+
class sn extends u {
|
|
911
948
|
constructor({ cause: t } = {}) {
|
|
912
949
|
super([
|
|
913
950
|
"The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."
|
|
@@ -928,41 +965,41 @@ class ss extends u {
|
|
|
928
965
|
});
|
|
929
966
|
}
|
|
930
967
|
}
|
|
931
|
-
Object.defineProperty(
|
|
968
|
+
Object.defineProperty(sn, "nodeMessage", {
|
|
932
969
|
enumerable: !0,
|
|
933
970
|
configurable: !0,
|
|
934
971
|
writable: !0,
|
|
935
972
|
value: /insufficient funds|exceeds transaction sender account balance/
|
|
936
973
|
});
|
|
937
|
-
class
|
|
938
|
-
constructor({ cause: t, gas:
|
|
939
|
-
super(`The amount of gas ${
|
|
974
|
+
class rn extends u {
|
|
975
|
+
constructor({ cause: t, gas: n } = {}) {
|
|
976
|
+
super(`The amount of gas ${n ? `(${n}) ` : ""}provided for the transaction exceeds the limit allowed for the block.`, {
|
|
940
977
|
cause: t,
|
|
941
978
|
name: "IntrinsicGasTooHighError"
|
|
942
979
|
});
|
|
943
980
|
}
|
|
944
981
|
}
|
|
945
|
-
Object.defineProperty(
|
|
982
|
+
Object.defineProperty(rn, "nodeMessage", {
|
|
946
983
|
enumerable: !0,
|
|
947
984
|
configurable: !0,
|
|
948
985
|
writable: !0,
|
|
949
986
|
value: /intrinsic gas too high|gas limit reached/
|
|
950
987
|
});
|
|
951
|
-
class
|
|
952
|
-
constructor({ cause: t, gas:
|
|
953
|
-
super(`The amount of gas ${
|
|
988
|
+
class on extends u {
|
|
989
|
+
constructor({ cause: t, gas: n } = {}) {
|
|
990
|
+
super(`The amount of gas ${n ? `(${n}) ` : ""}provided for the transaction is too low.`, {
|
|
954
991
|
cause: t,
|
|
955
992
|
name: "IntrinsicGasTooLowError"
|
|
956
993
|
});
|
|
957
994
|
}
|
|
958
995
|
}
|
|
959
|
-
Object.defineProperty(
|
|
996
|
+
Object.defineProperty(on, "nodeMessage", {
|
|
960
997
|
enumerable: !0,
|
|
961
998
|
configurable: !0,
|
|
962
999
|
writable: !0,
|
|
963
1000
|
value: /intrinsic gas too low/
|
|
964
1001
|
});
|
|
965
|
-
class
|
|
1002
|
+
class an extends u {
|
|
966
1003
|
constructor({ cause: t }) {
|
|
967
1004
|
super("The transaction type is not supported for this chain.", {
|
|
968
1005
|
cause: t,
|
|
@@ -970,16 +1007,16 @@ class rs extends u {
|
|
|
970
1007
|
});
|
|
971
1008
|
}
|
|
972
1009
|
}
|
|
973
|
-
Object.defineProperty(
|
|
1010
|
+
Object.defineProperty(an, "nodeMessage", {
|
|
974
1011
|
enumerable: !0,
|
|
975
1012
|
configurable: !0,
|
|
976
1013
|
writable: !0,
|
|
977
1014
|
value: /transaction type not valid/
|
|
978
1015
|
});
|
|
979
|
-
class
|
|
980
|
-
constructor({ cause: t, maxPriorityFeePerGas:
|
|
1016
|
+
class Ke extends u {
|
|
1017
|
+
constructor({ cause: t, maxPriorityFeePerGas: n, maxFeePerGas: s } = {}) {
|
|
981
1018
|
super([
|
|
982
|
-
`The provided tip (\`maxPriorityFeePerGas\`${
|
|
1019
|
+
`The provided tip (\`maxPriorityFeePerGas\`${n ? ` = ${$(n)} gwei` : ""}) cannot be higher than the fee cap (\`maxFeePerGas\`${s ? ` = ${$(s)} gwei` : ""}).`
|
|
983
1020
|
].join(`
|
|
984
1021
|
`), {
|
|
985
1022
|
cause: t,
|
|
@@ -987,13 +1024,13 @@ class Re extends u {
|
|
|
987
1024
|
});
|
|
988
1025
|
}
|
|
989
1026
|
}
|
|
990
|
-
Object.defineProperty(
|
|
1027
|
+
Object.defineProperty(Ke, "nodeMessage", {
|
|
991
1028
|
enumerable: !0,
|
|
992
1029
|
configurable: !0,
|
|
993
1030
|
writable: !0,
|
|
994
1031
|
value: /max priority fee per gas higher than max fee per gas|tip higher than fee cap/
|
|
995
1032
|
});
|
|
996
|
-
class
|
|
1033
|
+
class us extends u {
|
|
997
1034
|
constructor({ cause: t }) {
|
|
998
1035
|
super(`An error occurred while executing: ${t == null ? void 0 : t.shortMessage}`, {
|
|
999
1036
|
cause: t,
|
|
@@ -1001,49 +1038,49 @@ class rn extends u {
|
|
|
1001
1038
|
});
|
|
1002
1039
|
}
|
|
1003
1040
|
}
|
|
1004
|
-
function
|
|
1005
|
-
return ({ exclude:
|
|
1006
|
-
exclude:
|
|
1041
|
+
function re(e, t) {
|
|
1042
|
+
return ({ exclude: n, format: s }) => ({
|
|
1043
|
+
exclude: n,
|
|
1007
1044
|
format: (i) => {
|
|
1008
1045
|
const r = t(i);
|
|
1009
|
-
if (
|
|
1010
|
-
for (const o of
|
|
1046
|
+
if (n)
|
|
1047
|
+
for (const o of n)
|
|
1011
1048
|
delete r[o];
|
|
1012
1049
|
return {
|
|
1013
1050
|
...r,
|
|
1014
|
-
...
|
|
1051
|
+
...s(i)
|
|
1015
1052
|
};
|
|
1016
1053
|
},
|
|
1017
1054
|
type: e
|
|
1018
1055
|
});
|
|
1019
1056
|
}
|
|
1020
|
-
const
|
|
1057
|
+
const oe = 2n ** 256n - 1n, We = {
|
|
1021
1058
|
"0x0": "legacy",
|
|
1022
1059
|
"0x1": "eip2930",
|
|
1023
1060
|
"0x2": "eip1559",
|
|
1024
1061
|
"0x3": "eip4844",
|
|
1025
1062
|
"0x4": "eip7702"
|
|
1026
1063
|
};
|
|
1027
|
-
function
|
|
1064
|
+
function ae(e) {
|
|
1028
1065
|
const t = {
|
|
1029
1066
|
...e,
|
|
1030
1067
|
blockHash: e.blockHash ? e.blockHash : null,
|
|
1031
1068
|
blockNumber: e.blockNumber ? BigInt(e.blockNumber) : null,
|
|
1032
|
-
chainId: e.chainId ?
|
|
1069
|
+
chainId: e.chainId ? K(e.chainId) : void 0,
|
|
1033
1070
|
gas: e.gas ? BigInt(e.gas) : void 0,
|
|
1034
1071
|
gasPrice: e.gasPrice ? BigInt(e.gasPrice) : void 0,
|
|
1035
1072
|
maxFeePerBlobGas: e.maxFeePerBlobGas ? BigInt(e.maxFeePerBlobGas) : void 0,
|
|
1036
1073
|
maxFeePerGas: e.maxFeePerGas ? BigInt(e.maxFeePerGas) : void 0,
|
|
1037
1074
|
maxPriorityFeePerGas: e.maxPriorityFeePerGas ? BigInt(e.maxPriorityFeePerGas) : void 0,
|
|
1038
|
-
nonce: e.nonce ?
|
|
1075
|
+
nonce: e.nonce ? K(e.nonce) : void 0,
|
|
1039
1076
|
to: e.to ? e.to : null,
|
|
1040
1077
|
transactionIndex: e.transactionIndex ? Number(e.transactionIndex) : null,
|
|
1041
|
-
type: e.type ?
|
|
1078
|
+
type: e.type ? We[e.type] : void 0,
|
|
1042
1079
|
typeHex: e.type ? e.type : void 0,
|
|
1043
1080
|
value: e.value ? BigInt(e.value) : void 0,
|
|
1044
1081
|
v: e.v ? BigInt(e.v) : void 0
|
|
1045
1082
|
};
|
|
1046
|
-
return e.authorizationList && (t.authorizationList =
|
|
1083
|
+
return e.authorizationList && (t.authorizationList = un(e.authorizationList)), t.yParity = (() => {
|
|
1047
1084
|
if (e.yParity)
|
|
1048
1085
|
return Number(e.yParity);
|
|
1049
1086
|
if (typeof t.v == "bigint") {
|
|
@@ -1056,8 +1093,8 @@ function re(e) {
|
|
|
1056
1093
|
}
|
|
1057
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;
|
|
1058
1095
|
}
|
|
1059
|
-
const
|
|
1060
|
-
function
|
|
1096
|
+
const cn = /* @__PURE__ */ re("transaction", ae);
|
|
1097
|
+
function un(e) {
|
|
1061
1098
|
return e.map((t) => ({
|
|
1062
1099
|
contractAddress: t.address,
|
|
1063
1100
|
chainId: Number(t.chainId),
|
|
@@ -1067,8 +1104,8 @@ function as(e) {
|
|
|
1067
1104
|
yParity: Number(t.yParity)
|
|
1068
1105
|
}));
|
|
1069
1106
|
}
|
|
1070
|
-
function
|
|
1071
|
-
const t = (e.transactions ?? []).map((
|
|
1107
|
+
function fn(e) {
|
|
1108
|
+
const t = (e.transactions ?? []).map((n) => typeof n == "string" ? n : ae(n));
|
|
1072
1109
|
return {
|
|
1073
1110
|
...e,
|
|
1074
1111
|
baseFeePerGas: e.baseFeePerGas ? BigInt(e.baseFeePerGas) : null,
|
|
@@ -1087,58 +1124,63 @@ function cs(e) {
|
|
|
1087
1124
|
totalDifficulty: e.totalDifficulty ? BigInt(e.totalDifficulty) : null
|
|
1088
1125
|
};
|
|
1089
1126
|
}
|
|
1090
|
-
const
|
|
1091
|
-
function
|
|
1092
|
-
const { kzg: t } = e,
|
|
1093
|
-
for (const r of
|
|
1127
|
+
const ln = /* @__PURE__ */ re("block", fn);
|
|
1128
|
+
function Xe(e) {
|
|
1129
|
+
const { kzg: t } = e, n = e.to ?? (typeof e.blobs[0] == "string" ? "hex" : "bytes"), s = typeof e.blobs[0] == "string" ? e.blobs.map((r) => z(r)) : e.blobs, i = [];
|
|
1130
|
+
for (const r of s)
|
|
1094
1131
|
i.push(Uint8Array.from(t.blobToKzgCommitment(r)));
|
|
1095
|
-
return
|
|
1132
|
+
return n === "bytes" ? i : i.map((r) => I(r));
|
|
1096
1133
|
}
|
|
1097
|
-
function
|
|
1098
|
-
const { kzg: t } = e,
|
|
1099
|
-
for (let o = 0; o <
|
|
1100
|
-
const a =
|
|
1134
|
+
function qe(e) {
|
|
1135
|
+
const { kzg: t } = e, n = e.to ?? (typeof e.blobs[0] == "string" ? "hex" : "bytes"), s = typeof e.blobs[0] == "string" ? e.blobs.map((o) => z(o)) : e.blobs, i = typeof e.commitments[0] == "string" ? e.commitments.map((o) => z(o)) : e.commitments, r = [];
|
|
1136
|
+
for (let o = 0; o < s.length; o++) {
|
|
1137
|
+
const a = s[o], c = i[o];
|
|
1101
1138
|
r.push(Uint8Array.from(t.computeBlobKzgProof(a, c)));
|
|
1102
1139
|
}
|
|
1103
|
-
return
|
|
1140
|
+
return n === "bytes" ? r : r.map((o) => I(o));
|
|
1104
1141
|
}
|
|
1105
|
-
function
|
|
1142
|
+
function dn(e, t, n, s) {
|
|
1106
1143
|
if (typeof e.setBigUint64 == "function")
|
|
1107
|
-
return e.setBigUint64(t,
|
|
1108
|
-
const i = BigInt(32), r = BigInt(4294967295), o = Number(
|
|
1109
|
-
e.setUint32(t + c, o,
|
|
1144
|
+
return e.setBigUint64(t, n, s);
|
|
1145
|
+
const i = BigInt(32), r = BigInt(4294967295), o = Number(n >> i & r), a = Number(n & r), c = s ? 4 : 0, f = s ? 0 : 4;
|
|
1146
|
+
e.setUint32(t + c, o, s), e.setUint32(t + f, a, s);
|
|
1147
|
+
}
|
|
1148
|
+
function hn(e, t, n) {
|
|
1149
|
+
return e & t ^ ~e & n;
|
|
1110
1150
|
}
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1151
|
+
function pn(e, t, n) {
|
|
1152
|
+
return e & t ^ e & n ^ t & n;
|
|
1153
|
+
}
|
|
1154
|
+
class bn extends Ce {
|
|
1155
|
+
constructor(t, n, s, i) {
|
|
1156
|
+
super(), this.blockLen = t, this.outputLen = n, this.padOffset = s, this.isLE = i, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(t), this.view = ee(this.buffer);
|
|
1115
1157
|
}
|
|
1116
1158
|
update(t) {
|
|
1117
|
-
|
|
1118
|
-
const { view:
|
|
1119
|
-
t =
|
|
1159
|
+
X(this);
|
|
1160
|
+
const { view: n, buffer: s, blockLen: i } = this;
|
|
1161
|
+
t = se(t);
|
|
1120
1162
|
const r = t.length;
|
|
1121
1163
|
for (let o = 0; o < r; ) {
|
|
1122
1164
|
const a = Math.min(i - this.pos, r - o);
|
|
1123
1165
|
if (a === i) {
|
|
1124
|
-
const c =
|
|
1166
|
+
const c = ee(t);
|
|
1125
1167
|
for (; i <= r - o; o += i)
|
|
1126
1168
|
this.process(c, o);
|
|
1127
1169
|
continue;
|
|
1128
1170
|
}
|
|
1129
|
-
|
|
1171
|
+
s.set(t.subarray(o, o + a), this.pos), this.pos += a, o += a, this.pos === i && (this.process(n, 0), this.pos = 0);
|
|
1130
1172
|
}
|
|
1131
1173
|
return this.length += t.length, this.roundClean(), this;
|
|
1132
1174
|
}
|
|
1133
1175
|
digestInto(t) {
|
|
1134
|
-
|
|
1135
|
-
const { buffer:
|
|
1176
|
+
X(this), Ue(t, this), this.finished = !0;
|
|
1177
|
+
const { buffer: n, view: s, blockLen: i, isLE: r } = this;
|
|
1136
1178
|
let { pos: o } = this;
|
|
1137
|
-
|
|
1179
|
+
n[o++] = 128, this.buffer.subarray(o).fill(0), this.padOffset > i - o && (this.process(s, 0), o = 0);
|
|
1138
1180
|
for (let l = o; l < i; l++)
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
const a =
|
|
1181
|
+
n[l] = 0;
|
|
1182
|
+
dn(s, i - 8, BigInt(this.length * 8), r), this.process(s, 0);
|
|
1183
|
+
const a = ee(t), c = this.outputLen;
|
|
1142
1184
|
if (c % 4)
|
|
1143
1185
|
throw new Error("_sha2: outputLen should be aligned to 32bit");
|
|
1144
1186
|
const f = c / 4, h = this.get();
|
|
@@ -1148,18 +1190,18 @@ class hs extends Ue {
|
|
|
1148
1190
|
a.setUint32(4 * l, h[l], r);
|
|
1149
1191
|
}
|
|
1150
1192
|
digest() {
|
|
1151
|
-
const { buffer: t, outputLen:
|
|
1193
|
+
const { buffer: t, outputLen: n } = this;
|
|
1152
1194
|
this.digestInto(t);
|
|
1153
|
-
const
|
|
1154
|
-
return this.destroy(),
|
|
1195
|
+
const s = t.slice(0, n);
|
|
1196
|
+
return this.destroy(), s;
|
|
1155
1197
|
}
|
|
1156
1198
|
_cloneInto(t) {
|
|
1157
1199
|
t || (t = new this.constructor()), t.set(...this.get());
|
|
1158
|
-
const { blockLen:
|
|
1159
|
-
return t.length = i, t.pos = a, t.finished = r, t.destroyed = o, i %
|
|
1200
|
+
const { blockLen: n, buffer: s, length: i, finished: r, destroyed: o, pos: a } = this;
|
|
1201
|
+
return t.length = i, t.pos = a, t.finished = r, t.destroyed = o, i % n && t.buffer.set(s), t;
|
|
1160
1202
|
}
|
|
1161
1203
|
}
|
|
1162
|
-
const
|
|
1204
|
+
const xn = /* @__PURE__ */ new Uint32Array([
|
|
1163
1205
|
1116352408,
|
|
1164
1206
|
1899447441,
|
|
1165
1207
|
3049323471,
|
|
@@ -1234,31 +1276,31 @@ const ps = /* @__PURE__ */ new Uint32Array([
|
|
|
1234
1276
|
528734635,
|
|
1235
1277
|
1541459225
|
|
1236
1278
|
]), w = /* @__PURE__ */ new Uint32Array(64);
|
|
1237
|
-
class
|
|
1279
|
+
class mn extends bn {
|
|
1238
1280
|
constructor() {
|
|
1239
1281
|
super(64, 32, 8, !1), this.A = y[0] | 0, this.B = y[1] | 0, this.C = y[2] | 0, this.D = y[3] | 0, this.E = y[4] | 0, this.F = y[5] | 0, this.G = y[6] | 0, this.H = y[7] | 0;
|
|
1240
1282
|
}
|
|
1241
1283
|
get() {
|
|
1242
|
-
const { A: t, B:
|
|
1243
|
-
return [t,
|
|
1284
|
+
const { A: t, B: n, C: s, D: i, E: r, F: o, G: a, H: c } = this;
|
|
1285
|
+
return [t, n, s, i, r, o, a, c];
|
|
1244
1286
|
}
|
|
1245
1287
|
// prettier-ignore
|
|
1246
|
-
set(t,
|
|
1247
|
-
this.A = t | 0, this.B =
|
|
1288
|
+
set(t, n, s, i, r, o, a, c) {
|
|
1289
|
+
this.A = t | 0, this.B = n | 0, this.C = s | 0, this.D = i | 0, this.E = r | 0, this.F = o | 0, this.G = a | 0, this.H = c | 0;
|
|
1248
1290
|
}
|
|
1249
|
-
process(t,
|
|
1250
|
-
for (let l = 0; l < 16; l++,
|
|
1251
|
-
w[l] = t.getUint32(
|
|
1291
|
+
process(t, n) {
|
|
1292
|
+
for (let l = 0; l < 16; l++, n += 4)
|
|
1293
|
+
w[l] = t.getUint32(n, !1);
|
|
1252
1294
|
for (let l = 16; l < 64; l++) {
|
|
1253
1295
|
const b = w[l - 15], p = w[l - 2], g = x(b, 7) ^ x(b, 18) ^ b >>> 3, C = x(p, 17) ^ x(p, 19) ^ p >>> 10;
|
|
1254
1296
|
w[l] = C + w[l - 7] + g + w[l - 16] | 0;
|
|
1255
1297
|
}
|
|
1256
|
-
let { A:
|
|
1298
|
+
let { A: s, B: i, C: r, D: o, E: a, F: c, G: f, H: h } = this;
|
|
1257
1299
|
for (let l = 0; l < 64; l++) {
|
|
1258
|
-
const b = x(a, 6) ^ x(a, 11) ^ x(a, 25), p = h + b +
|
|
1259
|
-
h = f, f = c, c = a, a = o + p | 0, o = r, r = i, i =
|
|
1300
|
+
const b = x(a, 6) ^ x(a, 11) ^ x(a, 25), p = h + b + hn(a, c, f) + xn[l] + w[l] | 0, C = (x(s, 2) ^ x(s, 13) ^ x(s, 22)) + pn(s, i, r) | 0;
|
|
1301
|
+
h = f, f = c, c = a, a = o + p | 0, o = r, r = i, i = s, s = p + C | 0;
|
|
1260
1302
|
}
|
|
1261
|
-
|
|
1303
|
+
s = s + this.A | 0, i = i + this.B | 0, r = r + this.C | 0, o = o + this.D | 0, a = a + this.E | 0, c = c + this.F | 0, f = f + this.G | 0, h = h + this.H | 0, this.set(s, i, r, o, a, c, f, h);
|
|
1262
1304
|
}
|
|
1263
1305
|
roundClean() {
|
|
1264
1306
|
w.fill(0);
|
|
@@ -1267,75 +1309,75 @@ class bs extends hs {
|
|
|
1267
1309
|
this.set(0, 0, 0, 0, 0, 0, 0, 0), this.buffer.fill(0);
|
|
1268
1310
|
}
|
|
1269
1311
|
}
|
|
1270
|
-
const
|
|
1271
|
-
function
|
|
1272
|
-
return
|
|
1312
|
+
const gn = /* @__PURE__ */ Fe(() => new mn());
|
|
1313
|
+
function yn(e, t) {
|
|
1314
|
+
return gn(_(e, { strict: !1 }) ? ze(e) : e);
|
|
1273
1315
|
}
|
|
1274
|
-
function
|
|
1275
|
-
const { commitment: t, version:
|
|
1276
|
-
return i.set([
|
|
1316
|
+
function wn(e) {
|
|
1317
|
+
const { commitment: t, version: n = 1 } = e, s = e.to ?? (typeof t == "string" ? "hex" : "bytes"), i = yn(t);
|
|
1318
|
+
return i.set([n], 0), s === "bytes" ? i : I(i);
|
|
1277
1319
|
}
|
|
1278
|
-
function
|
|
1279
|
-
const { commitments: t, version:
|
|
1320
|
+
function Pn(e) {
|
|
1321
|
+
const { commitments: t, version: n } = e, s = e.to ?? (typeof t[0] == "string" ? "hex" : "bytes"), i = [];
|
|
1280
1322
|
for (const r of t)
|
|
1281
|
-
i.push(
|
|
1323
|
+
i.push(wn({
|
|
1282
1324
|
commitment: r,
|
|
1283
|
-
to:
|
|
1284
|
-
version:
|
|
1325
|
+
to: s,
|
|
1326
|
+
version: n
|
|
1285
1327
|
}));
|
|
1286
1328
|
return i;
|
|
1287
1329
|
}
|
|
1288
|
-
const
|
|
1330
|
+
const we = 6, Ye = 32, ce = 4096, Je = Ye * ce, Pe = Je * we - // terminator byte (0x80).
|
|
1289
1331
|
1 - // zero byte (0x00) appended to each field element.
|
|
1290
|
-
1 *
|
|
1291
|
-
class
|
|
1292
|
-
constructor({ maxSize: t, size:
|
|
1332
|
+
1 * ce * we, Qe = 1;
|
|
1333
|
+
class En extends u {
|
|
1334
|
+
constructor({ maxSize: t, size: n }) {
|
|
1293
1335
|
super("Blob size is too large.", {
|
|
1294
|
-
metaMessages: [`Max: ${t} bytes`, `Given: ${
|
|
1336
|
+
metaMessages: [`Max: ${t} bytes`, `Given: ${n} bytes`],
|
|
1295
1337
|
name: "BlobSizeTooLargeError"
|
|
1296
1338
|
});
|
|
1297
1339
|
}
|
|
1298
1340
|
}
|
|
1299
|
-
class
|
|
1341
|
+
class Ze extends u {
|
|
1300
1342
|
constructor() {
|
|
1301
1343
|
super("Blob data must not be empty.", { name: "EmptyBlobError" });
|
|
1302
1344
|
}
|
|
1303
1345
|
}
|
|
1304
|
-
class
|
|
1305
|
-
constructor({ hash: t, size:
|
|
1346
|
+
class Bn extends u {
|
|
1347
|
+
constructor({ hash: t, size: n }) {
|
|
1306
1348
|
super(`Versioned hash "${t}" size is invalid.`, {
|
|
1307
|
-
metaMessages: ["Expected: 32", `Received: ${
|
|
1349
|
+
metaMessages: ["Expected: 32", `Received: ${n}`],
|
|
1308
1350
|
name: "InvalidVersionedHashSizeError"
|
|
1309
1351
|
});
|
|
1310
1352
|
}
|
|
1311
1353
|
}
|
|
1312
|
-
class
|
|
1313
|
-
constructor({ hash: t, version:
|
|
1354
|
+
class In extends u {
|
|
1355
|
+
constructor({ hash: t, version: n }) {
|
|
1314
1356
|
super(`Versioned hash "${t}" version is invalid.`, {
|
|
1315
1357
|
metaMessages: [
|
|
1316
|
-
`Expected: ${
|
|
1317
|
-
`Received: ${
|
|
1358
|
+
`Expected: ${Qe}`,
|
|
1359
|
+
`Received: ${n}`
|
|
1318
1360
|
],
|
|
1319
1361
|
name: "InvalidVersionedHashVersionError"
|
|
1320
1362
|
});
|
|
1321
1363
|
}
|
|
1322
1364
|
}
|
|
1323
|
-
function
|
|
1324
|
-
const t = e.to ?? (typeof e.data == "string" ? "hex" : "bytes"),
|
|
1325
|
-
if (!
|
|
1326
|
-
throw new
|
|
1327
|
-
if (
|
|
1328
|
-
throw new
|
|
1329
|
-
maxSize:
|
|
1330
|
-
size:
|
|
1365
|
+
function vn(e) {
|
|
1366
|
+
const t = e.to ?? (typeof e.data == "string" ? "hex" : "bytes"), n = typeof e.data == "string" ? z(e.data) : e.data, s = P(n);
|
|
1367
|
+
if (!s)
|
|
1368
|
+
throw new Ze();
|
|
1369
|
+
if (s > Pe)
|
|
1370
|
+
throw new En({
|
|
1371
|
+
maxSize: Pe,
|
|
1372
|
+
size: s
|
|
1331
1373
|
});
|
|
1332
1374
|
const i = [];
|
|
1333
1375
|
let r = !0, o = 0;
|
|
1334
1376
|
for (; r; ) {
|
|
1335
|
-
const a =
|
|
1377
|
+
const a = Me(new Uint8Array(Je));
|
|
1336
1378
|
let c = 0;
|
|
1337
|
-
for (; c <
|
|
1338
|
-
const f =
|
|
1379
|
+
for (; c < ce; ) {
|
|
1380
|
+
const f = n.slice(o, o + (Ye - 1));
|
|
1339
1381
|
if (a.pushByte(0), a.pushBytes(f), f.length < 31) {
|
|
1340
1382
|
a.pushByte(128), r = !1;
|
|
1341
1383
|
break;
|
|
@@ -1346,8 +1388,8 @@ function Bs(e) {
|
|
|
1346
1388
|
}
|
|
1347
1389
|
return t === "bytes" ? i.map((a) => a.bytes) : i.map((a) => I(a.bytes));
|
|
1348
1390
|
}
|
|
1349
|
-
function
|
|
1350
|
-
const { data: t, kzg:
|
|
1391
|
+
function Tn(e) {
|
|
1392
|
+
const { data: t, kzg: n, to: s } = e, i = e.blobs ?? vn({ data: t, to: s }), r = e.commitments ?? Xe({ blobs: i, kzg: n, to: s }), o = e.proofs ?? qe({ blobs: i, commitments: r, kzg: n, to: s }), a = [];
|
|
1351
1393
|
for (let c = 0; c < i.length; c++)
|
|
1352
1394
|
a.push({
|
|
1353
1395
|
blob: i[c],
|
|
@@ -1356,7 +1398,7 @@ function Is(e) {
|
|
|
1356
1398
|
});
|
|
1357
1399
|
return a;
|
|
1358
1400
|
}
|
|
1359
|
-
function
|
|
1401
|
+
function $n(e) {
|
|
1360
1402
|
if (e.type)
|
|
1361
1403
|
return e.type;
|
|
1362
1404
|
if (typeof e.authorizationList < "u")
|
|
@@ -1367,9 +1409,9 @@ function vs(e) {
|
|
|
1367
1409
|
return "eip1559";
|
|
1368
1410
|
if (typeof e.gasPrice < "u")
|
|
1369
1411
|
return typeof e.accessList < "u" ? "eip2930" : "legacy";
|
|
1370
|
-
throw new
|
|
1412
|
+
throw new qt({ transaction: e });
|
|
1371
1413
|
}
|
|
1372
|
-
function
|
|
1414
|
+
function zn(e, { args: t, eventName: n } = {}) {
|
|
1373
1415
|
return {
|
|
1374
1416
|
...e,
|
|
1375
1417
|
blockHash: e.blockHash ? e.blockHash : null,
|
|
@@ -1377,36 +1419,36 @@ function Ts(e, { args: t, eventName: s } = {}) {
|
|
|
1377
1419
|
logIndex: e.logIndex ? Number(e.logIndex) : null,
|
|
1378
1420
|
transactionHash: e.transactionHash ? e.transactionHash : null,
|
|
1379
1421
|
transactionIndex: e.transactionIndex ? Number(e.transactionIndex) : null,
|
|
1380
|
-
...
|
|
1422
|
+
...n ? { args: t, eventName: n } : {}
|
|
1381
1423
|
};
|
|
1382
1424
|
}
|
|
1383
|
-
class
|
|
1384
|
-
constructor({ blockNumber: t, chain:
|
|
1385
|
-
super(`Chain "${
|
|
1425
|
+
class fs extends u {
|
|
1426
|
+
constructor({ blockNumber: t, chain: n, contract: s }) {
|
|
1427
|
+
super(`Chain "${n.name}" does not support contract "${s.name}".`, {
|
|
1386
1428
|
metaMessages: [
|
|
1387
1429
|
"This could be due to any of the following:",
|
|
1388
|
-
...t &&
|
|
1389
|
-
`- The contract "${
|
|
1430
|
+
...t && s.blockCreated && s.blockCreated > t ? [
|
|
1431
|
+
`- The contract "${s.name}" was not deployed until block ${s.blockCreated} (current block ${t}).`
|
|
1390
1432
|
] : [
|
|
1391
|
-
`- The chain does not have the contract "${
|
|
1433
|
+
`- The chain does not have the contract "${s.name}" configured.`
|
|
1392
1434
|
]
|
|
1393
1435
|
],
|
|
1394
1436
|
name: "ChainDoesNotSupportContract"
|
|
1395
1437
|
});
|
|
1396
1438
|
}
|
|
1397
1439
|
}
|
|
1398
|
-
class
|
|
1399
|
-
constructor({ chain: t, currentChainId:
|
|
1400
|
-
super(`The current chain of the wallet (id: ${
|
|
1440
|
+
class ls extends u {
|
|
1441
|
+
constructor({ chain: t, currentChainId: n }) {
|
|
1442
|
+
super(`The current chain of the wallet (id: ${n}) does not match the target chain for the transaction (id: ${t.id} – ${t.name}).`, {
|
|
1401
1443
|
metaMessages: [
|
|
1402
|
-
`Current Chain ID: ${
|
|
1444
|
+
`Current Chain ID: ${n}`,
|
|
1403
1445
|
`Expected Chain ID: ${t.id} – ${t.name}`
|
|
1404
1446
|
],
|
|
1405
1447
|
name: "ChainMismatchError"
|
|
1406
1448
|
});
|
|
1407
1449
|
}
|
|
1408
1450
|
}
|
|
1409
|
-
class
|
|
1451
|
+
class ds extends u {
|
|
1410
1452
|
constructor() {
|
|
1411
1453
|
super([
|
|
1412
1454
|
"No chain was provided to the request.",
|
|
@@ -1417,19 +1459,19 @@ class cn extends u {
|
|
|
1417
1459
|
});
|
|
1418
1460
|
}
|
|
1419
1461
|
}
|
|
1420
|
-
class
|
|
1462
|
+
class hs extends u {
|
|
1421
1463
|
constructor() {
|
|
1422
1464
|
super("No chain was provided to the Client.", {
|
|
1423
1465
|
name: "ClientChainNotConfiguredError"
|
|
1424
1466
|
});
|
|
1425
1467
|
}
|
|
1426
1468
|
}
|
|
1427
|
-
class
|
|
1469
|
+
class J extends u {
|
|
1428
1470
|
constructor({ chainId: t }) {
|
|
1429
1471
|
super(typeof t == "number" ? `Chain ID "${t}" is invalid.` : "Chain ID is invalid.", { name: "InvalidChainIdError" });
|
|
1430
1472
|
}
|
|
1431
1473
|
}
|
|
1432
|
-
function
|
|
1474
|
+
function Q(e) {
|
|
1433
1475
|
return {
|
|
1434
1476
|
formatters: void 0,
|
|
1435
1477
|
fees: void 0,
|
|
@@ -1437,11 +1479,11 @@ function q(e) {
|
|
|
1437
1479
|
...e
|
|
1438
1480
|
};
|
|
1439
1481
|
}
|
|
1440
|
-
const
|
|
1482
|
+
const An = {
|
|
1441
1483
|
"0x0": "reverted",
|
|
1442
1484
|
"0x1": "success"
|
|
1443
1485
|
};
|
|
1444
|
-
function
|
|
1486
|
+
function Un(e) {
|
|
1445
1487
|
const t = {
|
|
1446
1488
|
...e,
|
|
1447
1489
|
blockNumber: e.blockNumber ? BigInt(e.blockNumber) : null,
|
|
@@ -1449,120 +1491,120 @@ function zs(e) {
|
|
|
1449
1491
|
cumulativeGasUsed: e.cumulativeGasUsed ? BigInt(e.cumulativeGasUsed) : null,
|
|
1450
1492
|
effectiveGasPrice: e.effectiveGasPrice ? BigInt(e.effectiveGasPrice) : null,
|
|
1451
1493
|
gasUsed: e.gasUsed ? BigInt(e.gasUsed) : null,
|
|
1452
|
-
logs: e.logs ? e.logs.map((
|
|
1494
|
+
logs: e.logs ? e.logs.map((n) => zn(n)) : null,
|
|
1453
1495
|
to: e.to ? e.to : null,
|
|
1454
|
-
transactionIndex: e.transactionIndex ?
|
|
1455
|
-
status: e.status ?
|
|
1456
|
-
type: e.type ?
|
|
1496
|
+
transactionIndex: e.transactionIndex ? K(e.transactionIndex) : null,
|
|
1497
|
+
status: e.status ? An[e.status] : null,
|
|
1498
|
+
type: e.type ? We[e.type] || e.type : null
|
|
1457
1499
|
};
|
|
1458
1500
|
return e.blobGasPrice && (t.blobGasPrice = BigInt(e.blobGasPrice)), e.blobGasUsed && (t.blobGasUsed = BigInt(e.blobGasUsed)), t;
|
|
1459
1501
|
}
|
|
1460
|
-
const
|
|
1461
|
-
function
|
|
1502
|
+
const Cn = /* @__PURE__ */ re("transactionReceipt", Un);
|
|
1503
|
+
function Fn(e) {
|
|
1462
1504
|
const { authorizationList: t } = e;
|
|
1463
1505
|
if (t)
|
|
1464
|
-
for (const
|
|
1465
|
-
const { contractAddress:
|
|
1466
|
-
if (!B(
|
|
1467
|
-
throw new E({ address:
|
|
1506
|
+
for (const n of t) {
|
|
1507
|
+
const { contractAddress: s, chainId: i } = n;
|
|
1508
|
+
if (!B(s))
|
|
1509
|
+
throw new E({ address: s });
|
|
1468
1510
|
if (i < 0)
|
|
1469
|
-
throw new
|
|
1511
|
+
throw new J({ chainId: i });
|
|
1470
1512
|
}
|
|
1471
|
-
|
|
1513
|
+
ue(e);
|
|
1472
1514
|
}
|
|
1473
|
-
function
|
|
1515
|
+
function Ln(e) {
|
|
1474
1516
|
const { blobVersionedHashes: t } = e;
|
|
1475
1517
|
if (t) {
|
|
1476
1518
|
if (t.length === 0)
|
|
1477
|
-
throw new
|
|
1478
|
-
for (const
|
|
1479
|
-
const
|
|
1480
|
-
if (
|
|
1481
|
-
throw new
|
|
1482
|
-
if (i !==
|
|
1483
|
-
throw new
|
|
1484
|
-
hash:
|
|
1519
|
+
throw new Ze();
|
|
1520
|
+
for (const n of t) {
|
|
1521
|
+
const s = P(n), i = K(Nt(n, 0, 1));
|
|
1522
|
+
if (s !== 32)
|
|
1523
|
+
throw new Bn({ hash: n, size: s });
|
|
1524
|
+
if (i !== Qe)
|
|
1525
|
+
throw new In({
|
|
1526
|
+
hash: n,
|
|
1485
1527
|
version: i
|
|
1486
1528
|
});
|
|
1487
1529
|
}
|
|
1488
1530
|
}
|
|
1489
|
-
|
|
1531
|
+
ue(e);
|
|
1490
1532
|
}
|
|
1491
|
-
function
|
|
1492
|
-
const { chainId: t, maxPriorityFeePerGas:
|
|
1533
|
+
function ue(e) {
|
|
1534
|
+
const { chainId: t, maxPriorityFeePerGas: n, maxFeePerGas: s, to: i } = e;
|
|
1493
1535
|
if (t <= 0)
|
|
1494
|
-
throw new
|
|
1536
|
+
throw new J({ chainId: t });
|
|
1495
1537
|
if (i && !B(i))
|
|
1496
1538
|
throw new E({ address: i });
|
|
1497
|
-
if (
|
|
1498
|
-
throw new
|
|
1499
|
-
if (
|
|
1500
|
-
throw new
|
|
1539
|
+
if (s && s > oe)
|
|
1540
|
+
throw new Y({ maxFeePerGas: s });
|
|
1541
|
+
if (n && s && n > s)
|
|
1542
|
+
throw new Ke({ maxFeePerGas: s, maxPriorityFeePerGas: n });
|
|
1501
1543
|
}
|
|
1502
|
-
function
|
|
1503
|
-
const { chainId: t, maxPriorityFeePerGas:
|
|
1544
|
+
function Gn(e) {
|
|
1545
|
+
const { chainId: t, maxPriorityFeePerGas: n, gasPrice: s, maxFeePerGas: i, to: r } = e;
|
|
1504
1546
|
if (t <= 0)
|
|
1505
|
-
throw new
|
|
1547
|
+
throw new J({ chainId: t });
|
|
1506
1548
|
if (r && !B(r))
|
|
1507
1549
|
throw new E({ address: r });
|
|
1508
|
-
if (
|
|
1550
|
+
if (n || i)
|
|
1509
1551
|
throw new u("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");
|
|
1510
|
-
if (
|
|
1511
|
-
throw new
|
|
1552
|
+
if (s && s > oe)
|
|
1553
|
+
throw new Y({ maxFeePerGas: s });
|
|
1512
1554
|
}
|
|
1513
|
-
function
|
|
1514
|
-
const { chainId: t, maxPriorityFeePerGas:
|
|
1555
|
+
function Sn(e) {
|
|
1556
|
+
const { chainId: t, maxPriorityFeePerGas: n, gasPrice: s, maxFeePerGas: i, to: r } = e;
|
|
1515
1557
|
if (r && !B(r))
|
|
1516
1558
|
throw new E({ address: r });
|
|
1517
1559
|
if (typeof t < "u" && t <= 0)
|
|
1518
|
-
throw new
|
|
1519
|
-
if (
|
|
1560
|
+
throw new J({ chainId: t });
|
|
1561
|
+
if (n || i)
|
|
1520
1562
|
throw new u("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");
|
|
1521
|
-
if (
|
|
1522
|
-
throw new
|
|
1563
|
+
if (s && s > oe)
|
|
1564
|
+
throw new Y({ maxFeePerGas: s });
|
|
1523
1565
|
}
|
|
1524
|
-
function
|
|
1566
|
+
function kn(e) {
|
|
1525
1567
|
if (!e || e.length === 0)
|
|
1526
1568
|
return [];
|
|
1527
1569
|
const t = [];
|
|
1528
|
-
for (const
|
|
1529
|
-
const { contractAddress:
|
|
1570
|
+
for (const n of e) {
|
|
1571
|
+
const { contractAddress: s, chainId: i, nonce: r, ...o } = n;
|
|
1530
1572
|
t.push([
|
|
1531
1573
|
i ? d(i) : "0x",
|
|
1532
|
-
|
|
1574
|
+
s,
|
|
1533
1575
|
r ? d(r) : "0x",
|
|
1534
|
-
...
|
|
1576
|
+
...j({}, o)
|
|
1535
1577
|
]);
|
|
1536
1578
|
}
|
|
1537
1579
|
return t;
|
|
1538
1580
|
}
|
|
1539
|
-
function
|
|
1581
|
+
function Z(e) {
|
|
1540
1582
|
if (!e || e.length === 0)
|
|
1541
1583
|
return [];
|
|
1542
1584
|
const t = [];
|
|
1543
|
-
for (let
|
|
1544
|
-
const { address:
|
|
1585
|
+
for (let n = 0; n < e.length; n++) {
|
|
1586
|
+
const { address: s, storageKeys: i } = e[n];
|
|
1545
1587
|
for (let r = 0; r < i.length; r++)
|
|
1546
1588
|
if (i[r].length - 2 !== 64)
|
|
1547
|
-
throw new
|
|
1548
|
-
if (!B(
|
|
1549
|
-
throw new E({ address:
|
|
1550
|
-
t.push([
|
|
1589
|
+
throw new Yt({ storageKey: i[r] });
|
|
1590
|
+
if (!B(s, { strict: !1 }))
|
|
1591
|
+
throw new E({ address: s });
|
|
1592
|
+
t.push([s, i]);
|
|
1551
1593
|
}
|
|
1552
1594
|
return t;
|
|
1553
1595
|
}
|
|
1554
|
-
function
|
|
1555
|
-
const
|
|
1556
|
-
return
|
|
1596
|
+
function Hn(e, t) {
|
|
1597
|
+
const n = $n(e);
|
|
1598
|
+
return n === "eip1559" ? Mn(e, t) : n === "eip2930" ? Vn(e, t) : n === "eip4844" ? Nn(e, t) : n === "eip7702" ? On(e, t) : _n(e, t);
|
|
1557
1599
|
}
|
|
1558
|
-
function
|
|
1559
|
-
const { authorizationList:
|
|
1560
|
-
|
|
1561
|
-
const b =
|
|
1562
|
-
return
|
|
1600
|
+
function On(e, t) {
|
|
1601
|
+
const { authorizationList: n, chainId: s, gas: i, nonce: r, to: o, value: a, maxFeePerGas: c, maxPriorityFeePerGas: f, accessList: h, data: l } = e;
|
|
1602
|
+
Fn(e);
|
|
1603
|
+
const b = Z(h), p = kn(n);
|
|
1604
|
+
return S([
|
|
1563
1605
|
"0x04",
|
|
1564
1606
|
A([
|
|
1565
|
-
d(
|
|
1607
|
+
d(s),
|
|
1566
1608
|
r ? d(r) : "0x",
|
|
1567
1609
|
f ? d(f) : "0x",
|
|
1568
1610
|
c ? d(c) : "0x",
|
|
@@ -1572,97 +1614,97 @@ function Hs(e, t) {
|
|
|
1572
1614
|
l ?? "0x",
|
|
1573
1615
|
b,
|
|
1574
1616
|
p,
|
|
1575
|
-
...
|
|
1617
|
+
...j(e, t)
|
|
1576
1618
|
])
|
|
1577
1619
|
]);
|
|
1578
1620
|
}
|
|
1579
|
-
function
|
|
1580
|
-
const { chainId:
|
|
1581
|
-
|
|
1621
|
+
function Nn(e, t) {
|
|
1622
|
+
const { chainId: n, gas: s, nonce: i, to: r, value: o, maxFeePerBlobGas: a, maxFeePerGas: c, maxPriorityFeePerGas: f, accessList: h, data: l } = e;
|
|
1623
|
+
Ln(e);
|
|
1582
1624
|
let b = e.blobVersionedHashes, p = e.sidecars;
|
|
1583
1625
|
if (e.blobs && (typeof b > "u" || typeof p > "u")) {
|
|
1584
|
-
const v = typeof e.blobs[0] == "string" ? e.blobs : e.blobs.map((H) => I(H)),
|
|
1626
|
+
const v = typeof e.blobs[0] == "string" ? e.blobs : e.blobs.map((H) => I(H)), D = e.kzg, k = Xe({
|
|
1585
1627
|
blobs: v,
|
|
1586
|
-
kzg:
|
|
1628
|
+
kzg: D
|
|
1587
1629
|
});
|
|
1588
|
-
if (typeof b > "u" && (b =
|
|
1589
|
-
commitments:
|
|
1630
|
+
if (typeof b > "u" && (b = Pn({
|
|
1631
|
+
commitments: k
|
|
1590
1632
|
})), typeof p > "u") {
|
|
1591
|
-
const H =
|
|
1592
|
-
p =
|
|
1633
|
+
const H = qe({ blobs: v, commitments: k, kzg: D });
|
|
1634
|
+
p = Tn({ blobs: v, commitments: k, proofs: H });
|
|
1593
1635
|
}
|
|
1594
1636
|
}
|
|
1595
|
-
const g =
|
|
1596
|
-
d(
|
|
1637
|
+
const g = Z(h), C = [
|
|
1638
|
+
d(n),
|
|
1597
1639
|
i ? d(i) : "0x",
|
|
1598
1640
|
f ? d(f) : "0x",
|
|
1599
1641
|
c ? d(c) : "0x",
|
|
1600
|
-
|
|
1642
|
+
s ? d(s) : "0x",
|
|
1601
1643
|
r ?? "0x",
|
|
1602
1644
|
o ? d(o) : "0x",
|
|
1603
1645
|
l ?? "0x",
|
|
1604
1646
|
g,
|
|
1605
1647
|
a ? d(a) : "0x",
|
|
1606
1648
|
b ?? [],
|
|
1607
|
-
...
|
|
1608
|
-
],
|
|
1649
|
+
...j(e, t)
|
|
1650
|
+
], fe = [], le = [], de = [];
|
|
1609
1651
|
if (p)
|
|
1610
1652
|
for (let v = 0; v < p.length; v++) {
|
|
1611
|
-
const { blob:
|
|
1612
|
-
|
|
1653
|
+
const { blob: D, commitment: k, proof: H } = p[v];
|
|
1654
|
+
fe.push(D), le.push(k), de.push(H);
|
|
1613
1655
|
}
|
|
1614
|
-
return
|
|
1656
|
+
return S([
|
|
1615
1657
|
"0x03",
|
|
1616
1658
|
// If sidecars are enabled, envelope turns into a "wrapper":
|
|
1617
|
-
A(p ? [C,
|
|
1659
|
+
A(p ? [C, fe, le, de] : C)
|
|
1618
1660
|
]);
|
|
1619
1661
|
}
|
|
1620
|
-
function
|
|
1621
|
-
const { chainId:
|
|
1622
|
-
|
|
1623
|
-
const l =
|
|
1624
|
-
d(
|
|
1662
|
+
function Mn(e, t) {
|
|
1663
|
+
const { chainId: n, gas: s, nonce: i, to: r, value: o, maxFeePerGas: a, maxPriorityFeePerGas: c, accessList: f, data: h } = e;
|
|
1664
|
+
ue(e);
|
|
1665
|
+
const l = Z(f), b = [
|
|
1666
|
+
d(n),
|
|
1625
1667
|
i ? d(i) : "0x",
|
|
1626
1668
|
c ? d(c) : "0x",
|
|
1627
1669
|
a ? d(a) : "0x",
|
|
1628
|
-
|
|
1670
|
+
s ? d(s) : "0x",
|
|
1629
1671
|
r ?? "0x",
|
|
1630
1672
|
o ? d(o) : "0x",
|
|
1631
1673
|
h ?? "0x",
|
|
1632
1674
|
l,
|
|
1633
|
-
...
|
|
1675
|
+
...j(e, t)
|
|
1634
1676
|
];
|
|
1635
|
-
return
|
|
1677
|
+
return S([
|
|
1636
1678
|
"0x02",
|
|
1637
1679
|
A(b)
|
|
1638
1680
|
]);
|
|
1639
1681
|
}
|
|
1640
|
-
function
|
|
1641
|
-
const { chainId:
|
|
1642
|
-
|
|
1643
|
-
const h =
|
|
1644
|
-
d(
|
|
1682
|
+
function Vn(e, t) {
|
|
1683
|
+
const { chainId: n, gas: s, data: i, nonce: r, to: o, value: a, accessList: c, gasPrice: f } = e;
|
|
1684
|
+
Gn(e);
|
|
1685
|
+
const h = Z(c), l = [
|
|
1686
|
+
d(n),
|
|
1645
1687
|
r ? d(r) : "0x",
|
|
1646
1688
|
f ? d(f) : "0x",
|
|
1647
|
-
|
|
1689
|
+
s ? d(s) : "0x",
|
|
1648
1690
|
o ?? "0x",
|
|
1649
1691
|
a ? d(a) : "0x",
|
|
1650
1692
|
i ?? "0x",
|
|
1651
1693
|
h,
|
|
1652
|
-
...
|
|
1694
|
+
...j(e, t)
|
|
1653
1695
|
];
|
|
1654
|
-
return
|
|
1696
|
+
return S([
|
|
1655
1697
|
"0x01",
|
|
1656
1698
|
A(l)
|
|
1657
1699
|
]);
|
|
1658
1700
|
}
|
|
1659
|
-
function
|
|
1660
|
-
const { chainId:
|
|
1661
|
-
|
|
1701
|
+
function _n(e, t) {
|
|
1702
|
+
const { chainId: n = 0, gas: s, data: i, nonce: r, to: o, value: a, gasPrice: c } = e;
|
|
1703
|
+
Sn(e);
|
|
1662
1704
|
let f = [
|
|
1663
1705
|
r ? d(r) : "0x",
|
|
1664
1706
|
c ? d(c) : "0x",
|
|
1665
|
-
|
|
1707
|
+
s ? d(s) : "0x",
|
|
1666
1708
|
o ?? "0x",
|
|
1667
1709
|
a ? d(a) : "0x",
|
|
1668
1710
|
i ?? "0x"
|
|
@@ -1671,11 +1713,11 @@ function Ms(e, t) {
|
|
|
1671
1713
|
const h = (() => {
|
|
1672
1714
|
if (t.v >= 35n)
|
|
1673
1715
|
return (t.v - 35n) / 2n > 0 ? t.v : 27n + (t.v === 35n ? 0n : 1n);
|
|
1674
|
-
if (
|
|
1675
|
-
return BigInt(
|
|
1716
|
+
if (n > 0)
|
|
1717
|
+
return BigInt(n * 2) + BigInt(35n + t.v - 27n);
|
|
1676
1718
|
const p = 27n + (t.v === 27n ? 0n : 1n);
|
|
1677
1719
|
if (t.v !== p)
|
|
1678
|
-
throw new
|
|
1720
|
+
throw new Xt({ v: t.v });
|
|
1679
1721
|
return p;
|
|
1680
1722
|
})(), l = T(t.r), b = T(t.s);
|
|
1681
1723
|
f = [
|
|
@@ -1684,26 +1726,26 @@ function Ms(e, t) {
|
|
|
1684
1726
|
l === "0x00" ? "0x" : l,
|
|
1685
1727
|
b === "0x00" ? "0x" : b
|
|
1686
1728
|
];
|
|
1687
|
-
} else
|
|
1729
|
+
} else n > 0 && (f = [
|
|
1688
1730
|
...f,
|
|
1689
|
-
d(
|
|
1731
|
+
d(n),
|
|
1690
1732
|
"0x",
|
|
1691
1733
|
"0x"
|
|
1692
1734
|
]);
|
|
1693
1735
|
return A(f);
|
|
1694
1736
|
}
|
|
1695
|
-
function
|
|
1696
|
-
const
|
|
1697
|
-
if (typeof
|
|
1737
|
+
function j(e, t) {
|
|
1738
|
+
const n = t ?? e, { v: s, yParity: i } = n;
|
|
1739
|
+
if (typeof n.r > "u")
|
|
1698
1740
|
return [];
|
|
1699
|
-
if (typeof
|
|
1741
|
+
if (typeof n.s > "u")
|
|
1700
1742
|
return [];
|
|
1701
|
-
if (typeof
|
|
1743
|
+
if (typeof s > "u" && typeof i > "u")
|
|
1702
1744
|
return [];
|
|
1703
|
-
const r = T(
|
|
1704
|
-
return [typeof i == "number" ? i ? d(1) : "0x" :
|
|
1745
|
+
const r = T(n.r), o = T(n.s);
|
|
1746
|
+
return [typeof i == "number" ? i ? d(1) : "0x" : s === 0n ? "0x" : s === 1n ? d(1) : s === 27n ? "0x" : d(1), r === "0x00" ? "0x" : r, o === "0x00" ? "0x" : o];
|
|
1705
1747
|
}
|
|
1706
|
-
const
|
|
1748
|
+
const jn = {
|
|
1707
1749
|
gasPriceOracle: { address: "0x420000000000000000000000000000000000000F" },
|
|
1708
1750
|
l1Block: { address: "0x4200000000000000000000000000000000000015" },
|
|
1709
1751
|
l2CrossDomainMessenger: {
|
|
@@ -1714,77 +1756,77 @@ const Vs = {
|
|
|
1714
1756
|
l2ToL1MessagePasser: {
|
|
1715
1757
|
address: "0x4200000000000000000000000000000000000016"
|
|
1716
1758
|
}
|
|
1717
|
-
},
|
|
1718
|
-
block: /* @__PURE__ */
|
|
1759
|
+
}, Dn = {
|
|
1760
|
+
block: /* @__PURE__ */ ln({
|
|
1719
1761
|
format(e) {
|
|
1720
|
-
var
|
|
1762
|
+
var n;
|
|
1721
1763
|
return {
|
|
1722
|
-
transactions: (
|
|
1723
|
-
if (typeof
|
|
1724
|
-
return
|
|
1725
|
-
const i =
|
|
1726
|
-
return i.typeHex === "0x7e" && (i.isSystemTx =
|
|
1764
|
+
transactions: (n = e.transactions) == null ? void 0 : n.map((s) => {
|
|
1765
|
+
if (typeof s == "string")
|
|
1766
|
+
return s;
|
|
1767
|
+
const i = ae(s);
|
|
1768
|
+
return i.typeHex === "0x7e" && (i.isSystemTx = s.isSystemTx, i.mint = s.mint ? L(s.mint) : void 0, i.sourceHash = s.sourceHash, i.type = "deposit"), i;
|
|
1727
1769
|
}),
|
|
1728
1770
|
stateRoot: e.stateRoot
|
|
1729
1771
|
};
|
|
1730
1772
|
}
|
|
1731
1773
|
}),
|
|
1732
|
-
transaction: /* @__PURE__ */
|
|
1774
|
+
transaction: /* @__PURE__ */ cn({
|
|
1733
1775
|
format(e) {
|
|
1734
1776
|
const t = {};
|
|
1735
|
-
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 ? L(e.mint) : void 0, t.sourceHash = e.sourceHash, t.type = "deposit"), t;
|
|
1736
1778
|
}
|
|
1737
1779
|
}),
|
|
1738
|
-
transactionReceipt: /* @__PURE__ */
|
|
1780
|
+
transactionReceipt: /* @__PURE__ */ Cn({
|
|
1739
1781
|
format(e) {
|
|
1740
1782
|
return {
|
|
1741
|
-
l1GasPrice: e.l1GasPrice ?
|
|
1742
|
-
l1GasUsed: e.l1GasUsed ?
|
|
1743
|
-
l1Fee: e.l1Fee ?
|
|
1783
|
+
l1GasPrice: e.l1GasPrice ? L(e.l1GasPrice) : null,
|
|
1784
|
+
l1GasUsed: e.l1GasUsed ? L(e.l1GasUsed) : null,
|
|
1785
|
+
l1Fee: e.l1Fee ? L(e.l1Fee) : null,
|
|
1744
1786
|
l1FeeScalar: e.l1FeeScalar ? Number(e.l1FeeScalar) : null
|
|
1745
1787
|
};
|
|
1746
1788
|
}
|
|
1747
1789
|
})
|
|
1748
1790
|
};
|
|
1749
|
-
function
|
|
1750
|
-
return
|
|
1791
|
+
function Rn(e, t) {
|
|
1792
|
+
return Xn(e) ? Wn(e) : Hn(e, t);
|
|
1751
1793
|
}
|
|
1752
|
-
const
|
|
1753
|
-
transaction:
|
|
1794
|
+
const Kn = {
|
|
1795
|
+
transaction: Rn
|
|
1754
1796
|
};
|
|
1755
|
-
function
|
|
1756
|
-
|
|
1757
|
-
const { sourceHash: t, data:
|
|
1797
|
+
function Wn(e) {
|
|
1798
|
+
qn(e);
|
|
1799
|
+
const { sourceHash: t, data: n, from: s, gas: i, isSystemTx: r, mint: o, to: a, value: c } = e, f = [
|
|
1758
1800
|
t,
|
|
1759
|
-
|
|
1801
|
+
s,
|
|
1760
1802
|
a ?? "0x",
|
|
1761
1803
|
o ? d(o) : "0x",
|
|
1762
1804
|
c ? d(c) : "0x",
|
|
1763
1805
|
i ? d(i) : "0x",
|
|
1764
1806
|
r ? "0x1" : "0x",
|
|
1765
|
-
|
|
1807
|
+
n ?? "0x"
|
|
1766
1808
|
];
|
|
1767
|
-
return
|
|
1809
|
+
return S([
|
|
1768
1810
|
"0x7e",
|
|
1769
1811
|
A(f)
|
|
1770
1812
|
]);
|
|
1771
1813
|
}
|
|
1772
|
-
function
|
|
1814
|
+
function Xn(e) {
|
|
1773
1815
|
return e.type === "deposit" || typeof e.sourceHash < "u";
|
|
1774
1816
|
}
|
|
1775
|
-
function
|
|
1776
|
-
const { from: t, to:
|
|
1817
|
+
function qn(e) {
|
|
1818
|
+
const { from: t, to: n } = e;
|
|
1777
1819
|
if (t && !B(t))
|
|
1778
1820
|
throw new E({ address: t });
|
|
1779
|
-
if (
|
|
1780
|
-
throw new E({ address:
|
|
1781
|
-
}
|
|
1782
|
-
const
|
|
1783
|
-
contracts:
|
|
1784
|
-
formatters:
|
|
1785
|
-
serializers:
|
|
1786
|
-
},
|
|
1787
|
-
...
|
|
1821
|
+
if (n && !B(n))
|
|
1822
|
+
throw new E({ address: n });
|
|
1823
|
+
}
|
|
1824
|
+
const Ee = {
|
|
1825
|
+
contracts: jn,
|
|
1826
|
+
formatters: Dn,
|
|
1827
|
+
serializers: Kn
|
|
1828
|
+
}, M = 1, et = /* @__PURE__ */ Q({
|
|
1829
|
+
...Ee,
|
|
1788
1830
|
id: 8453,
|
|
1789
1831
|
name: "Base",
|
|
1790
1832
|
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
@@ -1801,14 +1843,14 @@ const Pe = {
|
|
|
1801
1843
|
}
|
|
1802
1844
|
},
|
|
1803
1845
|
contracts: {
|
|
1804
|
-
...
|
|
1846
|
+
...Ee.contracts,
|
|
1805
1847
|
disputeGameFactory: {
|
|
1806
|
-
[
|
|
1848
|
+
[M]: {
|
|
1807
1849
|
address: "0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"
|
|
1808
1850
|
}
|
|
1809
1851
|
},
|
|
1810
1852
|
l2OutputOracle: {
|
|
1811
|
-
[
|
|
1853
|
+
[M]: {
|
|
1812
1854
|
address: "0x56315b90c40730925ec5485cf004d835058518A0"
|
|
1813
1855
|
}
|
|
1814
1856
|
},
|
|
@@ -1817,20 +1859,20 @@ const Pe = {
|
|
|
1817
1859
|
blockCreated: 5022
|
|
1818
1860
|
},
|
|
1819
1861
|
portal: {
|
|
1820
|
-
[
|
|
1862
|
+
[M]: {
|
|
1821
1863
|
address: "0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",
|
|
1822
1864
|
blockCreated: 17482143
|
|
1823
1865
|
}
|
|
1824
1866
|
},
|
|
1825
1867
|
l1StandardBridge: {
|
|
1826
|
-
[
|
|
1868
|
+
[M]: {
|
|
1827
1869
|
address: "0x3154Cf16ccdb4C6d922629664174b904d80F2C35",
|
|
1828
1870
|
blockCreated: 17482143
|
|
1829
1871
|
}
|
|
1830
1872
|
}
|
|
1831
1873
|
},
|
|
1832
|
-
sourceId:
|
|
1833
|
-
}),
|
|
1874
|
+
sourceId: M
|
|
1875
|
+
}), tt = /* @__PURE__ */ Q({
|
|
1834
1876
|
id: 56,
|
|
1835
1877
|
name: "BNB Smart Chain",
|
|
1836
1878
|
nativeCurrency: {
|
|
@@ -1854,7 +1896,7 @@ const Pe = {
|
|
|
1854
1896
|
blockCreated: 15921452
|
|
1855
1897
|
}
|
|
1856
1898
|
}
|
|
1857
|
-
}),
|
|
1899
|
+
}), nt = /* @__PURE__ */ Q({
|
|
1858
1900
|
id: 17e3,
|
|
1859
1901
|
name: "Holesky",
|
|
1860
1902
|
nativeCurrency: { name: "Holesky Ether", symbol: "ETH", decimals: 18 },
|
|
@@ -1885,13 +1927,13 @@ const Pe = {
|
|
|
1885
1927
|
}
|
|
1886
1928
|
},
|
|
1887
1929
|
testnet: !0
|
|
1888
|
-
}), st = /* @__PURE__ */
|
|
1930
|
+
}), st = /* @__PURE__ */ Q({
|
|
1889
1931
|
id: 1,
|
|
1890
1932
|
name: "Ethereum",
|
|
1891
1933
|
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
1892
1934
|
rpcUrls: {
|
|
1893
1935
|
default: {
|
|
1894
|
-
http: ["https://
|
|
1936
|
+
http: ["https://eth.merkle.io"]
|
|
1895
1937
|
}
|
|
1896
1938
|
},
|
|
1897
1939
|
blockExplorers: {
|
|
@@ -1915,83 +1957,92 @@ const Pe = {
|
|
|
1915
1957
|
}
|
|
1916
1958
|
}
|
|
1917
1959
|
});
|
|
1918
|
-
var
|
|
1919
|
-
const
|
|
1920
|
-
[
|
|
1921
|
-
[
|
|
1922
|
-
[
|
|
1923
|
-
[
|
|
1960
|
+
var V = ((e) => (e[e.Mainnet = st.id] = "Mainnet", e[e.Holesky = nt.id] = "Holesky", e[e.Base = et.id] = "Base", e[e.Bsc = tt.id] = "Bsc", e))(V || {});
|
|
1961
|
+
const ps = {
|
|
1962
|
+
[V.Mainnet]: st,
|
|
1963
|
+
[V.Holesky]: nt,
|
|
1964
|
+
[V.Base]: et,
|
|
1965
|
+
[V.Bsc]: tt
|
|
1924
1966
|
};
|
|
1925
1967
|
export {
|
|
1926
|
-
|
|
1927
|
-
|
|
1968
|
+
is as $,
|
|
1969
|
+
z as A,
|
|
1928
1970
|
u as B,
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1971
|
+
V as C,
|
|
1972
|
+
Me as D,
|
|
1973
|
+
Re as E,
|
|
1974
|
+
He as F,
|
|
1975
|
+
Mt as G,
|
|
1976
|
+
Ce as H,
|
|
1935
1977
|
E as I,
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1978
|
+
_e as J,
|
|
1979
|
+
$ as K,
|
|
1980
|
+
Wt as L,
|
|
1981
|
+
d as M,
|
|
1940
1982
|
A as N,
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1983
|
+
Y as O,
|
|
1984
|
+
Zt as P,
|
|
1985
|
+
en as Q,
|
|
1986
|
+
tn as R,
|
|
1987
|
+
nn as S,
|
|
1988
|
+
sn as T,
|
|
1989
|
+
rn as U,
|
|
1990
|
+
ps as V,
|
|
1991
|
+
on as W,
|
|
1992
|
+
an as X,
|
|
1993
|
+
Ke as Y,
|
|
1994
|
+
us as Z,
|
|
1995
|
+
Yn as _,
|
|
1996
|
+
Zn as a,
|
|
1997
|
+
oe as a0,
|
|
1998
|
+
fn as a1,
|
|
1999
|
+
Xe as a2,
|
|
2000
|
+
Pn as a3,
|
|
2001
|
+
qe as a4,
|
|
2002
|
+
Tn as a5,
|
|
2003
|
+
$n as a6,
|
|
2004
|
+
_t as a7,
|
|
2005
|
+
zn as a8,
|
|
2006
|
+
fs as a9,
|
|
2007
|
+
hs as aa,
|
|
2008
|
+
ds as ab,
|
|
2009
|
+
ls as ac,
|
|
2010
|
+
rs as ad,
|
|
2011
|
+
ke as ae,
|
|
2012
|
+
Ae as af,
|
|
2013
|
+
Vt as ag,
|
|
2014
|
+
os as ah,
|
|
2015
|
+
ae as ai,
|
|
2016
|
+
as as aj,
|
|
2017
|
+
Un as ak,
|
|
2018
|
+
St as al,
|
|
2019
|
+
Qn as am,
|
|
2020
|
+
ns as an,
|
|
2021
|
+
cs as ao,
|
|
2022
|
+
X as b,
|
|
2023
|
+
ss as c,
|
|
2024
|
+
q as d,
|
|
2025
|
+
es as e,
|
|
2026
|
+
P as f,
|
|
2027
|
+
ze as g,
|
|
2028
|
+
B as h,
|
|
2029
|
+
_ as i,
|
|
2030
|
+
ft as j,
|
|
2031
|
+
kt as k,
|
|
2032
|
+
ot as l,
|
|
2033
|
+
dt as m,
|
|
2034
|
+
$e as n,
|
|
2035
|
+
Nt as o,
|
|
2036
|
+
it as p,
|
|
2037
|
+
S as q,
|
|
2038
|
+
ts as r,
|
|
2039
|
+
gn as s,
|
|
2040
|
+
se as t,
|
|
2041
|
+
U as u,
|
|
2042
|
+
I as v,
|
|
2043
|
+
K as w,
|
|
2044
|
+
T as x,
|
|
2045
|
+
Jn as y,
|
|
2046
|
+
L as z
|
|
1996
2047
|
};
|
|
1997
|
-
//# sourceMappingURL=constants-
|
|
2048
|
+
//# sourceMappingURL=constants-CH7Tz5jz.js.map
|