Skip to content

Commit 7790961

Browse files
committed
Initial commit
0 parents  commit 7790961

521 files changed

Lines changed: 92318 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# http://editorconfig.org
4+
5+
root = true
6+
7+
[*]
8+
indent_style = space
9+
indent_size = 2
10+
end_of_line = lf
11+
charset = utf-8
12+
trim_trailing_whitespace = true
13+
insert_final_newline = true
14+
15+
[{Makefile,**.mk}]
16+
# Use tabs for indentation (Makefiles require tabs)
17+
indent_style = tab

.env.example

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Broadcast user address
2+
SENDER=
3+
4+
# Deployment via ledger
5+
MNEMONIC_INDEX=
6+
LEDGER_SENDER=
7+
8+
# Deployment via private key
9+
PRIVATE_KEY=
10+
11+
# Test rpc_endpoints
12+
RPC_MAINNET=https://eth.llamarpc.com
13+
RPC_AVALANCHE=https://api.avax.network/ext/bc/C/rpc
14+
RPC_OPTIMISM=https://optimism.llamarpc.com
15+
RPC_POLYGON=https://polygon.llamarpc.com
16+
RPC_ARBITRUM=https://arbitrum.llamarpc.com
17+
RPC_FANTOM=https://rpc.ftm.tools
18+
RPC_HARMONY=https://api.harmony.one
19+
RPC_METIS=https://andromeda.metis.io/?owner=1088
20+
RPC_BASE=https://base.llamarpc.com
21+
RPC_ZKEVM=https://zkevm-rpc.com
22+
RPC_GNOSIS=https://rpc.ankr.com/gnosis
23+
RPC_BNB=https://binance.llamarpc.com
24+
RPC_SCROLL=https://rpc.scroll.io
25+
26+
# Etherscan api keys for verification & download utils
27+
ETHERSCAN_API_KEY_MAINNET=
28+
ETHERSCAN_API_KEY_POLYGON=
29+
ETHERSCAN_API_KEY_AVALANCHE=
30+
ETHERSCAN_API_KEY_FANTOM=
31+
ETHERSCAN_API_KEY_OPTIMISM=
32+
ETHERSCAN_API_KEY_ARBITRUM=
33+
ETHERSCAN_API_KEY_BASE=
34+
ETHERSCAN_API_KEY_ZKEVM=
35+
ETHERSCAN_API_KEY_GNOSIS=
36+
ETHERSCAN_API_KEY_BNB=
37+
ETHERSCAN_API_KEY_SCROLL=
38+
39+
# Simulation/fork creation
40+
TENDERLY_ACCESS_TOKEN=
41+
TENDERLY_ACCOUNT=
42+
TENDERLY_PROJECT=

.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# build and cache
2+
cache/
3+
out/
4+
5+
# general
6+
.env
7+
.env.bk
8+
reports/
9+
diffs/
10+
downloads/
11+
12+
# editors
13+
.idea
14+
.vscode
15+
lcov*
16+
17+
# well, looks strange to ignore package-lock, but we have only pretter and it's temproray
18+
package-lock.json
19+
node_modules
20+
21+
# ignore foundry deploy artifacts
22+
broadcast/
23+
24+
.DS_Store
25+
26+
report/

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[submodule "lib/solidity-utils"]
2+
path = lib/solidity-utils
3+
url = https://github.com/bgd-labs/solidity-utils
4+
[submodule "lib/forge-std"]
5+
path = lib/forge-std
6+
url = https://github.com/foundry-rs/forge-std

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
out
2+
lib
3+
cache
4+
node_modules

.prettierrc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"overrides": [
3+
{
4+
"files": "*.sol",
5+
"options": {
6+
"printWidth": 100,
7+
"tabWidth": 2,
8+
"useTabs": false,
9+
"singleQuote": true,
10+
"bracketSpacing": false
11+
}
12+
},
13+
{
14+
"files": "*.ts",
15+
"options": {
16+
"printWidth": 100,
17+
"tabWidth": 2,
18+
"useTabs": false,
19+
"singleQuote": true,
20+
"bracketSpacing": false
21+
}
22+
}
23+
]
24+
}

