Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge #147

Open
wants to merge 373 commits into
base: interactive
Choose a base branch
from
Open

merge #147

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
373 commits
Select commit Hold shift + click to select a range
89a233b
Update migrations_scripts/1_use_registry_and_add_adapters.js
Yorkemartin Aug 6, 2020
e8bc323
Update migrations_scripts/1_use_registry_and_add_adapters.js
Yorkemartin Aug 6, 2020
1de2c8e
Update test/YFIAdapter.js
Yorkemartin Aug 6, 2020
72146e6
Update test/YFIAdapter.js
Yorkemartin Aug 6, 2020
a7849e1
Update test/YFIAdapter.js
Yorkemartin Aug 6, 2020
a6f2bce
Update test/YFIAdapter.js
Yorkemartin Aug 6, 2020
54e9c5c
removed author tag and protocol adapter implimentation noted
Yorkemartin Aug 6, 2020
fbc3d71
Update test/YFIAdapter.js
Yorkemartin Aug 6, 2020
d0727fd
package-lock.json ignored
Yorkemartin Aug 6, 2020
16d78a0
removed contract.only from test
Yorkemartin Aug 6, 2020
827dcfd
un-delete author tag
Yorkemartin Aug 7, 2020
fc3a4d2
Merge branch 'YFI-Adapter' of https://github.com/Yorkemartin/defi-sdk…
Yorkemartin Aug 7, 2020
8a08939
un-delete author tag / test fix
Yorkemartin Aug 7, 2020
ec0d8cb
Merge branch 'YFI-Adapter' of https://github.com/Yorkemartin/defi-sdk…
Yorkemartin Aug 7, 2020
c460860
delete package-lock from git.ignore
Yorkemartin Aug 7, 2020
e1806e6
edited package.json - reinstalled package-lock
Yorkemartin Aug 7, 2020
ea05b2c
removed package-lock changes
Yorkemartin Aug 7, 2020
9447175
copied package-lock from master repo
Yorkemartin Aug 7, 2020
8224675
Update test/YFIAdapter.js
Yorkemartin Aug 7, 2020
be2fbd3
Update test/YFIAdapter.js
Yorkemartin Aug 7, 2020
1e3cf98
Update test/YFIAdapter.js
Yorkemartin Aug 7, 2020
8ba5568
Update test/YFIAdapter.js
Yorkemartin Aug 7, 2020
1bcae00
edit test for yCrv
Yorkemartin Aug 7, 2020
5d07570
Update test/YFIAdapter.js
Yorkemartin Aug 7, 2020
0c186b3
removed await tokenadapter
Yorkemartin Aug 7, 2020
e9de133
Merge branch 'YFI-Adapter' of https://github.com/Yorkemartin/defi-sdk…
Yorkemartin Aug 7, 2020
fa1ebcc
return author tag
Yorkemartin Aug 9, 2020
210822a
added bancor V2 support
sobolev-igor Aug 10, 2020
6412544
Merge branch 'master' into added-melonprotocol
sobolev-igor Aug 10, 2020
52d677a
Merge pull request #58 from developerfred/added-melonprotocol
sobolev-igor Aug 10, 2020
378486c
Update contracts/adapters/yearn/YFIAdapter.sol
Yorkemartin Aug 10, 2020
c07109b
Update contracts/adapters/yearn/YFIAdapter.sol
Yorkemartin Aug 10, 2020
55a5017
Merge branch 'master' into YFI-Adapter
sobolev-igor Aug 10, 2020
eb582f0
Merge pull request #64 from Yorkemartin/YFI-Adapter
sobolev-igor Aug 10, 2020
1ff69a9
fixed yfi adapter's tests
sobolev-igor Aug 10, 2020
9dacb53
fixed linter
sobolev-igor Aug 10, 2020
9cd762d
Merge pull request #70 from zeriontech/added-new-protocols-support
sobolev-igor Aug 10, 2020
e510243
fixed linter
sobolev-igor Aug 10, 2020
f3e6207
Merge pull request #71 from zeriontech/fixed-yearn-staking-v1
sobolev-igor Aug 10, 2020
1d2d9a2
fixed melon adapter
sobolev-igor Aug 11, 2020
a5696c8
fixed linter
sobolev-igor Aug 11, 2020
cd9b58d
Merge pull request #72 from zeriontech/fixed-for-melon-adapter
sobolev-igor Aug 11, 2020
8e16555
added aragon
sobolev-igor Aug 12, 2020
03fe7b8
removed .only from tests
sobolev-igor Aug 12, 2020
eece102
added yam protocol
sobolev-igor Aug 12, 2020
e70c8fb
Merge pull request #73 from zeriontech/added-yam-adapters
sobolev-igor Aug 12, 2020
c22852a
fixed linter issues
sobolev-igor Aug 13, 2020
7c08a06
Merge pull request #74 from zeriontech/linter-issues
sobolev-igor Aug 13, 2020
634c724
Merge branch 'master' into added-aragon-lp-staking
sobolev-igor Aug 13, 2020
5686ec9
Merge pull request #75 from zeriontech/added-aragon-lp-staking
sobolev-igor Aug 13, 2020
4d5ee18
added curve staking
sobolev-igor Aug 14, 2020
449a4b6
added aragon staking to readme
sobolev-igor Aug 17, 2020
a4fad87
removed yam
sobolev-igor Aug 17, 2020
a086aa3
fixed tests
sobolev-igor Aug 17, 2020
4bb509b
fixed linter issues
sobolev-igor Aug 17, 2020
8859441
Merge pull request #76 from zeriontech/added-curve-staking
sobolev-igor Aug 17, 2020
528ba1e
Merge pull request #1 from zeriontech/master
krboktv Aug 18, 2020
8ff11b7
add mooniswap adapter
krboktv Aug 18, 2020
20031c0
added Matic support
sobolev-igor Aug 19, 2020
3a85bec
remove some redundant code
krboktv Aug 19, 2020
4826460
Merge pull request #77 from krboktv/mooniswap-adapter
sobolev-igor Aug 19, 2020
7ce04d4
Merge pull request #78 from zeriontech/added-matic-support
sobolev-igor Aug 25, 2020
284e01e
added curve vesting and nexus staking
sobolev-igor Aug 25, 2020
bdfc4b0
updated idle addresses
sobolev-igor Aug 27, 2020
75015c1
fixed curve staking contract
sobolev-igor Aug 27, 2020
d7b40f6
Merge pull request #79 from zeriontech/nexus-and-crv-vesting
sobolev-igor Aug 28, 2020
9467403
added SushiSwap
sobolev-igor Aug 31, 2020
bb37bdd
fixed matic adapter
sobolev-igor Aug 31, 2020
f2d4571
added kimchi
sobolev-igor Sep 2, 2020
d9b4dcd
added harvest
sobolev-igor Sep 2, 2020
4f027b8
added harvest metadata
sobolev-igor Sep 2, 2020
e745ed8
fixed linter issues
sobolev-igor Sep 2, 2020
7bbb526
fixed supported tokens
sobolev-igor Sep 2, 2020
c064d88
fixed migration script
sobolev-igor Sep 3, 2020
52ea45e
fixed fUSDT address
sobolev-igor Sep 8, 2020
6cc2b25
Delete yarn.lock
MickdeGraaf Sep 8, 2020
cc5c8c5
adding bZx to zerion sdk
Sep 8, 2020
eecfb40
adding bZx to zerion sdk
Sep 8, 2020
6e534fe
review fixes
Sep 9, 2020
b1da52f
fixing blanc lines and identation
Sep 9, 2020
b913ebb
fixing spaces
Sep 9, 2020
ff703ac
Add BerezkaDAO Token and Protocol Adapters
Sep 10, 2020
308536d
Style fixes for review
Sep 10, 2020
ac71dab
review fixes
Sep 10, 2020
42db27d
review: fixing count
Sep 10, 2020
e127864
Merge pull request #68 from MickdeGraaf/update-piedao
sobolev-igor Sep 11, 2020
293ba8d
removed redundant code
sobolev-igor Sep 11, 2020
10fa961
added sashimi
sobolev-igor Sep 11, 2020
0e47ffc
review fixes
Sep 11, 2020
bd15aea
review fixes
Sep 11, 2020
db6589f
added swerve
sobolev-igor Sep 11, 2020
188b879
Merge branch 'master' of github.com:zeriontech/protocol-wrappers into…
sobolev-igor Sep 11, 2020
5dc5c8a
Merge pull request #84 from zeriontech/sushi-adapter
sobolev-igor Sep 11, 2020
275a438
updated sushi supported tokens to SLP tokens
sobolev-igor Sep 14, 2020
807d188
Merge pull request #85 from zeriontech/upd-sushi-lp-tokens
sobolev-igor Sep 14, 2020
0f0643f
added sushi token to supported tokens
sobolev-igor Sep 14, 2020
b2378e6
Merge pull request #86 from zeriontech/upd-sushi-lp-tokens
sobolev-igor Sep 14, 2020
4c0bf80
updated nexus adapter
sobolev-igor Sep 14, 2020
c15b1b2
updated nexus adapter
sobolev-igor Sep 15, 2020
95e0a02
added cream
sobolev-igor Sep 16, 2020
d49a674
updated readme
sobolev-igor Sep 17, 2020
e79fc1a
Add token name + minor code style fixes
Sep 17, 2020
16b5e5d
added 2nd harvest adapter
sobolev-igor Sep 18, 2020
0d071a2
added uniswap staking
sobolev-igor Sep 18, 2020
af2d3b3
Merge pull request #83 from execc/feature/berezka-dao
sobolev-igor Sep 28, 2020
bd8fdf6
Merge branch 'master' into master
sobolev-igor Sep 28, 2020
144678b
Merge pull request #82 from RomanHiden/master
sobolev-igor Sep 28, 2020
a522304
updated curve token adapter
sobolev-igor Sep 30, 2020
9d218c0
updated cream staking adapter
sobolev-igor Sep 30, 2020
8e94496
updated curve staking adapter
sobolev-igor Oct 2, 2020
19843ac
Add support for token types
Oct 4, 2020
40b44e4
added piedao
sobolev-igor Oct 6, 2020
4ab0d04
updated compound
sobolev-igor Oct 6, 2020
4dbaf44
updated ampl
sobolev-igor Oct 6, 2020
9c5e2d7
added aave staking
sobolev-igor Oct 6, 2020
a5f4a28
removed .only for old tests
sobolev-igor Oct 6, 2020
7bfac1a
updated migrations
sobolev-igor Oct 6, 2020
6b5f266
Merge pull request #88 from zeriontech/added-cream
sobolev-igor Oct 6, 2020
bd003d3
Added test for Berezka Adapter
Oct 7, 2020
2aaaefd
added dodo
sobolev-igor Oct 7, 2020
214c05d
updated readme
sobolev-igor Oct 7, 2020
ebede6b
Merge pull request #89 from zeriontech/added-dodo
sobolev-igor Oct 7, 2020
079dcd6
added adapter for fnx
Oct 9, 2020
56fd1d9
fixed checksum error
Oct 9, 2020
283a320
added pickle
sobolev-igor Oct 9, 2020
84b43c2
removed .only from old tests
sobolev-igor Oct 9, 2020
1b5c8ba
added token sets v2
sobolev-igor Oct 9, 2020
eed94ba
changed interface
Oct 10, 2020
6eba39f
Review fixes
Oct 10, 2020
bcc8b77
removed unused variable
Oct 10, 2020
c17ec9f
Review fixes
Oct 12, 2020
9abeede
Merge pull request #87 from execc/feature/berezka-dao
sobolev-igor Oct 13, 2020
691b3b5
added test case for fnx
Oct 14, 2020
9821577
Merge branch 'master' of https://github.com/FinNexus/defi-sdk
Oct 14, 2020
a4c3a09
fixed dodo token adapter
sobolev-igor Oct 14, 2020
e6e14bb
added token adapter
Oct 15, 2020
f46f184
changed name
Oct 15, 2020
7db0292
added token adapter
Oct 15, 2020
e0fdf52
changed contract name
Oct 15, 2020
9ba6fc5
changed token number calculation
Oct 15, 2020
538c219
Merge pull request #90 from zeriontech/added-pickle
sobolev-igor Oct 15, 2020
ab66e30
Update contracts/adapters/finnexus/FinNexusTokenAdapter.sol
Oct 16, 2020
dc55c51
Update contracts/adapters/finnexus/FinNexusDebtAdapter.sol
Oct 16, 2020
7cf4145
Update contracts/adapters/finnexus/FinNexusDebtAdapter.sol
Oct 16, 2020
24b1923
Update contracts/adapters/finnexus/FinNexusDebtAdapter.sol
Oct 16, 2020
3ad448b
Update contracts/adapters/finnexus/FinNexusTokenAdapter.sol
Oct 16, 2020
1dc7a17
Update contracts/adapters/finnexus/FinNexusTokenAdapter.sol
Oct 16, 2020
399b4b5
Update contracts/adapters/finnexus/FinNexusTokenAdapter.sol
Oct 16, 2020
d88badb
Update contracts/adapters/finnexus/FinNexusTokenAdapter.sol
Oct 16, 2020
a1e831c
Update contracts/adapters/finnexus/FinNexusTokenAdapter.sol
Oct 16, 2020
a108114
fixed compile error
Oct 16, 2020
3be792d
[Berezka] Add support for staking tokens
Oct 19, 2020
01c08bc
Merge pull request #91 from FinNexus/master
sobolev-igor Oct 20, 2020
c1eae5d
curve + harvest updates
sobolev-igor Oct 21, 2020
c4fe0b9
curve gauges
sobolev-igor Oct 22, 2020
ff5aee9
fixed bug with wrong address
sobolev-igor Oct 23, 2020
1982487
added autostake pool to harvest adapter
sobolev-igor Oct 29, 2020
42b59c1
Merge pull request #107 from zeriontech/updated-curve-and-harvest
sobolev-igor Oct 30, 2020
92b46dd
fixed uniswap token adapter
sobolev-igor Oct 30, 2020
b743a77
fixed uniswap token adapter bugs
sobolev-igor Oct 30, 2020
05160f9
Merge pull request #108 from zeriontech/fixed-uniswap-adapter
sobolev-igor Oct 30, 2020
a55566a
updated pickle staking adapter
sobolev-igor Nov 3, 2020
a47265a
Merge pull request #98 from execc/feature/berezka-dao
sobolev-igor Nov 12, 2020
a396c32
Merge pull request #110 from zeriontech/updated-pickle
sobolev-igor Nov 12, 2020
e45d866
Merge pull request #111 from zeriontech/updated-nexus
sobolev-igor Nov 12, 2020
255beb8
updated KeeperDAO token adapter
sobolev-igor Nov 13, 2020
0ea9d33
Merge pull request #113 from zeriontech/updated-keeperdao
sobolev-igor Nov 13, 2020
920d63e
updated curve staking adapter
cr-igor Nov 26, 2020
1ed6074
updated harvest staking adapter
cr-igor Nov 26, 2020
1436d1e
added harvest autostaking adapter
cr-igor Nov 26, 2020
8decce2
added idle adapter
cr-igor Nov 30, 2020
d3b90d9
add adapters for Mushrooms Finance
mandalorian-101 Dec 1, 2020
d49f1ab
code format
mandalorian-101 Dec 1, 2020
d9c58b3
Merge pull request #1 from mandalorian-101/master
mushroomsforest Dec 1, 2020
14d344e
fix address checksum
mandalorian-101 Dec 1, 2020
353759c
Merge pull request #2 from mandalorian-101/master
mushroomsforest Dec 1, 2020
36847a0
added SnowSwap adapters
cr-igor Dec 9, 2020
ab5ac2b
Merge pull request #123 from zeriontech/updated-staking-adapters
cr-igor Dec 10, 2020
4bd2821
Make return correct amount (0) for non-COMP tokens
execc Dec 15, 2020
a2dc833
Merge pull request #125 from execc/patch-1
cr-igor Dec 16, 2020
4bb0a93
added PieDAO ExperiPie adapters
cr-igor Dec 15, 2020
8f2fa2b
added bancor v2.1 support
cr-igor Dec 16, 2020
a10369c
fixed bancor adapter names
cr-igor Dec 17, 2020
5b72329
updated tests
cr-igor Dec 17, 2020
1120ee2
fixed linter issues
cr-igor Dec 17, 2020
e3d5e7f
DD-1576 Add AKRO, ADEL Staking Adapter
0xbuidlman Dec 18, 2020
f8b39b2
DD-1408 Add tests
0xbuidlman Dec 18, 2020
10a3713
Update author tags
0xbuidlman Dec 21, 2020
dca449e
Merge pull request #127 from akropolisio/master
cr-igor Dec 21, 2020
fc255b8
Merge pull request #116 from mushroomsforest/master
cr-igor Dec 21, 2020
7dae194
removed .only
cr-igor Dec 21, 2020
49e4f34
fixed mushrooms adapter
cr-igor Dec 21, 2020
68c7daf
Merge pull request #128 from zeriontech/mushrooms-fixes
cr-igor Dec 21, 2020
cde15d9
Merge pull request #126 from zeriontech/add-new-adapters
cr-igor Dec 21, 2020
423a616
Merge pull request #2 from zeriontech/master
krboktv Dec 25, 2020
8d74b6e
Add 1inch Liquidity Protocol
krboktv Dec 26, 2020
a1600f1
Merge pull request #129 from krboktv/one-inch-liquidity-protocol
cr-igor Dec 28, 2020
1009676
updated 1lp contracts
cr-igor Dec 28, 2020
e5295f7
Merge pull request #130 from zeriontech/updated-1lp
cr-igor Dec 28, 2020
bfcc66c
fixed 1inch zero division
cr-igor Dec 29, 2020
2c73489
fixed Bancor LP adapter
cr-igor Dec 30, 2020
7c31f55
Merge pull request #131 from zeriontech/1inch-bancor-fixes
cr-igor Dec 30, 2020
0df2116
upd ampleforth
cr-igor Jan 14, 2021
87588b2
added pool together
cr-igor Jan 16, 2021
78040f6
added yearn vaults adapters
cr-igor Jan 16, 2021
ce2536d
updated pool together adapters and tests
cr-igor Jan 19, 2021
54ca178
added audits
cr-igor Jan 21, 2021
c86d9d2
add livepeer staking adaptor
adamsoffer Jan 22, 2021
f09b5cc
added enzyme read adapters
cr-igor Jan 25, 2021
dc01b1c
fixes
adamsoffer Jan 25, 2021
fe3f87e
Merge pull request #135 from adamsoffer/livepeer-adaptor
cr-igor Jan 26, 2021
fbe7c93
fixed tests linter
cr-igor Jan 26, 2021
4132803
upd gitignore
cr-igor Jan 26, 2021
0aa9a29
fixed tests
cr-igor Jan 26, 2021
549a6bd
Add LINKSWAP adapter
giovannidisiena Jan 26, 2021
49630af
added new protocols
cr-igor Jan 26, 2021
e2c2a06
removed broken test
cr-igor Jan 26, 2021
08a2519
fixed package-lock
cr-igor Jan 26, 2021
c9866c3
fixed old mstable adapter
cr-igor Jan 26, 2021
a219a0e
updated node version in actions
cr-igor Jan 26, 2021
f6aa791
fixed coverage action
cr-igor Jan 26, 2021
743d5dd
add veCRV support
just-toby Jan 27, 2021
54a85bc
Add sYFL pools
giovannidisiena Feb 2, 2021
620f36a
added TubeProtocolAdapter
Feb 2, 2021
7b80468
added MustStakingAdapter
Feb 2, 2021
95f6a33
Add yax-weth pool
giovannidisiena Feb 4, 2021
2458ed7
Add new YFL-WETH pool with replenished rewards
giovannidisiena Feb 5, 2021
1843748
Merge pull request #134 from giovannidisiena/linkswap_adapter
sobolev-igor Feb 11, 2021
91bf540
Merge pull request #139 from giovannidisiena/linkswap_adapter_update
sobolev-igor Feb 11, 2021
1ff7161
fixed tests for linkswap
cr-igor Feb 11, 2021
ade1a54
upd uniswap token adapter
cr-igor Feb 11, 2021
e30ec6b
removed .only
cr-igor Feb 11, 2021
f4406fe
Merge pull request #141 from toparc077/master
sobolev-igor Feb 11, 2021
c6c6497
added must/tube tests
cr-igor Feb 11, 2021
a0a5ffb
fixed linter
cr-igor Feb 11, 2021
9169003
fixed indentation
cr-igor Feb 11, 2021
84236a4
add veCRV support
just-toby Jan 27, 2021
f57c719
Merge branch 'master' of https://github.com/just-toby/defi-sdk
just-toby Feb 12, 2021
9d44d46
remove old files
just-toby Feb 12, 2021
e68b890
update to veCRV adapter
just-toby Feb 12, 2021
f8a50f3
Merge pull request #138 from just-toby/master
sobolev-igor Feb 13, 2021
e7e5dc0
fixed veCRV adapter
cr-igor Feb 15, 2021
6a24cb6
fixed indentation
cr-igor Feb 15, 2021
05e1e5a
fixed tests
cr-igor Feb 15, 2021
e9243c2
added reflexer adapters
cr-igor Feb 18, 2021
27b7dc8
minor fixes
cr-igor Feb 18, 2021
0710feb
fixed reflexer adapters
cr-igor Feb 18, 2021
e1719a4
fixed reflexer debt adapter
cr-igor Feb 18, 2021
e0444ee
fixed reflexer adapters
cr-igor Feb 18, 2021
29e809c
added oued read adapter
cr-igor Feb 18, 2021
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
22 changes: 0 additions & 22 deletions .eslintrc.js

