Skip to content

Commit 7595407

Browse files
authored
Merge pull request #228 from valory-xyz/pol
feat: initial implementation on POL active management
2 parents d665970 + e11dc05 commit 7595407

75 files changed

Lines changed: 16852 additions & 306 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.

.eslintignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/workflows/workflow.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ jobs:
3535

3636
# Compile the code
3737
- name: Compile, adjust uniswap library hash and recompile again
38-
run: npm run compile
38+
run: yarn compile
3939

4040
# Compile the code and run hardhat tests
4141
- name: Run hardhat tests
42-
run: ./node_modules/.bin/hardhat test
42+
run: yarn test
4343

4444
# Run hardhat coverage and upload codecov report
4545
- name: Solidity coverage summary
46-
run: ./node_modules/.bin/hardhat coverage
46+
run: yarn coverage
4747
- name: Upload coverage to Codecov
4848
uses: codecov/codecov-action@v1
4949
with:
@@ -53,9 +53,9 @@ jobs:
5353
name: codecov-umbrella
5454
fail_ci_if_error: false
5555

56-
# Compile the code and run foundry tests
56+
# Compile the code and run foundry tests (except for fork ones)
5757
- name: Run foundry tests
58-
run: forge test -vvv
58+
run: forge test --match-contract Depository && forge test --match-contract Dispenser && forge test --match-contract Treasury
5959

6060
scan:
6161
name: gitleaks

.gitleaksignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,4 +232,5 @@ c097d8274ab4cdbe199d0b92525aab13031d3866:scripts/deployment/globals_mainnet.json
232232
c097d8274ab4cdbe199d0b92525aab13031d3866:scripts/deployment/globals_mainnet.json:generic-api-key:36
233233
33fa7bba2dbef77a6d7029b12f065afaae102ed5:scripts/deployment/staking/celo/globals_celo_mainnet.json:generic-api-key:15
234234
cc02a34e835abcc1c6fb329bd9b407883e41961f:scripts/deployment/staking/celo/globals_celo_mainnet.json:generic-api-key:15
235+
237a184f7cd5837b76566c42f8b5680c9e5d7d0d:contracts/pol/LiquidityManagerOptimism.sol:generic-api-key:231
235236

.solcover.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
module.exports = {
22
skipFiles: [
3+
"interfaces/IBridgeErrors.sol",
4+
"interfaces/IDonatorBlacklist.sol",
5+
"interfaces/IErrorsTokenomics.sol",
6+
"interfaces/IGenericBondCalculator.sol",
7+
"interfaces/IOLAS.sol",
8+
"interfaces/IPositionManagerV3.sol",
9+
"interfaces/IServiceRegistry.sol",
10+
"interfaces/IToken.sol",
11+
"interfaces/ITokenomics.sol",
12+
"interfaces/ITreasury.sol",
13+
"interfaces/IUniswapV2Pair.sol",
14+
"interfaces/IUniswapV3.sol",
15+
"interfaces/IVotingEscrow.sol",
16+
"libraries/FixedPoint96.sol",
17+
"libraries/FullMath.sol",
18+
"libraries/LiquidityAmounts.sol",
19+
"libraries/TickMath.sol",
320
"staking/test/BridgeRelayer.sol",
421
"staking/test/MockDepositProcessorL1.sol",
522
"staking/test/MockStakingDispenser.sol",
@@ -12,6 +29,7 @@ module.exports = {
1229
"test/MockRegistry.sol",
1330
"test/MockTokenomics.sol",
1431
"test/MockVE.sol",
32+
"test/MockVoteWeighting.sol",
1533
"test/ReentrancyAttacker.sol",
1634
"test/TestTokenomics.sol",
1735
"test/UniswapFactory.sol",

README.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,21 +68,36 @@ test
6868
```
6969

7070
### Compile the code and run
71+
#### Hardhat
7172
Compile the code with Hardhat:
7273
```
73-
npm run compile
74+
yarn compile
7475
```
7576
Run tests with Hardhat:
7677
```
77-
npx hardhat test
78+
yarn test
7879
```
79-
Compile the code with Foundry:
80+
Run coverage with Hardhat:
81+
```
82+
yarn coverage
83+
```
84+
85+
#### Forge
86+
Compile the code with Forge:
8087
```
8188
forge build
8289
```
83-
Run tests with Foundry:
90+
Run tests with Forge (skip fork testing):
91+
```
92+
forge test --match-contract Depository -vvv
93+
forge test --match-contract Dispenser -vvv
94+
forge test --match-contract Treasury -vvv
95+
```
96+
Run fork tests with Forge:
8497
```
85-
forge test
98+
forge test -f $FORK_NODE_URL --match-contract LiquidityManagerETH -vvv
99+
forge test -f $FORK_NODE_URL --match-contract LiquidityManagerBase -vvv
100+
forge test -f $FORK_NODE_URL --match-contract BuyBackBurner -vvv
86101
```
87102

88103
### Audits

audits/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ An internal audit with a focus on tokenimics inflation update is located in this
1616

1717
An internal audit with a focus on WithheldAmount fixing in PoAA Staking is located in this folder: [internal audit 7](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/audits/internal7).
1818

19+
An internal audit with a focus on POL Manager is located in this folder: [internal audit 8](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/audits/internal8).
20+
21+
An internal audit with a focus on BuyBackBurner/Bridge2Burner is located in this folder: [internal audit 9](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/audits/internal9).
22+
1923
### External audit
2024
Final audit reports are listed in their historical order:
2125
- [v1](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/audits/Autonolas%20Tokenomics%20Smart%20Contract%20Audit.pdf);

0 commit comments

Comments
 (0)