From c3da56acb0a7a6d2a4188f519ca03c384ed23a8a Mon Sep 17 00:00:00 2001 From: Gabriel Rocheleau Date: Mon, 12 Aug 2024 11:54:01 -0400 Subject: [PATCH 1/3] util: add string array to rpc params --- packages/util/src/provider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)[] } /** From e3c1c218e448502479cbfe93a968f0d05668cc51 Mon Sep 17 00:00:00 2001 From: Gabriel Rocheleau Date: Mon, 12 Aug 2024 11:55:34 -0400 Subject: [PATCH 2/3] statemanager: remove as any typecast --- packages/statemanager/src/rpcStateManager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/statemanager/src/rpcStateManager.ts b/packages/statemanager/src/rpcStateManager.ts index f00f2f5b28..650960c83e 100644 --- a/packages/statemanager/src/rpcStateManager.ts +++ b/packages/statemanager/src/rpcStateManager.ts @@ -333,7 +333,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 From f6ad8d97dd37d51a5f332df0efe58ee597d4d731 Mon Sep 17 00:00:00 2001 From: Gabriel Rocheleau Date: Mon, 12 Aug 2024 12:17:13 -0400 Subject: [PATCH 3/3] statemanager: commented out code cleanuip --- packages/statemanager/src/rpcStateManager.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/statemanager/src/rpcStateManager.ts b/packages/statemanager/src/rpcStateManager.ts index 650960c83e..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