This file was deleted.

22 changes: 22 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"env": {
"browser": true,
"es6": true
},
"extends": [
"airbnb-base"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
"indent": ["error", 2],
"no-undef": "off",
"prefer-const": "off"
}
}
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v1
uses: actions/checkout@v2
- name: setup-node
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: '10.x'
node-version: '14'
- name: install
run: npm install
- name: build
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v1
uses: actions/checkout@v2
- name: setup-node
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: '10.x'
node-version: '14'
- name: install
run: npm install
- name: test+coverage
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v1
uses: actions/checkout@v2
- name: setup-node
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: '10.x'
node-version: '14'
- name: install
run: npm install
- name: lint
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v1
uses: actions/checkout@v2
- name: setup-node
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: '10.x'
node-version: '14'
- name: install
run: npm install
- name: test
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ coverage.json
.log
.env
ganache.log
.DS_Store
6 changes: 5 additions & 1 deletion .solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
{ "maxLength" : 50 }
],
"function-max-lines": [
"error", 60
"error",
149
],
"compiler-version": [
"error",
Expand All @@ -20,6 +21,9 @@
],
"const-name-snakecase": [
"off"
],
"comprehensive-interface": [
"off"
]
}
}
1 change: 1 addition & 0 deletions .solhintignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ node_modules
./contracts/ProtocolManager.sol
./contracts/TokenAdapterManager.sol
./contracts/adapters/dydx
./contracts/adapters/berezka/lib
85 changes: 70 additions & 15 deletions README.md

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
14 changes: 14 additions & 0 deletions compiler.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"contractsDir": "contracts",
"artifactsDir": "artifacts",
"contracts": [],
"shouldSaveStandardInput": true,
"compilerSettings": {
"optimizer": { "enabled": true, "runs": 1000000 },
"outputSelection": {
"*": {
"*": ["abi", "evm.bytecode.object"]
}
}
}
}
8 changes: 4 additions & 4 deletions contracts/ProtocolManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ abstract contract ProtocolManager is Ownable {
string internal constant INITIAL_PROTOCOL_NAME = "Initial protocol name";

// protocol name => next protocol name (linked list)
mapping (string => string) internal nextProtocolName;
mapping(string => string) internal nextProtocolName;
// protocol name => protocol struct with info and adapters
mapping (string => ProtocolMetadata) internal protocolMetadata;
mapping(string => ProtocolMetadata) internal protocolMetadata;
// protocol name => array of protocol adapters
mapping (string => address[]) internal protocolAdapters;
mapping(string => address[]) internal protocolAdapters;
// protocol adapter => array of supported tokens
mapping (address => address[]) internal supportedTokens;
mapping(address => address[]) internal supportedTokens;

/**
* @notice Initializes contract storage.
Expand Down
4 changes: 2 additions & 2 deletions contracts/TokenAdapterManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ abstract contract TokenAdapterManager is Ownable {
string internal constant INITIAL_NAME = "Initial token name";

// adapter name => next adapter name (linked list)
mapping (string => string) internal nextTokenAdapterName;
mapping(string => string) internal nextTokenAdapterName;
// adapter name => adapter info
mapping (string => address) internal tokenAdapter;
mapping(string => address) internal tokenAdapter;

/**
* @notice Initializes contract storage.
Expand Down
2 changes: 1 addition & 1 deletion contracts/adapters/ERC20TokenAdapter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ contract ERC20TokenAdapter is TokenAdapter {
bytes memory result;

for (uint256 i = 0; i < 32; i++) {
if (data[i] != byte(0)) {
if (data[i] != bytes1(0)) {
length++;
}
}
Expand Down
14 changes: 7 additions & 7 deletions contracts/adapters/TokenAdapter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ interface TokenAdapter {
function getMetadata(address token) external view returns (TokenMetadata memory);

/**
* @dev MUST return array of Component structs with underlying tokens rates for the given token.
* struct Component {
* address token; // Address of token contract
* string tokenType; // Token type ("ERC20" by default)
* uint256 rate; // Price per share (1e18)
* }
*/
* @dev MUST return array of Component structs with underlying tokens rates for the given token.
* struct Component {
* address token; // Address of token contract
* string tokenType; // Token type ("ERC20" by default)
* uint256 rate; // Price per share (1e18)
* }
*/
function getComponents(address token) external view returns (Component[] memory);
}
53 changes: 53 additions & 0 deletions contracts/adapters/aave/AaveStakingAdapter.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// Copyright (C) 2020 Zerion Inc. <https://zerion.io>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

