Skip to content

Commit

Permalink
fix merge
Browse files Browse the repository at this point in the history
  • Loading branch information
dglowinski committed Mar 25, 2024
1 parent 28afd84 commit 6c77a53
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/EVault/shared/Constants.sol
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ uint32 constant CFG_EVC_COMPATIBLE_ASSET = 1 << 1;

// in order to perform these operations, the account doesn't need to have the vault installed as a controller
uint32 constant CONTROLLER_NEUTRAL_OPS = OP_DEPOSIT | OP_MINT | OP_WITHDRAW | OP_REDEEM | OP_TRANSFER | OP_SKIM
| OP_REPAY | OP_DELOOP | OP_CONVERT_FEES | OP_FLASHLOAN | OP_TOUCH | OP_ACCRUE_INTEREST;
| OP_REPAY | OP_DELOOP | OP_CONVERT_FEES | OP_FLASHLOAN | OP_TOUCH;
5 changes: 3 additions & 2 deletions src/ProductLines/Escrow.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ contract Escrow is BaseProductLine {
vault.setName(string.concat("Escrow vault: ", getTokenName(asset)));
vault.setSymbol(string.concat("e", getTokenSymbol(asset)));

vault.setDisabledOps(
// Disable borrowing operations
vault.setHookConfig(
address(0),
OP_BORROW | OP_REPAY | OP_LOOP | OP_DELOOP | OP_PULL_DEBT | OP_CONVERT_FEES | OP_LIQUIDATE | OP_TOUCH
| OP_ACCRUE_INTEREST
);

// Renounce governorship
Expand Down
7 changes: 5 additions & 2 deletions test/unit/productLines/productLines.escrow.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import "../evault/EVaultTestBase.t.sol";

contract ProductLine_Escrow is EVaultTestBase {
uint32 constant ESCROW_DISABLED_OPS = OP_BORROW | OP_REPAY | OP_LOOP | OP_DELOOP | OP_PULL_DEBT | OP_CONVERT_FEES
| OP_LIQUIDATE | OP_TOUCH | OP_ACCRUE_INTEREST;
| OP_LIQUIDATE | OP_TOUCH;

function test_ProductLine_Escrow_basicViews() public {
IEVault escrowTST = IEVault(escrowProductLine.createVault(address(assetTST)));
Expand All @@ -18,7 +18,10 @@ contract ProductLine_Escrow is EVaultTestBase {
assertEq(escrowTST.symbol(), "eTST");
assertEq(escrowTST.unitOfAccount(), address(0));
assertEq(escrowTST.oracle(), address(0));
assertEq(escrowTST.disabledOps(), ESCROW_DISABLED_OPS);

(address hookTarget, uint32 hookedOps) = escrowTST.hookConfig();
assertEq(hookTarget, address(0));
assertEq(hookedOps, ESCROW_DISABLED_OPS);
}

function test_ProductLine_Escrow_RevertWhenAlreadyCreated() public {
Expand Down

0 comments on commit 6c77a53

Please sign in to comment.