1
1
import { parseUnits } from "ethers/lib/utils" ;
2
- import { ethers } from "hardhat" ;
2
+ import { ethers , network } from "hardhat" ;
3
3
import { DeployFunction } from "hardhat-deploy/types" ;
4
4
import { HardhatRuntimeEnvironment } from "hardhat/types" ;
5
5
@@ -20,12 +20,18 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
20
20
const wBNBAddress = ( await ethers . getContract ( "WBNB" ) ) . address ;
21
21
const riskFundAddress = ( await ethers . getContract ( "RiskFund" ) ) . address ;
22
22
const poolRegistryAddress = ( await ethers . getContract ( "PoolRegistry" ) ) . address ;
23
- const poolStableCoinAddress = ( await ethers . getContract ( "Comptroller_StableCoins" ) ) . address ;
24
23
const poolDeFiAddress = ( await ethers . getContract ( "Comptroller_DeFi" ) ) . address ;
25
24
const poolGameFiAddress = ( await ethers . getContract ( "Comptroller_GameFi" ) ) . address ;
26
25
const poolTronAddress = ( await ethers . getContract ( "Comptroller_Tron" ) ) . address ;
27
26
const timelockAddress = ( await ethers . getContract ( "NormalTimelock" ) ) . address ;
28
27
28
+ let poolStableCoinAddress ;
29
+ if ( network . name === "bscmainnet" ) {
30
+ poolStableCoinAddress = ( await ethers . getContract ( "Comptroller_Stablecoins" ) ) . address ;
31
+ } else {
32
+ poolStableCoinAddress = ( await ethers . getContract ( "Comptroller_StableCoins" ) ) . address ;
33
+ }
34
+
29
35
const comptrollers = [ corePoolAddress , poolStableCoinAddress , poolDeFiAddress , poolGameFiAddress , poolTronAddress ] ;
30
36
const assets = [ [ usdtAddress , btcbAddress , ethAddress ] , [ usdtAddress ] , [ usdtAddress ] , [ usdtAddress ] , [ usdtAddress ] ] ;
31
37
const values = [ [ true , true , true ] , [ true ] , [ true ] , [ true ] , [ true ] ] ;
0 commit comments