• Georgios Konstantopoulos's avatar
    feat: hardhat-deploy (#418) · 3e2700d1
    Georgios Konstantopoulos authored
    * chore(hardhat-ovm): yarn lint:fix
    
    * install hardhat-deploy
    
    * refactor: move predeploys to own file
    
    * feat: enable hardhat-deploy on hardhat config
    
    * feat(contracts): add deployment steps
    
    * feat(ops): copy over any additional build files
    
    * ops: make scripts wait for more retries
    
    hardhat-deploy is slower and requires re-compiling
    3e2700d1
009-OVM_ExecutionManager.deploy.ts 1.01 KB
/* 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