pragma solidity 0.6.5;
pragma experimental ABIEncoderV2;

import { ERC20 } from "../../ERC20.sol";
import { ProtocolAdapter } from "../ProtocolAdapter.sol";


interface StakedAave {
function getTotalRewardsBalance(address) external view returns (uint256);
}


/**
* @title Adapter for Aave protocol (staking).
* @dev Implementation of ProtocolAdapter interface.
* @author Igor Sobolev <[email protected]>
*/
contract AaveStakingAdapter is ProtocolAdapter {

string public constant override adapterType = "Asset";

string public constant override tokenType = "ERC20";

address internal constant STAKED_AAVE = 0x4da27a545c0c5B758a6BA100e3a049001de870f5;

/**
* @return Amount of staked AAVE tokens for a given account.
* @dev Implementation of ProtocolAdapter interface function.
*/
function getBalance(address, address account) external view override returns (uint256) {
uint256 totalBalance = 0;

totalBalance += ERC20(STAKED_AAVE).balanceOf(account);
totalBalance += StakedAave(STAKED_AAVE).getTotalRewardsBalance(account);

return totalBalance;
}
}
41 changes: 41 additions & 0 deletions contracts/adapters/aaveUniswap/AaveUniswapAssetAdapter.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Copyright (C) 2020 Zerion Inc. <https://zerion.io>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

