diff --git a/src/providers/v3/gas-data-provider.ts b/src/providers/v3/gas-data-provider.ts index c076ca0b7..8ef60e1cd 100644 --- a/src/providers/v3/gas-data-provider.ts +++ b/src/providers/v3/gas-data-provider.ts @@ -54,7 +54,7 @@ export class OptimismGasDataProvider providerConfig?: ProviderConfig ): Promise { // TODO: Also get the gasPrice from GasPriceOracle.sol - const funcNames = ['l1BaseFee', 'scalar', 'decimals', 'overhead']; + const funcNames = ['l1BaseFee', 'decimals']; const tx = await this.multicall2Provider.callMultipleFunctionsOnSameContract< undefined, @@ -68,9 +68,7 @@ export class OptimismGasDataProvider if ( !tx.results[0]?.success || - !tx.results[1]?.success || - !tx.results[2]?.success || - !tx.results[3]?.success + !tx.results[1]?.success ) { log.info( { results: tx.results }, @@ -81,16 +79,17 @@ export class OptimismGasDataProvider ); } + // TODO: replace the hardcoded scalar and overhead with op gas estimate sdk const { result: l1BaseFee } = tx.results![0]; - const { result: scalar } = tx.results![1]; - const { result: decimals } = tx.results![2]; - const { result: overhead } = tx.results![3]; + const scalar = BigNumber.from(1) + const { result: decimals } = tx.results![1]; + const overhead = BigNumber.from(0); return { l1BaseFee: l1BaseFee[0], - scalar: scalar[0], + scalar: scalar, decimals: decimals[0], - overhead: overhead[0], + overhead: overhead, }; } }