Commit Graph

786 Commits

Author SHA1 Message Date
Jason Raymond Bell
4fe36c8fa4 Introduce registry of valid Augustus addresses
Set in constructor of BaseParaSwapSellAdapter and validates before swap.
Created mock registry that only validates one address.
Changed the test fixtures to accomodate registry and added two new tests.
Updated deployment script.
Registry address left as a placeholder in package.json since not known yet.

Fixes MixBytes Warning 1.
2021-05-20 23:25:51 +01:00
Jason Raymond Bell
9d1cb50d76 Add reentrancy guard to adapter
Fixes MixBytes Warning 2.
2021-05-20 17:36:41 +01:00
Jason Raymond Bell
d8b8d50de8 Use better types than address
Fixes ABDK CVF-6, CVF-7, CVF-16, CVF-17, CVF-31 and CVF-32.
2021-05-20 16:50:20 +01:00
Jason Raymond Bell
bf7b19a181 Add comments to empty constructor bodies
Fixes ABDK CVF-4 and CVF-15.
2021-05-20 15:41:59 +01:00
Jason Raymond Bell
38bec942da Check lengths of all the arrays
Fixes ABDK CVF-5.
2021-05-20 15:00:22 +01:00
Jason Raymond Bell
afeb5fb996 Remove _usePermit function
Just use a simple check if deadline is set or not.

Fixes ABDK CVF-34 and CVF-35.
2021-05-20 14:47:10 +01:00
Jason Raymond Bell
5b45be6a44 Don't ignore return value of withdraw
Fixes MixBytes Warning 4.
2021-05-20 14:38:24 +01:00
Jason Raymond Bell
d26b1beb68 Fix _getDecimals function
Added a limit on number of decimals and changed return type to uint8.

Fixes MixBytes Warning 5 and ABDK CVF-30.
2021-05-20 14:14:51 +01:00
Jason Raymond Bell
11d0367d3c Explain code to overwrite fromAmount in comment
Fixes MixBytes Comment 1.
2021-05-20 14:00:34 +01:00
Jason Raymond Bell
b13a01d8b8 Rename _pullAToken function
Fixes MixBytes Comment 4.
2021-05-20 13:45:50 +01:00
Jason Raymond Bell
fe05ceccd6 Use safeTransfer for rescueTokens
Fixes MixBytes Warning 3.
2021-05-20 13:40:55 +01:00
Jason Raymond Bell
29772961ac Simplify ASM for copying revert reason 2021-03-19 00:16:39 +00:00
Jason Raymond Bell
bf635b6d50 Merge branch 'master' into paraswap 2021-03-18 16:46:02 +00:00
Jason Raymond Bell
242826ded6 ParaSwap adapter for collateral swaps
Complete with unit tests (using a mock AugustusSwapper contract).

Has similar functionality/tests as for existing Uniswap adapter.

Fixed a couple bugs in tests for Uniswap adapters.
2021-03-18 15:44:52 +00:00
The3D
7f44a0c242 Removed unused param in struct 2021-03-05 10:36:55 +01:00
The3D
eb9077f25e Refactored interest rate strategies tests 2021-03-01 20:26:08 +01:00
The3D
03dc5370ee Added initialized events 2021-03-01 18:33:48 +01:00
The3D
bc1a237f34 Added handleRepayment() function 2021-03-01 17:47:27 +01:00
The3D
e735d40a3b Merge branch 'feat/light-deployments' of github.com:aave/protocol-v2 into feat/light-deployments 2021-03-01 15:58:41 +01:00
The3D
03a410230d Updated interest rate strategy to generalize fetching of the available liquidity 2021-03-01 15:58:31 +01:00
The3D
77fab5d3bb Added encoded parameter to reserve initialization 2021-02-26 18:17:10 +01:00
Hadrien Charlanes
1656f1c6a3 Added Weth gateway contract in config, updated deployment 2021-02-22 14:26:05 +01:00
Hadrien Charlanes
dacf441916 Updated Weth gateway contract 2021-02-22 12:30:26 +01:00
Zer0dot
e4f4bb0cdb Brought branch up to speed with light deployment update 2021-02-18 09:38:13 -05:00
eboado
0302339892 - Changed modifier on batchInitReserve() 2021-02-18 13:29:17 +01:00
Zer0dot
e729926543 Merge branch 'master' into feat/light-deployments-update 2021-02-05 10:03:11 -05:00
Zer0dot
6a2d383c94 Merge branch 'master' into feat/light-deployments-update 2021-02-05 10:01:26 -05:00
Zer0dot
f590040c60 Merge remote-tracking branch 'oldfork/light-implementation' into lp-market 2021-02-04 16:45:00 -05:00
Zer0dot
0c90873843 Merge branch 'gitlab-merge' into lp-market 2021-02-04 15:49:43 -05:00
Zer0dot
0d1e673f56 Removed an un-merged line break 2021-02-04 13:43:59 -05:00
Zer0dot
d3de30ff55 Merge remote-tracking branch 'gitlab/master' into gitlab-merge 2021-02-04 12:54:38 -05:00
dhadrien
9e62528b98 Fixed memory usage 2021-02-03 15:57:34 +01:00
Zer0dot
9431541593 More fixes, some stable tests fail WIP 2021-02-02 17:44:46 -05:00
Zer0dot
57996bd5b8 Pulled lendingPool fix from origin 2021-02-01 16:10:14 -05:00
andyk
9f94f04b6c fix eth->eth repay with collateral 2021-02-01 17:13:53 +03:00
David Racero
211dca7a07 Add new variable borrowedAssetLeftovers to improve readability 2021-02-01 13:24:07 +01:00
eboado
34d7642990 - Fixed incompatible initialize() interface on LendingPool 2021-01-31 22:06:10 +01:00
Zer0dot
b4d72bfc37 Pulled contracts for light deployment 2021-01-29 22:51:59 -05:00
David Racero
37ac8b5297 Add new edge case when flash liquidation same asset. Add tests. 2021-01-29 18:09:06 +01:00
David Racero
d464b0d592 Pull master and fix conflicts 2021-01-29 13:27:12 +01:00
eboado
80fd095723 - Implemented protocol changes to enable re-usage of implementations. 2021-01-28 11:05:19 +01:00
David Racero
6a503eb0a8 Lint files. Add all ts and sol files to pre-commit. Add prettier format check to CI. 2021-01-27 15:43:34 +01:00
eboado
d6059938bb - Fixed array init on BaseUniswapAdapter 2021-01-25 09:29:07 +01:00
root
55f14c1af9 Use diff balances instead of liquidation logic for flash liquidations 2021-01-22 09:59:47 +00:00
andyk
6cebf50f11 add special quotation flow 2021-01-21 17:44:48 +03:00
David Racero
a72b73d804 Merge branch 'master' of gitlab.com:aave-tech/protocol-v2 into 183-flash-liquidation-adapter 2021-01-20 09:27:33 +01:00
The-3D
29448c19c1 Merge branch 'fix/185-validation-borrow' into 'master'
- Fix non-initialized vars.rateMode on borrow validation

See merge request aave-tech/protocol-v2!209
2021-01-19 11:46:36 +00:00
David Racero
94dd996666 Add test cases for FlashLiquidationAdapter 2021-01-18 15:40:02 +01:00
David Racero
7040f9ea2e Fix conflicts 2021-01-15 16:55:51 +01:00
root
a9aff29b77 Flash liquidation fixes. Add working test for flash liquidation. Add Tenderly tests support. 2021-01-15 15:48:54 +00:00