Skip to content

Commit

Permalink
util: add string[] type to rpcParams type (#3579)
Browse files Browse the repository at this point in the history
* util: add string array to rpc params

* statemanager: remove as any typecast

* statemanager: commented out code cleanuip
  • Loading branch information
gabrocheleau authored Aug 12, 2024
1 parent 4470cc3 commit a930add
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions packages/statemanager/src/rpcStateManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/util/src/provider.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
type rpcParams = {
method: string
params: (string | boolean | number)[]
params: (string | string[] | boolean | number)[]
}

/**
Expand Down

0 comments on commit a930add

Please sign in to comment.