.solhint.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "solhint:recommended",
3+
"rules": {
4+
"compiler-version": ["error", "^0.8.0"],
5+
"func-visibility": ["warn", { "ignoreConstructors": true }],
6+
"compiler-fixed": false,
7+
"quotes": ["error", "single"],
8+
"indent": [2]
9+
}
10+
}

.solhintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

LICENSE

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
Business Source License 1.1
2+
3+
License text copyright (c) 2020 MariaDB Corporation Ab, All Rights Reserved.
4+
“Business Source License” is a trademark of MariaDB Corporation Ab.
5+
6+
-----------------------------------------------------------------------------
7+
8+
Parameters
9+
10+
Licensor: Aave DAO, represented by its governance smart contracts
11+
12+
13+
Licensed Work: Aave v3.1
14+
The Licensed Work is (c) 2024 Aave DAO, represented by its governance smart contracts
15+
16+
Additional Use Grant: You are permitted to use, copy, and modify the Licensed Work, subject to
17+
the following conditions:
18+
- Your use of the Licensed Work shall not, directly or indirectly, enable, facilitate,
19+
or assist in any way with the migration of users and/or funds from the Aave ecosystem.
20+
The "Aave ecosystem" is defined in the context of this License as the collection of
21+
software protocols and applications approved by the Aave governance, including all
22+
those produced within compensated service provider engagements with the Aave DAO.
23+
The Aave DAO is able to waive this requirement for one or more third-parties, if and
24+
only if explicitly indicating it on a record 'authorizations' on govv3.aavelicense.eth.
25+
- You are neither an individual nor a direct or indirect participant in any incorporated
26+
organization, DAO, or identifiable group, that has deployed in production any original
27+
or derived software ("fork") of the Aave ecosystem for purposes competitive to Aave,
28+
within the preceding four years.
29+
The Aave DAO is able to waive this requirement for one or more third-parties, if and
30+
only if explicitly indicating it on a record 'authorizations' on v31.aavelicense.eth.
31+
- You must ensure that the usage of the Licensed Work does not result in any direct or
32+
indirect harm to the Aave ecosystem or the Aave brand. This encompasses, but is not limited to,
33+
reputational damage, omission of proper credit/attribution, or utilization for any malicious
34+
intent.
35+
36+
Change Date: The earlier of:
37+
- 2027-03-06
38+
- If specified, the date in the 'change-date' record on v31.aavelicense.eth
39+
40+
Change License: MIT
41+
42+
-----------------------------------------------------------------------------
43+
44+
Notice
45+
46+
The Business Source License (this document, or the “License”) is not an Open
47+
Source license. However, the Licensed Work will eventually be made available
48+
under an Open Source License, as stated in this License.
49+
50+
-----------------------------------------------------------------------------
51+
52+
Terms
53+
54+
The Licensor hereby grants you the right to copy, modify, create derivative
55+
works, redistribute, and make non-production use of the Licensed Work. The
56+
Licensor may make an Additional Use Grant, above, permitting limited
57+
production use.
58+
59+
Effective on the Change Date, or the fourth anniversary of the first publicly
60+
available distribution of a specific version of the Licensed Work under this
61+
License, whichever comes first, the Licensor hereby grants you rights under
62+
the terms of the Change License, and the rights granted in the paragraph
63+
above terminate.
64+
65+
If your use of the Licensed Work does not comply with the requirements
66+
currently in effect as described in this License, you must purchase a
67+
commercial license from the Licensor, its affiliated entities, or authorized
68+
resellers, or you must refrain from using the Licensed Work.
69+
70+
All copies of the original and modified Licensed Work, and derivative works
71+
of the Licensed Work, are subject to this License. This License applies
72+
separately for each version of the Licensed Work and the Change Date may vary
73+
for each version of the Licensed Work released by Licensor.
74+
75+
You must conspicuously display this License on each original or modified copy
76+
of the Licensed Work. If you receive the Licensed Work in original or
77+
modified form from a third party, the terms and conditions set forth in this
78+
License apply to your use of that work.
79+
80+
Any use of the Licensed Work in violation of this License will automatically
81+
terminate your rights under this License for the current and all other
82+
versions of the Licensed Work.
83+
84+
This License does not grant you any right in any trademark or logo of
85+
Licensor or its affiliates (provided that you may use a trademark or logo of
86+
Licensor as expressly required by this License).
87+
88+
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
89+
AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
90+
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
91+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
92+
TITLE.
93+
94+
MariaDB hereby grants you permission to use this License’s text to license
95+
your works, and to refer to it using the trademark “Business Source License”,
96+
as long as you comply with the Covenants of Licensor below.
97+
98+
Covenants of Licensor
99+
100+
In consideration of the right to use this License’s text and the “Business
101+
Source License” name and trademark, Licensor covenants to MariaDB, and to all
102+
other recipients of the licensed work to be provided by Licensor:
103+
104+
1. To specify as the Change License the GPL Version 2.0 or any later version,
105+
or a license that is compatible with GPL Version 2.0 or a later version,
106+
where “compatible” means that software provided under the Change License can
107+
be included in a program with software provided under GPL Version 2.0 or a
108+
later version. Licensor may specify additional Change Licenses without
109+
limitation.
110+
111+
2. To either: (a) specify an additional grant of rights to use that does not
112+
impose any additional restriction on the right granted in this License, as
113+
the Additional Use Grant; or (b) insert the text “None”.
114+
115+
3. To specify a Change Date.
116+
117+
4. Not to modify this License in any other way.

