viem 0.0.1-alpha.17 → 0.0.1-alpha.19
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/chains.js +5 -5
- package/dist/chains.mjs +1 -1
- package/dist/{chunk-KCXMY4FZ.js → chunk-24EKKMUO.js} +12 -12
- package/dist/{chunk-KCXMY4FZ.js.map → chunk-24EKKMUO.js.map} +0 -0
- package/dist/{chunk-XEGTPY6M.js → chunk-BZFF747V.js} +2 -2
- package/dist/{chunk-XEGTPY6M.js.map → chunk-BZFF747V.js.map} +0 -0
- package/dist/{chunk-BL2ZZ7UN.js → chunk-CTU4PQLY.js} +14 -14
- package/dist/{chunk-BL2ZZ7UN.js.map → chunk-CTU4PQLY.js.map} +0 -0
- package/dist/{chunk-HF44N2P3.mjs → chunk-E7LH5H76.mjs} +2 -2
- package/dist/{chunk-HF44N2P3.mjs.map → chunk-E7LH5H76.mjs.map} +0 -0
- package/dist/{chunk-EOY65E5E.js → chunk-HRE6LYF3.js} +13 -13
- package/dist/chunk-HRE6LYF3.js.map +1 -0
- package/dist/{chunk-KWHCOWNW.mjs → chunk-IVWG22RQ.mjs} +49 -3
- package/dist/chunk-IVWG22RQ.mjs.map +1 -0
- package/dist/{chunk-WQFS6KDQ.mjs → chunk-NSRORL3O.mjs} +2 -2
- package/dist/{chunk-WQFS6KDQ.mjs.map → chunk-NSRORL3O.mjs.map} +0 -0
- package/dist/{chunk-EVOCIEHK.js → chunk-NYMS65YI.js} +101 -55
- package/dist/chunk-NYMS65YI.js.map +1 -0
- package/dist/{chunk-KQI5IRRL.mjs → chunk-PHSAQQGZ.mjs} +2 -2
- package/dist/{chunk-KQI5IRRL.mjs.map → chunk-PHSAQQGZ.mjs.map} +0 -0
- package/dist/{chunk-JNAHFK7Z.mjs → chunk-VAT5CEF7.mjs} +2 -2
- package/dist/{chunk-JNAHFK7Z.mjs.map → chunk-VAT5CEF7.mjs.map} +1 -1
- package/dist/clients/index.d.ts +6 -6
- package/dist/clients/index.js +3 -3
- package/dist/clients/index.mjs +2 -2
- package/dist/{createClient-aadeff37.d.ts → createClient-03ba79e8.d.ts} +1 -1
- package/dist/{createPublicClient-88f35518.d.ts → createPublicClient-818241ba.d.ts} +2 -2
- package/dist/{createTestClient-fbf66ec2.d.ts → createTestClient-24eb7be8.d.ts} +2 -2
- package/dist/{createWalletClient-b13dabd6.d.ts → createWalletClient-7cbd6ad1.d.ts} +2 -2
- package/dist/{eip1193-3a40c941.d.ts → eip1193-71d8e27d.d.ts} +1 -1
- package/dist/index.d.ts +38 -16
- package/dist/index.js +10 -6
- package/dist/index.mjs +9 -5
- package/dist/{parseGwei-e6f49667.d.ts → parseGwei-dbd12305.d.ts} +1 -1
- package/dist/public.d.ts +7 -7
- package/dist/public.js +4 -4
- package/dist/public.mjs +3 -3
- package/dist/{sendTransaction-bd109cd4.d.ts → sendTransaction-d09961a7.d.ts} +1 -1
- package/dist/{stopImpersonatingAccount-6603ebdd.d.ts → stopImpersonatingAccount-c8a00be7.d.ts} +1 -1
- package/dist/test.d.ts +4 -4
- package/dist/test.js +3 -3
- package/dist/test.mjs +2 -2
- package/dist/{transactionReceipt-86c1094c.d.ts → transactionReceipt-aed524b4.d.ts} +1 -1
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/index.js +2 -2
- package/dist/utils/index.mjs +1 -1
- package/dist/wallet.d.ts +5 -5
- package/dist/wallet.js +3 -3
- package/dist/wallet.mjs +2 -2
- package/dist/{watchAsset-7ef25553.d.ts → watchAsset-c39645b7.d.ts} +2 -2
- package/dist/{watchPendingTransactions-2563071e.d.ts → watchPendingTransactions-01e6be4f.d.ts} +4 -4
- package/dist/{webSocket-2a77cdb3.d.ts → webSocket-3a00015b.d.ts} +1 -1
- package/dist/window.d.ts +1 -1
- package/package.json +1 -1
- package/src/actions/index.test.ts +2 -0
- package/src/actions/index.ts +6 -0
- package/src/actions/public/getStorageAt.test.ts +34 -0
- package/src/actions/public/getStorageAt.ts +32 -0
- package/src/actions/public/index.test.ts +2 -0
- package/src/actions/public/index.ts +9 -1
- package/src/actions/public/readContract.test.ts +128 -0
- package/src/actions/public/readContract.ts +87 -0
- package/src/actions/public/simulateContract.ts +1 -5
- package/src/actions/wallet/writeContract.ts +0 -5
- package/src/index.test.ts +2 -0
- package/src/index.ts +6 -0
- package/src/types/eip1193.ts +1 -1
- package/dist/chunk-EOY65E5E.js.map +0 -1
- package/dist/chunk-EVOCIEHK.js.map +0 -1
- package/dist/chunk-KWHCOWNW.mjs.map +0 -1
package/dist/index.mjs
CHANGED
@@ -8,7 +8,7 @@ import {
|
|
8
8
|
fallback,
|
9
9
|
http,
|
10
10
|
webSocket
|
11
|
-
} from "./chunk-
|
11
|
+
} from "./chunk-E7LH5H76.mjs";
|
12
12
|
import {
|
13
13
|
call,
|
14
14
|
createBlockFilter,
|
@@ -26,17 +26,19 @@ import {
|
|
26
26
|
getFilterLogs,
|
27
27
|
getGasPrice,
|
28
28
|
getLogs,
|
29
|
+
getStorageAt,
|
29
30
|
getTransaction,
|
30
31
|
getTransactionConfirmations,
|
31
32
|
getTransactionCount,
|
32
33
|
getTransactionReceipt,
|
34
|
+
readContract,
|
33
35
|
simulateContract,
|
34
36
|
uninstallFilter,
|
35
37
|
waitForTransactionReceipt,
|
36
38
|
watchBlockNumber,
|
37
39
|
watchBlocks,
|
38
40
|
watchPendingTransactions
|
39
|
-
} from "./chunk-
|
41
|
+
} from "./chunk-IVWG22RQ.mjs";
|
40
42
|
import {
|
41
43
|
dropTransaction,
|
42
44
|
getAutomine,
|
@@ -65,7 +67,7 @@ import {
|
|
65
67
|
setStorageAt,
|
66
68
|
snapshot,
|
67
69
|
stopImpersonatingAccount
|
68
|
-
} from "./chunk-
|
70
|
+
} from "./chunk-NSRORL3O.mjs";
|
69
71
|
import {
|
70
72
|
addChain,
|
71
73
|
getAccounts,
|
@@ -77,7 +79,7 @@ import {
|
|
77
79
|
switchChain,
|
78
80
|
watchAsset,
|
79
81
|
writeContract
|
80
|
-
} from "./chunk-
|
82
|
+
} from "./chunk-VAT5CEF7.mjs";
|
81
83
|
import {
|
82
84
|
AbiConstructorNotFoundError,
|
83
85
|
AbiConstructorParamsNotFoundError,
|
@@ -194,7 +196,7 @@ import {
|
|
194
196
|
transactionType,
|
195
197
|
trim,
|
196
198
|
weiUnits
|
197
|
-
} from "./chunk-
|
199
|
+
} from "./chunk-PHSAQQGZ.mjs";
|
198
200
|
export {
|
199
201
|
AbiConstructorNotFoundError,
|
200
202
|
AbiConstructorParamsNotFoundError,
|
@@ -311,6 +313,7 @@ export {
|
|
311
313
|
getGasPrice,
|
312
314
|
getLogs,
|
313
315
|
getPermissions,
|
316
|
+
getStorageAt,
|
314
317
|
getTransaction,
|
315
318
|
getTransactionConfirmations,
|
316
319
|
getTransactionCount,
|
@@ -341,6 +344,7 @@ export {
|
|
341
344
|
parseEther,
|
342
345
|
parseGwei,
|
343
346
|
parseUnit,
|
347
|
+
readContract,
|
344
348
|
removeBlockTimestampInterval,
|
345
349
|
requestAccounts,
|
346
350
|
requestPermissions,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { AbiParameter, AbiParametersToPrimitiveTypes, Abi, ExtractAbiErrorNames, ExtractAbiEventNames } from 'abitype';
|
2
2
|
import { b as Hex, A as Address, c as ByteArray } from './rpc-858670f1.js';
|
3
|
-
import {
|
3
|
+
import { a as ExtractFunctionNameFromAbi, c as ExtractResultFromAbi, g as ExtractConstructorArgsFromAbi, j as ExtractErrorArgsFromAbi, k as ExtractEventArgsFromAbi, b as ExtractArgsFromAbi } from './transactionReceipt-aed524b4.js';
|
4
4
|
|
5
5
|
type DecodeAbiArgs<TParams extends readonly AbiParameter[]> = {
|
6
6
|
data: Hex;
|
package/dist/public.d.ts
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
export { C as CallArgs, a as CallResponse, b as CreateBlockFilterResponse, c as CreatePendingTransactionFilterResponse, D as DeployContractArgs, e as DeployContractResponse, E as EstimateGasArgs, d as EstimateGasResponse, G as GetBalanceArgs, f as GetBalanceResponse, g as GetBlockArgs, h as GetBlockNumberArgs, i as GetBlockNumberResponse, j as GetBlockResponse, k as GetBlockTransactionCountArgs, l as GetBlockTransactionCountResponse, m as GetBytecodeArgs, n as GetBytecodeResponse, o as GetFeeHistoryArgs, p as GetFeeHistoryResponse, q as GetFilterChangesArgs, r as GetFilterChangesResponse, s as GetFilterLogsArgs, t as GetFilterLogsResponse, u as GetGasPriceResponse, v as GetTransactionArgs, w as GetTransactionConfirmationsArgs, x as GetTransactionConfirmationsResponse, y as GetTransactionCountArgs, z as GetTransactionCountResponse, B as GetTransactionReceiptArgs, F as GetTransactionReceiptResponse, A as GetTransactionResponse, O as OnBlock, H as OnBlockNumber, I as OnBlockNumberResponse, J as OnBlockResponse, K as OnTransactions, L as OnTransactionsResponse, an as ReplacementReason, ao as ReplacementResponse, S as SimulateContractArgs, M as SimulateContractResponse, U as UninstallFilterArgs, N as UninstallFilterResponse, W as WaitForTransactionReceiptArgs, P as WaitForTransactionReceiptResponse, Q as WatchBlockNumberArgs, R as WatchBlocksArgs, T as WatchPendingTransactionsArgs, Y as call, Z as createBlockFilter, _ as createPendingTransactionFilter, $ as deployContract, a0 as estimateGas, a1 as getBalance, a2 as getBlock, a3 as getBlockNumber, am as getBlockNumberCache, a4 as getBlockTransactionCount, a5 as getBytecode, a6 as getChainId, a7 as getFeeHistory, a8 as getFilterChanges, a9 as getFilterLogs, aa as getGasPrice, ab as getTransaction, ac as getTransactionConfirmations, ad as getTransactionCount, ae as getTransactionReceipt, af as simulateContract, ag as uninstallFilter, ah as waitForTransactionReceipt, ai as watchBlockNumber, aj as watchBlocks, ak as watchPendingTransactions } from './watchPendingTransactions-
|
1
|
+
export { C as CallArgs, a as CallResponse, b as CreateBlockFilterResponse, c as CreatePendingTransactionFilterResponse, D as DeployContractArgs, e as DeployContractResponse, E as EstimateGasArgs, d as EstimateGasResponse, G as GetBalanceArgs, f as GetBalanceResponse, g as GetBlockArgs, h as GetBlockNumberArgs, i as GetBlockNumberResponse, j as GetBlockResponse, k as GetBlockTransactionCountArgs, l as GetBlockTransactionCountResponse, m as GetBytecodeArgs, n as GetBytecodeResponse, o as GetFeeHistoryArgs, p as GetFeeHistoryResponse, q as GetFilterChangesArgs, r as GetFilterChangesResponse, s as GetFilterLogsArgs, t as GetFilterLogsResponse, u as GetGasPriceResponse, v as GetTransactionArgs, w as GetTransactionConfirmationsArgs, x as GetTransactionConfirmationsResponse, y as GetTransactionCountArgs, z as GetTransactionCountResponse, B as GetTransactionReceiptArgs, F as GetTransactionReceiptResponse, A as GetTransactionResponse, O as OnBlock, H as OnBlockNumber, I as OnBlockNumberResponse, J as OnBlockResponse, K as OnTransactions, L as OnTransactionsResponse, an as ReplacementReason, ao as ReplacementResponse, S as SimulateContractArgs, M as SimulateContractResponse, U as UninstallFilterArgs, N as UninstallFilterResponse, W as WaitForTransactionReceiptArgs, P as WaitForTransactionReceiptResponse, Q as WatchBlockNumberArgs, R as WatchBlocksArgs, T as WatchPendingTransactionsArgs, Y as call, Z as createBlockFilter, _ as createPendingTransactionFilter, $ as deployContract, a0 as estimateGas, a1 as getBalance, a2 as getBlock, a3 as getBlockNumber, am as getBlockNumberCache, a4 as getBlockTransactionCount, a5 as getBytecode, a6 as getChainId, a7 as getFeeHistory, a8 as getFilterChanges, a9 as getFilterLogs, aa as getGasPrice, ab as getTransaction, ac as getTransactionConfirmations, ad as getTransactionCount, ae as getTransactionReceipt, af as simulateContract, ag as uninstallFilter, ah as waitForTransactionReceipt, ai as watchBlockNumber, aj as watchBlocks, ak as watchPendingTransactions } from './watchPendingTransactions-01e6be4f.js';
|
2
2
|
import 'abitype';
|
3
3
|
import './chains.js';
|
4
4
|
import './rpc-858670f1.js';
|
5
5
|
import '@wagmi/chains';
|
6
|
-
import './transactionReceipt-
|
6
|
+
import './transactionReceipt-aed524b4.js';
|
7
7
|
import './transactionRequest-8e970b0e.js';
|
8
|
-
import './createPublicClient-
|
9
|
-
import './eip1193-
|
10
|
-
import './createClient-
|
11
|
-
import './createWalletClient-
|
12
|
-
import './sendTransaction-
|
8
|
+
import './createPublicClient-818241ba.js';
|
9
|
+
import './eip1193-71d8e27d.js';
|
10
|
+
import './createClient-03ba79e8.js';
|
11
|
+
import './createWalletClient-7cbd6ad1.js';
|
12
|
+
import './sendTransaction-d09961a7.js';
|
package/dist/public.js
CHANGED
@@ -25,9 +25,9 @@
|
|
25
25
|
|
26
26
|
|
27
27
|
|
28
|
-
var
|
29
|
-
require('./chunk-
|
30
|
-
require('./chunk-
|
28
|
+
var _chunkNYMS65YIjs = require('./chunk-NYMS65YI.js');
|
29
|
+
require('./chunk-HRE6LYF3.js');
|
30
|
+
require('./chunk-BZFF747V.js');
|
31
31
|
|
32
32
|
|
33
33
|
|
@@ -55,5 +55,5 @@ require('./chunk-XEGTPY6M.js');
|
|
55
55
|
|
56
56
|
|
57
57
|
|
58
|
-
exports.call =
|
58
|
+
exports.call = _chunkNYMS65YIjs.call; exports.createBlockFilter = _chunkNYMS65YIjs.createBlockFilter; exports.createPendingTransactionFilter = _chunkNYMS65YIjs.createPendingTransactionFilter; exports.deployContract = _chunkNYMS65YIjs.deployContract; exports.estimateGas = _chunkNYMS65YIjs.estimateGas; exports.getBalance = _chunkNYMS65YIjs.getBalance; exports.getBlock = _chunkNYMS65YIjs.getBlock; exports.getBlockNumber = _chunkNYMS65YIjs.getBlockNumber; exports.getBlockNumberCache = _chunkNYMS65YIjs.getBlockNumberCache; exports.getBlockTransactionCount = _chunkNYMS65YIjs.getBlockTransactionCount; exports.getBytecode = _chunkNYMS65YIjs.getBytecode; exports.getChainId = _chunkNYMS65YIjs.getChainId; exports.getFeeHistory = _chunkNYMS65YIjs.getFeeHistory; exports.getFilterChanges = _chunkNYMS65YIjs.getFilterChanges; exports.getFilterLogs = _chunkNYMS65YIjs.getFilterLogs; exports.getGasPrice = _chunkNYMS65YIjs.getGasPrice; exports.getTransaction = _chunkNYMS65YIjs.getTransaction; exports.getTransactionConfirmations = _chunkNYMS65YIjs.getTransactionConfirmations; exports.getTransactionCount = _chunkNYMS65YIjs.getTransactionCount; exports.getTransactionReceipt = _chunkNYMS65YIjs.getTransactionReceipt; exports.simulateContract = _chunkNYMS65YIjs.simulateContract; exports.uninstallFilter = _chunkNYMS65YIjs.uninstallFilter; exports.waitForTransactionReceipt = _chunkNYMS65YIjs.waitForTransactionReceipt; exports.watchBlockNumber = _chunkNYMS65YIjs.watchBlockNumber; exports.watchBlocks = _chunkNYMS65YIjs.watchBlocks; exports.watchPendingTransactions = _chunkNYMS65YIjs.watchPendingTransactions;
|
59
59
|
//# sourceMappingURL=public.js.map
|
package/dist/public.mjs
CHANGED
@@ -25,9 +25,9 @@ import {
|
|
25
25
|
watchBlockNumber,
|
26
26
|
watchBlocks,
|
27
27
|
watchPendingTransactions
|
28
|
-
} from "./chunk-
|
29
|
-
import "./chunk-
|
30
|
-
import "./chunk-
|
28
|
+
} from "./chunk-IVWG22RQ.mjs";
|
29
|
+
import "./chunk-VAT5CEF7.mjs";
|
30
|
+
import "./chunk-PHSAQQGZ.mjs";
|
31
31
|
export {
|
32
32
|
call,
|
33
33
|
createBlockFilter,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Formatter, Chain } from './chains.js';
|
2
2
|
import { M as MergeIntersectionProperties, v as TransactionRequest, H as Hash } from './rpc-858670f1.js';
|
3
|
-
import { W as WalletClient } from './createWalletClient-
|
3
|
+
import { W as WalletClient } from './createWalletClient-7cbd6ad1.js';
|
4
4
|
import { a as Formatted, T as TransactionRequestFormatter } from './transactionRequest-8e970b0e.js';
|
5
5
|
|
6
6
|
type FormattedTransactionRequest<TFormatter extends Formatter | undefined = Formatter> = MergeIntersectionProperties<Formatted<TFormatter, TransactionRequest, true>, TransactionRequest>;
|
package/dist/{stopImpersonatingAccount-6603ebdd.d.ts → stopImpersonatingAccount-c8a00be7.d.ts}
RENAMED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { H as Hash, q as RpcTransaction, A as Address, Q as Quantity, v as TransactionRequest, b as Hex } from './rpc-858670f1.js';
|
2
|
-
import { T as TestClient } from './createTestClient-
|
2
|
+
import { T as TestClient } from './createTestClient-24eb7be8.js';
|
3
3
|
|
4
4
|
type DropTransactionArgs = {
|
5
5
|
/** The hash of the transaction to drop. */
|
package/dist/test.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
export { D as DropTransactionArgs, I as ImpersonateAccountArgs, a as IncreaseTimeArgs, M as MineArgs, R as ResetArgs, b as RevertArgs, S as SendUnsignedTransactionArgs, c as SendUnsignedTransactionResponse, d as SetBalanceArgs, e as SetBlockGasLimitArgs, j as SetBlockTimestampIntervalArgs, f as SetCodeArgs, g as SetCoinbaseArgs, h as SetIntervalMiningArgs, i as SetMinGasPriceArgs, l as SetNextBlockBaseFeePerGasArgs, k as SetNextBlockTimestampArgs, m as SetNonceArgs, n as SetStorageAtArgs, o as StopImpersonatingAccountArgs, p as dropTransaction, q as getAutomine, r as getTxpoolContent, s as getTxpoolStatus, t as impersonateAccount, u as increaseTime, v as inspectTxpool, w as mine, x as removeBlockTimestampInterval, y as reset, z as revert, A as sendUnsignedTransaction, B as setAutomine, C as setBalance, E as setBlockGasLimit, F as setBlockTimestampInterval, G as setCode, H as setCoinbase, J as setIntervalMining, K as setLoggingEnabled, L as setMinGasPrice, N as setNextBlockBaseFeePerGas, O as setNextBlockTimestamp, P as setNonce, Q as setStorageAt, T as snapshot, U as stopImpersonatingAccount } from './stopImpersonatingAccount-
|
1
|
+
export { D as DropTransactionArgs, I as ImpersonateAccountArgs, a as IncreaseTimeArgs, M as MineArgs, R as ResetArgs, b as RevertArgs, S as SendUnsignedTransactionArgs, c as SendUnsignedTransactionResponse, d as SetBalanceArgs, e as SetBlockGasLimitArgs, j as SetBlockTimestampIntervalArgs, f as SetCodeArgs, g as SetCoinbaseArgs, h as SetIntervalMiningArgs, i as SetMinGasPriceArgs, l as SetNextBlockBaseFeePerGasArgs, k as SetNextBlockTimestampArgs, m as SetNonceArgs, n as SetStorageAtArgs, o as StopImpersonatingAccountArgs, p as dropTransaction, q as getAutomine, r as getTxpoolContent, s as getTxpoolStatus, t as impersonateAccount, u as increaseTime, v as inspectTxpool, w as mine, x as removeBlockTimestampInterval, y as reset, z as revert, A as sendUnsignedTransaction, B as setAutomine, C as setBalance, E as setBlockGasLimit, F as setBlockTimestampInterval, G as setCode, H as setCoinbase, J as setIntervalMining, K as setLoggingEnabled, L as setMinGasPrice, N as setNextBlockBaseFeePerGas, O as setNextBlockTimestamp, P as setNonce, Q as setStorageAt, T as snapshot, U as stopImpersonatingAccount } from './stopImpersonatingAccount-c8a00be7.js';
|
2
2
|
import './rpc-858670f1.js';
|
3
|
-
import './createTestClient-
|
4
|
-
import './eip1193-
|
5
|
-
import './createClient-
|
3
|
+
import './createTestClient-24eb7be8.js';
|
4
|
+
import './eip1193-71d8e27d.js';
|
5
|
+
import './createClient-03ba79e8.js';
|
6
6
|
import './chains.js';
|
7
7
|
import '@wagmi/chains';
|
package/dist/test.js
CHANGED
@@ -26,8 +26,8 @@
|
|
26
26
|
|
27
27
|
|
28
28
|
|
29
|
-
var
|
30
|
-
require('./chunk-
|
29
|
+
var _chunkCTU4PQLYjs = require('./chunk-CTU4PQLY.js');
|
30
|
+
require('./chunk-BZFF747V.js');
|
31
31
|
|
32
32
|
|
33
33
|
|
@@ -56,5 +56,5 @@ require('./chunk-XEGTPY6M.js');
|
|
56
56
|
|
57
57
|
|
58
58
|
|
59
|
-
exports.dropTransaction =
|
59
|
+
exports.dropTransaction = _chunkCTU4PQLYjs.dropTransaction; exports.getAutomine = _chunkCTU4PQLYjs.getAutomine; exports.getTxpoolContent = _chunkCTU4PQLYjs.getTxpoolContent; exports.getTxpoolStatus = _chunkCTU4PQLYjs.getTxpoolStatus; exports.impersonateAccount = _chunkCTU4PQLYjs.impersonateAccount; exports.increaseTime = _chunkCTU4PQLYjs.increaseTime; exports.inspectTxpool = _chunkCTU4PQLYjs.inspectTxpool; exports.mine = _chunkCTU4PQLYjs.mine; exports.removeBlockTimestampInterval = _chunkCTU4PQLYjs.removeBlockTimestampInterval; exports.reset = _chunkCTU4PQLYjs.reset; exports.revert = _chunkCTU4PQLYjs.revert; exports.sendUnsignedTransaction = _chunkCTU4PQLYjs.sendUnsignedTransaction; exports.setAutomine = _chunkCTU4PQLYjs.setAutomine; exports.setBalance = _chunkCTU4PQLYjs.setBalance; exports.setBlockGasLimit = _chunkCTU4PQLYjs.setBlockGasLimit; exports.setBlockTimestampInterval = _chunkCTU4PQLYjs.setBlockTimestampInterval; exports.setCode = _chunkCTU4PQLYjs.setCode; exports.setCoinbase = _chunkCTU4PQLYjs.setCoinbase; exports.setIntervalMining = _chunkCTU4PQLYjs.setIntervalMining; exports.setLoggingEnabled = _chunkCTU4PQLYjs.setLoggingEnabled; exports.setMinGasPrice = _chunkCTU4PQLYjs.setMinGasPrice; exports.setNextBlockBaseFeePerGas = _chunkCTU4PQLYjs.setNextBlockBaseFeePerGas; exports.setNextBlockTimestamp = _chunkCTU4PQLYjs.setNextBlockTimestamp; exports.setNonce = _chunkCTU4PQLYjs.setNonce; exports.setStorageAt = _chunkCTU4PQLYjs.setStorageAt; exports.snapshot = _chunkCTU4PQLYjs.snapshot; exports.stopImpersonatingAccount = _chunkCTU4PQLYjs.stopImpersonatingAccount;
|
60
60
|
//# sourceMappingURL=test.js.map
|
package/dist/test.mjs
CHANGED
@@ -127,4 +127,4 @@ declare function formatTransaction(transaction: Partial<RpcTransaction>): Transa
|
|
127
127
|
type TransactionReceiptFormatter<TChain extends Chain = Chain> = ExtractFormatter<TChain, 'transactionReceipt', NonNullable<Formatters['transactionReceipt']>>;
|
128
128
|
type FormattedTransactionReceipt<TFormatter extends Formatter | undefined = Formatter> = Formatted<TFormatter, TransactionReceipt>;
|
129
129
|
|
130
|
-
export { AbiItem as A, BlockFormatter as B, ExtractArgsFromEventDefinition as E, FormattedBlock as F, GetValue as G, TransactionFormatter as T,
|
130
|
+
export { AbiItem as A, BlockFormatter as B, ExtractArgsFromEventDefinition as E, FormattedBlock as F, GetValue as G, TransactionFormatter as T, ExtractFunctionNameFromAbi as a, ExtractArgsFromAbi as b, ExtractResultFromAbi as c, FormattedTransaction as d, formatTransaction as e, formatBlock as f, ExtractConstructorArgsFromAbi as g, FormattedTransactionReceipt as h, TransactionReceiptFormatter as i, ExtractErrorArgsFromAbi as j, ExtractEventArgsFromAbi as k };
|
package/dist/utils/index.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
export { D as DecodeAbiArgs, a as DecodeErrorResultArgs, b as DecodeFunctionDataArgs, c as DecodeFunctionResultArgs, d as DecodeFunctionResultResponse, E as EncodeAbiArgs, e as EncodeDeployDataArgs, f as EncodeErrorResultArgs, g as EncodeEventTopicsArgs, h as EncodeFunctionDataArgs, i as EncodeFunctionResultArgs, l as EncodeRlpResponse, G as GetContractAddressOptions, k as GetCreate2AddressOptions, j as GetCreateAddressOptions, o as boolToBytes, p as boolToHex, q as bytesToBigint, r as bytesToBool, m as bytesToHex, s as bytesToNumber, n as bytesToString, t as decodeAbi, u as decodeBytes, v as decodeErrorResult, w as decodeFunctionData, x as decodeFunctionResult, y as decodeHex, z as decodeRlp, A as encodeAbi, B as encodeBytes, C as encodeDeployData, F as encodeErrorResult, H as encodeEventTopics, I as encodeFunctionData, J as encodeFunctionResult, K as encodeHex, L as encodeRlp, S as formatEther, a7 as formatGwei, a8 as formatUnit, M as getAddress, N as getContractAddress, P as getCreate2Address, O as getCreateAddress, Q as getEventSignature, R as getFunctionSignature, X as hexToBigInt, Y as hexToBool, Z as hexToBytes, a9 as hexToNumber, _ as hexToString, T as isAddress, U as isAddressEqual, V as isBytes, W as isHex, $ as keccak256, a0 as numberToBytes, aa as numberToHex, a1 as pad, a2 as padBytes, a3 as padHex, a4 as parseEther, a5 as parseGwei, a6 as parseUnit, ab as size, ac as slice, ad as sliceBytes, ae as sliceHex, af as stringToBytes, ag as stringToHex, ah as trim } from '../parseGwei-
|
2
|
-
import { A as AbiItem } from '../transactionReceipt-
|
3
|
-
export { B as BlockFormatter, F as FormattedBlock,
|
1
|
+
export { D as DecodeAbiArgs, a as DecodeErrorResultArgs, b as DecodeFunctionDataArgs, c as DecodeFunctionResultArgs, d as DecodeFunctionResultResponse, E as EncodeAbiArgs, e as EncodeDeployDataArgs, f as EncodeErrorResultArgs, g as EncodeEventTopicsArgs, h as EncodeFunctionDataArgs, i as EncodeFunctionResultArgs, l as EncodeRlpResponse, G as GetContractAddressOptions, k as GetCreate2AddressOptions, j as GetCreateAddressOptions, o as boolToBytes, p as boolToHex, q as bytesToBigint, r as bytesToBool, m as bytesToHex, s as bytesToNumber, n as bytesToString, t as decodeAbi, u as decodeBytes, v as decodeErrorResult, w as decodeFunctionData, x as decodeFunctionResult, y as decodeHex, z as decodeRlp, A as encodeAbi, B as encodeBytes, C as encodeDeployData, F as encodeErrorResult, H as encodeEventTopics, I as encodeFunctionData, J as encodeFunctionResult, K as encodeHex, L as encodeRlp, S as formatEther, a7 as formatGwei, a8 as formatUnit, M as getAddress, N as getContractAddress, P as getCreate2Address, O as getCreateAddress, Q as getEventSignature, R as getFunctionSignature, X as hexToBigInt, Y as hexToBool, Z as hexToBytes, a9 as hexToNumber, _ as hexToString, T as isAddress, U as isAddressEqual, V as isBytes, W as isHex, $ as keccak256, a0 as numberToBytes, aa as numberToHex, a1 as pad, a2 as padBytes, a3 as padHex, a4 as parseEther, a5 as parseGwei, a6 as parseUnit, ab as size, ac as slice, ad as sliceBytes, ae as sliceHex, af as stringToBytes, ag as stringToHex, ah as trim } from '../parseGwei-dbd12305.js';
|
2
|
+
import { A as AbiItem } from '../transactionReceipt-aed524b4.js';
|
3
|
+
export { B as BlockFormatter, F as FormattedBlock, d as FormattedTransaction, h as FormattedTransactionReceipt, T as TransactionFormatter, i as TransactionReceiptFormatter, f as formatBlock, e as formatTransaction } from '../transactionReceipt-aed524b4.js';
|
4
4
|
import * as abitype_dist_abi_b1bae27f from 'abitype/dist/abi-b1bae27f';
|
5
5
|
import { Abi } from 'abitype';
|
6
6
|
import { A as Address } from '../rpc-858670f1.js';
|
package/dist/utils/index.js
CHANGED
@@ -72,7 +72,7 @@
|
|
72
72
|
|
73
73
|
|
74
74
|
|
75
|
-
var
|
75
|
+
var _chunkBZFF747Vjs = require('../chunk-BZFF747V.js');
|
76
76
|
|
77
77
|
|
78
78
|
|
@@ -147,5 +147,5 @@ var _chunkXEGTPY6Mjs = require('../chunk-XEGTPY6M.js');
|
|
147
147
|
|
148
148
|
|
149
149
|
|
150
|
-
exports.boolToBytes =
|
150
|
+
exports.boolToBytes = _chunkBZFF747Vjs.boolToBytes; exports.boolToHex = _chunkBZFF747Vjs.boolToHex; exports.buildRequest = _chunkBZFF747Vjs.buildRequest; exports.bytesToBigint = _chunkBZFF747Vjs.bytesToBigint; exports.bytesToBool = _chunkBZFF747Vjs.bytesToBool; exports.bytesToHex = _chunkBZFF747Vjs.bytesToHex; exports.bytesToNumber = _chunkBZFF747Vjs.bytesToNumber; exports.bytesToString = _chunkBZFF747Vjs.bytesToString; exports.decodeAbi = _chunkBZFF747Vjs.decodeAbi; exports.decodeBytes = _chunkBZFF747Vjs.decodeBytes; exports.decodeErrorResult = _chunkBZFF747Vjs.decodeErrorResult; exports.decodeFunctionData = _chunkBZFF747Vjs.decodeFunctionData; exports.decodeFunctionResult = _chunkBZFF747Vjs.decodeFunctionResult; exports.decodeHex = _chunkBZFF747Vjs.decodeHex; exports.decodeRlp = _chunkBZFF747Vjs.decodeRlp; exports.encodeAbi = _chunkBZFF747Vjs.encodeAbi; exports.encodeBytes = _chunkBZFF747Vjs.encodeBytes; exports.encodeDeployData = _chunkBZFF747Vjs.encodeDeployData; exports.encodeErrorResult = _chunkBZFF747Vjs.encodeErrorResult; exports.encodeEventTopics = _chunkBZFF747Vjs.encodeEventTopics; exports.encodeFunctionData = _chunkBZFF747Vjs.encodeFunctionData; exports.encodeFunctionResult = _chunkBZFF747Vjs.encodeFunctionResult; exports.encodeHex = _chunkBZFF747Vjs.encodeHex; exports.encodeRlp = _chunkBZFF747Vjs.encodeRlp; exports.extract = _chunkBZFF747Vjs.extract; exports.extractFunctionName = _chunkBZFF747Vjs.extractFunctionName; exports.extractFunctionParams = _chunkBZFF747Vjs.extractFunctionParams; exports.extractFunctionParts = _chunkBZFF747Vjs.extractFunctionParts; exports.extractFunctionType = _chunkBZFF747Vjs.extractFunctionType; exports.format = _chunkBZFF747Vjs.format; exports.formatAbiItemWithArgs = _chunkBZFF747Vjs.formatAbiItemWithArgs; exports.formatAbiItemWithParams = _chunkBZFF747Vjs.formatAbiItemWithParams; exports.formatBlock = _chunkBZFF747Vjs.formatBlock; exports.formatEther = _chunkBZFF747Vjs.formatEther; exports.formatGwei = _chunkBZFF747Vjs.formatGwei; exports.formatTransaction = _chunkBZFF747Vjs.formatTransaction; exports.formatTransactionRequest = _chunkBZFF747Vjs.formatTransactionRequest; exports.formatUnit = _chunkBZFF747Vjs.formatUnit; exports.getAbiItem = _chunkBZFF747Vjs.getAbiItem; exports.getAddress = _chunkBZFF747Vjs.getAddress; exports.getContractAddress = _chunkBZFF747Vjs.getContractAddress; exports.getContractError = _chunkBZFF747Vjs.getContractError; exports.getCreate2Address = _chunkBZFF747Vjs.getCreate2Address; exports.getCreateAddress = _chunkBZFF747Vjs.getCreateAddress; exports.getEventSignature = _chunkBZFF747Vjs.getEventSignature; exports.getFunctionSignature = _chunkBZFF747Vjs.getFunctionSignature; exports.hexToBigInt = _chunkBZFF747Vjs.hexToBigInt; exports.hexToBool = _chunkBZFF747Vjs.hexToBool; exports.hexToBytes = _chunkBZFF747Vjs.hexToBytes; exports.hexToNumber = _chunkBZFF747Vjs.hexToNumber; exports.hexToString = _chunkBZFF747Vjs.hexToString; exports.isAddress = _chunkBZFF747Vjs.isAddress; exports.isAddressEqual = _chunkBZFF747Vjs.isAddressEqual; exports.isBytes = _chunkBZFF747Vjs.isBytes; exports.isHex = _chunkBZFF747Vjs.isHex; exports.keccak256 = _chunkBZFF747Vjs.keccak256; exports.numberToBytes = _chunkBZFF747Vjs.numberToBytes; exports.numberToHex = _chunkBZFF747Vjs.numberToHex; exports.pad = _chunkBZFF747Vjs.pad; exports.padBytes = _chunkBZFF747Vjs.padBytes; exports.padHex = _chunkBZFF747Vjs.padHex; exports.parseEther = _chunkBZFF747Vjs.parseEther; exports.parseGwei = _chunkBZFF747Vjs.parseGwei; exports.parseUnit = _chunkBZFF747Vjs.parseUnit; exports.rpc = _chunkBZFF747Vjs.rpc; exports.size = _chunkBZFF747Vjs.size; exports.slice = _chunkBZFF747Vjs.slice; exports.sliceBytes = _chunkBZFF747Vjs.sliceBytes; exports.sliceHex = _chunkBZFF747Vjs.sliceHex; exports.stringToBytes = _chunkBZFF747Vjs.stringToBytes; exports.stringToHex = _chunkBZFF747Vjs.stringToHex; exports.stringify = _chunkBZFF747Vjs.stringify; exports.trim = _chunkBZFF747Vjs.trim;
|
151
151
|
//# sourceMappingURL=index.js.map
|
package/dist/utils/index.mjs
CHANGED
package/dist/wallet.d.ts
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
export { G as GetPermissionsResponse, R as RequestPermissionsResponse, S as SignMessageArgs, a as SignMessageResponse, b as SwitchChainArgs, W as WatchAssetArgs, c as WatchAssetResponse, d as addChain, g as getAccounts, e as getPermissions, r as requestAccounts, f as requestPermissions, s as signMessage, h as switchChain, w as watchAsset } from './watchAsset-
|
2
|
-
export { F as FormattedTransactionRequest, S as SendTransactionArgs, a as SendTransactionResponse, s as sendTransaction } from './sendTransaction-
|
1
|
+
export { G as GetPermissionsResponse, R as RequestPermissionsResponse, S as SignMessageArgs, a as SignMessageResponse, b as SwitchChainArgs, W as WatchAssetArgs, c as WatchAssetResponse, d as addChain, g as getAccounts, e as getPermissions, r as requestAccounts, f as requestPermissions, s as signMessage, h as switchChain, w as watchAsset } from './watchAsset-c39645b7.js';
|
2
|
+
export { F as FormattedTransactionRequest, S as SendTransactionArgs, a as SendTransactionResponse, s as sendTransaction } from './sendTransaction-d09961a7.js';
|
3
3
|
import './chains.js';
|
4
4
|
import './rpc-858670f1.js';
|
5
5
|
import '@wagmi/chains';
|
6
|
-
import './createWalletClient-
|
7
|
-
import './eip1193-
|
8
|
-
import './createClient-
|
6
|
+
import './createWalletClient-7cbd6ad1.js';
|
7
|
+
import './eip1193-71d8e27d.js';
|
8
|
+
import './createClient-03ba79e8.js';
|
9
9
|
import './transactionRequest-8e970b0e.js';
|
package/dist/wallet.js
CHANGED
@@ -8,8 +8,8 @@
|
|
8
8
|
|
9
9
|
|
10
10
|
|
11
|
-
var
|
12
|
-
require('./chunk-
|
11
|
+
var _chunkHRE6LYF3js = require('./chunk-HRE6LYF3.js');
|
12
|
+
require('./chunk-BZFF747V.js');
|
13
13
|
|
14
14
|
|
15
15
|
|
@@ -20,5 +20,5 @@ require('./chunk-XEGTPY6M.js');
|
|
20
20
|
|
21
21
|
|
22
22
|
|
23
|
-
exports.addChain =
|
23
|
+
exports.addChain = _chunkHRE6LYF3js.addChain; exports.getAccounts = _chunkHRE6LYF3js.getAccounts; exports.getPermissions = _chunkHRE6LYF3js.getPermissions; exports.requestAccounts = _chunkHRE6LYF3js.requestAccounts; exports.requestPermissions = _chunkHRE6LYF3js.requestPermissions; exports.sendTransaction = _chunkHRE6LYF3js.sendTransaction; exports.signMessage = _chunkHRE6LYF3js.signMessage; exports.switchChain = _chunkHRE6LYF3js.switchChain; exports.watchAsset = _chunkHRE6LYF3js.watchAsset;
|
24
24
|
//# sourceMappingURL=wallet.js.map
|
package/dist/wallet.mjs
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Chain } from './chains.js';
|
2
|
-
import { W as WalletClient } from './createWalletClient-
|
3
|
-
import { a as WalletPermission, b as WatchAssetParams } from './eip1193-
|
2
|
+
import { W as WalletClient } from './createWalletClient-7cbd6ad1.js';
|
3
|
+
import { a as WalletPermission, b as WatchAssetParams } from './eip1193-71d8e27d.js';
|
4
4
|
import { A as Address, b as Hex, c as ByteArray } from './rpc-858670f1.js';
|
5
5
|
|
6
6
|
declare function addChain(client: WalletClient, chain: Chain): Promise<void>;
|
package/dist/{watchPendingTransactions-2563071e.d.ts → watchPendingTransactions-01e6be4f.d.ts}
RENAMED
@@ -1,10 +1,10 @@
|
|
1
1
|
import { Abi } from 'abitype';
|
2
2
|
import { Chain, Formatter } from './chains.js';
|
3
3
|
import { b as Hex, A as Address, a as BlockTag, M as MergeIntersectionProperties, v as TransactionRequest, K as EstimateGasParameters, H as Hash, F as FeeHistory, L as Log, r as RpcTransactionReceipt, T as TransactionReceipt, N as TransactionType, D as Transaction } from './rpc-858670f1.js';
|
4
|
-
import {
|
5
|
-
import { P as PublicClient } from './createPublicClient-
|
6
|
-
import { W as WalletClient } from './createWalletClient-
|
7
|
-
import { S as SendTransactionArgs, a as SendTransactionResponse } from './sendTransaction-
|
4
|
+
import { a as ExtractFunctionNameFromAbi, G as GetValue, b as ExtractArgsFromAbi, c as ExtractResultFromAbi, g as ExtractConstructorArgsFromAbi, F as FormattedBlock, B as BlockFormatter, d as FormattedTransaction, T as TransactionFormatter, h as FormattedTransactionReceipt, i as TransactionReceiptFormatter } from './transactionReceipt-aed524b4.js';
|
5
|
+
import { P as PublicClient } from './createPublicClient-818241ba.js';
|
6
|
+
import { W as WalletClient } from './createWalletClient-7cbd6ad1.js';
|
7
|
+
import { S as SendTransactionArgs, a as SendTransactionResponse } from './sendTransaction-d09961a7.js';
|
8
8
|
import { T as TransactionRequestFormatter, a as Formatted, E as ExtractFormatter } from './transactionRequest-8e970b0e.js';
|
9
9
|
|
10
10
|
type FilterType = 'transaction' | 'block' | 'event';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { b as TransportConfig, T as Transport, B as BaseRpcRequests } from './createClient-
|
1
|
+
import { b as TransportConfig, T as Transport, B as BaseRpcRequests } from './createClient-03ba79e8.js';
|
2
2
|
import { H as Hash } from './rpc-858670f1.js';
|
3
3
|
import { R as RpcResponse } from './rpc-26932bae.js';
|
4
4
|
|
package/dist/window.d.ts
CHANGED
package/package.json
CHANGED
@@ -27,6 +27,7 @@ test('exports actions', () => {
|
|
27
27
|
"getGasPrice": [Function],
|
28
28
|
"getLogs": [Function],
|
29
29
|
"getPermissions": [Function],
|
30
|
+
"getStorageAt": [Function],
|
30
31
|
"getTransaction": [Function],
|
31
32
|
"getTransactionConfirmations": [Function],
|
32
33
|
"getTransactionCount": [Function],
|
@@ -37,6 +38,7 @@ test('exports actions', () => {
|
|
37
38
|
"increaseTime": [Function],
|
38
39
|
"inspectTxpool": [Function],
|
39
40
|
"mine": [Function],
|
41
|
+
"readContract": [Function],
|
40
42
|
"removeBlockTimestampInterval": [Function],
|
41
43
|
"requestAccounts": [Function],
|
42
44
|
"requestPermissions": [Function],
|
package/src/actions/index.ts
CHANGED
@@ -16,10 +16,12 @@ export {
|
|
16
16
|
getFilterLogs,
|
17
17
|
getGasPrice,
|
18
18
|
getLogs,
|
19
|
+
getStorageAt,
|
19
20
|
getTransaction,
|
20
21
|
getTransactionConfirmations,
|
21
22
|
getTransactionCount,
|
22
23
|
getTransactionReceipt,
|
24
|
+
readContract,
|
23
25
|
simulateContract,
|
24
26
|
uninstallFilter,
|
25
27
|
waitForTransactionReceipt,
|
@@ -55,6 +57,8 @@ export type {
|
|
55
57
|
GetGasPriceResponse,
|
56
58
|
GetLogsArgs,
|
57
59
|
GetLogsResponse,
|
60
|
+
GetStorageAtArgs,
|
61
|
+
GetStorageAtResponse,
|
58
62
|
GetTransactionArgs,
|
59
63
|
GetTransactionConfirmationsArgs,
|
60
64
|
GetTransactionConfirmationsResponse,
|
@@ -69,6 +73,8 @@ export type {
|
|
69
73
|
OnBlockResponse,
|
70
74
|
OnTransactions,
|
71
75
|
OnTransactionsResponse,
|
76
|
+
ReadContractArgs,
|
77
|
+
ReadContractResponse,
|
72
78
|
ReplacementReason,
|
73
79
|
ReplacementResponse,
|
74
80
|
SimulateContractArgs,
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import { expect, test } from 'vitest'
|
2
|
+
import {
|
3
|
+
initialBlockNumber,
|
4
|
+
publicClient,
|
5
|
+
wagmiContractConfig,
|
6
|
+
} from '../../_test'
|
7
|
+
|
8
|
+
import { getBytecode } from './getBytecode'
|
9
|
+
import { getStorageAt } from './getStorageAt'
|
10
|
+
|
11
|
+
test('default', async () => {
|
12
|
+
expect(
|
13
|
+
await getStorageAt(publicClient, {
|
14
|
+
address: wagmiContractConfig.address,
|
15
|
+
slot: '0x0',
|
16
|
+
}),
|
17
|
+
).toBe('0x7761676d6900000000000000000000000000000000000000000000000000000a')
|
18
|
+
expect(
|
19
|
+
await getStorageAt(publicClient, {
|
20
|
+
address: wagmiContractConfig.address,
|
21
|
+
slot: '0x1',
|
22
|
+
}),
|
23
|
+
).toBe('0x5741474d4900000000000000000000000000000000000000000000000000000a')
|
24
|
+
})
|
25
|
+
|
26
|
+
test('args: blockNumber', async () => {
|
27
|
+
expect(
|
28
|
+
await getStorageAt(publicClient, {
|
29
|
+
address: wagmiContractConfig.address,
|
30
|
+
slot: '0x0',
|
31
|
+
blockNumber: initialBlockNumber,
|
32
|
+
}),
|
33
|
+
).toBe('0x7761676d6900000000000000000000000000000000000000000000000000000a')
|
34
|
+
})
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { PublicClient } from '../../clients'
|
2
|
+
import { Address, BlockTag, Hex } from '../../types'
|
3
|
+
import { numberToHex } from '../../utils'
|
4
|
+
|
5
|
+
export type GetStorageAtArgs = {
|
6
|
+
address: Address
|
7
|
+
slot: Hex
|
8
|
+
} & (
|
9
|
+
| {
|
10
|
+
blockNumber?: never
|
11
|
+
blockTag?: BlockTag
|
12
|
+
}
|
13
|
+
| {
|
14
|
+
blockNumber?: bigint
|
15
|
+
blockTag?: never
|
16
|
+
}
|
17
|
+
)
|
18
|
+
|
19
|
+
export type GetStorageAtResponse = Hex | undefined
|
20
|
+
|
21
|
+
export async function getStorageAt(
|
22
|
+
client: PublicClient,
|
23
|
+
{ address, blockNumber, blockTag = 'latest', slot }: GetStorageAtArgs,
|
24
|
+
): Promise<GetStorageAtResponse> {
|
25
|
+
const blockNumberHex =
|
26
|
+
blockNumber !== undefined ? numberToHex(blockNumber) : undefined
|
27
|
+
const data = await client.request({
|
28
|
+
method: 'eth_getStorageAt',
|
29
|
+
params: [address, slot, blockNumberHex || blockTag],
|
30
|
+
})
|
31
|
+
return data
|
32
|
+
}
|
@@ -22,10 +22,12 @@ test('exports actions', () => {
|
|
22
22
|
"getFilterLogs": [Function],
|
23
23
|
"getGasPrice": [Function],
|
24
24
|
"getLogs": [Function],
|
25
|
+
"getStorageAt": [Function],
|
25
26
|
"getTransaction": [Function],
|
26
27
|
"getTransactionConfirmations": [Function],
|
27
28
|
"getTransactionCount": [Function],
|
28
29
|
"getTransactionReceipt": [Function],
|
30
|
+
"readContract": [Function],
|
29
31
|
"simulateContract": [Function],
|
30
32
|
"uninstallFilter": [Function],
|
31
33
|
"waitForTransactionReceipt": [Function],
|
@@ -5,7 +5,6 @@ export { simulateContract } from './simulateContract'
|
|
5
5
|
export type {
|
6
6
|
SimulateContractArgs,
|
7
7
|
SimulateContractResponse,
|
8
|
-
FormattedSimulateContract,
|
9
8
|
} from './simulateContract'
|
10
9
|
|
11
10
|
export { createPendingTransactionFilter } from './createPendingTransactionFilter'
|
@@ -67,6 +66,9 @@ export type { GetGasPriceResponse } from './getGasPrice'
|
|
67
66
|
export { getLogs } from './getLogs'
|
68
67
|
export type { GetLogsArgs, GetLogsResponse } from './getLogs'
|
69
68
|
|
69
|
+
export { getStorageAt } from './getStorageAt'
|
70
|
+
export type { GetStorageAtArgs, GetStorageAtResponse } from './getStorageAt'
|
71
|
+
|
70
72
|
export { getTransaction } from './getTransaction'
|
71
73
|
export type {
|
72
74
|
GetTransactionArgs,
|
@@ -91,6 +93,12 @@ export type {
|
|
91
93
|
GetTransactionReceiptResponse,
|
92
94
|
} from './getTransactionReceipt'
|
93
95
|
|
96
|
+
export { readContract } from './readContract'
|
97
|
+
export type {
|
98
|
+
ReadContractArgs,
|
99
|
+
ReadContractResponse,
|
100
|
+
} from './readContract'
|
101
|
+
|
94
102
|
export { uninstallFilter } from './uninstallFilter'
|
95
103
|
export type {
|
96
104
|
UninstallFilterArgs,
|