@lidofinance/lsv-cli 1.7.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/abi/defi-wrapper/GenericStrategy.d.ts +308 -0
- package/dist/abi/defi-wrapper/GenericStrategy.js +409 -0
- package/dist/abi/defi-wrapper/GenericStrategy.js.map +1 -0
- package/dist/abi/defi-wrapper/index.d.ts +1 -0
- package/dist/abi/defi-wrapper/index.js +1 -0
- package/dist/abi/defi-wrapper/index.js.map +1 -1
- package/dist/abi/defi-wrapper/sources.d.ts +103 -0
- package/dist/abi/defi-wrapper/sources.js +104 -0
- package/dist/abi/defi-wrapper/sources.js.map +1 -0
- package/dist/configs/deployed.d.ts +5 -0
- package/dist/configs/deployed.js +20 -2
- package/dist/configs/deployed.js.map +1 -1
- package/dist/configs/envs.js +2 -0
- package/dist/configs/envs.js.map +1 -1
- package/dist/contracts/defi-wrapper/generic-strategy.d.ts +5 -0
- package/dist/contracts/defi-wrapper/generic-strategy.js +12 -0
- package/dist/contracts/defi-wrapper/generic-strategy.js.map +1 -0
- package/dist/contracts/defi-wrapper/index.d.ts +1 -0
- package/dist/contracts/defi-wrapper/index.js +1 -0
- package/dist/contracts/defi-wrapper/index.js.map +1 -1
- package/dist/features/defi-wrapper/defi-wrapper-factory.d.ts +3 -0
- package/dist/features/defi-wrapper/defi-wrapper-factory.js +4 -1
- package/dist/features/defi-wrapper/defi-wrapper-factory.js.map +1 -1
- package/dist/features/defi-wrapper/index.d.ts +1 -0
- package/dist/features/defi-wrapper/index.js +1 -0
- package/dist/features/defi-wrapper/index.js.map +1 -1
- package/dist/features/defi-wrapper/pool-info.d.ts +18 -1
- package/dist/features/defi-wrapper/pool-info.js +47 -3
- package/dist/features/defi-wrapper/pool-info.js.map +1 -1
- package/dist/features/defi-wrapper/timelock-roles.d.ts +5 -0
- package/dist/features/defi-wrapper/timelock-roles.js +43 -0
- package/dist/features/defi-wrapper/timelock-roles.js.map +1 -0
- package/dist/features/defi-wrapper/timelock.d.ts +1 -6
- package/dist/features/defi-wrapper/timelock.js +2 -45
- package/dist/features/defi-wrapper/timelock.js.map +1 -1
- package/dist/features/defi-wrapper/verify-contracts.d.ts +20 -0
- package/dist/features/defi-wrapper/verify-contracts.js +145 -0
- package/dist/features/defi-wrapper/verify-contracts.js.map +1 -0
- package/dist/features/utils/try-fetch.js +2 -0
- package/dist/features/utils/try-fetch.js.map +1 -1
- package/dist/programs/account/write.js +2 -1
- package/dist/programs/account/write.js.map +1 -1
- package/dist/programs/defi-wrapper/contracts/factory/write.js +77 -6
- package/dist/programs/defi-wrapper/contracts/factory/write.js.map +1 -1
- package/dist/programs/defi-wrapper/contracts/index.d.ts +1 -0
- package/dist/programs/defi-wrapper/contracts/index.js +1 -0
- package/dist/programs/defi-wrapper/contracts/index.js.map +1 -1
- package/dist/programs/defi-wrapper/contracts/strategy/config.d.ts +3 -0
- package/dist/programs/defi-wrapper/contracts/strategy/config.js +40 -0
- package/dist/programs/defi-wrapper/contracts/strategy/config.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/strategy/index.d.ts +3 -0
- package/dist/programs/defi-wrapper/contracts/strategy/index.js +4 -0
- package/dist/programs/defi-wrapper/contracts/strategy/index.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/strategy/main.d.ts +1 -0
- package/dist/programs/defi-wrapper/contracts/strategy/main.js +6 -0
- package/dist/programs/defi-wrapper/contracts/strategy/main.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/strategy/read.d.ts +1 -0
- package/dist/programs/defi-wrapper/contracts/strategy/read.js +30 -0
- package/dist/programs/defi-wrapper/contracts/strategy/read.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/strategy/write.d.ts +1 -0
- package/dist/programs/defi-wrapper/contracts/strategy/write.js +34 -0
- package/dist/programs/defi-wrapper/contracts/strategy/write.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/stv-steth-pool/write.js +25 -21
- package/dist/programs/defi-wrapper/contracts/stv-steth-pool/write.js.map +1 -1
- package/dist/programs/defi-wrapper/contracts/withdrawal-queue/write.js +3 -4
- package/dist/programs/defi-wrapper/contracts/withdrawal-queue/write.js.map +1 -1
- package/dist/programs/defi-wrapper/use-cases/distributor/write.js +1 -0
- package/dist/programs/defi-wrapper/use-cases/distributor/write.js.map +1 -1
- package/dist/programs/defi-wrapper/use-cases/timelock-governance/common/read.js +3 -3
- package/dist/programs/defi-wrapper/use-cases/timelock-governance/common/read.js.map +1 -1
- package/dist/programs/defi-wrapper/use-cases/timelock-governance/common/write.js +3 -3
- package/dist/programs/defi-wrapper/use-cases/timelock-governance/common/write.js.map +1 -1
- package/dist/programs/defi-wrapper/use-cases/timelock-governance/dashboard/write.js +3 -3
- package/dist/programs/defi-wrapper/use-cases/timelock-governance/dashboard/write.js.map +1 -1
- package/dist/programs/defi-wrapper/use-cases/timelock-governance/index.d.ts +1 -0
- package/dist/programs/defi-wrapper/use-cases/timelock-governance/index.js +1 -0
- package/dist/programs/defi-wrapper/use-cases/timelock-governance/index.js.map +1 -1
- package/dist/programs/defi-wrapper/use-cases/timelock-governance/pool/write.js +4 -4
- package/dist/programs/defi-wrapper/use-cases/timelock-governance/pool/write.js.map +1 -1
- package/dist/programs/defi-wrapper/use-cases/timelock-governance/proxy/write.js +3 -3
- package/dist/programs/defi-wrapper/use-cases/timelock-governance/proxy/write.js.map +1 -1
- package/dist/programs/defi-wrapper/use-cases/timelock-governance/strategy/index.d.ts +2 -0
- package/dist/programs/defi-wrapper/use-cases/timelock-governance/strategy/index.js +3 -0
- package/dist/programs/defi-wrapper/use-cases/timelock-governance/strategy/index.js.map +1 -0
- package/dist/programs/defi-wrapper/use-cases/timelock-governance/strategy/main.d.ts +1 -0
- package/dist/programs/defi-wrapper/use-cases/timelock-governance/strategy/main.js +6 -0
- package/dist/programs/defi-wrapper/use-cases/timelock-governance/strategy/main.js.map +1 -0
- package/dist/programs/defi-wrapper/use-cases/timelock-governance/strategy/write.d.ts +1 -0
- package/dist/programs/defi-wrapper/use-cases/timelock-governance/strategy/write.js +57 -0
- package/dist/programs/defi-wrapper/use-cases/timelock-governance/strategy/write.js.map +1 -0
- package/dist/programs/defi-wrapper/use-cases/timelock-governance/withdrawal-queue/write.js +4 -4
- package/dist/programs/defi-wrapper/use-cases/timelock-governance/withdrawal-queue/write.js.map +1 -1
- package/dist/programs/defi-wrapper/use-cases/wrapper-operations/read.js +32 -11
- package/dist/programs/defi-wrapper/use-cases/wrapper-operations/read.js.map +1 -1
- package/dist/programs/defi-wrapper/use-cases/wrapper-operations/write.js +14 -12
- package/dist/programs/defi-wrapper/use-cases/wrapper-operations/write.js.map +1 -1
- package/dist/programs/use-cases/consolidation/write.js +2 -0
- package/dist/programs/use-cases/consolidation/write.js.map +1 -1
- package/dist/providers/wallet.d.ts +88 -72
- package/dist/providers/wallet.js +74 -2
- package/dist/providers/wallet.js.map +1 -1
- package/dist/tests/integration/gas-estimation.test.d.ts +1 -0
- package/dist/tests/integration/gas-estimation.test.js +76 -0
- package/dist/tests/integration/gas-estimation.test.js.map +1 -0
- package/dist/tests/integration/helpers/test-client.d.ts +52 -52
- package/dist/tests/utils/arguments-security.test.d.ts +1 -0
- package/dist/tests/utils/arguments-security.test.js +34 -0
- package/dist/tests/utils/arguments-security.test.js.map +1 -0
- package/dist/tests/utils/arguments.test.js +2 -20
- package/dist/tests/utils/arguments.test.js.map +1 -1
- package/dist/tests/utils/cache-security.test.d.ts +1 -0
- package/dist/tests/utils/cache-security.test.js +62 -0
- package/dist/tests/utils/cache-security.test.js.map +1 -0
- package/dist/tests/utils/contract-write-stateoverride.test.d.ts +1 -0
- package/dist/tests/utils/contract-write-stateoverride.test.js +135 -0
- package/dist/tests/utils/contract-write-stateoverride.test.js.map +1 -0
- package/dist/tests/utils/data-validators.test.js +21 -5
- package/dist/tests/utils/data-validators.test.js.map +1 -1
- package/dist/tests/utils/deployed-security.test.d.ts +1 -0
- package/dist/tests/utils/deployed-security.test.js +51 -0
- package/dist/tests/utils/deployed-security.test.js.map +1 -0
- package/dist/tests/utils/get-confirmations.test.d.ts +1 -0
- package/dist/tests/utils/get-confirmations.test.js +40 -0
- package/dist/tests/utils/get-confirmations.test.js.map +1 -0
- package/dist/tests/utils/ipfs-security.test.d.ts +1 -0
- package/dist/tests/utils/ipfs-security.test.js +105 -0
- package/dist/tests/utils/ipfs-security.test.js.map +1 -0
- package/dist/tests/utils/public-client-gas-estimation.test.d.ts +1 -0
- package/dist/tests/utils/public-client-gas-estimation.test.js +231 -0
- package/dist/tests/utils/public-client-gas-estimation.test.js.map +1 -0
- package/dist/tests/utils/rate-limit-security.test.d.ts +1 -0
- package/dist/tests/utils/rate-limit-security.test.js +82 -0
- package/dist/tests/utils/rate-limit-security.test.js.map +1 -0
- package/dist/tests/utils/salt.test.d.ts +1 -0
- package/dist/tests/utils/salt.test.js +20 -0
- package/dist/tests/utils/salt.test.js.map +1 -0
- package/dist/utils/arguments.d.ts +2 -7
- package/dist/utils/arguments.js +21 -17
- package/dist/utils/arguments.js.map +1 -1
- package/dist/utils/cache.js +15 -13
- package/dist/utils/cache.js.map +1 -1
- package/dist/utils/data-validators.d.ts +3 -2
- package/dist/utils/data-validators.js +8 -11
- package/dist/utils/data-validators.js.map +1 -1
- package/dist/utils/fetch-cl.js +2 -1
- package/dist/utils/fetch-cl.js.map +1 -1
- package/dist/utils/index.d.ts +6 -5
- package/dist/utils/index.js +6 -5
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/ipfs.js +18 -1
- package/dist/utils/ipfs.js.map +1 -1
- package/dist/utils/logging/console.d.ts +1 -0
- package/dist/utils/logging/console.js +23 -2
- package/dist/utils/logging/console.js.map +1 -1
- package/dist/utils/prompts/account.d.ts +1 -0
- package/dist/utils/prompts/account.js +13 -0
- package/dist/utils/prompts/account.js.map +1 -0
- package/dist/utils/prompts/index.d.ts +3 -0
- package/dist/utils/prompts/index.js +3 -0
- package/dist/utils/prompts/index.js.map +1 -1
- package/dist/utils/prompts/strategy.d.ts +15398 -0
- package/dist/utils/prompts/strategy.js +10 -0
- package/dist/utils/prompts/strategy.js.map +1 -0
- package/dist/utils/prompts/timelock-roles.d.ts +1 -0
- package/dist/utils/prompts/timelock-roles.js +13 -0
- package/dist/utils/prompts/timelock-roles.js.map +1 -0
- package/dist/utils/rate-limit.d.ts +6 -9
- package/dist/utils/rate-limit.js +27 -5
- package/dist/utils/rate-limit.js.map +1 -1
- package/dist/utils/salt.d.ts +3 -0
- package/dist/utils/salt.js +8 -0
- package/dist/utils/salt.js.map +1 -0
- package/dist/utils/transactions/tx-private-key.d.ts +2 -1
- package/dist/utils/transactions/tx-private-key.js +5 -8
- package/dist/utils/transactions/tx-private-key.js.map +1 -1
- package/dist/utils/transactions/tx-wc.js +3 -7
- package/dist/utils/transactions/tx-wc.js.map +1 -1
- package/dist/utils/transactions/utils.d.ts +1 -0
- package/dist/utils/transactions/utils.js +12 -0
- package/dist/utils/transactions/utils.js.map +1 -1
- package/dist/version/index.js +1 -1
- package/package.json +3 -2
|
@@ -1,4 +1,23 @@
|
|
|
1
|
-
import { Address, createPublicClient, WalletClient } from 'viem';
|
|
1
|
+
import { Address, createPublicClient, type Transport, WalletClient } from 'viem';
|
|
2
|
+
/**
|
|
3
|
+
* Wraps viem's http() transport to inject a `stateOverride` into every
|
|
4
|
+
* `eth_estimateGas` RPC call, setting the sender's balance to maxUint256.
|
|
5
|
+
*
|
|
6
|
+
* Why: viem's `prepareTransactionRequest` fills `maxFeePerGas` BEFORE
|
|
7
|
+
* calling `eth_estimateGas`. The node then checks
|
|
8
|
+
* `balance >= blockGasLimit * maxFeePerGas`, which fails for low-balance
|
|
9
|
+
* accounts even though the actual TX cost is much lower.
|
|
10
|
+
*
|
|
11
|
+
* Operating at the transport level guarantees the override is applied
|
|
12
|
+
* regardless of how viem resolves its internal action chain (the
|
|
13
|
+
* `client.extend()` approach does not work because viem's bound methods
|
|
14
|
+
* close over the original base client and `getAction` short-circuits).
|
|
15
|
+
*
|
|
16
|
+
* Falls back to the original call if the RPC does not support
|
|
17
|
+
* `stateOverride` (geth < 1.13), and caches the result so subsequent
|
|
18
|
+
* calls skip the failed attempt.
|
|
19
|
+
*/
|
|
20
|
+
export declare const balanceAwareTransport: (url: string) => Transport;
|
|
2
21
|
export declare const getAccount: () => Promise<{
|
|
3
22
|
address: Address;
|
|
4
23
|
nonceManager?: import("viem").NonceManager | undefined;
|
|
@@ -34,10 +53,7 @@ export declare const getPublicClient: () => Promise<{
|
|
|
34
53
|
name: string;
|
|
35
54
|
pollingInterval: number;
|
|
36
55
|
request: import("viem").EIP1193RequestFn<import("viem").PublicRpcSchema>;
|
|
37
|
-
transport: import("viem").TransportConfig<
|
|
38
|
-
fetchOptions?: import("viem").HttpTransportConfig["fetchOptions"] | undefined;
|
|
39
|
-
url?: string | undefined;
|
|
40
|
-
};
|
|
56
|
+
transport: import("viem").TransportConfig<string, import("viem").EIP1193RequestFn> & Record<string, any>;
|
|
41
57
|
type: string;
|
|
42
58
|
uid: string;
|
|
43
59
|
call: (parameters: import("viem").CallParameters<import("viem").Chain>) => Promise<import("viem").CallReturnType>;
|
|
@@ -82,12 +98,12 @@ export declare const getPublicClient: () => Promise<{
|
|
|
82
98
|
withdrawals?: import("viem").Withdrawal[] | undefined | undefined;
|
|
83
99
|
withdrawalsRoot?: `0x${string}` | undefined;
|
|
84
100
|
transactions: includeTransactions extends true ? ({
|
|
101
|
+
value: bigint;
|
|
85
102
|
type: "legacy";
|
|
86
103
|
to: Address | null;
|
|
87
104
|
from: Address;
|
|
88
105
|
gas: bigint;
|
|
89
106
|
nonce: number;
|
|
90
|
-
value: bigint;
|
|
91
107
|
blobVersionedHashes?: undefined | undefined;
|
|
92
108
|
gasPrice: bigint;
|
|
93
109
|
maxFeePerBlobGas?: undefined | undefined;
|
|
@@ -107,12 +123,12 @@ export declare const getPublicClient: () => Promise<{
|
|
|
107
123
|
blockHash: (blockTag extends "pending" ? true : false) extends infer T_1 ? T_1 extends (blockTag extends "pending" ? true : false) ? T_1 extends true ? null : `0x${string}` : never : never;
|
|
108
124
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_2 ? T_2 extends (blockTag extends "pending" ? true : false) ? T_2 extends true ? null : number : never : never;
|
|
109
125
|
} | {
|
|
126
|
+
value: bigint;
|
|
110
127
|
type: "eip2930";
|
|
111
128
|
to: Address | null;
|
|
112
129
|
from: Address;
|
|
113
130
|
gas: bigint;
|
|
114
131
|
nonce: number;
|
|
115
|
-
value: bigint;
|
|
116
132
|
blobVersionedHashes?: undefined | undefined;
|
|
117
133
|
gasPrice: bigint;
|
|
118
134
|
maxFeePerBlobGas?: undefined | undefined;
|
|
@@ -132,12 +148,12 @@ export declare const getPublicClient: () => Promise<{
|
|
|
132
148
|
blockHash: (blockTag extends "pending" ? true : false) extends infer T_4 ? T_4 extends (blockTag extends "pending" ? true : false) ? T_4 extends true ? null : `0x${string}` : never : never;
|
|
133
149
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_5 ? T_5 extends (blockTag extends "pending" ? true : false) ? T_5 extends true ? null : number : never : never;
|
|
134
150
|
} | {
|
|
151
|
+
value: bigint;
|
|
135
152
|
type: "eip1559";
|
|
136
153
|
to: Address | null;
|
|
137
154
|
from: Address;
|
|
138
155
|
gas: bigint;
|
|
139
156
|
nonce: number;
|
|
140
|
-
value: bigint;
|
|
141
157
|
blobVersionedHashes?: undefined | undefined;
|
|
142
158
|
gasPrice?: undefined | undefined;
|
|
143
159
|
maxFeePerBlobGas?: undefined | undefined;
|
|
@@ -157,12 +173,12 @@ export declare const getPublicClient: () => Promise<{
|
|
|
157
173
|
blockHash: (blockTag extends "pending" ? true : false) extends infer T_7 ? T_7 extends (blockTag extends "pending" ? true : false) ? T_7 extends true ? null : `0x${string}` : never : never;
|
|
158
174
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_8 ? T_8 extends (blockTag extends "pending" ? true : false) ? T_8 extends true ? null : number : never : never;
|
|
159
175
|
} | {
|
|
176
|
+
value: bigint;
|
|
160
177
|
type: "eip4844";
|
|
161
178
|
to: Address | null;
|
|
162
179
|
from: Address;
|
|
163
180
|
gas: bigint;
|
|
164
181
|
nonce: number;
|
|
165
|
-
value: bigint;
|
|
166
182
|
blobVersionedHashes: readonly import("viem").Hex[];
|
|
167
183
|
gasPrice?: undefined | undefined;
|
|
168
184
|
maxFeePerBlobGas: bigint;
|
|
@@ -182,12 +198,12 @@ export declare const getPublicClient: () => Promise<{
|
|
|
182
198
|
blockHash: (blockTag extends "pending" ? true : false) extends infer T_10 ? T_10 extends (blockTag extends "pending" ? true : false) ? T_10 extends true ? null : `0x${string}` : never : never;
|
|
183
199
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_11 ? T_11 extends (blockTag extends "pending" ? true : false) ? T_11 extends true ? null : number : never : never;
|
|
184
200
|
} | {
|
|
201
|
+
value: bigint;
|
|
185
202
|
type: "eip7702";
|
|
186
203
|
to: Address | null;
|
|
187
204
|
from: Address;
|
|
188
205
|
gas: bigint;
|
|
189
206
|
nonce: number;
|
|
190
|
-
value: bigint;
|
|
191
207
|
blobVersionedHashes?: undefined | undefined;
|
|
192
208
|
gasPrice?: undefined | undefined;
|
|
193
209
|
maxFeePerBlobGas?: undefined | undefined;
|
|
@@ -233,12 +249,12 @@ export declare const getPublicClient: () => Promise<{
|
|
|
233
249
|
} | undefined) => Promise<import("viem").EstimateMaxPriorityFeePerGasReturnType>;
|
|
234
250
|
getStorageAt: (args: import("viem").GetStorageAtParameters) => Promise<import("viem").GetStorageAtReturnType>;
|
|
235
251
|
getTransaction: <blockTag extends import("viem").BlockTag = "latest">(args: import("viem").GetTransactionParameters<blockTag>) => Promise<{
|
|
252
|
+
value: bigint;
|
|
236
253
|
type: "legacy";
|
|
237
254
|
to: Address | null;
|
|
238
255
|
from: Address;
|
|
239
256
|
gas: bigint;
|
|
240
257
|
nonce: number;
|
|
241
|
-
value: bigint;
|
|
242
258
|
blobVersionedHashes?: undefined | undefined;
|
|
243
259
|
gasPrice: bigint;
|
|
244
260
|
maxFeePerBlobGas?: undefined | undefined;
|
|
@@ -258,12 +274,12 @@ export declare const getPublicClient: () => Promise<{
|
|
|
258
274
|
blockHash: (blockTag extends "pending" ? true : false) extends infer T_1 ? T_1 extends (blockTag extends "pending" ? true : false) ? T_1 extends true ? null : `0x${string}` : never : never;
|
|
259
275
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_2 ? T_2 extends (blockTag extends "pending" ? true : false) ? T_2 extends true ? null : number : never : never;
|
|
260
276
|
} | {
|
|
277
|
+
value: bigint;
|
|
261
278
|
type: "eip2930";
|
|
262
279
|
to: Address | null;
|
|
263
280
|
from: Address;
|
|
264
281
|
gas: bigint;
|
|
265
282
|
nonce: number;
|
|
266
|
-
value: bigint;
|
|
267
283
|
blobVersionedHashes?: undefined | undefined;
|
|
268
284
|
gasPrice: bigint;
|
|
269
285
|
maxFeePerBlobGas?: undefined | undefined;
|
|
@@ -283,12 +299,12 @@ export declare const getPublicClient: () => Promise<{
|
|
|
283
299
|
blockHash: (blockTag extends "pending" ? true : false) extends infer T_4 ? T_4 extends (blockTag extends "pending" ? true : false) ? T_4 extends true ? null : `0x${string}` : never : never;
|
|
284
300
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_5 ? T_5 extends (blockTag extends "pending" ? true : false) ? T_5 extends true ? null : number : never : never;
|
|
285
301
|
} | {
|
|
302
|
+
value: bigint;
|
|
286
303
|
type: "eip1559";
|
|
287
304
|
to: Address | null;
|
|
288
305
|
from: Address;
|
|
289
306
|
gas: bigint;
|
|
290
307
|
nonce: number;
|
|
291
|
-
value: bigint;
|
|
292
308
|
blobVersionedHashes?: undefined | undefined;
|
|
293
309
|
gasPrice?: undefined | undefined;
|
|
294
310
|
maxFeePerBlobGas?: undefined | undefined;
|
|
@@ -308,12 +324,12 @@ export declare const getPublicClient: () => Promise<{
|
|
|
308
324
|
blockHash: (blockTag extends "pending" ? true : false) extends infer T_7 ? T_7 extends (blockTag extends "pending" ? true : false) ? T_7 extends true ? null : `0x${string}` : never : never;
|
|
309
325
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_8 ? T_8 extends (blockTag extends "pending" ? true : false) ? T_8 extends true ? null : number : never : never;
|
|
310
326
|
} | {
|
|
327
|
+
value: bigint;
|
|
311
328
|
type: "eip4844";
|
|
312
329
|
to: Address | null;
|
|
313
330
|
from: Address;
|
|
314
331
|
gas: bigint;
|
|
315
332
|
nonce: number;
|
|
316
|
-
value: bigint;
|
|
317
333
|
blobVersionedHashes: readonly import("viem").Hex[];
|
|
318
334
|
gasPrice?: undefined | undefined;
|
|
319
335
|
maxFeePerBlobGas: bigint;
|
|
@@ -333,12 +349,12 @@ export declare const getPublicClient: () => Promise<{
|
|
|
333
349
|
blockHash: (blockTag extends "pending" ? true : false) extends infer T_10 ? T_10 extends (blockTag extends "pending" ? true : false) ? T_10 extends true ? null : `0x${string}` : never : never;
|
|
334
350
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_11 ? T_11 extends (blockTag extends "pending" ? true : false) ? T_11 extends true ? null : number : never : never;
|
|
335
351
|
} | {
|
|
352
|
+
value: bigint;
|
|
336
353
|
type: "eip7702";
|
|
337
354
|
to: Address | null;
|
|
338
355
|
from: Address;
|
|
339
356
|
gas: bigint;
|
|
340
357
|
nonce: number;
|
|
341
|
-
value: bigint;
|
|
342
358
|
blobVersionedHashes?: undefined | undefined;
|
|
343
359
|
gasPrice?: undefined | undefined;
|
|
344
360
|
maxFeePerBlobGas?: undefined | undefined;
|
|
@@ -3629,10 +3645,10 @@ export declare const getPublicClient: () => Promise<{
|
|
|
3629
3645
|
uninstallFilter: (args: import("viem").UninstallFilterParameters) => Promise<import("viem").UninstallFilterReturnType>;
|
|
3630
3646
|
waitForTransactionReceipt: (args: import("viem").WaitForTransactionReceiptParameters<import("viem").Chain>) => Promise<import("viem").TransactionReceipt>;
|
|
3631
3647
|
watchBlockNumber: (args: import("viem").WatchBlockNumberParameters) => import("viem").WatchBlockNumberReturnType;
|
|
3632
|
-
watchBlocks: <includeTransactions extends boolean = false, blockTag extends import("viem").BlockTag = "latest">(args: import("viem").WatchBlocksParameters<
|
|
3633
|
-
watchContractEvent: <const abi extends import("viem").Abi | readonly unknown[], eventName extends import("viem").ContractEventName<abi>, strict extends boolean | undefined = undefined>(args: import("viem").WatchContractEventParameters<abi, eventName, strict,
|
|
3634
|
-
watchEvent: <const abiEvent extends import("viem").AbiEvent | undefined = undefined, const abiEvents extends readonly import("viem").AbiEvent[] | readonly unknown[] | undefined = abiEvent extends import("viem").AbiEvent ? [abiEvent] : undefined, strict extends boolean | undefined = undefined>(args: import("viem").WatchEventParameters<abiEvent, abiEvents, strict,
|
|
3635
|
-
watchPendingTransactions: (args: import("viem").WatchPendingTransactionsParameters<
|
|
3648
|
+
watchBlocks: <includeTransactions extends boolean = false, blockTag extends import("viem").BlockTag = "latest">(args: import("viem").WatchBlocksParameters<Transport, import("viem").Chain, includeTransactions, blockTag>) => import("viem").WatchBlocksReturnType;
|
|
3649
|
+
watchContractEvent: <const abi extends import("viem").Abi | readonly unknown[], eventName extends import("viem").ContractEventName<abi>, strict extends boolean | undefined = undefined>(args: import("viem").WatchContractEventParameters<abi, eventName, strict, Transport>) => import("viem").WatchContractEventReturnType;
|
|
3650
|
+
watchEvent: <const abiEvent extends import("viem").AbiEvent | undefined = undefined, const abiEvents extends readonly import("viem").AbiEvent[] | readonly unknown[] | undefined = abiEvent extends import("viem").AbiEvent ? [abiEvent] : undefined, strict extends boolean | undefined = undefined>(args: import("viem").WatchEventParameters<abiEvent, abiEvents, strict, Transport>) => import("viem").WatchEventReturnType;
|
|
3651
|
+
watchPendingTransactions: (args: import("viem").WatchPendingTransactionsParameters<Transport>) => import("viem").WatchPendingTransactionsReturnType;
|
|
3636
3652
|
extend: <const client extends {
|
|
3637
3653
|
[x: string]: unknown;
|
|
3638
3654
|
account?: undefined;
|
|
@@ -3649,7 +3665,7 @@ export declare const getPublicClient: () => Promise<{
|
|
|
3649
3665
|
transport?: undefined;
|
|
3650
3666
|
type?: undefined;
|
|
3651
3667
|
uid?: undefined;
|
|
3652
|
-
} & import("viem").ExactPartial<Pick<import("viem").PublicActions<
|
|
3668
|
+
} & import("viem").ExactPartial<Pick<import("viem").PublicActions<Transport, import("viem").Chain, undefined>, "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getChainId" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "prepareTransactionRequest" | "readContract" | "sendRawTransaction" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<import("viem").WalletActions<import("viem").Chain, undefined>, "sendTransaction" | "writeContract">>>(fn: (client: import("viem").Client<Transport, import("viem").Chain, undefined, import("viem").PublicRpcSchema, import("viem").PublicActions<Transport, import("viem").Chain>>) => client) => import("viem").Client<Transport, import("viem").Chain, undefined, import("viem").PublicRpcSchema, { [K in keyof client]: client[K]; } & import("viem").PublicActions<Transport, import("viem").Chain>>;
|
|
3653
3669
|
}>;
|
|
3654
3670
|
export declare const getTestClient: () => Promise<import("viem").Client<import("viem").HttpTransport<undefined, false>, import("viem").Chain, undefined, import("viem").TestRpcSchema<"anvil">, {
|
|
3655
3671
|
addChain: (args: import("viem").AddChainParameters) => Promise<void>;
|
|
@@ -7843,21 +7859,24 @@ export declare const getTestClient: () => Promise<import("viem").Client<import("
|
|
|
7843
7859
|
[x: `bool[${string}]`]: undefined;
|
|
7844
7860
|
[x: `bytes[${string}]`]: undefined;
|
|
7845
7861
|
[x: `bytes11[${string}]`]: undefined;
|
|
7846
|
-
[x: `bytes1[${string}]`]: undefined;
|
|
7847
7862
|
[x: `bytes2[${string}]`]: undefined;
|
|
7863
|
+
[x: `bytes1[${string}]`]: undefined;
|
|
7864
|
+
[x: `bytes16[${string}]`]: undefined;
|
|
7865
|
+
[x: `bytes32[${string}]`]: undefined;
|
|
7866
|
+
[x: `bytes8[${string}]`]: undefined;
|
|
7867
|
+
[x: `bytes24[${string}]`]: undefined;
|
|
7868
|
+
[x: `bytes7[${string}]`]: undefined;
|
|
7869
|
+
[x: `bytes31[${string}]`]: undefined;
|
|
7870
|
+
[x: `bytes10[${string}]`]: undefined;
|
|
7871
|
+
[x: `bytes9[${string}]`]: undefined;
|
|
7848
7872
|
[x: `bytes3[${string}]`]: undefined;
|
|
7849
7873
|
[x: `bytes4[${string}]`]: undefined;
|
|
7850
7874
|
[x: `bytes5[${string}]`]: undefined;
|
|
7851
7875
|
[x: `bytes6[${string}]`]: undefined;
|
|
7852
|
-
[x: `bytes7[${string}]`]: undefined;
|
|
7853
|
-
[x: `bytes8[${string}]`]: undefined;
|
|
7854
|
-
[x: `bytes9[${string}]`]: undefined;
|
|
7855
|
-
[x: `bytes10[${string}]`]: undefined;
|
|
7856
7876
|
[x: `bytes12[${string}]`]: undefined;
|
|
7857
7877
|
[x: `bytes13[${string}]`]: undefined;
|
|
7858
7878
|
[x: `bytes14[${string}]`]: undefined;
|
|
7859
7879
|
[x: `bytes15[${string}]`]: undefined;
|
|
7860
|
-
[x: `bytes16[${string}]`]: undefined;
|
|
7861
7880
|
[x: `bytes17[${string}]`]: undefined;
|
|
7862
7881
|
[x: `bytes18[${string}]`]: undefined;
|
|
7863
7882
|
[x: `bytes19[${string}]`]: undefined;
|
|
@@ -7865,31 +7884,28 @@ export declare const getTestClient: () => Promise<import("viem").Client<import("
|
|
|
7865
7884
|
[x: `bytes21[${string}]`]: undefined;
|
|
7866
7885
|
[x: `bytes22[${string}]`]: undefined;
|
|
7867
7886
|
[x: `bytes23[${string}]`]: undefined;
|
|
7868
|
-
[x: `bytes24[${string}]`]: undefined;
|
|
7869
7887
|
[x: `bytes25[${string}]`]: undefined;
|
|
7870
7888
|
[x: `bytes26[${string}]`]: undefined;
|
|
7871
7889
|
[x: `bytes27[${string}]`]: undefined;
|
|
7872
7890
|
[x: `bytes28[${string}]`]: undefined;
|
|
7873
7891
|
[x: `bytes29[${string}]`]: undefined;
|
|
7874
7892
|
[x: `bytes30[${string}]`]: undefined;
|
|
7875
|
-
[x: `bytes31[${string}]`]: undefined;
|
|
7876
|
-
[x: `bytes32[${string}]`]: undefined;
|
|
7877
7893
|
[x: `int[${string}]`]: undefined;
|
|
7878
|
-
[x: `int8[${string}]`]: undefined;
|
|
7879
7894
|
[x: `int16[${string}]`]: undefined;
|
|
7880
|
-
[x: `int24[${string}]`]: undefined;
|
|
7881
7895
|
[x: `int32[${string}]`]: undefined;
|
|
7882
|
-
[x: `
|
|
7896
|
+
[x: `int64[${string}]`]: undefined;
|
|
7883
7897
|
[x: `int48[${string}]`]: undefined;
|
|
7898
|
+
[x: `int8[${string}]`]: undefined;
|
|
7899
|
+
[x: `int24[${string}]`]: undefined;
|
|
7900
|
+
[x: `int80[${string}]`]: undefined;
|
|
7901
|
+
[x: `int120[${string}]`]: undefined;
|
|
7902
|
+
[x: `int40[${string}]`]: undefined;
|
|
7884
7903
|
[x: `int56[${string}]`]: undefined;
|
|
7885
|
-
[x: `int64[${string}]`]: undefined;
|
|
7886
7904
|
[x: `int72[${string}]`]: undefined;
|
|
7887
|
-
[x: `int80[${string}]`]: undefined;
|
|
7888
7905
|
[x: `int88[${string}]`]: undefined;
|
|
7889
7906
|
[x: `int96[${string}]`]: undefined;
|
|
7890
7907
|
[x: `int104[${string}]`]: undefined;
|
|
7891
7908
|
[x: `int112[${string}]`]: undefined;
|
|
7892
|
-
[x: `int120[${string}]`]: undefined;
|
|
7893
7909
|
[x: `int128[${string}]`]: undefined;
|
|
7894
7910
|
[x: `int136[${string}]`]: undefined;
|
|
7895
7911
|
[x: `int144[${string}]`]: undefined;
|
|
@@ -7908,21 +7924,21 @@ export declare const getTestClient: () => Promise<import("viem").Client<import("
|
|
|
7908
7924
|
[x: `int248[${string}]`]: undefined;
|
|
7909
7925
|
[x: `int256[${string}]`]: undefined;
|
|
7910
7926
|
[x: `uint[${string}]`]: undefined;
|
|
7911
|
-
[x: `uint8[${string}]`]: undefined;
|
|
7912
7927
|
[x: `uint16[${string}]`]: undefined;
|
|
7913
|
-
[x: `uint24[${string}]`]: undefined;
|
|
7914
7928
|
[x: `uint32[${string}]`]: undefined;
|
|
7915
|
-
[x: `
|
|
7929
|
+
[x: `uint64[${string}]`]: undefined;
|
|
7916
7930
|
[x: `uint48[${string}]`]: undefined;
|
|
7931
|
+
[x: `uint8[${string}]`]: undefined;
|
|
7932
|
+
[x: `uint24[${string}]`]: undefined;
|
|
7933
|
+
[x: `uint80[${string}]`]: undefined;
|
|
7934
|
+
[x: `uint120[${string}]`]: undefined;
|
|
7935
|
+
[x: `uint40[${string}]`]: undefined;
|
|
7917
7936
|
[x: `uint56[${string}]`]: undefined;
|
|
7918
|
-
[x: `uint64[${string}]`]: undefined;
|
|
7919
7937
|
[x: `uint72[${string}]`]: undefined;
|
|
7920
|
-
[x: `uint80[${string}]`]: undefined;
|
|
7921
7938
|
[x: `uint88[${string}]`]: undefined;
|
|
7922
7939
|
[x: `uint96[${string}]`]: undefined;
|
|
7923
7940
|
[x: `uint104[${string}]`]: undefined;
|
|
7924
7941
|
[x: `uint112[${string}]`]: undefined;
|
|
7925
|
-
[x: `uint120[${string}]`]: undefined;
|
|
7926
7942
|
[x: `uint128[${string}]`]: undefined;
|
|
7927
7943
|
[x: `uint136[${string}]`]: undefined;
|
|
7928
7944
|
[x: `uint144[${string}]`]: undefined;
|
|
@@ -7945,21 +7961,24 @@ export declare const getTestClient: () => Promise<import("viem").Client<import("
|
|
|
7945
7961
|
bool?: undefined;
|
|
7946
7962
|
bytes?: undefined;
|
|
7947
7963
|
bytes11?: undefined;
|
|
7948
|
-
bytes1?: undefined;
|
|
7949
7964
|
bytes2?: undefined;
|
|
7965
|
+
bytes1?: undefined;
|
|
7966
|
+
bytes16?: undefined;
|
|
7967
|
+
bytes32?: undefined;
|
|
7968
|
+
bytes8?: undefined;
|
|
7969
|
+
bytes24?: undefined;
|
|
7970
|
+
bytes7?: undefined;
|
|
7971
|
+
bytes31?: undefined;
|
|
7972
|
+
bytes10?: undefined;
|
|
7973
|
+
bytes9?: undefined;
|
|
7950
7974
|
bytes3?: undefined;
|
|
7951
7975
|
bytes4?: undefined;
|
|
7952
7976
|
bytes5?: undefined;
|
|
7953
7977
|
bytes6?: undefined;
|
|
7954
|
-
bytes7?: undefined;
|
|
7955
|
-
bytes8?: undefined;
|
|
7956
|
-
bytes9?: undefined;
|
|
7957
|
-
bytes10?: undefined;
|
|
7958
7978
|
bytes12?: undefined;
|
|
7959
7979
|
bytes13?: undefined;
|
|
7960
7980
|
bytes14?: undefined;
|
|
7961
7981
|
bytes15?: undefined;
|
|
7962
|
-
bytes16?: undefined;
|
|
7963
7982
|
bytes17?: undefined;
|
|
7964
7983
|
bytes18?: undefined;
|
|
7965
7984
|
bytes19?: undefined;
|
|
@@ -7967,30 +7986,27 @@ export declare const getTestClient: () => Promise<import("viem").Client<import("
|
|
|
7967
7986
|
bytes21?: undefined;
|
|
7968
7987
|
bytes22?: undefined;
|
|
7969
7988
|
bytes23?: undefined;
|
|
7970
|
-
bytes24?: undefined;
|
|
7971
7989
|
bytes25?: undefined;
|
|
7972
7990
|
bytes26?: undefined;
|
|
7973
7991
|
bytes27?: undefined;
|
|
7974
7992
|
bytes28?: undefined;
|
|
7975
7993
|
bytes29?: undefined;
|
|
7976
7994
|
bytes30?: undefined;
|
|
7977
|
-
bytes31?: undefined;
|
|
7978
|
-
bytes32?: undefined;
|
|
7979
|
-
int8?: undefined;
|
|
7980
7995
|
int16?: undefined;
|
|
7981
|
-
int24?: undefined;
|
|
7982
7996
|
int32?: undefined;
|
|
7983
|
-
|
|
7997
|
+
int64?: undefined;
|
|
7984
7998
|
int48?: undefined;
|
|
7999
|
+
int8?: undefined;
|
|
8000
|
+
int24?: undefined;
|
|
8001
|
+
int80?: undefined;
|
|
8002
|
+
int120?: undefined;
|
|
8003
|
+
int40?: undefined;
|
|
7985
8004
|
int56?: undefined;
|
|
7986
|
-
int64?: undefined;
|
|
7987
8005
|
int72?: undefined;
|
|
7988
|
-
int80?: undefined;
|
|
7989
8006
|
int88?: undefined;
|
|
7990
8007
|
int96?: undefined;
|
|
7991
8008
|
int104?: undefined;
|
|
7992
8009
|
int112?: undefined;
|
|
7993
|
-
int120?: undefined;
|
|
7994
8010
|
int128?: undefined;
|
|
7995
8011
|
int136?: undefined;
|
|
7996
8012
|
int144?: undefined;
|
|
@@ -8008,21 +8024,21 @@ export declare const getTestClient: () => Promise<import("viem").Client<import("
|
|
|
8008
8024
|
int240?: undefined;
|
|
8009
8025
|
int248?: undefined;
|
|
8010
8026
|
int256?: undefined;
|
|
8011
|
-
uint8?: undefined;
|
|
8012
8027
|
uint16?: undefined;
|
|
8013
|
-
uint24?: undefined;
|
|
8014
8028
|
uint32?: undefined;
|
|
8015
|
-
|
|
8029
|
+
uint64?: undefined;
|
|
8016
8030
|
uint48?: undefined;
|
|
8031
|
+
uint8?: undefined;
|
|
8032
|
+
uint24?: undefined;
|
|
8033
|
+
uint80?: undefined;
|
|
8034
|
+
uint120?: undefined;
|
|
8035
|
+
uint40?: undefined;
|
|
8017
8036
|
uint56?: undefined;
|
|
8018
|
-
uint64?: undefined;
|
|
8019
8037
|
uint72?: undefined;
|
|
8020
|
-
uint80?: undefined;
|
|
8021
8038
|
uint88?: undefined;
|
|
8022
8039
|
uint96?: undefined;
|
|
8023
8040
|
uint104?: undefined;
|
|
8024
8041
|
uint112?: undefined;
|
|
8025
|
-
uint120?: undefined;
|
|
8026
8042
|
uint128?: undefined;
|
|
8027
8043
|
uint136?: undefined;
|
|
8028
8044
|
uint144?: undefined;
|
|
@@ -8091,12 +8107,12 @@ export declare const getTestClient: () => Promise<import("viem").Client<import("
|
|
|
8091
8107
|
withdrawals?: import("viem").Withdrawal[] | undefined | undefined;
|
|
8092
8108
|
withdrawalsRoot?: `0x${string}` | undefined;
|
|
8093
8109
|
transactions: includeTransactions extends true ? ({
|
|
8110
|
+
value: bigint;
|
|
8094
8111
|
type: "legacy";
|
|
8095
8112
|
to: Address | null;
|
|
8096
8113
|
from: Address;
|
|
8097
8114
|
gas: bigint;
|
|
8098
8115
|
nonce: number;
|
|
8099
|
-
value: bigint;
|
|
8100
8116
|
blobVersionedHashes?: undefined | undefined;
|
|
8101
8117
|
gasPrice: bigint;
|
|
8102
8118
|
maxFeePerBlobGas?: undefined | undefined;
|
|
@@ -8116,12 +8132,12 @@ export declare const getTestClient: () => Promise<import("viem").Client<import("
|
|
|
8116
8132
|
blockHash: (blockTag extends "pending" ? true : false) extends infer T_1 ? T_1 extends (blockTag extends "pending" ? true : false) ? T_1 extends true ? null : `0x${string}` : never : never;
|
|
8117
8133
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_2 ? T_2 extends (blockTag extends "pending" ? true : false) ? T_2 extends true ? null : number : never : never;
|
|
8118
8134
|
} | {
|
|
8135
|
+
value: bigint;
|
|
8119
8136
|
type: "eip2930";
|
|
8120
8137
|
to: Address | null;
|
|
8121
8138
|
from: Address;
|
|
8122
8139
|
gas: bigint;
|
|
8123
8140
|
nonce: number;
|
|
8124
|
-
value: bigint;
|
|
8125
8141
|
blobVersionedHashes?: undefined | undefined;
|
|
8126
8142
|
gasPrice: bigint;
|
|
8127
8143
|
maxFeePerBlobGas?: undefined | undefined;
|
|
@@ -8141,12 +8157,12 @@ export declare const getTestClient: () => Promise<import("viem").Client<import("
|
|
|
8141
8157
|
blockHash: (blockTag extends "pending" ? true : false) extends infer T_4 ? T_4 extends (blockTag extends "pending" ? true : false) ? T_4 extends true ? null : `0x${string}` : never : never;
|
|
8142
8158
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_5 ? T_5 extends (blockTag extends "pending" ? true : false) ? T_5 extends true ? null : number : never : never;
|
|
8143
8159
|
} | {
|
|
8160
|
+
value: bigint;
|
|
8144
8161
|
type: "eip1559";
|
|
8145
8162
|
to: Address | null;
|
|
8146
8163
|
from: Address;
|
|
8147
8164
|
gas: bigint;
|
|
8148
8165
|
nonce: number;
|
|
8149
|
-
value: bigint;
|
|
8150
8166
|
blobVersionedHashes?: undefined | undefined;
|
|
8151
8167
|
gasPrice?: undefined | undefined;
|
|
8152
8168
|
maxFeePerBlobGas?: undefined | undefined;
|
|
@@ -8166,12 +8182,12 @@ export declare const getTestClient: () => Promise<import("viem").Client<import("
|
|
|
8166
8182
|
blockHash: (blockTag extends "pending" ? true : false) extends infer T_7 ? T_7 extends (blockTag extends "pending" ? true : false) ? T_7 extends true ? null : `0x${string}` : never : never;
|
|
8167
8183
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_8 ? T_8 extends (blockTag extends "pending" ? true : false) ? T_8 extends true ? null : number : never : never;
|
|
8168
8184
|
} | {
|
|
8185
|
+
value: bigint;
|
|
8169
8186
|
type: "eip4844";
|
|
8170
8187
|
to: Address | null;
|
|
8171
8188
|
from: Address;
|
|
8172
8189
|
gas: bigint;
|
|
8173
8190
|
nonce: number;
|
|
8174
|
-
value: bigint;
|
|
8175
8191
|
blobVersionedHashes: readonly import("viem").Hex[];
|
|
8176
8192
|
gasPrice?: undefined | undefined;
|
|
8177
8193
|
maxFeePerBlobGas: bigint;
|
|
@@ -8191,12 +8207,12 @@ export declare const getTestClient: () => Promise<import("viem").Client<import("
|
|
|
8191
8207
|
blockHash: (blockTag extends "pending" ? true : false) extends infer T_10 ? T_10 extends (blockTag extends "pending" ? true : false) ? T_10 extends true ? null : `0x${string}` : never : never;
|
|
8192
8208
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_11 ? T_11 extends (blockTag extends "pending" ? true : false) ? T_11 extends true ? null : number : never : never;
|
|
8193
8209
|
} | {
|
|
8210
|
+
value: bigint;
|
|
8194
8211
|
type: "eip7702";
|
|
8195
8212
|
to: Address | null;
|
|
8196
8213
|
from: Address;
|
|
8197
8214
|
gas: bigint;
|
|
8198
8215
|
nonce: number;
|
|
8199
|
-
value: bigint;
|
|
8200
8216
|
blobVersionedHashes?: undefined | undefined;
|
|
8201
8217
|
gasPrice?: undefined | undefined;
|
|
8202
8218
|
maxFeePerBlobGas?: undefined | undefined;
|
|
@@ -8242,12 +8258,12 @@ export declare const getTestClient: () => Promise<import("viem").Client<import("
|
|
|
8242
8258
|
} | undefined) => Promise<import("viem").EstimateMaxPriorityFeePerGasReturnType>;
|
|
8243
8259
|
getStorageAt: (args: import("viem").GetStorageAtParameters) => Promise<import("viem").GetStorageAtReturnType>;
|
|
8244
8260
|
getTransaction: <blockTag extends import("viem").BlockTag = "latest">(args: import("viem").GetTransactionParameters<blockTag>) => Promise<{
|
|
8261
|
+
value: bigint;
|
|
8245
8262
|
type: "legacy";
|
|
8246
8263
|
to: Address | null;
|
|
8247
8264
|
from: Address;
|
|
8248
8265
|
gas: bigint;
|
|
8249
8266
|
nonce: number;
|
|
8250
|
-
value: bigint;
|
|
8251
8267
|
blobVersionedHashes?: undefined | undefined;
|
|
8252
8268
|
gasPrice: bigint;
|
|
8253
8269
|
maxFeePerBlobGas?: undefined | undefined;
|
|
@@ -8267,12 +8283,12 @@ export declare const getTestClient: () => Promise<import("viem").Client<import("
|
|
|
8267
8283
|
blockHash: (blockTag extends "pending" ? true : false) extends infer T_1 ? T_1 extends (blockTag extends "pending" ? true : false) ? T_1 extends true ? null : `0x${string}` : never : never;
|
|
8268
8284
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_2 ? T_2 extends (blockTag extends "pending" ? true : false) ? T_2 extends true ? null : number : never : never;
|
|
8269
8285
|
} | {
|
|
8286
|
+
value: bigint;
|
|
8270
8287
|
type: "eip2930";
|
|
8271
8288
|
to: Address | null;
|
|
8272
8289
|
from: Address;
|
|
8273
8290
|
gas: bigint;
|
|
8274
8291
|
nonce: number;
|
|
8275
|
-
value: bigint;
|
|
8276
8292
|
blobVersionedHashes?: undefined | undefined;
|
|
8277
8293
|
gasPrice: bigint;
|
|
8278
8294
|
maxFeePerBlobGas?: undefined | undefined;
|
|
@@ -8292,12 +8308,12 @@ export declare const getTestClient: () => Promise<import("viem").Client<import("
|
|
|
8292
8308
|
blockHash: (blockTag extends "pending" ? true : false) extends infer T_4 ? T_4 extends (blockTag extends "pending" ? true : false) ? T_4 extends true ? null : `0x${string}` : never : never;
|
|
8293
8309
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_5 ? T_5 extends (blockTag extends "pending" ? true : false) ? T_5 extends true ? null : number : never : never;
|
|
8294
8310
|
} | {
|
|
8311
|
+
value: bigint;
|
|
8295
8312
|
type: "eip1559";
|
|
8296
8313
|
to: Address | null;
|
|
8297
8314
|
from: Address;
|
|
8298
8315
|
gas: bigint;
|
|
8299
8316
|
nonce: number;
|
|
8300
|
-
value: bigint;
|
|
8301
8317
|
blobVersionedHashes?: undefined | undefined;
|
|
8302
8318
|
gasPrice?: undefined | undefined;
|
|
8303
8319
|
maxFeePerBlobGas?: undefined | undefined;
|
|
@@ -8317,12 +8333,12 @@ export declare const getTestClient: () => Promise<import("viem").Client<import("
|
|
|
8317
8333
|
blockHash: (blockTag extends "pending" ? true : false) extends infer T_7 ? T_7 extends (blockTag extends "pending" ? true : false) ? T_7 extends true ? null : `0x${string}` : never : never;
|
|
8318
8334
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_8 ? T_8 extends (blockTag extends "pending" ? true : false) ? T_8 extends true ? null : number : never : never;
|
|
8319
8335
|
} | {
|
|
8336
|
+
value: bigint;
|
|
8320
8337
|
type: "eip4844";
|
|
8321
8338
|
to: Address | null;
|
|
8322
8339
|
from: Address;
|
|
8323
8340
|
gas: bigint;
|
|
8324
8341
|
nonce: number;
|
|
8325
|
-
value: bigint;
|
|
8326
8342
|
blobVersionedHashes: readonly import("viem").Hex[];
|
|
8327
8343
|
gasPrice?: undefined | undefined;
|
|
8328
8344
|
maxFeePerBlobGas: bigint;
|
|
@@ -8342,12 +8358,12 @@ export declare const getTestClient: () => Promise<import("viem").Client<import("
|
|
|
8342
8358
|
blockHash: (blockTag extends "pending" ? true : false) extends infer T_10 ? T_10 extends (blockTag extends "pending" ? true : false) ? T_10 extends true ? null : `0x${string}` : never : never;
|
|
8343
8359
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_11 ? T_11 extends (blockTag extends "pending" ? true : false) ? T_11 extends true ? null : number : never : never;
|
|
8344
8360
|
} | {
|
|
8361
|
+
value: bigint;
|
|
8345
8362
|
type: "eip7702";
|
|
8346
8363
|
to: Address | null;
|
|
8347
8364
|
from: Address;
|
|
8348
8365
|
gas: bigint;
|
|
8349
8366
|
nonce: number;
|
|
8350
|
-
value: bigint;
|
|
8351
8367
|
blobVersionedHashes?: undefined | undefined;
|
|
8352
8368
|
gasPrice?: undefined | undefined;
|
|
8353
8369
|
maxFeePerBlobGas?: undefined | undefined;
|
package/dist/providers/wallet.js
CHANGED
|
@@ -5,6 +5,78 @@ import { privateKeyToAccount } from 'viem/accounts';
|
|
|
5
5
|
import { Keystore } from 'ox';
|
|
6
6
|
import { envs, getConfig, getChainId, getElUrl, getChain } from '../configs/index.js';
|
|
7
7
|
import { createWalletConnectClient } from '../utils/index.js';
|
|
8
|
+
const MAX_UINT256_HEX = '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff';
|
|
9
|
+
// Cached after the first eth_estimateGas call to avoid a double RPC
|
|
10
|
+
// roundtrip on every subsequent estimation when the node lacks support.
|
|
11
|
+
let nodeSupportsStateOverride = null;
|
|
12
|
+
const isStateOverrideError = (err) => {
|
|
13
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
14
|
+
return (msg.includes('stateOverride') ||
|
|
15
|
+
msg.includes('too many arguments') ||
|
|
16
|
+
msg.includes('invalid argument 2') ||
|
|
17
|
+
msg.includes('Invalid method parameters') ||
|
|
18
|
+
msg.includes('eth_estimateGas does not support'));
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Wraps viem's http() transport to inject a `stateOverride` into every
|
|
22
|
+
* `eth_estimateGas` RPC call, setting the sender's balance to maxUint256.
|
|
23
|
+
*
|
|
24
|
+
* Why: viem's `prepareTransactionRequest` fills `maxFeePerGas` BEFORE
|
|
25
|
+
* calling `eth_estimateGas`. The node then checks
|
|
26
|
+
* `balance >= blockGasLimit * maxFeePerGas`, which fails for low-balance
|
|
27
|
+
* accounts even though the actual TX cost is much lower.
|
|
28
|
+
*
|
|
29
|
+
* Operating at the transport level guarantees the override is applied
|
|
30
|
+
* regardless of how viem resolves its internal action chain (the
|
|
31
|
+
* `client.extend()` approach does not work because viem's bound methods
|
|
32
|
+
* close over the original base client and `getAction` short-circuits).
|
|
33
|
+
*
|
|
34
|
+
* Falls back to the original call if the RPC does not support
|
|
35
|
+
* `stateOverride` (geth < 1.13), and caches the result so subsequent
|
|
36
|
+
* calls skip the failed attempt.
|
|
37
|
+
*/
|
|
38
|
+
export const balanceAwareTransport = (url) => {
|
|
39
|
+
const baseTransport = http(url);
|
|
40
|
+
return ((params) => {
|
|
41
|
+
const base = baseTransport(params);
|
|
42
|
+
return {
|
|
43
|
+
...base,
|
|
44
|
+
async request(args) {
|
|
45
|
+
if (args.method === 'eth_estimateGas' &&
|
|
46
|
+
Array.isArray(args.params) &&
|
|
47
|
+
args.params[0]?.from) {
|
|
48
|
+
if (nodeSupportsStateOverride === false) {
|
|
49
|
+
return base.request(args);
|
|
50
|
+
}
|
|
51
|
+
const from = args.params[0].from;
|
|
52
|
+
const txRequest = args.params[0];
|
|
53
|
+
const blockTag = args.params[1] ?? 'latest';
|
|
54
|
+
const existingOverride = args.params[2] ?? {};
|
|
55
|
+
const stateOverride = {
|
|
56
|
+
...existingOverride,
|
|
57
|
+
[from]: { balance: MAX_UINT256_HEX },
|
|
58
|
+
};
|
|
59
|
+
try {
|
|
60
|
+
const result = await base.request({
|
|
61
|
+
method: 'eth_estimateGas',
|
|
62
|
+
params: [txRequest, blockTag, stateOverride],
|
|
63
|
+
});
|
|
64
|
+
nodeSupportsStateOverride = true;
|
|
65
|
+
return result;
|
|
66
|
+
}
|
|
67
|
+
catch (err) {
|
|
68
|
+
if (isStateOverrideError(err)) {
|
|
69
|
+
nodeSupportsStateOverride = false;
|
|
70
|
+
return await base.request(args);
|
|
71
|
+
}
|
|
72
|
+
throw err;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return base.request(args);
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
});
|
|
79
|
+
};
|
|
8
80
|
const getPrivateKey = async () => {
|
|
9
81
|
const { PRIVATE_KEY, ACCOUNT_FILE, ACCOUNT_FILE_PASSWORD } = getConfig();
|
|
10
82
|
const id = await getChainId();
|
|
@@ -59,7 +131,7 @@ export const getPublicClient = async () => {
|
|
|
59
131
|
}
|
|
60
132
|
const publicClient = createPublicClient({
|
|
61
133
|
chain,
|
|
62
|
-
transport:
|
|
134
|
+
transport: balanceAwareTransport(getElUrl()),
|
|
63
135
|
});
|
|
64
136
|
PUBLIC_CLIENT_CACHE[chain.id] = publicClient;
|
|
65
137
|
return publicClient;
|
|
@@ -79,7 +151,7 @@ export const getWalletWithAccount = async () => {
|
|
|
79
151
|
return createWalletClient({
|
|
80
152
|
account,
|
|
81
153
|
chain,
|
|
82
|
-
transport:
|
|
154
|
+
transport: balanceAwareTransport(getElUrl()),
|
|
83
155
|
});
|
|
84
156
|
};
|
|
85
157
|
export const getWalletConnectClient = async () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallet.js","sourceRoot":"","sources":["../../providers/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAEL,kBAAkB,EAClB,kBAAkB,EAClB,IAAI,
|
|
1
|
+
{"version":3,"file":"wallet.js","sourceRoot":"","sources":["../../providers/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAEL,kBAAkB,EACl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