From 6c77a5326cb23ffc2506370a4e739864cbfd3ab6 Mon Sep 17 00:00:00 2001 From: dglowinski Date: Mon, 25 Mar 2024 13:13:37 +0100 Subject: [PATCH] fix merge --- src/EVault/shared/Constants.sol | 2 +- src/ProductLines/Escrow.sol | 5 +++-- test/unit/productLines/productLines.escrow.t.sol | 7 +++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/EVault/shared/Constants.sol b/src/EVault/shared/Constants.sol index 4a2eee9c..08bcb61e 100644 --- a/src/EVault/shared/Constants.sol +++ b/src/EVault/shared/Constants.sol @@ -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; diff --git a/src/ProductLines/Escrow.sol b/src/ProductLines/Escrow.sol index 00d8f872..76a1321f 100644 --- a/src/ProductLines/Escrow.sol +++ b/src/ProductLines/Escrow.sol @@ -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 diff --git a/test/unit/productLines/productLines.escrow.t.sol b/test/unit/productLines/productLines.escrow.t.sol index 7abf6ecf..c1833a2b 100644 --- a/test/unit/productLines/productLines.escrow.t.sol +++ b/test/unit/productLines/productLines.escrow.t.sol @@ -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))); @@ -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 {