-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from euler-xyz/invariants-test
Test: invariants tests
- Loading branch information
Showing
30 changed files
with
861 additions
and
66 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# name: Echidna Test | ||
|
||
# on: | ||
# push: | ||
# branches: | ||
# - main | ||
# pull_request: | ||
|
||
# env: | ||
# FOUNDRY_PROFILE: ci | ||
|
||
# concurrency: | ||
# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
# cancel-in-progress: true | ||
|
||
# jobs: | ||
# test: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Checkout repository | ||
# uses: actions/checkout@v3 | ||
# with: | ||
# submodules: recursive | ||
|
||
# - name: Install Foundry | ||
# uses: foundry-rs/foundry-toolchain@v1 | ||
# with: | ||
# version: nightly | ||
|
||
# - name: Compile contracts | ||
# run: | | ||
# forge build --build-info | ||
|
||
# - name: Run Echidna | ||
# uses: crytic/echidna-action@v2 | ||
# with: | ||
# files: test/echidna/CryticERC4626Harness.t.sol | ||
# contract: CryticERC4626Harness |
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 |
---|---|---|
|
@@ -18,4 +18,8 @@ lcov.info | |
coverage | ||
|
||
# gas | ||
.gas-snapshot | ||
.gas-snapshot | ||
|
||
# echidna | ||
crytic-export/ | ||
/test/echidna/_corpus/ |
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
Submodule properties
added at
bb1b78
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 |
---|---|---|
|
@@ -12,7 +12,7 @@ import {ErrorsLib as Errors} from "../lib/ErrorsLib.sol"; | |
/// @title Shared contract | ||
/// @custom:security-contact [email protected] | ||
/// @author Euler Labs (https://www.eulerlabs.com/) | ||
contract Shared { | ||
abstract contract Shared { | ||
using HooksLib for uint32; | ||
|
||
uint8 internal constant REENTRANCYLOCK__UNLOCKED = 1; | ||
|
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 |
---|---|---|
|
@@ -6,8 +6,6 @@ import {IBalanceForwarder} from "../interface/IBalanceForwarder.sol"; | |
import {IBalanceTracker} from "reward-streams/interfaces/IBalanceTracker.sol"; | ||
import {IRewardStreams} from "reward-streams/interfaces/IRewardStreams.sol"; | ||
import {IERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | ||
// contracts | ||
import {Shared} from "../common/Shared.sol"; | ||
// libs | ||
import {StorageLib, AggregationVaultStorage} from "../lib/StorageLib.sol"; | ||
import {ErrorsLib as Errors} from "../lib/ErrorsLib.sol"; | ||
|
@@ -16,12 +14,12 @@ import {EventsLib as Events} from "../lib/EventsLib.sol"; | |
/// @title FeeModule contract | ||
/// @custom:security-contact [email protected] | ||
/// @author Euler Labs (https://www.eulerlabs.com/) | ||
abstract contract FeeModule is Shared { | ||
abstract contract FeeModule { | ||
/// @dev The maximum performanceFee the vault can have is 50% | ||
uint256 internal constant MAX_PERFORMANCE_FEE = 0.5e18; | ||
|
||
/// @notice Set performance fee recipient address | ||
/// @notice @param _newFeeRecipient Recipient address | ||
/// @param _newFeeRecipient Recipient address | ||
function setFeeRecipient(address _newFeeRecipient) external { | ||
AggregationVaultStorage storage $ = StorageLib._getAggregationVaultStorage(); | ||
address feeRecipientCached = $.feeRecipient; | ||
|
@@ -34,7 +32,7 @@ abstract contract FeeModule is Shared { | |
} | ||
|
||
/// @notice Set performance fee (1e18 == 100%) | ||
/// @notice @param _newFee Fee rate | ||
/// @param _newFee Fee rate | ||
function setPerformanceFee(uint256 _newFee) external { | ||
AggregationVaultStorage storage $ = StorageLib._getAggregationVaultStorage(); | ||
|
||
|
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
Oops, something went wrong.