004-OVM_CanonicalTransactionChain.deploy.ts 784 Bytes
Newer Older
1 2 3 4 5
/* Imports: External */
import { DeployFunction } from 'hardhat-deploy/dist/types'

/* Imports: Internal */
import {
6
  deployAndVerifyAndThen,
7
  getContractFromArtifact,
8
} from '../src/deploy-utils'
9
import { names } from '../src/address-names'
10 11

const deployFn: DeployFunction = async (hre) => {
12 13
  const Lib_AddressManager = await getContractFromArtifact(
    hre,
14
    names.unmanaged.Lib_AddressManager
15
  )
16

17
  await deployAndVerifyAndThen({
18
    hre,
19
    name: names.managed.contracts.CanonicalTransactionChain,
20 21
    args: [
      Lib_AddressManager.address,
22 23 24
      hre.deployConfig.l2BlockGasLimit,
      hre.deployConfig.ctcL2GasDiscountDivisor,
      hre.deployConfig.ctcEnqueueGasCost,
25 26 27 28
    ],
  })
}

29
deployFn.tags = ['CanonicalTransactionChain', 'upgrade']
30 31

export default deployFn