diff --git a/solidity/deploy/02_deploy_vending_machine.ts b/solidity/deploy/02_deploy_vending_machine.ts index 94995f826..546ec2414 100644 --- a/solidity/deploy/02_deploy_vending_machine.ts +++ b/solidity/deploy/02_deploy_vending_machine.ts @@ -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() @@ -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