Skip to content

Commit

Permalink
Update hbr token deployemnt script
Browse files Browse the repository at this point in the history
  • Loading branch information
SigismundSchlomo committed Oct 9, 2024
1 parent 40b9992 commit cfb86b5
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions scripts/ecosystem/token_staking/deploy_hbr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { ethers } from "hardhat";
import { ContractNames } from "../../../src";
import { deploy } from "@airdao/deployments/deploying";
import { HBRToken__factory } from "../../../typechain-types";
import { deployMultisig } from "../../utils/deployMultisig";

async function main() {
const {chainId} = await ethers.provider.getNetwork();
Expand All @@ -19,8 +20,16 @@ async function main() {
loadIfAlreadyDeployed: true,
});

await (await airBond.grantRole(await airBond.DEFAULT_ADMIN_ROLE(), deployer.address)).wait(); //
await (await airBond.grantRole(await airBond.MINTER_ROLE(), deployer.address)).wait();
if (chainId != 16718) {
console.log("Granting roles to deployer (dev and test envs only)");
await (await airBond.grantRole(await airBond.DEFAULT_ADMIN_ROLE(), deployer.address)).wait(); //
await (await airBond.grantRole(await airBond.MINTER_ROLE(), deployer.address)).wait();
} else {
console.log("Granting roles to multisig (mainnet only)");
const multisig = await deployMultisig(ContractNames.Ecosystem_LimitedTokenPoolsManagerMultisig, deployer);
await (await airBond.grantRole(await airBond.DEFAULT_ADMIN_ROLE(), multisig.address)).wait();
await (await airBond.grantRole(await airBond.MINTER_ROLE(), multisig.address)).wait();
}
}

if (require.main === module) {
Expand Down

0 comments on commit cfb86b5

Please sign in to comment.