Skip to content

Commit e99e8bb

Browse files
ckoopmannChristian Koopmannsnake-poisonSnakePoison
authored
feat: FlashMintNotional
* Add Interfaces and ExchangeIssuanceNotional starting code * Add fcash wrapper mocks * First test case issuing set token with fCash positions * Add more tests * Add redemption method * Adjust test token to contain different maturities * Fix redemption tests * Add swap method to be able to issue from any input token * Test case for issuance from usdc passing * Minor refactoring * Add redemption method * Add redemption test case * Import wrappedFCash contracts * Extend integration tests * Fix weth case * Use deployed wrappedfCash factory instance in integration test * Use deployed NotionalTradeModule instead of mock * Integration tests against deployed notionalTradeModule passing * Extend integration tests * Add issueExactTokenFromEth method * implement redeemExactSetForETH * Remove wrappedfcash contract imports from deploy functions * Remove more references to wrappedFCash contract implementations * clean and build artifacts before integration test * Adjust contract to use DEXAdapter instead of 0x swapTarget * Fix unit test for issuance from usdc * Fix redemption tests * Fix integration tests * Fix unittests * Add unittests for ETH methods * Use isEth return value instead of ETH_ADDRESS to determine if underlying token is ETH * fix tests * Add documentation and reordering functions according to access modifier * Add methods to set / change the decodedIdGaslimit * Change order of test code * Add test case for revertion in wfCashFactory computeAddress * Add store_artifacts step to circleci pipeline * Use getToken in _getUnderlyingAndAssetToken * Parameterize unittests to be run both with basic and debt issuance module * Fill coverage gaps in uniitests * Remove unneeded functions and increase coverage * Furter simplifications and additional test coverage * Remove underbought component check * Fix compilation failure * Test address check in fallback receive method * Fix missed conflict * Remove wrong gaslimit in eiNotional tests * Fix ethereum integration tests * Increase tolerance in integration tests * Rename exchangeIssuanceNotional to flashMintNotional * Add flag to allow user to skip gas intensive redemption of matured positions * Adjust integration test to check different values for redeemMaturedPositions flag * Cover redeemMaturedPositions=false in unit tests * Undo accidental formatting changes * Remove package patch * Remove unneeded dependencies * Remove unneeded v8 solidity from hardhat config * Fix wrong notional interface * Add contract level docstring * Remove more unnecessary dependencies * Add explanatory component * Avoid type error due to missing environment variable in hardhat file * ref: use setBalance for manipulating balances. * Remove empty if branch Co-authored-by: SnakePoison <[email protected]> * Remov eslint comment and use hardhat_setBalance to fund token whales * remove merge conflict marker * Remove dependencies file * Move INotionalProxy.sol file * Fix wrong license and reset circleci and solhint config files * Cache mapping of component to filtered component to avoid calling _findComponent twice * Restore config.yml file from master * Remove IERC20Metadata interface * Remove forked_network test and coverage stages since they just rerun the original unittests Co-authored-by: Christian Koopmann <[email protected]> Co-authored-by: SnakePoison <[email protected]> Co-authored-by: SnakePoison <[email protected]>
1 parent bd70f3d commit e99e8bb

28 files changed

+3999
-86
lines changed

.circleci/config.yml

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -57,28 +57,6 @@ jobs:
5757
TEST_FILES="$(circleci tests glob "./test/**/*.spec.ts" | circleci tests split)"
5858
yarn test ${TEST_FILES}
5959
60-
test_forked_network:
61-
docker:
62-
- image: cimg/node:lts
63-
working_directory: ~/index-coop-smart-contracts
64-
steps:
65-
- setup_remote_docker:
66-
docker_layer_caching: false
67-
- run:
68-
name: Fetch solc version
69-
command: docker pull ethereum/solc:0.6.10
70-
- restore_cache:
71-
key: compiled-env-{{ .Environment.CIRCLE_SHA1 }}
72-
- run:
73-
name: Set Up Environment Variables
74-
command: cp .env.default .env
75-
- run:
76-
name: Test RPC
77-
command: yarn chain
78-
background: true
79-
- run:
80-
name: Hardhat Test
81-
command: yarn test:fork
8260
8361
test_integration_polygon:
8462
docker:
@@ -185,37 +163,6 @@ jobs:
185163
- cov_0.json
186164
- cov_1.json
187165

188-
coverage_forked_network:
189-
docker:
190-
- image: cimg/node:lts
191-
working_directory: ~/index-coop-smart-contracts
192-
steps:
193-
- setup_remote_docker:
194-
docker_layer_caching: false
195-
- run:
196-
name: Fetch solc version
197-
command: docker pull ethereum/solc:0.6.10
198-
- restore_cache:
199-
key: compiled-env-{{ .Environment.CIRCLE_SHA1 }}
200-
- run:
201-
name: Set Up Environment Variables
202-
command: cp .env.default .env
203-
- run:
204-
name: Create shared coverage outputs folder
205-
command: mkdir -p /tmp/coverage
206-
- run:
207-
name: Coverage
208-
command: |
209-
yarn coverage:fork
210-
- run:
211-
name: Save coverage
212-
command: |
213-
cp coverage.json /tmp/coverage/cov_fork.json
214-
chmod -R 777 /tmp/coverage/cov_fork.json
215-
- persist_to_workspace:
216-
root: /tmp/coverage
217-
paths:
218-
- cov_fork.json
219166

220167
report_coverage:
221168
docker:
@@ -245,9 +192,6 @@ workflows:
245192
- test:
246193
requires:
247194
- checkout_and_compile
248-
- test_forked_network:
249-
requires:
250-
- checkout_and_compile
251195
- test_integration_ethereum:
252196
requires:
253197
- checkout_and_compile
@@ -260,10 +204,6 @@ workflows:
260204
- coverage:
261205
requires:
262206
- checkout_and_compile
263-
- coverage_forked_network:
264-
requires:
265-
- checkout_and_compile
266207
- report_coverage:
267208
requires:
268209
- coverage
269-
- coverage_forked_network

0 commit comments

Comments
 (0)