@@ -11,16 +11,16 @@ import {EVCUtil} from "ethereum-vault-connector/utils/EVCUtil.sol";
11
11
contract EulerSwapFactory is IEulerSwapFactory , EVCUtil {
12
12
/// @dev An array to store all pools addresses.
13
13
address [] public allPools;
14
- /// @dev Mapping between a swap account and deployed pool that is currently set as operator
15
- mapping (address swapAccount = > address operator ) public swapAccountToPool ;
14
+ /// @dev Mapping between a euler account and deployed pool that is currently set as operator
15
+ mapping (address eulerAccount = > address operator ) public eulerAccountToPool ;
16
16
17
17
event PoolDeployed (
18
18
address indexed asset0 ,
19
19
address indexed asset1 ,
20
20
address vault0 ,
21
21
address vault1 ,
22
22
uint256 indexed feeMultiplier ,
23
- address swapAccount ,
23
+ address eulerAccount ,
24
24
uint256 priceX ,
25
25
uint256 priceY ,
26
26
uint256 concentrationX ,
@@ -37,7 +37,7 @@ contract EulerSwapFactory is IEulerSwapFactory, EVCUtil {
37
37
38
38
/// @notice Deploy a new EulerSwap pool with the given parameters
39
39
/// @dev The pool address is deterministically generated using CREATE2 with a salt derived from
40
- /// the swap account address and provided salt parameter. This allows the pool address to be
40
+ /// the euler account address and provided salt parameter. This allows the pool address to be
41
41
/// predicted before deployment.
42
42
/// @param params Core pool parameters including vaults, account, and fee settings
43
43
/// @param curveParams Parameters defining the curve shape including prices and concentrations
@@ -51,7 +51,7 @@ contract EulerSwapFactory is IEulerSwapFactory, EVCUtil {
51
51
52
52
EulerSwap pool = new EulerSwap {salt: keccak256 (abi.encode (params.eulerAccount, salt))}(params, curveParams);
53
53
54
- checkSwapAccountOperators (params.eulerAccount, address (pool));
54
+ checkEulerAccountOperators (params.eulerAccount, address (pool));
55
55
56
56
allPools.push (address (pool));
57
57
@@ -97,20 +97,20 @@ contract EulerSwapFactory is IEulerSwapFactory, EVCUtil {
97
97
return allPoolsList;
98
98
}
99
99
100
- /// @notice Validates operator authorization for a swap account. First checks if the account has an existing operator
100
+ /// @notice Validates operator authorization for a euler account. First checks if the account has an existing operator
101
101
/// and ensures it is deauthorized. Then verifies the new pool is authorized as an operator. Finally, updates the
102
102
/// mapping to track the new pool as the account's operator.
103
- /// @param swapAccount The address of the swap account.
103
+ /// @param eulerAccount The address of the euler account.
104
104
/// @param newPool The address of the new pool.
105
- function checkSwapAccountOperators (address swapAccount , address newPool ) internal {
106
- address operator = swapAccountToPool[swapAccount ];
105
+ function checkEulerAccountOperators (address eulerAccount , address newPool ) internal {
106
+ address operator = eulerAccountToPool[eulerAccount ];
107
107
108
108
if (operator != address (0 )) {
109
- require (! evc.isAccountOperatorAuthorized (swapAccount , operator), OldOperatorStillInstalled ());
109
+ require (! evc.isAccountOperatorAuthorized (eulerAccount , operator), OldOperatorStillInstalled ());
110
110
}
111
111
112
- require (evc.isAccountOperatorAuthorized (swapAccount , newPool), OperatorNotInstalled ());
112
+ require (evc.isAccountOperatorAuthorized (eulerAccount , newPool), OperatorNotInstalled ());
113
113
114
- swapAccountToPool[swapAccount ] = newPool;
114
+ eulerAccountToPool[eulerAccount ] = newPool;
115
115
}
116
116
}
0 commit comments