Skip to content

Commit

Permalink
Merge pull request #10 from aviggiano/patch-1
Browse files Browse the repository at this point in the history
Remove try/catch from verify_depositProperties
  • Loading branch information
bsamuels453 authored Mar 17, 2023
2 parents fff46c3 + 6e50932 commit 91ef906
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions contracts/ERC4626/properties/FunctionalAccountingProps.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ contract CryticERC4626FunctionalAccounting is CryticERC4626PropertyBase {
(, uint256 receiverSharesBeforeDeposit) = measureAddressHoldings(receiver, "receiver", "before deposit");

uint256 sharesExpected = vault.previewDeposit(tokens);
uint256 sharesMinted;
try vault.deposit(tokens,receiver) returns (uint256 sharesMinted2) {sharesMinted = sharesMinted2;} catch {assert(false);}
//uint256 sharesMinted = vault.deposit(tokens, receiver);
uint256 sharesMinted = vault.deposit(tokens, receiver);
assertGte(sharesMinted, sharesExpected, "deposit() must always mint greater than or equal to the shares predicted by previewDeposit()");

(uint256 senderAssetsAfterDeposit,) = measureAddressHoldings(sender, "sender", "after deposit");
Expand Down

0 comments on commit 91ef906

Please sign in to comment.