diff --git a/.github/workflows/foundry.yaml b/.github/workflows/foundry.yaml index 607d7a75..ebc1ede3 100644 --- a/.github/workflows/foundry.yaml +++ b/.github/workflows/foundry.yaml @@ -19,43 +19,16 @@ jobs: - ubuntu-latest architecture: - "x64" - python-version: - - "3.10" - node_version: - - 16 steps: - name: Checkout uses: actions/checkout@v3 with: submodules: recursive - - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - architecture: ${{ matrix.architecture }} - - - name: Install Ape - uses: ApeWorX/github-action@v2.0 - with: - python-version: '3.10' - - - name: install vyper - run: pip install git+https://github.com/vyperlang/vyper - - - name: Compile contracts - # Compile Ape contracts to get dependencies - run: ape compile --force --size - + - name: Install Vyper run: pip install vyper==0.3.7 - - name: Use Node.js ${{ matrix.node_version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node_version }} - - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 with: diff --git a/foundry.toml b/foundry.toml index 22757b16..864746bc 100644 --- a/foundry.toml +++ b/foundry.toml @@ -8,7 +8,7 @@ libs = ['lib'] remappings = [ 'forge-std/=lib/forge-std/src/', 'erc4626-tests/=lib/erc4626-tests/', - "@tokenized-strategy=lib/tokenized-strategy/", + "@tokenized-strategy=lib/tokenized-strategy/src", '@openzeppelin/=lib/openzeppelin-contracts/', ] fs_permissions = [{ access = "read", path = "./"}] diff --git a/foundry_tests/tests/ERC4626Std.t.sol b/foundry_tests/tests/ERC4626Std.t.sol index 7d7162ef..c3de553a 100644 --- a/foundry_tests/tests/ERC4626Std.t.sol +++ b/foundry_tests/tests/ERC4626Std.t.sol @@ -29,6 +29,24 @@ contract VaultERC4626StdTest is ERC4626Test, Setup { super.test_maxRedeem(init); } + //Avoid special case for deposits of uint256 max + function test_previewDeposit( + Init memory init, + uint assets + ) public override { + if (assets == type(uint256).max) assets -= 1; + super.test_previewDeposit(init, assets); + } + + function test_deposit( + Init memory init, + uint assets, + uint allowance + ) public override { + if (assets == type(uint256).max) assets -= 1; + super.test_deposit(init, assets, allowance); + } + function clamp( Init memory init, uint max