008-SystemConfigProxy.ts 578 Bytes
Newer Older
1 2 3 4
import { DeployFunction } from 'hardhat-deploy/dist/types'

import {
  assertContractVariable,
5
  deploy,
6 7 8 9 10
  getDeploymentAddress,
} from '../src/deploy-utils'

const deployFn: DeployFunction = async (hre) => {
  const proxyAdmin = await getDeploymentAddress(hre, 'ProxyAdmin')
11

12
  await deploy({
13 14 15 16 17 18 19 20 21 22
    hre,
    name: 'SystemConfigProxy',
    contract: 'Proxy',
    args: [proxyAdmin],
    postDeployAction: async (contract) => {
      await assertContractVariable(contract, 'admin', proxyAdmin)
    },
  })
}

23
deployFn.tags = ['SystemConfigProxy', 'setup']
24 25

export default deployFn