-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ERC4626 standard property tests (#3792)
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
- Loading branch information
1 parent
0b6becd
commit c7315e8
Showing
4 changed files
with
22 additions
and
0 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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
[submodule "lib/forge-std"] | ||
path = lib/forge-std | ||
url = https://github.com/foundry-rs/forge-std | ||
[submodule "lib/erc4626-tests"] | ||
path = lib/erc4626-tests | ||
url = https://github.com/a16z/erc4626-tests.git |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
[fuzz] | ||
runs = 10000 | ||
max_test_rejects = 100000 |
Submodule erc4626-tests
added at
8b1d7c
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,17 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import "erc4626-tests/ERC4626.test.sol"; | ||
|
||
import {ERC20Mock} from "../../../../contracts/mocks/ERC20Mock.sol"; | ||
import {ERC4626Mock, IERC20Metadata} from "../../../../contracts/mocks/ERC4626Mock.sol"; | ||
|
||
contract ERC4626StdTest is ERC4626Test { | ||
function setUp() public override { | ||
_underlying_ = address(new ERC20Mock("MockERC20", "MockERC20", address(this), 0)); | ||
_vault_ = address(new ERC4626Mock(IERC20Metadata(_underlying_), "MockERC4626", "MockERC4626")); | ||
_delta_ = 0; | ||
_vaultMayBeEmpty = false; | ||
_unlimitedAmount = true; | ||
} | ||
} |