Commit b6a40240 authored by elenadimitrova's avatar elenadimitrova Committed by Elena Gesheva

Add deployment script for the L2 token factory

parent dca0eb84
/* 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 l2TokenFactory = getContractDefinition('OVM_L2StandardTokenFactory', true)
const factoryOwner = (hre as any).deployConfig.ovmSequencerAddress
const initialGasPrice = (hre as any).deployConfig.initialGasPriceOracleGasPrice
if (!factoryOwner || !initialGasPrice) {
throw new Error('initialGasPrice & ovmSequencerAddress required to deploy gas price oracle')
}
await deploy('OVM_L2StandardTokenFactory', {
contract: l2TokenFactory,
from: deployer,
args: [factoryOwner, initialGasPrice],
log: true,
});
}
deployFn.tags = ['OVM_L2StandardTokenFactory']
export default deployFn
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