import { HardhatRuntimeEnvironment } from "hardhat/types" ; import { DeployFunction } from "hardhat-deploy/types" ; import { isTestNetwork } from "../../utils/network" ; import { BigNumber } from "ethers" ; const VETH2_TOKENS_ARGS = { WETH : [ "Wrapped Ether" , "WETH" , "18" ] , VETH2 : [ "validator-Eth2" , "vETH2" , "18" ] , } ; const func = async function ( hre ) { const { deployments , getNamedAccounts , getChainId } = hre ; const { deploy , execute } = deployments ; const { deployer } = await getNamedAccounts ( ) ; for ( const token in VETH2_TOKENS_ARGS ) { await deploy ( token , { from : deployer , log : true , contract : "GenericERC20" , args : VETH2_TOKENS_ARGS [ token ] , skipIfAlreadyDeployed : true , } ) ; if ( isTestNetwork ( await getChainId ( ) ) ) { const decimals = VETH2_TOKENS_ARGS [ token ] [ 2 ] ; await execute ( token , { from : deployer , log : true } , "mint" , deployer , BigNumber . from ( 10 ) . pow ( decimals ) . mul ( 1000 ) ) ; } } } ; export default func ; func . tags = [ "VETH2PoolTokens" ] ;