Skip to content

Commit

Permalink
Add script to update debt allowance for Mezo Portal
Browse files Browse the repository at this point in the history
We need to set the debt allowance for Mezo Portal to initial value of 250 stBTC.
  • Loading branch information
nkuba committed Aug 9, 2024
1 parent f273483 commit 1d63186
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions solidity/deploy/33_update_debt_allowance.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import type { HardhatRuntimeEnvironment } from "hardhat/types"
import type { DeployFunction } from "hardhat-deploy/types"

const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
const { getNamedAccounts, deployments } = hre
const { governance } = await getNamedAccounts()
const { log } = deployments

const mezoPortal = await deployments.get("MezoPortal")

const debtAllowance = 250000000000000000000n // 250 stBTC

log(`updating debt allowance for ${mezoPortal.address}`)

await deployments.execute(
"stBTC",
{ from: governance, log: true, waitConfirmations: 1 },
"updateDebtAllowance",
mezoPortal.address,
debtAllowance,
)
}

export default func

func.tags = ["UpdateDebtAllowance"]
func.dependencies = ["UpgradeStBTC"]
func.skip = async (hre: HardhatRuntimeEnvironment): Promise<boolean> =>
Promise.resolve(
hre.network.name === "integration" || hre.network.name === "mainnet",
)

0 comments on commit 1d63186

Please sign in to comment.