• Kelvin Fichter's avatar
    feat(ct): overhaul deployment process · 4c486d70
    Kelvin Fichter authored
    Overhauls the contract deployment process to use a simpler typed
    deployment method. Removes the need for deployment bash scripts and
    makes review of deployment configurations much easier.
    4c486d70
005-OVM_StateCommitmentChain.deploy.ts 857 Bytes
/* Imports: External */
import { DeployFunction } from 'hardhat-deploy/dist/types'

/* Imports: Internal */
import {
  deployAndVerifyAndThen,
  getContractFromArtifact,
} from '../src/deploy-utils'
import { getDeployConfig } from '../src/deploy-config'
import { names } from '../src/address-names'

const deployFn: DeployFunction = async (hre) => {
  const deployConfig = getDeployConfig(hre.network.name)

  const Lib_AddressManager = await getContractFromArtifact(
    hre,
    names.unmanaged.Lib_AddressManager
  )

  await deployAndVerifyAndThen({
    hre,
    name: names.managed.contracts.StateCommitmentChain,
    args: [
      Lib_AddressManager.address,
      deployConfig.sccFaultProofWindowSeconds,
      deployConfig.sccSequencerPublishWindowSeconds,
    ],
  })
}

deployFn.tags = ['StateCommitmentChain', 'upgrade']

export default deployFn