forked from keep-network/tbtc-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path04_transfer_vending_machine_roles.ts
43 lines (35 loc) · 1.15 KB
/
04_transfer_vending_machine_roles.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
36
37
38
39
40
41
42
43
import { HardhatRuntimeEnvironment } from "hardhat/types"
import { DeployFunction } from "hardhat-deploy/types"
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { getNamedAccounts, helpers, deployments } = hre
const { execute, log } = deployments
const { deployer, keepTechnicalWalletTeam, keepCommunityMultiSig } =
await getNamedAccounts()
log(
`transferring vendingMachineUpgradeInitiator role to ${keepTechnicalWalletTeam}`
)
await execute(
"VendingMachine",
{ from: deployer, log: true, waitConfirmations: 1 },
"transferVendingMachineUpgradeInitiatorRole",
keepTechnicalWalletTeam
)
log(
`transferring unmintFeeUpdateInitiator role to ${keepTechnicalWalletTeam}`
)
await execute(
"VendingMachine",
{ from: deployer, log: true, waitConfirmations: 1 },
"transferUnmintFeeUpdateInitiatorRole",
keepTechnicalWalletTeam
)
await helpers.ownable.transferOwnership(
"VendingMachine",
keepCommunityMultiSig,
deployer
)
}
export default func
func.tags = ["TransferVendingMachineRoles"]
func.dependencies = ["TBTC", "VendingMachine"]
func.runAtTheEnd = true