Skip to content

Commit

Permalink
Add backend role granding in script
Browse files Browse the repository at this point in the history
  • Loading branch information
SigismundSchlomo committed Sep 16, 2024
1 parent 3500d00 commit bb4a0b3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/ecosystem/liquid_staking/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ export async function main() {
const [deployer] = await ethers.getSigners();
wrapProviderToError(deployer.provider!);

console.log();

const validatorSet = loadDeployment(ContractNames.ValidatorSet, chainId, deployer) as ValidatorSet;
const airBond = loadDeployment(ContractNames.AirBond, chainId);

Expand Down Expand Up @@ -151,7 +153,6 @@ export async function main() {
loadIfAlreadyDeployed: true,
});


console.log("Setup stAmb");
await (await stAmb.setLiquidPool(liquidPool.address)).wait();
await (await stAmb.grantRole(await stAmb.DEFAULT_ADMIN_ROLE(), multisig.address)).wait();
Expand Down Expand Up @@ -186,6 +187,10 @@ export async function main() {
const bonuses = getBonuses();
await (await stakingTiers.setBonusBatch(Array.from(bonuses.keys()), Array.from(bonuses.values()))).wait();

// grant backend role
const backendAddress = process.env.LIQUID_STAKING_BACKEND_ADDRESS || "";
await (await nodeManager.grantRole(await nodeManager.BACKEND_ROLE(), backendAddress)).wait();

await (await nodesRewardsBank.revokeRole(await nodesRewardsBank.DEFAULT_ADMIN_ROLE(), deployer.address)).wait();
await (await poolRewardsBank.revokeRole(await poolRewardsBank.DEFAULT_ADMIN_ROLE(), deployer.address)).wait();
await (await nodeManager.revokeRole(await nodeManager.DEFAULT_ADMIN_ROLE(), deployer.address)).wait();
Expand Down

0 comments on commit bb4a0b3

Please sign in to comment.