Skip to content

Commit

Permalink
🔨 erc4626 fuzz tests
Browse files Browse the repository at this point in the history
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
  • Loading branch information
pcaversaccio committed Feb 22, 2023
1 parent 328a36e commit de44bef
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 4 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ lib/murky
lib/prb-test
lib/forge-std
lib/create-util
lib/erc4626-tests
lib/solidity-bytes-utils
lib/openzeppelin-contracts
bin
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
url = https://github.com/dmfxyz/murky.git
[submodule "lib/erc4626-tests"]
path = lib/erc4626-tests
url = https://github.com/a16z/erc4626-tests
url = https://github.com/a16z/erc4626-tests.git
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ lib/murky
lib/prb-test
lib/forge-std
lib/create-util
lib/erc4626-tests
lib/solidity-bytes-utils
lib/openzeppelin-contracts
bin
Expand Down
1 change: 1 addition & 0 deletions .solhintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ lib/murky
lib/prb-test
lib/forge-std
lib/create-util
lib/erc4626-tests
lib/solidity-bytes-utils
lib/openzeppelin-contracts
1 change: 1 addition & 0 deletions remappings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ utils/=lib/utils/
murky/=lib/murky/src/
prb/test/=lib/prb-test/src/
forge-std/=lib/forge-std/src/
erc4626-tests/=lib/erc4626-tests/
create-util/=lib/create-util/contracts/
openzeppelin/=lib/openzeppelin-contracts/contracts/
solidity-bytes-utils/=lib/solidity-bytes-utils/contracts/
12 changes: 9 additions & 3 deletions test/extensions/ERC4626.t.sol
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// SPDX-License-Identifier: WTFPL
pragma solidity ^0.8.18;

import {Test} from "forge-std/Test.sol";
import {ERC4626Test} from "erc4626-tests/ERC4626.test.sol";
import {VyperDeployer} from "utils/VyperDeployer.sol";

import {ERC20Mock} from "../utils/mocks/ERC20Mock.sol";

import {IERC4626Extended} from "./interfaces/IERC4626Extended.sol";

contract ERC4626Test is Test {
contract ERC4626VaultTest is ERC4626Test {
string private constant _NAME = "TokenisedVaultMock";
string private constant _NAME_UNDERLYING = "UnderlyingTokenMock";
string private constant _SYMBOL = "TVM";
Expand Down Expand Up @@ -72,7 +72,7 @@ contract ERC4626Test is Test {
uint256 shares
);

function setUp() public {
function setUp() public override {
bytes memory args = abi.encode(
_NAME,
_SYMBOL,
Expand All @@ -94,6 +94,12 @@ contract ERC4626Test is Test {
ERC4626ExtendedAddr
)
);

_underlying_ = address(underlying);
_vault_ = ERC4626ExtendedAddr;
_delta_ = 0;
_vaultMayBeEmpty = false;
_unlimitedAmount = true;
}

function testInitialSetup() public {
Expand Down

0 comments on commit de44bef

Please sign in to comment.