diff --git a/.github/workflows/core-contracts-storage-check.yml b/.github/workflows/core-contracts-storage-check.yml index a7b2cc2b3..085e4d3bb 100644 --- a/.github/workflows/core-contracts-storage-check.yml +++ b/.github/workflows/core-contracts-storage-check.yml @@ -46,6 +46,7 @@ jobs: check_storage_layout: needs: provide_contracts runs-on: ubuntu-latest + if: ${{ needs.provide_contracts.outputs.matrix != '[]' && needs.provide_contracts.outputs.matrix != '' }} strategy: matrix: diff --git a/.github/workflows/diamond-storage-check.yml b/.github/workflows/diamond-storage-check.yml index e7a4a8466..d4f869098 100644 --- a/.github/workflows/diamond-storage-check.yml +++ b/.github/workflows/diamond-storage-check.yml @@ -50,6 +50,7 @@ jobs: check_storage_layout: needs: provide_contracts runs-on: ubuntu-latest + if: ${{ needs.provide_contracts.outputs.matrix != '[]' && needs.provide_contracts.outputs.matrix != '' }} strategy: matrix: diff --git a/packages/contracts/test/fuzz/diamond/facets/UbiquityPoolFacet.fuzz.t.sol b/packages/contracts/test/fuzz/diamond/facets/UbiquityPoolFacet.fuzz.t.sol index 9202129be..6f6d11892 100644 --- a/packages/contracts/test/fuzz/diamond/facets/UbiquityPoolFacet.fuzz.t.sol +++ b/packages/contracts/test/fuzz/diamond/facets/UbiquityPoolFacet.fuzz.t.sol @@ -471,4 +471,30 @@ contract UbiquityPoolFacetFuzzTest is DiamondTestSetup { dollarTokenBalanceBeforeRedeem - tokenAmountToRedeem ); } + + function testMintDollar_FuzzCorrectDollarAmountRedeemed2( + uint256 tokenAmountToRedeem + ) public { + vm.assume(tokenAmountToRedeem < 50_000e18); + vm.startPrank(admin); + curveDollarPlainPool.updateMockParams(0.99e18); + dollarToken.mint(address(user), tokenAmountToRedeem); // make sure user has enough Dollars + collateralToken.mint(address(ubiquityPoolFacet), tokenAmountToRedeem); // make sure pool has enough collateral + uint256 dollarTokenBalanceBeforeRedeem = dollarToken.balanceOf(user); + vm.stopPrank(); + vm.prank(user); + ubiquityPoolFacet.redeemDollar( + 0, // collateral index + tokenAmountToRedeem, // Dollar amount + 0, // min Governance out + 0 // min collateral out + ); + vm.roll(3); // redemption delay set to 2 blocks + ubiquityPoolFacet.collectRedemption(0); + // balances after + assertEq( + dollarToken.balanceOf(user), + dollarTokenBalanceBeforeRedeem - tokenAmountToRedeem + ); + } }