viem 2.56.7 → 2.56.9
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/CHANGELOG.md +44 -0
- package/README.md +0 -1
- package/_cjs/actions/index.js +5 -3
- package/_cjs/actions/index.js.map +1 -1
- package/_cjs/actions/public/getStorageValues.js +17 -0
- package/_cjs/actions/public/getStorageValues.js.map +1 -0
- package/_cjs/actions/public/simulateBlocks.js +2 -0
- package/_cjs/actions/public/simulateBlocks.js.map +1 -1
- package/_cjs/chains/definitions/rabbitChainTestnet.js +24 -0
- package/_cjs/chains/definitions/rabbitChainTestnet.js.map +1 -0
- package/_cjs/chains/index.js +7 -5
- package/_cjs/chains/index.js.map +1 -1
- package/_cjs/clients/decorators/public.js +2 -0
- package/_cjs/clients/decorators/public.js.map +1 -1
- package/_cjs/errors/version.js +1 -1
- package/_cjs/index.js.map +1 -1
- package/_cjs/tempo/Abis.js +1211 -32
- package/_cjs/tempo/Abis.js.map +1 -1
- package/_cjs/tempo/Addresses.js +2 -1
- package/_cjs/tempo/Addresses.js.map +1 -1
- package/_cjs/tempo/Decorator.js +12 -0
- package/_cjs/tempo/Decorator.js.map +1 -1
- package/_cjs/tempo/Selectors.js +7 -4
- package/_cjs/tempo/Selectors.js.map +1 -1
- package/_cjs/tempo/actions/index.js +2 -1
- package/_cjs/tempo/actions/index.js.map +1 -1
- package/_cjs/tempo/actions/propAmm.js +349 -0
- package/_cjs/tempo/actions/propAmm.js.map +1 -0
- package/_cjs/tokens/definitions/eurc.js +1 -0
- package/_cjs/tokens/definitions/eurc.js.map +1 -1
- package/_cjs/tokens/definitions/usdc.js +1 -0
- package/_cjs/tokens/definitions/usdc.js.map +1 -1
- package/_cjs/utils/formatters/formatter.js.map +1 -1
- package/_esm/actions/index.js +1 -0
- package/_esm/actions/index.js.map +1 -1
- package/_esm/actions/public/getStorageValues.js +39 -0
- package/_esm/actions/public/getStorageValues.js.map +1 -0
- package/_esm/actions/public/simulateBlocks.js +4 -0
- package/_esm/actions/public/simulateBlocks.js.map +1 -1
- package/_esm/chains/definitions/rabbitChainTestnet.js +21 -0
- package/_esm/chains/definitions/rabbitChainTestnet.js.map +1 -0
- package/_esm/chains/index.js +1 -0
- package/_esm/chains/index.js.map +1 -1
- package/_esm/clients/decorators/public.js +2 -0
- package/_esm/clients/decorators/public.js.map +1 -1
- package/_esm/errors/version.js +1 -1
- package/_esm/index.js.map +1 -1
- package/_esm/tempo/Abis.js +1214 -34
- package/_esm/tempo/Abis.js.map +1 -1
- package/_esm/tempo/Addresses.js +2 -0
- package/_esm/tempo/Addresses.js.map +1 -1
- package/_esm/tempo/Decorator.js +12 -0
- package/_esm/tempo/Decorator.js.map +1 -1
- package/_esm/tempo/Selectors.js +6 -3
- package/_esm/tempo/Selectors.js.map +1 -1
- package/_esm/tempo/actions/index.js +1 -0
- package/_esm/tempo/actions/index.js.map +1 -1
- package/_esm/tempo/actions/propAmm.js +539 -0
- package/_esm/tempo/actions/propAmm.js.map +1 -0
- package/_esm/tokens/definitions/eurc.js +1 -0
- package/_esm/tokens/definitions/eurc.js.map +1 -1
- package/_esm/tokens/definitions/usdc.js +1 -0
- package/_esm/tokens/definitions/usdc.js.map +1 -1
- package/_esm/utils/formatters/formatter.js +1 -0
- package/_esm/utils/formatters/formatter.js.map +1 -1
- package/_types/actions/index.d.ts +1 -0
- package/_types/actions/index.d.ts.map +1 -1
- package/_types/actions/public/getStorageValues.d.ts +59 -0
- package/_types/actions/public/getStorageValues.d.ts.map +1 -0
- package/_types/actions/public/simulateBlocks.d.ts +8 -0
- package/_types/actions/public/simulateBlocks.d.ts.map +1 -1
- package/_types/celo/chainConfig.d.ts +6 -840
- package/_types/celo/chainConfig.d.ts.map +1 -1
- package/_types/celo/formatters.d.ts +4 -421
- package/_types/celo/formatters.d.ts.map +1 -1
- package/_types/chains/definitions/abstract.d.ts +4 -371
- package/_types/chains/definitions/abstract.d.ts.map +1 -1
- package/_types/chains/definitions/abstractTestnet.d.ts +4 -371
- package/_types/chains/definitions/abstractTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/ancient8.d.ts +3 -226
- package/_types/chains/definitions/ancient8.d.ts.map +1 -1
- package/_types/chains/definitions/ancient8Sepolia.d.ts +3 -226
- package/_types/chains/definitions/ancient8Sepolia.d.ts.map +1 -1
- package/_types/chains/definitions/base.d.ts +6 -452
- package/_types/chains/definitions/base.d.ts.map +1 -1
- package/_types/chains/definitions/baseGoerli.d.ts +3 -226
- package/_types/chains/definitions/baseGoerli.d.ts.map +1 -1
- package/_types/chains/definitions/baseSepolia.d.ts +6 -452
- package/_types/chains/definitions/baseSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/battlechain.d.ts +4 -371
- package/_types/chains/definitions/battlechain.d.ts.map +1 -1
- package/_types/chains/definitions/battlechainTestnet.d.ts +4 -371
- package/_types/chains/definitions/battlechainTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/blast.d.ts +3 -226
- package/_types/chains/definitions/blast.d.ts.map +1 -1
- package/_types/chains/definitions/bob.d.ts +3 -226
- package/_types/chains/definitions/bob.d.ts.map +1 -1
- package/_types/chains/definitions/bobSepolia.d.ts +3 -226
- package/_types/chains/definitions/bobSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/celo.d.ts +6 -840
- package/_types/chains/definitions/celo.d.ts.map +1 -1
- package/_types/chains/definitions/celoAlfajores.d.ts +6 -840
- package/_types/chains/definitions/celoAlfajores.d.ts.map +1 -1
- package/_types/chains/definitions/celoSepolia.d.ts +6 -840
- package/_types/chains/definitions/celoSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/codex.d.ts +3 -226
- package/_types/chains/definitions/codex.d.ts.map +1 -1
- package/_types/chains/definitions/codexTestnet.d.ts +3 -226
- package/_types/chains/definitions/codexTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/dchain.d.ts +3 -226
- package/_types/chains/definitions/dchain.d.ts.map +1 -1
- package/_types/chains/definitions/dchainTestnet.d.ts +3 -226
- package/_types/chains/definitions/dchainTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/elysiumTestnet.d.ts +3 -226
- package/_types/chains/definitions/elysiumTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/fraxtal.d.ts +3 -226
- package/_types/chains/definitions/fraxtal.d.ts.map +1 -1
- package/_types/chains/definitions/fraxtalTestnet.d.ts +3 -226
- package/_types/chains/definitions/fraxtalTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/funkiMainnet.d.ts +3 -226
- package/_types/chains/definitions/funkiMainnet.d.ts.map +1 -1
- package/_types/chains/definitions/funkiSepolia.d.ts +3 -226
- package/_types/chains/definitions/funkiSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/garnet.d.ts +3 -226
- package/_types/chains/definitions/garnet.d.ts.map +1 -1
- package/_types/chains/definitions/giwaSepolia.d.ts +6 -452
- package/_types/chains/definitions/giwaSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/ink.d.ts +3 -226
- package/_types/chains/definitions/ink.d.ts.map +1 -1
- package/_types/chains/definitions/inkSepolia.d.ts +3 -226
- package/_types/chains/definitions/inkSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/lisk.d.ts +3 -226
- package/_types/chains/definitions/lisk.d.ts.map +1 -1
- package/_types/chains/definitions/liskSepolia.d.ts +3 -226
- package/_types/chains/definitions/liskSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/megaeth.d.ts +3 -226
- package/_types/chains/definitions/megaeth.d.ts.map +1 -1
- package/_types/chains/definitions/metalL2.d.ts +3 -226
- package/_types/chains/definitions/metalL2.d.ts.map +1 -1
- package/_types/chains/definitions/mode.d.ts +3 -226
- package/_types/chains/definitions/mode.d.ts.map +1 -1
- package/_types/chains/definitions/modeTestnet.d.ts +3 -226
- package/_types/chains/definitions/modeTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/optimism.d.ts +3 -226
- package/_types/chains/definitions/optimism.d.ts.map +1 -1
- package/_types/chains/definitions/optimismGoerli.d.ts +3 -226
- package/_types/chains/definitions/optimismGoerli.d.ts.map +1 -1
- package/_types/chains/definitions/optimismSepolia.d.ts +3 -226
- package/_types/chains/definitions/optimismSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/pgn.d.ts +3 -226
- package/_types/chains/definitions/pgn.d.ts.map +1 -1
- package/_types/chains/definitions/pgnTestnet.d.ts +3 -226
- package/_types/chains/definitions/pgnTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/playfiAlbireo.d.ts +4 -371
- package/_types/chains/definitions/playfiAlbireo.d.ts.map +1 -1
- package/_types/chains/definitions/pyrope.d.ts +3 -226
- package/_types/chains/definitions/pyrope.d.ts.map +1 -1
- package/_types/chains/definitions/rabbitChainTestnet.d.ts +51 -0
- package/_types/chains/definitions/rabbitChainTestnet.d.ts.map +1 -0
- package/_types/chains/definitions/redstone.d.ts +3 -226
- package/_types/chains/definitions/redstone.d.ts.map +1 -1
- package/_types/chains/definitions/rss3.d.ts +3 -226
- package/_types/chains/definitions/rss3.d.ts.map +1 -1
- package/_types/chains/definitions/rss3Sepolia.d.ts +3 -226
- package/_types/chains/definitions/rss3Sepolia.d.ts.map +1 -1
- package/_types/chains/definitions/shape.d.ts +3 -226
- package/_types/chains/definitions/shape.d.ts.map +1 -1
- package/_types/chains/definitions/shapeSepolia.d.ts +3 -226
- package/_types/chains/definitions/shapeSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/snax.d.ts +3 -226
- package/_types/chains/definitions/snax.d.ts.map +1 -1
- package/_types/chains/definitions/snaxTestnet.d.ts +3 -226
- package/_types/chains/definitions/snaxTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/soneium.d.ts +3 -226
- package/_types/chains/definitions/soneium.d.ts.map +1 -1
- package/_types/chains/definitions/soneiumMinato.d.ts +3 -226
- package/_types/chains/definitions/soneiumMinato.d.ts.map +1 -1
- package/_types/chains/definitions/sophon.d.ts +4 -371
- package/_types/chains/definitions/sophon.d.ts.map +1 -1
- package/_types/chains/definitions/sophonTestnet.d.ts +4 -371
- package/_types/chains/definitions/sophonTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/superseed.d.ts +3 -226
- package/_types/chains/definitions/superseed.d.ts.map +1 -1
- package/_types/chains/definitions/superseedSepolia.d.ts +3 -226
- package/_types/chains/definitions/superseedSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/swellchain.d.ts +3 -226
- package/_types/chains/definitions/swellchain.d.ts.map +1 -1
- package/_types/chains/definitions/swellchainTestnet.d.ts +3 -226
- package/_types/chains/definitions/swellchainTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/tempo.d.ts +6 -910
- package/_types/chains/definitions/tempo.d.ts.map +1 -1
- package/_types/chains/definitions/tempoDevnet.d.ts +6 -910
- package/_types/chains/definitions/tempoDevnet.d.ts.map +1 -1
- package/_types/chains/definitions/tempoLocalnet.d.ts +6 -910
- package/_types/chains/definitions/tempoLocalnet.d.ts.map +1 -1
- package/_types/chains/definitions/tempoModerato.d.ts +6 -910
- package/_types/chains/definitions/tempoModerato.d.ts.map +1 -1
- package/_types/chains/definitions/treasure.d.ts +4 -371
- package/_types/chains/definitions/treasure.d.ts.map +1 -1
- package/_types/chains/definitions/treasureTopaz.d.ts +4 -371
- package/_types/chains/definitions/treasureTopaz.d.ts.map +1 -1
- package/_types/chains/definitions/unichain.d.ts +3 -226
- package/_types/chains/definitions/unichain.d.ts.map +1 -1
- package/_types/chains/definitions/unichainSepolia.d.ts +3 -226
- package/_types/chains/definitions/unichainSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/whitechainSepolia.d.ts +3 -226
- package/_types/chains/definitions/whitechainSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/worldchain.d.ts +3 -226
- package/_types/chains/definitions/worldchain.d.ts.map +1 -1
- package/_types/chains/definitions/worldchainSepolia.d.ts +3 -226
- package/_types/chains/definitions/worldchainSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/zircuit.d.ts +3 -226
- package/_types/chains/definitions/zircuit.d.ts.map +1 -1
- package/_types/chains/definitions/zircuitGarfieldTestnet.d.ts +3 -226
- package/_types/chains/definitions/zircuitGarfieldTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/zksync.d.ts +4 -371
- package/_types/chains/definitions/zksync.d.ts.map +1 -1
- package/_types/chains/definitions/zksyncInMemoryNode.d.ts +4 -371
- package/_types/chains/definitions/zksyncInMemoryNode.d.ts.map +1 -1
- package/_types/chains/definitions/zksyncLocalCustomHyperchain.d.ts +4 -371
- package/_types/chains/definitions/zksyncLocalCustomHyperchain.d.ts.map +1 -1
- package/_types/chains/definitions/zksyncLocalHyperchain.d.ts +4 -371
- package/_types/chains/definitions/zksyncLocalHyperchain.d.ts.map +1 -1
- package/_types/chains/definitions/zksyncLocalNode.d.ts +4 -371
- package/_types/chains/definitions/zksyncLocalNode.d.ts.map +1 -1
- package/_types/chains/definitions/zksyncSepoliaTestnet.d.ts +4 -371
- package/_types/chains/definitions/zksyncSepoliaTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/zora.d.ts +3 -226
- package/_types/chains/definitions/zora.d.ts.map +1 -1
- package/_types/chains/definitions/zoraSepolia.d.ts +3 -226
- package/_types/chains/definitions/zoraSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/zoraTestnet.d.ts +3 -226
- package/_types/chains/definitions/zoraTestnet.d.ts.map +1 -1
- package/_types/chains/index.d.ts +1 -0
- package/_types/chains/index.d.ts.map +1 -1
- package/_types/clients/decorators/public.d.ts +11 -0
- package/_types/clients/decorators/public.d.ts.map +1 -1
- package/_types/errors/version.d.ts +1 -1
- package/_types/index.d.ts +1 -0
- package/_types/index.d.ts.map +1 -1
- package/_types/op-stack/chainConfig.d.ts +3 -226
- package/_types/op-stack/chainConfig.d.ts.map +1 -1
- package/_types/op-stack/formatters.d.ts +5 -228
- package/_types/op-stack/formatters.d.ts.map +1 -1
- package/_types/tempo/Abis.d.ts +14686 -9568
- package/_types/tempo/Abis.d.ts.map +1 -1
- package/_types/tempo/Addresses.d.ts +2 -0
- package/_types/tempo/Addresses.d.ts.map +1 -1
- package/_types/tempo/Decorator.d.ts +205 -1
- package/_types/tempo/Decorator.d.ts.map +1 -1
- package/_types/tempo/Selectors.d.ts +6 -3
- package/_types/tempo/Selectors.d.ts.map +1 -1
- package/_types/tempo/actions/earn.d.ts +621 -1
- package/_types/tempo/actions/earn.d.ts.map +1 -1
- package/_types/tempo/actions/index.d.ts +1 -0
- package/_types/tempo/actions/index.d.ts.map +1 -1
- package/_types/tempo/actions/propAmm.d.ts +2228 -0
- package/_types/tempo/actions/propAmm.d.ts.map +1 -0
- package/_types/tempo/chainConfig.d.ts +4 -457
- package/_types/tempo/chainConfig.d.ts.map +1 -1
- package/_types/tokens/definitions/eurc.d.ts +1 -0
- package/_types/tokens/definitions/eurc.d.ts.map +1 -1
- package/_types/tokens/definitions/usdc.d.ts +1 -0
- package/_types/tokens/definitions/usdc.d.ts.map +1 -1
- package/_types/tokens/sets.d.ts +3 -0
- package/_types/tokens/sets.d.ts.map +1 -1
- package/_types/types/eip1193.d.ts +20 -0
- package/_types/types/eip1193.d.ts.map +1 -1
- package/_types/utils/formatters/block.d.ts +1 -1
- package/_types/utils/formatters/formatter.d.ts +1 -2
- package/_types/utils/formatters/formatter.d.ts.map +1 -1
- package/_types/utils/formatters/transaction.d.ts +1 -1
- package/_types/utils/formatters/transactionReceipt.d.ts +1 -1
- package/_types/utils/formatters/transactionRequest.d.ts +1 -1
- package/_types/zksync/chainConfig.d.ts +4 -371
- package/_types/zksync/chainConfig.d.ts.map +1 -1
- package/_types/zksync/formatters.d.ts +6 -374
- package/_types/zksync/formatters.d.ts.map +1 -1
- package/actions/index.ts +6 -0
- package/actions/public/getStorageValues.ts +93 -0
- package/actions/public/simulateBlocks.ts +13 -0
- package/chains/definitions/rabbitChainTestnet.ts +21 -0
- package/chains/index.ts +1 -0
- package/clients/decorators/public.ts +18 -0
- package/errors/version.ts +1 -1
- package/index.ts +5 -0
- package/package.json +1 -1
- package/tempo/Abis.ts +1218 -34
- package/tempo/Addresses.ts +2 -0
- package/tempo/Decorator.ts +239 -3
- package/tempo/Selectors.ts +10 -4
- package/tempo/actions/index.ts +1 -0
- package/tempo/actions/propAmm.ts +998 -0
- package/tokens/definitions/eurc.ts +1 -0
- package/tokens/definitions/usdc.ts +1 -0
- package/types/eip1193.ts +20 -0
- package/utils/formatters/formatter.ts +4 -4
|
@@ -1,392 +1,24 @@
|
|
|
1
|
-
import type { ZksyncRpcBlock } from './types/block.js';
|
|
2
|
-
import type {
|
|
3
|
-
import type { ZksyncRpcTransaction, ZksyncRpcTransactionReceipt, ZksyncTransaction, ZksyncTransactionRequest } from './types/transaction.js';
|
|
1
|
+
import type { ZksyncBlock, ZksyncRpcBlock } from './types/block.js';
|
|
2
|
+
import type { ZksyncRpcTransaction, ZksyncRpcTransactionReceipt, ZksyncRpcTransactionRequest, ZksyncTransaction, ZksyncTransactionReceipt, ZksyncTransactionRequest } from './types/transaction.js';
|
|
4
3
|
export declare const formatters: {
|
|
5
4
|
readonly block: {
|
|
6
5
|
exclude: [] | undefined;
|
|
7
|
-
format: (args: ZksyncRpcBlock, action?: string | undefined) =>
|
|
8
|
-
baseFeePerGas: bigint | null;
|
|
9
|
-
blobGasUsed: bigint;
|
|
10
|
-
difficulty: bigint;
|
|
11
|
-
excessBlobGas: bigint;
|
|
12
|
-
extraData: import("../index.js").Hex;
|
|
13
|
-
gasLimit: bigint;
|
|
14
|
-
gasUsed: bigint;
|
|
15
|
-
hash: `0x${string}` | null;
|
|
16
|
-
logsBloom: `0x${string}` | null;
|
|
17
|
-
miner: import("abitype").Address;
|
|
18
|
-
mixHash: import("../index.js").Hash;
|
|
19
|
-
nonce: `0x${string}` | null;
|
|
20
|
-
number: bigint | null;
|
|
21
|
-
parentBeaconBlockRoot?: `0x${string}` | undefined;
|
|
22
|
-
parentHash: import("../index.js").Hash;
|
|
23
|
-
receiptsRoot: import("../index.js").Hex;
|
|
24
|
-
sealFields: import("../index.js").Hex[];
|
|
25
|
-
sha3Uncles: import("../index.js").Hash;
|
|
26
|
-
size: bigint;
|
|
27
|
-
stateRoot: import("../index.js").Hash;
|
|
28
|
-
timestamp: bigint;
|
|
29
|
-
totalDifficulty: bigint | null;
|
|
30
|
-
transactions: `0x${string}`[] | ZksyncTransaction<boolean>[];
|
|
31
|
-
transactionsRoot: import("../index.js").Hash;
|
|
32
|
-
uncles: import("../index.js").Hash[];
|
|
33
|
-
withdrawals?: import("../index.js").Withdrawal[] | undefined | undefined;
|
|
34
|
-
withdrawalsRoot?: `0x${string}` | undefined;
|
|
35
|
-
l1BatchNumber: bigint | null;
|
|
36
|
-
l1BatchTimestamp: bigint | null;
|
|
37
|
-
} & {};
|
|
6
|
+
format: (args: ZksyncRpcBlock, action?: string | undefined) => ZksyncBlock;
|
|
38
7
|
type: "block";
|
|
39
8
|
};
|
|
40
9
|
readonly transaction: {
|
|
41
10
|
exclude: [] | undefined;
|
|
42
|
-
format: (args: ZksyncRpcTransaction, action?: string | undefined) =>
|
|
43
|
-
r: import("../index.js").Hex;
|
|
44
|
-
s: import("../index.js").Hex;
|
|
45
|
-
v: bigint;
|
|
46
|
-
to: import("abitype").Address | null;
|
|
47
|
-
from: import("abitype").Address;
|
|
48
|
-
gas: bigint;
|
|
49
|
-
nonce: number;
|
|
50
|
-
value: bigint;
|
|
51
|
-
blockHash: `0x${string}` | null;
|
|
52
|
-
blockNumber: bigint | null;
|
|
53
|
-
blockTimestamp?: bigint | undefined;
|
|
54
|
-
hash: import("../index.js").Hash;
|
|
55
|
-
input: import("../index.js").Hex;
|
|
56
|
-
transactionIndex: number | null;
|
|
57
|
-
typeHex: import("../index.js").Hex | null;
|
|
58
|
-
accessList?: undefined | undefined;
|
|
59
|
-
authorizationList?: undefined | undefined;
|
|
60
|
-
blobVersionedHashes?: undefined | undefined;
|
|
61
|
-
chainId?: number | undefined;
|
|
62
|
-
yParity?: undefined | undefined;
|
|
63
|
-
type: "legacy";
|
|
64
|
-
gasPrice: bigint;
|
|
65
|
-
maxFeePerBlobGas?: undefined | undefined;
|
|
66
|
-
maxFeePerGas?: undefined | undefined;
|
|
67
|
-
maxPriorityFeePerGas?: undefined | undefined;
|
|
68
|
-
l1BatchNumber: bigint | null;
|
|
69
|
-
l1BatchTxIndex: bigint | null;
|
|
70
|
-
} | {
|
|
71
|
-
blockHash: `0x${string}` | null;
|
|
72
|
-
blockNumber: bigint | null;
|
|
73
|
-
blockTimestamp?: bigint | undefined;
|
|
74
|
-
from: import("abitype").Address;
|
|
75
|
-
gas: bigint;
|
|
76
|
-
hash: import("../index.js").Hash;
|
|
77
|
-
input: import("../index.js").Hex;
|
|
78
|
-
nonce: number;
|
|
79
|
-
r: import("../index.js").Hex;
|
|
80
|
-
s: import("../index.js").Hex;
|
|
81
|
-
to: import("abitype").Address | null;
|
|
82
|
-
transactionIndex: number | null;
|
|
83
|
-
typeHex: import("../index.js").Hex | null;
|
|
84
|
-
v: bigint;
|
|
85
|
-
value: bigint;
|
|
86
|
-
yParity: number;
|
|
87
|
-
accessList: import("../index.js").AccessList;
|
|
88
|
-
authorizationList?: undefined | undefined;
|
|
89
|
-
blobVersionedHashes?: undefined | undefined;
|
|
90
|
-
chainId: number;
|
|
91
|
-
type: "eip2930";
|
|
92
|
-
gasPrice: bigint;
|
|
93
|
-
maxFeePerBlobGas?: undefined | undefined;
|
|
94
|
-
maxFeePerGas?: undefined | undefined;
|
|
95
|
-
maxPriorityFeePerGas?: undefined | undefined;
|
|
96
|
-
l1BatchNumber: bigint | null;
|
|
97
|
-
l1BatchTxIndex: bigint | null;
|
|
98
|
-
} | {
|
|
99
|
-
blockHash: `0x${string}` | null;
|
|
100
|
-
blockNumber: bigint | null;
|
|
101
|
-
blockTimestamp?: bigint | undefined;
|
|
102
|
-
from: import("abitype").Address;
|
|
103
|
-
gas: bigint;
|
|
104
|
-
hash: import("../index.js").Hash;
|
|
105
|
-
input: import("../index.js").Hex;
|
|
106
|
-
nonce: number;
|
|
107
|
-
r: import("../index.js").Hex;
|
|
108
|
-
s: import("../index.js").Hex;
|
|
109
|
-
to: import("abitype").Address | null;
|
|
110
|
-
transactionIndex: number | null;
|
|
111
|
-
typeHex: import("../index.js").Hex | null;
|
|
112
|
-
v: bigint;
|
|
113
|
-
value: bigint;
|
|
114
|
-
yParity: number;
|
|
115
|
-
accessList: import("../index.js").AccessList;
|
|
116
|
-
authorizationList?: undefined | undefined;
|
|
117
|
-
blobVersionedHashes?: undefined | undefined;
|
|
118
|
-
chainId: number;
|
|
119
|
-
type: "eip1559";
|
|
120
|
-
gasPrice?: undefined | undefined;
|
|
121
|
-
maxFeePerBlobGas?: undefined | undefined;
|
|
122
|
-
maxFeePerGas: bigint;
|
|
123
|
-
maxPriorityFeePerGas: bigint;
|
|
124
|
-
l1BatchNumber: bigint | null;
|
|
125
|
-
l1BatchTxIndex: bigint | null;
|
|
126
|
-
} | {
|
|
127
|
-
blockHash: `0x${string}` | null;
|
|
128
|
-
blockNumber: bigint | null;
|
|
129
|
-
blockTimestamp?: bigint | undefined;
|
|
130
|
-
from: import("abitype").Address;
|
|
131
|
-
gas: bigint;
|
|
132
|
-
hash: import("../index.js").Hash;
|
|
133
|
-
input: import("../index.js").Hex;
|
|
134
|
-
nonce: number;
|
|
135
|
-
r: import("../index.js").Hex;
|
|
136
|
-
s: import("../index.js").Hex;
|
|
137
|
-
to: import("abitype").Address | null;
|
|
138
|
-
transactionIndex: number | null;
|
|
139
|
-
typeHex: import("../index.js").Hex | null;
|
|
140
|
-
v: bigint;
|
|
141
|
-
value: bigint;
|
|
142
|
-
yParity: number;
|
|
143
|
-
accessList: import("../index.js").AccessList;
|
|
144
|
-
authorizationList?: undefined | undefined;
|
|
145
|
-
blobVersionedHashes: readonly import("../index.js").Hex[];
|
|
146
|
-
chainId: number;
|
|
147
|
-
type: "eip4844";
|
|
148
|
-
gasPrice?: undefined | undefined;
|
|
149
|
-
maxFeePerBlobGas: bigint;
|
|
150
|
-
maxFeePerGas: bigint;
|
|
151
|
-
maxPriorityFeePerGas: bigint;
|
|
152
|
-
l1BatchNumber: bigint | null;
|
|
153
|
-
l1BatchTxIndex: bigint | null;
|
|
154
|
-
} | {
|
|
155
|
-
blockHash: `0x${string}` | null;
|
|
156
|
-
blockNumber: bigint | null;
|
|
157
|
-
blockTimestamp?: bigint | undefined;
|
|
158
|
-
from: import("abitype").Address;
|
|
159
|
-
gas: bigint;
|
|
160
|
-
hash: import("../index.js").Hash;
|
|
161
|
-
input: import("../index.js").Hex;
|
|
162
|
-
nonce: number;
|
|
163
|
-
r: import("../index.js").Hex;
|
|
164
|
-
s: import("../index.js").Hex;
|
|
165
|
-
to: import("abitype").Address | null;
|
|
166
|
-
transactionIndex: number | null;
|
|
167
|
-
typeHex: import("../index.js").Hex | null;
|
|
168
|
-
v: bigint;
|
|
169
|
-
value: bigint;
|
|
170
|
-
yParity: number;
|
|
171
|
-
accessList: import("../index.js").AccessList;
|
|
172
|
-
authorizationList: import("../index.js").SignedAuthorizationList;
|
|
173
|
-
blobVersionedHashes?: undefined | undefined;
|
|
174
|
-
chainId: number;
|
|
175
|
-
type: "eip7702";
|
|
176
|
-
gasPrice?: undefined | undefined;
|
|
177
|
-
maxFeePerBlobGas?: undefined | undefined;
|
|
178
|
-
maxFeePerGas: bigint;
|
|
179
|
-
maxPriorityFeePerGas: bigint;
|
|
180
|
-
l1BatchNumber: bigint | null;
|
|
181
|
-
l1BatchTxIndex: bigint | null;
|
|
182
|
-
} | {
|
|
183
|
-
blockHash: `0x${string}` | null;
|
|
184
|
-
blockNumber: bigint | null;
|
|
185
|
-
blockTimestamp?: bigint | undefined;
|
|
186
|
-
from: import("abitype").Address;
|
|
187
|
-
gas: bigint;
|
|
188
|
-
hash: import("../index.js").Hash;
|
|
189
|
-
input: import("../index.js").Hex;
|
|
190
|
-
nonce: number;
|
|
191
|
-
r: import("../index.js").Hex;
|
|
192
|
-
s: import("../index.js").Hex;
|
|
193
|
-
to: import("abitype").Address | null;
|
|
194
|
-
transactionIndex: number | null;
|
|
195
|
-
typeHex: import("../index.js").Hex | null;
|
|
196
|
-
v: bigint;
|
|
197
|
-
value: bigint;
|
|
198
|
-
yParity: number;
|
|
199
|
-
l1BatchNumber: bigint | null;
|
|
200
|
-
l1BatchTxIndex: bigint | null;
|
|
201
|
-
gasPrice?: undefined | undefined;
|
|
202
|
-
maxFeePerBlobGas?: undefined | undefined;
|
|
203
|
-
maxFeePerGas: bigint;
|
|
204
|
-
maxPriorityFeePerGas: bigint;
|
|
205
|
-
type: "priority";
|
|
206
|
-
} | {
|
|
207
|
-
blockHash: `0x${string}` | null;
|
|
208
|
-
blockNumber: bigint | null;
|
|
209
|
-
blockTimestamp?: bigint | undefined;
|
|
210
|
-
from: import("abitype").Address;
|
|
211
|
-
gas: bigint;
|
|
212
|
-
hash: import("../index.js").Hash;
|
|
213
|
-
input: import("../index.js").Hex;
|
|
214
|
-
nonce: number;
|
|
215
|
-
r: import("../index.js").Hex;
|
|
216
|
-
s: import("../index.js").Hex;
|
|
217
|
-
to: import("abitype").Address | null;
|
|
218
|
-
transactionIndex: number | null;
|
|
219
|
-
typeHex: import("../index.js").Hex | null;
|
|
220
|
-
v: bigint;
|
|
221
|
-
value: bigint;
|
|
222
|
-
yParity: number;
|
|
223
|
-
l1BatchNumber: bigint | null;
|
|
224
|
-
l1BatchTxIndex: bigint | null;
|
|
225
|
-
gasPrice?: undefined | undefined;
|
|
226
|
-
maxFeePerBlobGas?: undefined | undefined;
|
|
227
|
-
maxFeePerGas: bigint;
|
|
228
|
-
maxPriorityFeePerGas: bigint;
|
|
229
|
-
type: "eip712" | "priority";
|
|
230
|
-
}) & {};
|
|
11
|
+
format: (args: ZksyncRpcTransaction, action?: string | undefined) => ZksyncTransaction;
|
|
231
12
|
type: "transaction";
|
|
232
13
|
};
|
|
233
14
|
readonly transactionReceipt: {
|
|
234
15
|
exclude: [] | undefined;
|
|
235
|
-
format: (args: ZksyncRpcTransactionReceipt, action?: string | undefined) =>
|
|
236
|
-
type: import("./types/transaction.js").ZksyncTransactionType;
|
|
237
|
-
contractAddress: import("abitype").Address | null | undefined;
|
|
238
|
-
to: import("abitype").Address | null;
|
|
239
|
-
from: import("abitype").Address;
|
|
240
|
-
blockHash: import("../index.js").Hash;
|
|
241
|
-
blockNumber: bigint;
|
|
242
|
-
blockTimestamp?: bigint | undefined;
|
|
243
|
-
transactionIndex: number;
|
|
244
|
-
status: "success" | "reverted";
|
|
245
|
-
transactionHash: import("../index.js").Hash;
|
|
246
|
-
logsBloom: import("../index.js").Hex;
|
|
247
|
-
blobGasUsed?: bigint | undefined;
|
|
248
|
-
gasUsed: bigint;
|
|
249
|
-
blobGasPrice?: bigint | undefined;
|
|
250
|
-
cumulativeGasUsed: bigint;
|
|
251
|
-
effectiveGasPrice: bigint;
|
|
252
|
-
root?: `0x${string}` | undefined;
|
|
253
|
-
l1BatchNumber: bigint | null;
|
|
254
|
-
l1BatchTxIndex: bigint | null;
|
|
255
|
-
logs: ZksyncLog[];
|
|
256
|
-
l2ToL1Logs: ZksyncL2ToL1Log[];
|
|
257
|
-
} & {};
|
|
16
|
+
format: (args: ZksyncRpcTransactionReceipt, action?: string | undefined) => ZksyncTransactionReceipt;
|
|
258
17
|
type: "transactionReceipt";
|
|
259
18
|
};
|
|
260
19
|
readonly transactionRequest: {
|
|
261
20
|
exclude: ("paymaster" | "gasPerPubdata" | "factoryDeps" | "paymasterInput" | "customSignature")[] | undefined;
|
|
262
|
-
format: (args: ZksyncTransactionRequest, action?: string | undefined) =>
|
|
263
|
-
data?: `0x${string}` | undefined;
|
|
264
|
-
from?: `0x${string}` | undefined;
|
|
265
|
-
gas?: `0x${string}` | undefined;
|
|
266
|
-
nonce?: `0x${string}` | undefined;
|
|
267
|
-
to?: `0x${string}` | null | undefined;
|
|
268
|
-
type?: "0x0" | undefined;
|
|
269
|
-
value?: `0x${string}` | undefined;
|
|
270
|
-
gasPrice?: `0x${string}` | undefined;
|
|
271
|
-
maxFeePerBlobGas?: undefined | undefined;
|
|
272
|
-
maxFeePerGas?: undefined | undefined;
|
|
273
|
-
maxPriorityFeePerGas?: undefined | undefined;
|
|
274
|
-
blobs?: undefined;
|
|
275
|
-
blobVersionedHashes?: undefined;
|
|
276
|
-
kzg?: undefined;
|
|
277
|
-
accessList?: undefined;
|
|
278
|
-
sidecars?: undefined;
|
|
279
|
-
authorizationList?: undefined;
|
|
280
|
-
eip712Meta?: undefined | undefined;
|
|
281
|
-
} | {
|
|
282
|
-
data?: `0x${string}` | undefined;
|
|
283
|
-
from?: `0x${string}` | undefined;
|
|
284
|
-
gas?: `0x${string}` | undefined;
|
|
285
|
-
nonce?: `0x${string}` | undefined;
|
|
286
|
-
to?: `0x${string}` | null | undefined;
|
|
287
|
-
type?: "0x1" | undefined;
|
|
288
|
-
value?: `0x${string}` | undefined;
|
|
289
|
-
gasPrice?: `0x${string}` | undefined;
|
|
290
|
-
maxFeePerBlobGas?: undefined | undefined;
|
|
291
|
-
maxFeePerGas?: undefined | undefined;
|
|
292
|
-
maxPriorityFeePerGas?: undefined | undefined;
|
|
293
|
-
accessList?: import("../index.js").AccessList | undefined;
|
|
294
|
-
blobs?: undefined;
|
|
295
|
-
blobVersionedHashes?: undefined;
|
|
296
|
-
kzg?: undefined;
|
|
297
|
-
sidecars?: undefined;
|
|
298
|
-
authorizationList?: undefined;
|
|
299
|
-
eip712Meta?: undefined | undefined;
|
|
300
|
-
} | {
|
|
301
|
-
data?: `0x${string}` | undefined;
|
|
302
|
-
from?: `0x${string}` | undefined;
|
|
303
|
-
gas?: `0x${string}` | undefined;
|
|
304
|
-
nonce?: `0x${string}` | undefined;
|
|
305
|
-
to?: `0x${string}` | null | undefined;
|
|
306
|
-
type?: "0x2" | undefined;
|
|
307
|
-
value?: `0x${string}` | undefined;
|
|
308
|
-
gasPrice?: undefined | undefined;
|
|
309
|
-
maxFeePerBlobGas?: undefined | undefined;
|
|
310
|
-
maxFeePerGas?: `0x${string}` | undefined;
|
|
311
|
-
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
|
312
|
-
accessList?: import("../index.js").AccessList | undefined;
|
|
313
|
-
blobs?: undefined;
|
|
314
|
-
blobVersionedHashes?: undefined;
|
|
315
|
-
kzg?: undefined;
|
|
316
|
-
sidecars?: undefined;
|
|
317
|
-
authorizationList?: undefined;
|
|
318
|
-
eip712Meta?: undefined | undefined;
|
|
319
|
-
} | {
|
|
320
|
-
type?: "0x3" | undefined;
|
|
321
|
-
data?: `0x${string}` | undefined;
|
|
322
|
-
from?: `0x${string}` | undefined;
|
|
323
|
-
gas?: `0x${string}` | undefined;
|
|
324
|
-
nonce?: `0x${string}` | undefined;
|
|
325
|
-
value?: `0x${string}` | undefined;
|
|
326
|
-
to: `0x${string}` | null;
|
|
327
|
-
gasPrice?: undefined | undefined;
|
|
328
|
-
maxFeePerBlobGas?: `0x${string}` | undefined;
|
|
329
|
-
maxFeePerGas?: `0x${string}` | undefined;
|
|
330
|
-
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
|
331
|
-
accessList?: import("../index.js").AccessList | undefined;
|
|
332
|
-
sidecars?: readonly import("../index.js").BlobSidecar<`0x${string}`>[] | undefined;
|
|
333
|
-
blobs?: readonly `0x${string}`[] | readonly import("../index.js").ByteArray[] | undefined;
|
|
334
|
-
blobVersionedHashes: readonly import("../index.js").Hex[];
|
|
335
|
-
kzg?: undefined;
|
|
336
|
-
authorizationList?: undefined;
|
|
337
|
-
eip712Meta?: undefined | undefined;
|
|
338
|
-
} | {
|
|
339
|
-
type?: "0x3" | undefined;
|
|
340
|
-
data?: `0x${string}` | undefined;
|
|
341
|
-
from?: `0x${string}` | undefined;
|
|
342
|
-
gas?: `0x${string}` | undefined;
|
|
343
|
-
nonce?: `0x${string}` | undefined;
|
|
344
|
-
value?: `0x${string}` | undefined;
|
|
345
|
-
to: `0x${string}` | null;
|
|
346
|
-
gasPrice?: undefined | undefined;
|
|
347
|
-
maxFeePerBlobGas?: `0x${string}` | undefined;
|
|
348
|
-
maxFeePerGas?: `0x${string}` | undefined;
|
|
349
|
-
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
|
350
|
-
accessList?: import("../index.js").AccessList | undefined;
|
|
351
|
-
sidecars?: readonly import("../index.js").BlobSidecar<`0x${string}`>[] | undefined;
|
|
352
|
-
blobs: readonly import("../index.js").Hex[] | readonly import("../index.js").ByteArray[];
|
|
353
|
-
blobVersionedHashes?: readonly `0x${string}`[] | undefined;
|
|
354
|
-
kzg?: import("../index.js").Kzg | undefined;
|
|
355
|
-
authorizationList?: undefined;
|
|
356
|
-
eip712Meta?: undefined | undefined;
|
|
357
|
-
} | {
|
|
358
|
-
type?: "0x4" | undefined;
|
|
359
|
-
gasPrice?: undefined | undefined;
|
|
360
|
-
maxFeePerBlobGas?: undefined | undefined;
|
|
361
|
-
maxFeePerGas?: `0x${string}` | undefined;
|
|
362
|
-
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
|
363
|
-
to?: `0x${string}` | null | undefined;
|
|
364
|
-
data?: `0x${string}` | undefined;
|
|
365
|
-
from?: `0x${string}` | undefined;
|
|
366
|
-
gas?: `0x${string}` | undefined;
|
|
367
|
-
nonce?: `0x${string}` | undefined;
|
|
368
|
-
value?: `0x${string}` | undefined;
|
|
369
|
-
accessList?: import("../index.js").AccessList | undefined;
|
|
370
|
-
authorizationList?: import("../index.js").RpcAuthorizationList | undefined;
|
|
371
|
-
blobs?: undefined;
|
|
372
|
-
blobVersionedHashes?: undefined;
|
|
373
|
-
kzg?: undefined;
|
|
374
|
-
sidecars?: undefined;
|
|
375
|
-
eip712Meta?: undefined | undefined;
|
|
376
|
-
} | {
|
|
377
|
-
data?: `0x${string}` | undefined;
|
|
378
|
-
from?: `0x${string}` | undefined;
|
|
379
|
-
gas?: `0x${string}` | undefined;
|
|
380
|
-
nonce?: `0x${string}` | undefined;
|
|
381
|
-
to?: `0x${string}` | null | undefined;
|
|
382
|
-
type: "0xff" | "0x71";
|
|
383
|
-
value?: `0x${string}` | undefined;
|
|
384
|
-
gasPrice?: undefined | undefined;
|
|
385
|
-
maxFeePerBlobGas?: undefined | undefined;
|
|
386
|
-
maxFeePerGas?: `0x${string}` | undefined;
|
|
387
|
-
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
|
388
|
-
eip712Meta: import("./index.js").ZkSyncEip712Meta;
|
|
389
|
-
}) & {
|
|
21
|
+
format: (args: ZksyncTransactionRequest, action?: string | undefined) => ZksyncRpcTransactionRequest & {
|
|
390
22
|
paymaster: never;
|
|
391
23
|
gasPerPubdata: never;
|
|
392
24
|
factoryDeps: never;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../../zksync/formatters.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../../zksync/formatters.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEnE,OAAO,KAAK,EACV,oBAAoB,EACpB,2BAA2B,EAC3B,2BAA2B,EAC3B,iBAAiB,EACjB,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,wBAAwB,CAAA;AAE/B,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4Ha,CAAA"}
|
package/actions/index.ts
CHANGED
|
@@ -212,6 +212,12 @@ export {
|
|
|
212
212
|
type GetStorageAtReturnType,
|
|
213
213
|
getStorageAt,
|
|
214
214
|
} from './public/getStorageAt.js'
|
|
215
|
+
export {
|
|
216
|
+
type GetStorageValuesErrorType,
|
|
217
|
+
type GetStorageValuesParameters,
|
|
218
|
+
type GetStorageValuesReturnType,
|
|
219
|
+
getStorageValues,
|
|
220
|
+
} from './public/getStorageValues.js'
|
|
215
221
|
export {
|
|
216
222
|
type GetTransactionErrorType,
|
|
217
223
|
type GetTransactionParameters,
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type { Address } from 'abitype'
|
|
2
|
+
|
|
3
|
+
import type { Client } from '../../clients/createClient.js'
|
|
4
|
+
import type { Transport } from '../../clients/transports/createTransport.js'
|
|
5
|
+
import type { ErrorType } from '../../errors/utils.js'
|
|
6
|
+
import type { BlockTag } from '../../types/block.js'
|
|
7
|
+
import type { Chain } from '../../types/chain.js'
|
|
8
|
+
import type { Hash, Hex } from '../../types/misc.js'
|
|
9
|
+
import {
|
|
10
|
+
type FormatBlockParameterErrorType,
|
|
11
|
+
formatBlockParameter,
|
|
12
|
+
} from '../../utils/block/formatBlockParameter.js'
|
|
13
|
+
import type { RequestErrorType } from '../../utils/buildRequest.js'
|
|
14
|
+
|
|
15
|
+
export type GetStorageValuesParameters = {
|
|
16
|
+
/** Mapping of contract addresses to storage slot keys. */
|
|
17
|
+
requests: Record<Address, readonly Hex[]>
|
|
18
|
+
} & (
|
|
19
|
+
| {
|
|
20
|
+
blockNumber?: undefined
|
|
21
|
+
blockTag?: BlockTag | undefined
|
|
22
|
+
blockHash?: undefined
|
|
23
|
+
requireCanonical?: undefined
|
|
24
|
+
}
|
|
25
|
+
| {
|
|
26
|
+
blockNumber?: bigint | undefined
|
|
27
|
+
blockTag?: undefined
|
|
28
|
+
blockHash?: undefined
|
|
29
|
+
requireCanonical?: undefined
|
|
30
|
+
}
|
|
31
|
+
| {
|
|
32
|
+
blockNumber?: undefined
|
|
33
|
+
blockTag?: undefined
|
|
34
|
+
/** The storage values at a block specified by block hash. */
|
|
35
|
+
blockHash: Hash
|
|
36
|
+
/** Whether or not to throw an error if the block is not in the canonical chain. Only allowed in conjunction with `blockHash`. */
|
|
37
|
+
requireCanonical?: boolean | undefined
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
export type GetStorageValuesReturnType = Record<Address, Hex[]>
|
|
42
|
+
|
|
43
|
+
export type GetStorageValuesErrorType =
|
|
44
|
+
| FormatBlockParameterErrorType
|
|
45
|
+
| RequestErrorType
|
|
46
|
+
| ErrorType
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Returns values from multiple storage slots for multiple adddresses at a given block.
|
|
50
|
+
*
|
|
51
|
+
* - Docs: https://viem.sh/docs/actions/public/getStorageValues
|
|
52
|
+
* - JSON-RPC Methods: [`eth_getStorageValues`](https://github.com/ethereum/execution-apis/issues/752)
|
|
53
|
+
*
|
|
54
|
+
* @param client - Client to use
|
|
55
|
+
* @param parameters - {@link GetStorageValuesParameters}
|
|
56
|
+
* @returns The values of the requested storage slots. {@link GetStorageValuesReturnType}
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* import { createPublicClient, http, toHex } from 'viem'
|
|
60
|
+
* import { mainnet } from 'viem/chains'
|
|
61
|
+
* import { getStorageValues } from 'viem/actions'
|
|
62
|
+
*
|
|
63
|
+
* const client = createPublicClient({ chain: mainnet, transport: http() })
|
|
64
|
+
* const values = await getStorageValues(client, {
|
|
65
|
+
* requests: {
|
|
66
|
+
* '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2': [
|
|
67
|
+
* toHex(0, { size: 32 }),
|
|
68
|
+
* toHex(1, { size: 32 }),
|
|
69
|
+
* ],
|
|
70
|
+
* },
|
|
71
|
+
* })
|
|
72
|
+
*/
|
|
73
|
+
export async function getStorageValues<chain extends Chain | undefined>(
|
|
74
|
+
client: Client<Transport, chain>,
|
|
75
|
+
{
|
|
76
|
+
blockHash,
|
|
77
|
+
blockNumber,
|
|
78
|
+
blockTag = 'latest',
|
|
79
|
+
requireCanonical,
|
|
80
|
+
requests,
|
|
81
|
+
}: GetStorageValuesParameters,
|
|
82
|
+
): Promise<GetStorageValuesReturnType> {
|
|
83
|
+
const block = formatBlockParameter({
|
|
84
|
+
blockHash,
|
|
85
|
+
blockNumber,
|
|
86
|
+
blockTag,
|
|
87
|
+
requireCanonical,
|
|
88
|
+
})
|
|
89
|
+
return client.request({
|
|
90
|
+
method: 'eth_getStorageValues',
|
|
91
|
+
params: [requests, block],
|
|
92
|
+
})
|
|
93
|
+
}
|
|
@@ -115,6 +115,14 @@ export type SimulateBlocksReturnType<
|
|
|
115
115
|
data: Hex
|
|
116
116
|
gasUsed: bigint
|
|
117
117
|
logs?: Log[] | undefined
|
|
118
|
+
/**
|
|
119
|
+
* Gas used by the call as measured by the node before gas refunds are
|
|
120
|
+
* applied. `undefined` when the node does not report it.
|
|
121
|
+
*
|
|
122
|
+
* Note: this is a measurement of gas usage, not a guaranteed minimum
|
|
123
|
+
* sufficient gas limit for the call.
|
|
124
|
+
*/
|
|
125
|
+
maxUsedGas?: bigint | undefined
|
|
118
126
|
}
|
|
119
127
|
error: Error
|
|
120
128
|
mutability: AbiStateMutability
|
|
@@ -247,6 +255,8 @@ export async function simulateBlocks<
|
|
|
247
255
|
|
|
248
256
|
const data = call.error?.data ?? call.returnData
|
|
249
257
|
const gasUsed = BigInt(call.gasUsed)
|
|
258
|
+
const maxUsedGas =
|
|
259
|
+
call.maxUsedGas === undefined ? undefined : BigInt(call.maxUsedGas)
|
|
250
260
|
const logs = call.logs?.map((log) => formatLog(log))
|
|
251
261
|
const status = call.status === '0x1' ? 'success' : 'failure'
|
|
252
262
|
|
|
@@ -279,6 +289,9 @@ export async function simulateBlocks<
|
|
|
279
289
|
data,
|
|
280
290
|
gasUsed,
|
|
281
291
|
logs,
|
|
292
|
+
// only present when reported by the node, so existing consumers
|
|
293
|
+
// (and snapshots) are unaffected on nodes that omit it.
|
|
294
|
+
...(maxUsedGas === undefined ? {} : { maxUsedGas }),
|
|
282
295
|
status,
|
|
283
296
|
...(status === 'success'
|
|
284
297
|
? {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineChain } from '../../utils/chain/defineChain.js'
|
|
2
|
+
|
|
3
|
+
export const rabbitChainTestnet = /*#__PURE__*/ defineChain({
|
|
4
|
+
id: 9280,
|
|
5
|
+
name: 'Rabbit Chain Testnet',
|
|
6
|
+
nativeCurrency: {
|
|
7
|
+
decimals: 18,
|
|
8
|
+
name: 'Test Rabbit',
|
|
9
|
+
symbol: 'tRAB',
|
|
10
|
+
},
|
|
11
|
+
rpcUrls: {
|
|
12
|
+
default: { http: ['https://rpc-testnet.rabbitchain.org'] },
|
|
13
|
+
},
|
|
14
|
+
blockExplorers: {
|
|
15
|
+
default: {
|
|
16
|
+
name: 'Rabbit Chain Testnet Explorer',
|
|
17
|
+
url: 'https://explorer-testnet.rabbitchain.org',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
testnet: true,
|
|
21
|
+
})
|
package/chains/index.ts
CHANGED
|
@@ -517,6 +517,7 @@ export { qMainnet } from './definitions/qMainnet.js'
|
|
|
517
517
|
export { qTestnet } from './definitions/qTestnet.js'
|
|
518
518
|
export { quai } from './definitions/quai.js'
|
|
519
519
|
export { quaiTestnet } from './definitions/quaiTestnet.js'
|
|
520
|
+
export { rabbitChainTestnet } from './definitions/rabbitChainTestnet.js'
|
|
520
521
|
export { radius } from './definitions/radius.js'
|
|
521
522
|
export { radiusTestnet } from './definitions/radiusTestnet.js'
|
|
522
523
|
export { reactiveTestnet } from './definitions/reactiveTestnet.js'
|
|
@@ -170,6 +170,11 @@ import {
|
|
|
170
170
|
type GetStorageAtReturnType,
|
|
171
171
|
getStorageAt,
|
|
172
172
|
} from '../../actions/public/getStorageAt.js'
|
|
173
|
+
import {
|
|
174
|
+
type GetStorageValuesParameters,
|
|
175
|
+
type GetStorageValuesReturnType,
|
|
176
|
+
getStorageValues,
|
|
177
|
+
} from '../../actions/public/getStorageValues.js'
|
|
173
178
|
import {
|
|
174
179
|
type GetTransactionParameters,
|
|
175
180
|
type GetTransactionReturnType,
|
|
@@ -1413,6 +1418,18 @@ export type PublicActions<
|
|
|
1413
1418
|
getStorageAt: (
|
|
1414
1419
|
args: GetStorageAtParameters,
|
|
1415
1420
|
) => Promise<GetStorageAtReturnType>
|
|
1421
|
+
/**
|
|
1422
|
+
* Returns values from multiple storage slots at a given address and block.
|
|
1423
|
+
*
|
|
1424
|
+
* - Docs: https://viem.sh/docs/actions/public/getStorageValues
|
|
1425
|
+
* - JSON-RPC Methods: [`eth_getStorageValues`](https://github.com/ethereum/execution-apis/issues/752)
|
|
1426
|
+
*
|
|
1427
|
+
* @param args - {@link GetStorageValuesParameters}
|
|
1428
|
+
* @returns The values of the requested storage slots. {@link GetStorageValuesReturnType}
|
|
1429
|
+
*/
|
|
1430
|
+
getStorageValues: (
|
|
1431
|
+
args: GetStorageValuesParameters,
|
|
1432
|
+
) => Promise<GetStorageValuesReturnType>
|
|
1416
1433
|
/**
|
|
1417
1434
|
* Returns information about a [Transaction](https://viem.sh/docs/glossary/terms#transaction) given a hash or block identifier.
|
|
1418
1435
|
*
|
|
@@ -2347,6 +2364,7 @@ export function publicActions<
|
|
|
2347
2364
|
fillTransaction: (args) => fillTransaction(client, args),
|
|
2348
2365
|
getRawTransaction: (args) => getRawTransaction(client, args),
|
|
2349
2366
|
getStorageAt: (args) => getStorageAt(client, args),
|
|
2367
|
+
getStorageValues: (args) => getStorageValues(client, args),
|
|
2350
2368
|
getTransaction: (args) => getTransaction(client, args),
|
|
2351
2369
|
getTransactionConfirmations: (args) =>
|
|
2352
2370
|
getTransactionConfirmations(client, args),
|
package/errors/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '2.56.
|
|
1
|
+
export const version = '2.56.9'
|
package/index.ts
CHANGED
|
@@ -247,6 +247,11 @@ export type {
|
|
|
247
247
|
GetStorageAtParameters,
|
|
248
248
|
GetStorageAtReturnType,
|
|
249
249
|
} from './actions/public/getStorageAt.js'
|
|
250
|
+
export type {
|
|
251
|
+
GetStorageValuesErrorType,
|
|
252
|
+
GetStorageValuesParameters,
|
|
253
|
+
GetStorageValuesReturnType,
|
|
254
|
+
} from './actions/public/getStorageValues.js'
|
|
250
255
|
export type {
|
|
251
256
|
GetTransactionErrorType,
|
|
252
257
|
GetTransactionParameters,
|