Skip to content

Commit

Permalink
Merge pull request #30 from keep-network/tbtc-owner-transfer
Browse files Browse the repository at this point in the history
Transfer TBTC token ownership to VendingMachine
  • Loading branch information
pdyraga authored Aug 17, 2021
2 parents 006a356 + e6c8527 commit 5917764
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 5917764

Please sign in to comment.