Closed bdrhn9 closed 3 months ago
Alternatively, it can be implemented by extending the JsonRpcProvider class like following:
// eslint-disable-next-line functional/no-classes
export class LegacyGasPriceRpcProvider extends ethers.JsonRpcProvider {
public async getGasPrice(): Promise<bigint> {
const value = await this.send('eth_gasPrice', []);
return getBigInt(value);
}
}
I didn't prefer this approach because it would necessitate modifying nearly every file that references ethers.JsonRpcProvider
, both as a class and as an interface.
Closes #305