From a930add0ce28c13adf1e2c751f85de4cd8f59a2a Mon Sep 17 00:00:00 2001 From: Gabriel Rocheleau Date: Mon, 12 Aug 2024 13:39:26 -0400 Subject: [PATCH] util: add string[] type to rpcParams type (#3579) * util: add string array to rpc params * statemanager: remove as any typecast * statemanager: commented out code cleanuip --- packages/statemanager/src/rpcStateManager.ts | 6 +----- packages/util/src/provider.ts | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/statemanager/src/rpcStateManager.ts b/packages/statemanager/src/rpcStateManager.ts index f00f2f5b28..58c4b7f8a0 100644 --- a/packages/statemanager/src/rpcStateManager.ts +++ b/packages/statemanager/src/rpcStateManager.ts @@ -53,10 +53,6 @@ export class RPCStateManager implements StateManagerInterface { this._caches = new Caches({ storage: { size: 100000 }, code: { size: 100000 } }) - // this._contractCache = new Map() - // this._storageCache = new StorageCache({ size: 100000, type: CacheType.ORDERED_MAP }) - // this._accountCache = new AccountCache({ size: 100000, type: CacheType.ORDERED_MAP }) - this.originalStorageCache = new OriginalStorageCache(this.getStorage.bind(this)) this.common = opts.common ?? new Common({ chain: Mainnet }) this.keccakFunction = opts.common?.customCrypto.keccak256 ?? keccak256 @@ -333,7 +329,7 @@ export class RPCStateManager implements StateManagerInterface { if (this.DEBUG) this._debug(`retrieving proof from provider for ${address.toString()}`) const proof = await fetchFromProvider(this._provider, { method: 'eth_getProof', - params: [address.toString(), storageSlots.map(bytesToHex).join(','), this._blockTag], + params: [address.toString(), storageSlots.map(bytesToHex), this._blockTag], }) return proof diff --git a/packages/util/src/provider.ts b/packages/util/src/provider.ts index 28bc74a766..e61e6bfad3 100644 --- a/packages/util/src/provider.ts +++ b/packages/util/src/provider.ts @@ -1,6 +1,6 @@ type rpcParams = { method: string - params: (string | boolean | number)[] + params: (string | string[] | boolean | number)[] } /**