pragma solidity 0.6.5;
pragma experimental ABIEncoderV2;

import { ERC20 } from "../../ERC20.sol";
import { ProtocolAdapter } from "../ProtocolAdapter.sol";


/**
* @title Asset adapter for Aave protocol (Uniswap market).
* @dev Implementation of ProtocolAdapter interface.
* @author Igor Sobolev <[email protected]>
*/
contract AaveUniswapAssetAdapter is ProtocolAdapter {

string public constant override adapterType = "Asset";

string public constant override tokenType = "AToken Uniswap Market";

/**
* @return Amount of ATokens held by the given account.
* @dev Implementation of ProtocolAdapter interface function.
*/
function getBalance(address token, address account) external view override returns (uint256) {
return ERC20(token).balanceOf(account);
}
}
68 changes: 68 additions & 0 deletions contracts/adapters/aaveUniswap/AaveUniswapDebtAdapter.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
// Copyright (C) 2020 Zerion Inc. <https://zerion.io>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

pragma solidity 0.6.5;
pragma experimental ABIEncoderV2;

import { ProtocolAdapter } from "../ProtocolAdapter.sol";


/**
* @dev LendingPoolAddressesProvider contract interface.
* Only the functions required for AaveUniswapDebtAdapter contract are added.
* The LendingPoolAddressesProvider contract is available here
* github.com/aave/aave-protocol/blob/master/contracts/configuration/LendingPoolAddressesProvider.sol.
*/
interface LendingPoolAddressesProvider {
function getLendingPool() external view returns (LendingPool);
}


/**
* @dev LendingPool contract interface.
* Only the functions required for AaveUniswapDebtAdapter contract are added.
* The LendingPool contract is available here
* github.com/aave/aave-protocol/blob/master/contracts/lendingpool/LendingPool.sol.
*/
interface LendingPool {
function getUserReserveData(address, address) external view returns (uint256, uint256);
}


/**
* @title Debt adapter for Aave protocol (Uniswap market).
* @dev Implementation of ProtocolAdapter interface.
* @author Igor Sobolev <[email protected]>
*/
contract AaveUniswapDebtAdapter is ProtocolAdapter {

address internal constant PROVIDER = 0x7fd53085B9A29D236235D6FC593b47C9C33429F1;

string public constant override adapterType = "Debt";

string public constant override tokenType = "ERC20";

/**
* @return Amount of debt of the given account for the protocol.
* @dev Implementation of ProtocolAdapter interface function.
*/
function getBalance(address token, address account) external view override returns (uint256) {
LendingPool pool = LendingPoolAddressesProvider(PROVIDER).getLendingPool();

(, uint256 debtAmount) = pool.getUserReserveData(token, account);

return debtAmount;
}
}
Loading