Commit 014dea71 authored by smartcontracts's avatar smartcontracts Committed by GitHub

refactor[contracts]: remove one-off GasPriceOracle deployment file (#1046)

* refactor[contracts]: remove one-off gpo deployment

* chore: add changeset
parent 0a7f5a46
---
'@eth-optimism/contracts': patch
---
Removes one-off GasPriceOracle deployment file
/* Imports: External */
import { DeployFunction } from 'hardhat-deploy/dist/types'
/* Imports: Internal */
import { getContractDefinition } from '../src'
const deployFn: DeployFunction = async (hre: any) => {
const { deployments, getNamedAccounts } = hre
const { deploy } = deployments
const { deployer } = await getNamedAccounts()
const gasPriceOracle = getContractDefinition('OVM_GasPriceOracle', true)
const gasOracleOwner = (hre as any).deployConfig.ovmSequencerAddress
const initialGasPrice = (hre as any).deployConfig.initialGasPriceOracleGasPrice
if (!gasOracleOwner || !initialGasPrice) {
throw new Error('initialGasPrice & ovmSequencerAddress required to deploy gas price oracle')
}
await deploy('OVM_GasPriceOracle', {
contract: gasPriceOracle,
from: deployer,
args: [gasOracleOwner, initialGasPrice],
log: true,
});
}
deployFn.tags = ['OVM_GasPriceOracle']
export default deployFn
......@@ -99,12 +99,6 @@ task('deploy')
undefined,
types.string
)
.addOptionalParam(
'initialGasPriceOracleGasPrice',
'The initial execution price for the gas price oracle.',
undefined,
types.int
)
.setAction(async (args, hre: any, runSuper) => {
// Necessary because hardhat doesn't let us attach non-optional parameters to existing tasks.
const validateAddressArg = (argName: string) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment