009-OVM_ExecutionManager.deploy.ts 1.01 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
/* Imports: External */
import { DeployFunction } from 'hardhat-deploy/dist/types'

/* Imports: Internal */
import {
  deployAndRegister,
  getDeployedContract,
} from '../src/hardhat-deploy-ethers'

const deployFn: DeployFunction = async (hre) => {
  const Lib_AddressManager = await getDeployedContract(
    hre,
    'Lib_AddressManager'
  )

  await deployAndRegister({
    hre,
    name: 'OVM_ExecutionManager',
    args: [
      Lib_AddressManager.address,
      {
        minTransactionGasLimit: (hre as any).deployConfig
          .emMinTransactionGasLimit,
        maxTransactionGasLimit: (hre as any).deployConfig
          .emMaxTransactionGasLimit,
        maxGasPerQueuePerEpoch: (hre as any).deployConfig
          .emMaxGasPerQueuePerEpoch,
        secondsPerEpoch: (hre as any).deployConfig.emSecondsPerEpoch,
      },
      {
        ovmCHAINID: (hre as any).deployConfig.emOvmChainId,
      },
    ],
  })
}

deployFn.dependencies = ['Lib_AddressManager']
deployFn.tags = ['OVM_ExecutionManager']

export default deployFn