// Hardhat and ethers imports
import hre from 'hardhat';
import '@nomiclabs/hardhat-ethers';
import { Contract, ContractFactory } from 'ethers';
// Import some helper methods we have
import { getChainId, getContractAddress, logSuccess, logFailure, findLog, fundAccount } from '../utils/utils';
// Import any required ABIs
import comptrollerAbi from '../abi/Comptroller.json';
// STEP 0: ENVIRONMENT SETUP
// Use the default Hardhat provider
const provider = hre.ethers.provider;
// Initialize our signer using the private key from the environment variable
const signer = new hre.ethers.Wallet(process.env.PRIVATE_KEY as string, hre.ethers.provider);
// Chain ID is used to determine which contract addresses to use, and we use a
// special helper method for getting chain ID. Normally you would get this from
// (await ethers.provider.getNetwork()).chainId, but since we are testing against
// a forked network we need to ensure we used the forked network's ID (e.g. 1 for
// mainnet) instead of the Hardhat default Chain ID of 1337
const chainId = getChainId(hre);