-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding AcreRouter deployment scripts
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |