Skip to content

Commit

Permalink
Adding AcreRouter deployment scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
dimpar committed Dec 7, 2023
1 parent 9a9c513 commit 2ae92ec
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
22 changes: 22 additions & 0 deletions core/deploy/02_deploy_acre_router.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import type { HardhatRuntimeEnvironment } from "hardhat/types"
import type { DeployFunction } from "hardhat-deploy/types"

const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
const { getNamedAccounts, deployments } = hre
const { deployer } = await getNamedAccounts()

await deployments.deploy("AcreRouter", {
from: deployer,
args: [],
log: true,
waitConfirmations: 1,
})

// TODO: Add Etherscan verification
// TODO: Add Tenderly verification
}

export default func

func.tags = ["AcreRouter"]
func.dependencies = ["Acre"]
21 changes: 21 additions & 0 deletions core/deploy/22_transfer_ownership_acre_router.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import type { HardhatRuntimeEnvironment } from "hardhat/types"
import type { DeployFunction } from "hardhat-deploy/types"

const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
const { getNamedAccounts, deployments } = hre
const { deployer, governance } = await getNamedAccounts()
const { log } = deployments

log(`transferring ownership of AcreRouter contract to ${governance}`)

await deployments.execute(
"AcreRouter",
{ from: deployer, log: true, waitConfirmations: 1 },
"transferOwnership",
governance,
)
}

export default func

func.tags = ["TransferOwnershipAcreRouter"]

0 comments on commit 2ae92ec

Please sign in to comment.