@@ -6,12 +6,13 @@ import {EVCUtil} from "ethereum-vault-connector/utils/EVCUtil.sol";
6
6
import {GenericFactory} from "evk/GenericFactory/GenericFactory.sol " ;
7
7
8
8
import {EulerSwap} from "./EulerSwap.sol " ;
9
+ import {ProtocolFee} from "./utils/ProtocolFee.sol " ;
9
10
import {MetaProxyDeployer} from "./MetaProxyDeployer.sol " ;
10
11
11
12
/// @title EulerSwapFactory contract
12
13
/// @custom:security-contact [email protected]
13
14
/// @author Euler Labs (https://www.eulerlabs.com/)
14
- contract EulerSwapFactory is IEulerSwapFactory , EVCUtil {
15
+ contract EulerSwapFactory is IEulerSwapFactory , EVCUtil , ProtocolFee {
15
16
/// @dev An array to store all pools addresses.
16
17
address [] private allPools;
17
18
/// @dev Vaults must be deployed by this factory
@@ -33,7 +34,10 @@ contract EulerSwapFactory is IEulerSwapFactory, EVCUtil {
33
34
error InvalidVaultImplementation ();
34
35
error SliceOutOfBounds ();
35
36
36
- constructor (address evc , address evkFactory_ , address eulerSwapImpl_ ) EVCUtil (evc) {
37
+ constructor (address evc , address evkFactory_ , address eulerSwapImpl_ , address feeOwner_ )
38
+ EVCUtil (evc)
39
+ ProtocolFee (feeOwner_)
40
+ {
37
41
evkFactory = evkFactory_;
38
42
eulerSwapImpl = eulerSwapImpl_;
39
43
}
@@ -51,6 +55,10 @@ contract EulerSwapFactory is IEulerSwapFactory, EVCUtil {
51
55
52
56
uninstall (params.eulerAccount);
53
57
58
+ // set protocol fee
59
+ params.protocolFee = protocolFee;
60
+ params.protocolFeeRecipient = protocolFeeRecipient;
61
+
54
62
EulerSwap pool = EulerSwap (
55
63
MetaProxyDeployer.deployMetaProxy (
56
64
eulerSwapImpl, abi.encode (params), keccak256 (abi.encode (params.eulerAccount, salt))
0 commit comments