Skip to content

Commit 5598c4d

Browse files
chore: rename to eulerAccount
1 parent 8bc8a77 commit 5598c4d

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

src/EulerSwapFactory.sol

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ import {EVCUtil} from "ethereum-vault-connector/utils/EVCUtil.sol";
1111
contract EulerSwapFactory is IEulerSwapFactory, EVCUtil {
1212
/// @dev An array to store all pools addresses.
1313
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;
1616

1717
event PoolDeployed(
1818
address indexed asset0,
1919
address indexed asset1,
2020
address vault0,
2121
address vault1,
2222
uint256 indexed feeMultiplier,
23-
address swapAccount,
23+
address eulerAccount,
2424
uint256 priceX,
2525
uint256 priceY,
2626
uint256 concentrationX,
@@ -37,7 +37,7 @@ contract EulerSwapFactory is IEulerSwapFactory, EVCUtil {
3737

3838
/// @notice Deploy a new EulerSwap pool with the given parameters
3939
/// @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
4141
/// predicted before deployment.
4242
/// @param params Core pool parameters including vaults, account, and fee settings
4343
/// @param curveParams Parameters defining the curve shape including prices and concentrations
@@ -51,7 +51,7 @@ contract EulerSwapFactory is IEulerSwapFactory, EVCUtil {
5151

5252
EulerSwap pool = new EulerSwap{salt: keccak256(abi.encode(params.eulerAccount, salt))}(params, curveParams);
5353

54-
checkSwapAccountOperators(params.eulerAccount, address(pool));
54+
checkEulerAccountOperators(params.eulerAccount, address(pool));
5555

5656
allPools.push(address(pool));
5757

@@ -97,20 +97,20 @@ contract EulerSwapFactory is IEulerSwapFactory, EVCUtil {
9797
return allPoolsList;
9898
}
9999

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
101101
/// and ensures it is deauthorized. Then verifies the new pool is authorized as an operator. Finally, updates the
102102
/// 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.
104104
/// @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];
107107

108108
if (operator != address(0)) {
109-
require(!evc.isAccountOperatorAuthorized(swapAccount, operator), OldOperatorStillInstalled());
109+
require(!evc.isAccountOperatorAuthorized(eulerAccount, operator), OldOperatorStillInstalled());
110110
}
111111

112-
require(evc.isAccountOperatorAuthorized(swapAccount, newPool), OperatorNotInstalled());
112+
require(evc.isAccountOperatorAuthorized(eulerAccount, newPool), OperatorNotInstalled());
113113

114-
swapAccountToPool[swapAccount] = newPool;
114+
eulerAccountToPool[eulerAccount] = newPool;
115115
}
116116
}

test/EulerSwapFactoryTest.t.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ contract EulerSwapFactoryTest is EulerSwapTestBase {
4343
vm.prank(holder);
4444
evc.batch(items);
4545

46-
EulerSwap eulerSwap = EulerSwap(eulerSwapFactory.swapAccountToPool(holder));
46+
EulerSwap eulerSwap = EulerSwap(eulerSwapFactory.eulerAccountToPool(holder));
4747

4848
uint256 allPoolsLengthAfter = eulerSwapFactory.allPoolsLength();
4949
assertEq(allPoolsLengthAfter - allPoolsLengthBefore, 1);

0 commit comments

Comments
 (0)