diff --git a/integration-tests/test/native-eth.spec.ts b/integration-tests/test/native-eth.spec.ts index 411054acdfec..eb8eecacb37c 100644 --- a/integration-tests/test/native-eth.spec.ts +++ b/integration-tests/test/native-eth.spec.ts @@ -56,7 +56,7 @@ describe('Native ETH Integration Tests', async () => { it('Should estimate gas for ETH withdraw', async () => { const amount = utils.parseEther('0.5') const gas = await env.ovmEth.estimateGas.withdraw(amount, 0, '0xFFFF') - expect(gas).to.be.deep.eq(BigNumber.from(6140049)) + expect(gas).to.be.deep.eq(BigNumber.from(6580050)) }) }) diff --git a/packages/contracts/bin/take-dump.ts b/packages/contracts/bin/take-dump.ts index b1e5376ed737..8dfea3bf04f7 100644 --- a/packages/contracts/bin/take-dump.ts +++ b/packages/contracts/bin/take-dump.ts @@ -19,7 +19,10 @@ import { RollupDeployConfig } from '../src/contract-deployment' ovmGlobalContext: { ovmCHAINID: parseInt(CHAIN_ID, 10), }, - gasPriceOracleOwner: GAS_PRICE_ORACLE_OWNER + gasPriceOracleConfig: { + owner: GAS_PRICE_ORACLE_OWNER, + initialGasPrice: 0, + } } const dump = await makeStateDump(config as RollupDeployConfig) diff --git a/packages/contracts/src/contract-deployment/config.ts b/packages/contracts/src/contract-deployment/config.ts index 99c9f8b722d4..ba04437c0708 100644 --- a/packages/contracts/src/contract-deployment/config.ts +++ b/packages/contracts/src/contract-deployment/config.ts @@ -35,7 +35,10 @@ export interface RollupDeployConfig { owner: string | Signer allowArbitraryContractDeployment: boolean } - gasPriceOracleOwner: string + gasPriceOracleConfig: { + owner: string | Signer + initialGasPrice: number + } addressManager?: string dependencies?: string[] deployOverrides: Overrides @@ -262,7 +265,15 @@ export const makeContractDeployConfig = async ( }, OVM_GasPriceOracle: { factory: getContractFactory('OVM_GasPriceOracle'), - params: [config.gasPriceOracleOwner], + params: [ + (() => { + if (typeof config.gasPriceOracleConfig.owner !== 'string') { + return config.gasPriceOracleConfig.owner.getAddress() + } + return config.gasPriceOracleConfig.owner + })(), + config.gasPriceOracleConfig.initialGasPrice, + ], }, } } diff --git a/packages/contracts/src/state-dump/make-dump.ts b/packages/contracts/src/state-dump/make-dump.ts index b6d49f233443..19c1ce682e46 100644 --- a/packages/contracts/src/state-dump/make-dump.ts +++ b/packages/contracts/src/state-dump/make-dump.ts @@ -140,7 +140,10 @@ export const makeStateDump = async (cfg: RollupDeployConfig): Promise => { ], deployOverrides: {}, waitForReceipts: false, - gasPriceOracleOwner: cfg.gasPriceOracleOwner, + gasPriceOracleConfig: { + owner: signer, + initialGasPrice: 0, + }, } config = { ...config, ...cfg }