• 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
000-Lib_AddressManager.deploy.ts 1.17 KB
/* Imports: External */
import { DeployFunction } from 'hardhat-deploy/dist/types'

/* Imports: Internal */
import { registerAddress } from '../src/hardhat-deploy-ethers'
import { predeploys } from '../src/predeploys'

const deployFn: DeployFunction = async (hre) => {
  const { deploy } = hre.deployments
  const { deployer } = await hre.getNamedAccounts()

  await deploy('Lib_AddressManager', {
    from: deployer,
    args: [],
    log: true,
  })

  await registerAddress({
    hre,
    name: 'OVM_L2CrossDomainMessenger',
    address: predeploys.OVM_L2CrossDomainMessenger,
  })

  await registerAddress({
    hre,
    name: 'OVM_DecompressionPrecompileAddress',
    address: predeploys.OVM_SequencerEntrypoint,
  })

  await registerAddress({
    hre,
    name: 'OVM_Sequencer',
    address: (hre as any).deployConfig.ovmSequencerAddress,
  })

  await registerAddress({
    hre,
    name: 'OVM_Proposer',
    address: (hre as any).deployConfig.ovmProposerAddress,
  })

  await registerAddress({
    hre,
    name: 'OVM_L2BatchMessageRelayer',
    address: (hre as any).deployConfig.ovmRelayerAddress,
  })
}

deployFn.tags = ['Lib_AddressManager', 'required']

export default deployFn