Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

Add tests coverage for stETH #13

Merged
merged 1 commit into from
Dec 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,16 @@ docker-compose exec contracts-env bash
npm run test
```

## Test StETH Integration

To run tests for StETH integration use the following commands:

```
npm install
npm run test:steth
npm run test:steth-coverage # to run tests with coverage report
```

## Deployments

For deploying Aave Protocol V2, you can use the available scripts located at `package.json`. For a complete list, run `npm run` to see all the tasks.
Expand Down
19 changes: 18 additions & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { eEthereumNetwork } from './helpers/types';
import { BUIDLEREVM_CHAINID, COVERAGE_CHAINID } from './helpers/buidler-constants';

require('dotenv').config();
require('solidity-coverage');

import '@nomiclabs/hardhat-ethers';
import '@nomiclabs/hardhat-waffle';
Expand All @@ -26,6 +27,7 @@ const ETHERSCAN_KEY = process.env.ETHERSCAN_KEY || '';
const MNEMONIC_PATH = "m/44'/60'/0'/0";
const MNEMONIC = process.env.MNEMONIC || '';
const MAINNET_FORK = process.env.MAINNET_FORK === 'true';
const USE_OPTIMIZER = process.env.USE_OPTIMIZER === 'false' ? false : true;

// Prevent to load scripts before compilation and typechain
if (!SKIP_LOAD) {
Expand Down Expand Up @@ -76,7 +78,22 @@ const buidlerConfig: HardhatUserConfig = {
solidity: {
version: '0.6.12',
settings: {
optimizer: { enabled: true, runs: 200 },
optimizer: USE_OPTIMIZER
? { enabled: true, runs: 200 }
: {
// This config is required to make it works with solidity coverage.
// With the enabled optimizer, it fails on the compilation step because
// the stack is too deep. See this comment of fix for details:
// https://github.com/ethereum/solidity/issues/10354#issuecomment-847407103
details: {
yul: true,
yulDetails: {
stackAllocation: true,
},
},
enabled: true,
runs: 200,
},
evmVersion: 'istanbul',
},
},
Expand Down
2 changes: 1 addition & 1 deletion markets/aave/reservesConfigs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,5 +373,5 @@ export let strategyStETH: IReserveParams = {
stableBorrowRateEnabled: false,
reserveDecimals: '18',
aTokenImpl: eContractid.AStETH,
reserveFactor: '3500',
reserveFactor: '1000',
};
Loading