• 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
006-mockOVM_BondManager.deploy.ts 829 Bytes
/* Imports: External */
import { DeployFunction } from 'hardhat-deploy/dist/types'

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

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

  const Lib_AddressManager = await getDeployedContract(
    hre,
    'Lib_AddressManager',
    {
      signerOrProvider: deployer,
    }
  )

  const result = await deploy('mockOVM_BondManager', {
    from: deployer,
    args: [Lib_AddressManager.address],
    log: true,
  })

  if (!result.newlyDeployed) {
    return
  }

  await Lib_AddressManager.setAddress('OVM_BondManager', result.address)
}

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

export default deployFn