Skip to content

Commit

Permalink
fix(eip1559): use hex number for eth_feehistory 'blockcount' parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-abrioux committed Oct 7, 2022
1 parent cd4f55d commit 7a12685
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/ethereum-storage/src/ethereum-storage-ethers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ export class EthereumStorageEthers implements StorageTypes.IStorageWrite {
async initialize(): Promise<void> {
await this.ipfsStorage.initialize();
try {
await this.provider.send('eth_feeHistory', [1, 'latest', []]);
await this.provider.send('eth_feeHistory', [
utils.hexStripZeros(utils.hexlify(1)),
'latest',
[],
]);
} catch (e) {
this.logger.warn(
'This RPC provider does not support the "eth_feeHistory" method: switching to legacy gas price',
Expand Down

0 comments on commit 7a12685

Please sign in to comment.