mirror of
				https://github.com/Instadapp/dsa-connectors.git
				synced 2024-07-29 22:37:00 +00:00 
			
		
		
		
	fixed liquidity test
This commit is contained in:
		
							parent
							
								
									30a1939c42
								
							
						
					
					
						commit
						f8a812fb2f
					
				| 
						 | 
				
			
			@ -7,10 +7,10 @@ import { deployAndEnableConnector } from "../../../scripts/tests/deployAndEnable
 | 
			
		|||
import { buildDSAv2 } from "../../../scripts/tests/buildDSAv2"
 | 
			
		||||
import { encodeSpells } from "../../../scripts/tests/encodeSpells"
 | 
			
		||||
import { getMasterSigner } from "../../../scripts/tests/getMasterSigner"
 | 
			
		||||
import { addresses } from "../../../scripts/constant/addresses";
 | 
			
		||||
import { abis } from "../../../scripts/constant/abis";
 | 
			
		||||
import { ConnectV2BLiquity__factory } from "../../../typechain";
 | 
			
		||||
import type { Signer, Contract } from "ethers";
 | 
			
		||||
import addresses from "../../../scripts/constant/addresses";
 | 
			
		||||
 | 
			
		||||
const LUSD_WHALE = "0x66017D22b0f8556afDd19FC67041899Eb65a21bb" // stability pool
 | 
			
		||||
const BAMM_ADDRESS = "0x0d3AbAA7E088C2c82f54B2f47613DA438ea8C598"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,7 +18,6 @@ import { ConnectV2Liquity__factory, ConnectV2Basic__factory } from "../../../typ
 | 
			
		|||
// Instadapp uses a fake address to represent native ETH
 | 
			
		||||
import { constants } from "../../../scripts/constant/constant";
 | 
			
		||||
import type { Signer, Contract, BigNumber } from "ethers";
 | 
			
		||||
 | 
			
		||||
const LIQUITY_CONNECTOR = "LIQUITY-v1-TEST";
 | 
			
		||||
const LUSD_GAS_COMPENSATION = hre.ethers.utils.parseUnits("200", 18); // 200 LUSD gas compensation repaid after loan repayment
 | 
			
		||||
const LIQUIDATABLE_TROVES_BLOCK_NUMBER = 12478159; // Deterministic block number for tests to run against, if you change this, tests will break.
 | 
			
		||||
| 
						 | 
				
			
			@ -92,9 +91,7 @@ const sendToken = async (token: any, amount: any, from: any, to: any) => {
 | 
			
		|||
  });
 | 
			
		||||
  const signer = hre.ethers.provider.getSigner(from);
 | 
			
		||||
 | 
			
		||||
  return await token.connect(signer).transfer(to, amount, {
 | 
			
		||||
    gasPrice: 0,
 | 
			
		||||
  });
 | 
			
		||||
  return await token.connect(signer).transfer(to, amount);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const resetInitialState = async (walletAddress: any, contracts: any, isDebug = false) => {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| 
						 | 
				
			
			@ -82,6 +82,19 @@ describe("PoolTogether", function() {
 | 
			
		|||
  const wallets = provider.getWallets();
 | 
			
		||||
  const [wallet0, wallet1, wallet2, wallet3] = wallets;
 | 
			
		||||
  before(async () => {
 | 
			
		||||
    await hre.network.provider.request({
 | 
			
		||||
      method: "hardhat_reset",
 | 
			
		||||
      params: [
 | 
			
		||||
        {
 | 
			
		||||
          forking: {
 | 
			
		||||
            // @ts-ignore
 | 
			
		||||
            jsonRpcUrl: hre.config.networks.hardhat.forking.url,
 | 
			
		||||
            blockNumber: 12696000,
 | 
			
		||||
          },
 | 
			
		||||
        },
 | 
			
		||||
      ],
 | 
			
		||||
    });
 | 
			
		||||
    
 | 
			
		||||
    masterSigner = await getMasterSigner();
 | 
			
		||||
    instaConnectorsV2 = await ethers.getContractAt(
 | 
			
		||||
      abis.core.connectorsV2,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user