-
Notifications
You must be signed in to change notification settings - Fork 383
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into squashed-rebased-scp
* master: (269 commits) Do new aave linear deploy (#2055) Deploy entrypoint (#2062) (Re) deployment preparation: `AuthorizerAdaptorEntrypoint` (#2060) chore: update deployment readmes to point to artifact files rather than abis (#2061) Expose deployment artifacts from deployments package rather than ABI + bytecode (#2058) chore: add missing action-ids (#2025) Remove Protocol Fee Splitter task (#2054) Adaptor entrypoint events (#2051) Verify AaveLinearPool on deployment (#2040) Rename IPoolVersion --> IFactoryCreatedPoolVersion. (#2045) docs: remove deprecated networks from jsdoc (#2029) Add Version unit test. (#2038) Update linear build info (#2041) Make unnecessarily async functions sync (#2030) Do deployment (#2035) Aave linear pool versioning (#2032) Fix recovery readme (#2037) style: fix linter (#2036) Add tokens task (#2024) Create recovery helper deployment (#2033) ...
- Loading branch information
Showing
946 changed files
with
57,742 additions
and
433,722 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,6 @@ cache/ | |
dist/ | ||
pkg/balancer-js/src/typechain/* | ||
|
||
# Forge | ||
forge-artifacts/ | ||
forge-cache/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "pvt/lib/forge-std"] | ||
path = pvt/lib/forge-std | ||
url = https://github.com/foundry-rs/forge-std |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,18 @@ Active development occurs in this repository, which means some contracts in it m | |
- [`v2-liquidity-mining`](./pkg/liquidity-mining): contracts that compose the liquidity mining (veBAL) system. | ||
- [`v2-governance-scripts`](./pkg/governance-scripts): contracts that execute complex governance actions. | ||
|
||
## Pre-requisites | ||
|
||
The build & test instructions below should work out of the box with Node ^14.18.0. (Please note that it needs Node 14 specifically, and will NOT work with Node 16 or higher. Minor version should be at least 18). | ||
|
||
## Clone | ||
|
||
This repository uses git submodules; use `--recurse-submodules` option when cloning. For example, using https: | ||
|
||
```bash | ||
$ git clone --recurse-submodules https://github.com/balancer-labs/balancer-v2-monorepo.git | ||
``` | ||
|
||
## Build and Test | ||
|
||
Before any tests can be run, the repository needs to be prepared: | ||
|
@@ -55,11 +67,27 @@ $ yarn test | |
|
||
You can see a sample report of a test run [here](./audits/test-report.md). | ||
|
||
### Foundry (Forge) tests | ||
|
||
To run Forge tests, first [install Foundry](https://book.getfoundry.sh/getting-started/installation). The installation steps below apply to Linux or MacOS. Follow the link for additional options. | ||
|
||
```bash | ||
$ curl -L https://foundry.paradigm.xyz | bash | ||
$ source ~/.bashrc # or open a new terminal | ||
$ foundryup | ||
``` | ||
|
||
Then, to run tests in a single package, run: | ||
```bash | ||
$ cd pkg/<package> # e.g. cd pkg/v2-vault | ||
$ yarn test-fuzz | ||
``` | ||
|
||
## Security | ||
|
||
Multiple independent reviews and audits were performed by [Certora](https://www.certora.com/), [OpenZeppelin](https://openzeppelin.com/) and [Trail of Bits](https://www.trailofbits.com/). The latest reports from these engagements are located in the [`audits`](./audits) directory. | ||
|
||
Bug bounties apply to most of the smart contracts hosted in this repository: head to [Balancer V2 Bug Bounties](https://docs.balancer.fi/core-concepts/security/bug-bounties) to learn more. | ||
Bug bounties apply to most of the smart contracts hosted in this repository: head to [Balancer V2 Bug Bounties](https://docs.balancer.fi/core-concepts/security/bug-bounties) to learn more. Alternatively, send an email to [email protected]. | ||
|
||
All core smart contracts are immutable, and cannot be upgraded. See page 6 of the [Trail of Bits audit](https://github.com/balancer-labs/balancer-v2-monorepo/blob/master/audits/trail-of-bits/2021-04-05.pdf): | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[profile.default] | ||
src = 'contracts' | ||
out = 'forge-artifacts' | ||
libs = ['node_modules', 'lib'] | ||
test = 'test/foundry' | ||
cache_path = 'forge-cache' | ||
allow_paths = ['../', '../../pvt/lib/forge-std'] | ||
remappings = [ | ||
'ds-test/=../../pvt/lib/forge-std/lib/ds-test/src/', | ||
'forge-std/=../../pvt/lib/forge-std/src/', | ||
'@balancer-labs/=../../node_modules/@balancer-labs/' | ||
] | ||
optimizer = true | ||
optimizer_runs = 9999 | ||
solc_version = '0.7.1' | ||
ignored_error_codes = [8261] | ||
|
||
[fuzz] | ||
runs = 10000 | ||
max_test_rejects = 60000 | ||
|
||
[profile.intense.fuzz] | ||
verbosity = 3 | ||
runs = 100000 | ||
max_test_rejects = 600000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
"url": "https://github.com/balancer-labs/balancer-v2-monorepo/issues" | ||
}, | ||
"engines": { | ||
"node": ">=12.10" | ||
"node": ">=14.18.0 <15" | ||
}, | ||
"contributors": [ | ||
"Daniel Fernandez <[email protected]>", | ||
|
Oops, something went wrong.