import { HardhatRuntimeEnvironment } from "hardhat/types" ; import { DeployFunction } from "hardhat-deploy/types" ; import { ethers , network } from "hardhat" ; import { ConfigEntity } from "../../../entities" ; import { CollateralPoolConfig__factory } from "../../../../typechain" ; import { BigNumber } from "ethers" ; import { formatBytes32String } from "ethers/lib/utils" ; import { WeiPerRad , WeiPerRay } from "../../../../test/helper/unit" ; const func = async function ( hre ) { const config = ConfigEntity . getConfig ( ) ; const NEW_DEBT_FLOOR = ethers . utils . parseUnits ( "500" , 45 ) ; const COLLATERAL_POOL_ID = formatBytes32String ( "ibBUSD" ) ; const collateralPoolConfig = CollateralPoolConfig__factory . connect ( config . CollateralPoolConfig . address , ( await ethers . getSigners ( ) ) [ 0 ] ) ; console . log ( `>> setDebtFloor to ${ NEW_DEBT_FLOOR }` ) ; const tx = await collateralPoolConfig . setDebtFloor ( COLLATERAL_POOL_ID , NEW_DEBT_FLOOR , { gasPrice : ethers . utils . parseUnits ( "30" , "gwei" ) , } ) ; await tx . wait ( ) ; console . log ( `tx hash: ${ tx . hash }` ) ; } ; export default func ; func . tags = [ "SetDebtFloor" ] ;