Makefile

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# include .env file and export its env vars
2+
# (-include to ignore error if it does not exist)
3+
-include .env
4+
5+
# deps
6+
update:; forge update
7+
8+
# Build & test
9+
test :; forge test -vvv --no-match-contract DeploymentsGasLimits
10+
test-watch :; forge test --watch -vvv --no-match-contract DeploymentsGasLimits
11+
coverage :; forge coverage --report lcov && \
12+
lcov --remove ./lcov.info -o ./lcov.info.p \
13+
'scripts/*' \
14+
'tests/*' \
15+
'src/deployments/*' \
16+
'src/periphery/contracts/v3-config-engine/*' \
17+
'src/periphery/contracts/treasury/*' \
18+
'src/periphery/contracts/dependencies/openzeppelin/ReentrancyGuard.sol' \
19+
'src/periphery/contracts/misc/UiIncentiveDataProviderV3.sol' \
20+
'src/periphery/contracts/misc/UiPoolDataProviderV3.sol' \
21+
'src/periphery/contracts/misc/WalletBalanceProvider.sol' \
22+
'src/periphery/contracts/mocks/*' \
23+
'src/core/contracts/mocks/*' \
24+
'src/core/contracts/dependencies/*' \
25+
'src/core/contracts/misc/AaveProtocolDataProvider.sol' \
26+
'src/core/contracts/protocol/libraries/configuration/*' \
27+
'src/core/contracts/protocol/libraries/logic/GenericLogic.sol' \
28+
'src/core/contracts/protocol/libraries/logic/ReserveLogic.sol' \
29+
&& genhtml ./lcov.info.p -o report --branch-coverage
30+
31+
# Utilities
32+
download :; cast etherscan-source --chain ${chain} -d src/etherscan/${chain}_${address} ${address}
33+
git-diff :
34+
@mkdir -p diffs
35+
@printf '%s\n%s\n%s\n' "\`\`\`diff" "$$(git diff --no-index --diff-algorithm=patience --ignore-space-at-eol ${before} ${after})" "\`\`\`" > diffs/${out}.md

0 commit comments

Comments
 (0)