Skip to content

Commit

Permalink
Transfer TBTC token ownership to VendingMachine
Browse files Browse the repository at this point in the history
It is expected that VendingMachine becomes owner of TBTC token to manage
minting of the token.
  • Loading branch information
nkuba committed Aug 17, 2021
1 parent 006a356 commit e6c8527
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions solidity/deploy/02_deploy_vending_machine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { HardhatRuntimeEnvironment } from "hardhat/types"
import { DeployFunction } from "hardhat-deploy/types"

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

Expand All @@ -11,11 +11,17 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {

const unmintFee = 0

await deploy("VendingMachine", {
const VendingMachine = await deploy("VendingMachine", {
from: deployer,
args: [TBTCToken.address, TBTC.address, unmintFee],
log: true,
})

await helpers.ownable.transferOwnership(
"TBTC",
VendingMachine.address,
deployer
)
}

export default func
Expand Down

0 comments on commit e6c8527

Please sign in to comment.