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