Skip to content

Commit d8e029c

Browse files
ckoopmannChristian KoopmannChristian Koopmann
authored
feat: Add Curve Support in Leveraged EI (#100)
* Sync aave leverage module from inside the contract * Add IAaveLeverageModule interface * Parameterize integration test to be run both for Eth2x and iEth * Change calculation of eth to spend per test case * Reduce min amount out in test * Add curve contract interfaces * Implementation of swapExactTokensForTokensCurve * refactor integration test to have different exchanges for different sets * Add implementation of exact output swap on curve * Collect integration tests meant to be run on polygon fork in one directory * Add ethereum integration test skeleton * Increase pinned block number for eth mainnet fork * Test curve swap methods * Extend tests of curve integration * Test failing when trying to do two exact output swaps * Reset to snapshot to avoid failure on second exactOutput swap * Move exchange selection to swapData * More tweeking of integration tests * Fix unittests * Fix linter errors in integrationtest * Add ethereum integration test to circleci workflow * Add staging addresses to integration test * Fix wrong path in polygon integration test * Remove snapshot resets from polygon integration tests * Approve icEth token in integrationtest * Add attempt issuance with collateral token to ethereum integration test * Log statements to illustrate aave issue * First working test case for icEth issuance from stEth * Add test case issuing from weth * Add rounding margin to calculated amount in to avoid curve error of not enough tokens obtained * Remove debug logs * Add redemption to integration tests * Double rounding error margin when transfering out underlying of collateral * Add ETH testcases * Convert DEXAdapter to linked library * Remove unlimitedContractSize flag * Fix unittests * TODO comment to review if we want to keep isSetToken * Various cleanups in DEXAdapter contract code * Remove isSetToken modifier * Remove TODO comments Co-authored-by: Christian Koopmann <[email protected]> Co-authored-by: Christian Koopmann <[email protected]>
1 parent 4bb8242 commit d8e029c

20 files changed

+1660
-694
lines changed

.circleci/config.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,29 @@ jobs:
103103
name: Hardhat Test
104104
command: yarn test:integration:polygon
105105

106+
test_integration_ethereum:
107+
docker:
108+
- image: cimg/node:lts
109+
working_directory: ~/index-coop-smart-contracts
110+
steps:
111+
- setup_remote_docker:
112+
docker_layer_caching: false
113+
- run:
114+
name: Fetch solc version
115+
command: docker pull ethereum/solc:0.6.10
116+
- restore_cache:
117+
key: compiled-env-{{ .Environment.CIRCLE_SHA1 }}
118+
- run:
119+
name: Set Up Environment Variables
120+
command: cp .env.default .env
121+
- run:
122+
name: Test RPC
123+
command: yarn chain:fork:ethereum
124+
background: true
125+
- run:
126+
name: Hardhat Test
127+
command: yarn test:integration:ethereum
128+
106129
coverage:
107130
docker:
108131
- image: cimg/node:lts
@@ -202,6 +225,9 @@ workflows:
202225
- test_forked_network:
203226
requires:
204227
- checkout_and_compile
228+
- test_integration_ethereum:
229+
requires:
230+
- checkout_and_compile
205231
- test_integration_polygon:
206232
requires:
207233
- checkout_and_compile

0 commit comments

Comments
 (0)