forked from keep-network/tbtc-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path10_deploy_maintainer_proxy.ts
35 lines (28 loc) · 1017 Bytes
/
10_deploy_maintainer_proxy.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { HardhatRuntimeEnvironment } from "hardhat/types"
import { DeployFunction } from "hardhat-deploy/types"
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { deployments, getNamedAccounts, helpers } = hre
const { deploy } = deployments
const { deployer } = await getNamedAccounts()
const Bridge = await deployments.get("Bridge")
const ReimbursementPool = await deployments.get("ReimbursementPool")
const maintainerProxy = await deploy("MaintainerProxy", {
contract: "MaintainerProxy",
from: deployer,
args: [Bridge.address, ReimbursementPool.address],
log: true,
waitConfirmations: 1,
})
if (hre.network.tags.etherscan) {
await helpers.etherscan.verify(maintainerProxy)
}
if (hre.network.tags.tenderly) {
await hre.tenderly.verify({
name: "MaintainerProxy",
address: maintainerProxy.address,
})
}
}
export default func
func.tags = ["MaintainerProxy"]
func.dependencies = ["Bridge", "ReimbursementPool"]