Add ERC4626 standard property tests (#3792)
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -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
|
||||
|
||||
@ -1,2 +1,3 @@
|
||||
[fuzz]
|
||||
runs = 10000
|
||||
max_test_rejects = 100000
|
||||
|
||||
1
lib/erc4626-tests
Submodule
1
lib/erc4626-tests
Submodule
Submodule lib/erc4626-tests added at 8b1d7c2ac2
17
test/token/ERC20/extensions/ERC4626.t.sol
Normal file
17
test/token/ERC20/extensions/ERC4626.t.sol
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user