@@ -41,19 +41,19 @@ contract ATokenVaultFactory {
4141 //////////////////////////////////////////////////////////////*/
4242
4343 /// @notice Array of all deployed vaults
44- address [] public allVaults ;
44+ address [] internal _allVaults ;
4545
4646 /// @notice Mapping from underlying asset to deployed vaults
47- mapping (address => address []) public vaultsByUnderlying ;
47+ mapping (address => address []) internal _vaultsByUnderlying ;
4848
4949 /// @notice Mapping from deployer to deployed vaults
50- mapping (address => address []) public vaultsByDeployer ;
50+ mapping (address => address []) internal _vaultsByDeployer ;
5151
5252 /// @notice Mapping to check if a vault was deployed by this factory
53- mapping (address => bool ) public isVaultDeployed ;
53+ mapping (address => bool ) internal _isVaultDeployed ;
5454
5555 /// @notice Counter for unique salt generation
56- uint256 private deploymentCounter ;
56+ uint256 internal _deploymentCounter ;
5757
5858 /// @notice Proxy admin address for all deployed vaults
5959 address public immutable PROXY_ADMIN;
@@ -113,7 +113,7 @@ contract ATokenVaultFactory {
113113 params.initialLockDeposit
114114 );
115115
116- uint256 currentCounter = deploymentCounter ++ ;
116+ uint256 currentCounter = _deploymentCounter ++ ;
117117
118118 bytes32 salt = keccak256 (abi.encodePacked (
119119 params.underlying,
@@ -147,10 +147,10 @@ contract ATokenVaultFactory {
147147 params.initialLockDeposit
148148 );
149149
150- allVaults .push (vault);
151- vaultsByUnderlying [params.underlying].push (vault);
152- vaultsByDeployer [msg .sender ].push (vault);
153- isVaultDeployed [vault] = true ;
150+ _allVaults .push (vault);
151+ _vaultsByUnderlying [params.underlying].push (vault);
152+ _vaultsByDeployer [msg .sender ].push (vault);
153+ _isVaultDeployed [vault] = true ;
154154
155155 emit VaultDeployed (
156156 vault,
@@ -172,15 +172,15 @@ contract ATokenVaultFactory {
172172 * @return The total number of vaults
173173 */
174174 function getAllVaultsLength () external view returns (uint256 ) {
175- return allVaults .length ;
175+ return _allVaults .length ;
176176 }
177177
178178 /**
179179 * @notice Get all deployed vaults
180180 * @return Array of all vault addresses
181181 */
182182 function getAllVaults () external view returns (address [] memory ) {
183- return allVaults ;
183+ return _allVaults ;
184184 }
185185
186186 /**
@@ -189,7 +189,7 @@ contract ATokenVaultFactory {
189189 * @return Array of vault addresses for the underlying asset
190190 */
191191 function getVaultsByUnderlying (address underlying ) external view returns (address [] memory ) {
192- return vaultsByUnderlying [underlying];
192+ return _vaultsByUnderlying [underlying];
193193 }
194194
195195 /**
@@ -198,7 +198,7 @@ contract ATokenVaultFactory {
198198 * @return Array of vault addresses deployed by the deployer
199199 */
200200 function getVaultsByDeployer (address deployer ) external view returns (address [] memory ) {
201- return vaultsByDeployer [deployer];
201+ return _vaultsByDeployer [deployer];
202202 }
203203
204204 /**
@@ -211,8 +211,8 @@ contract ATokenVaultFactory {
211211 address vault ,
212212 address underlying
213213 ) {
214- require (vaultIndex < allVaults .length , "INVALID_VAULT_INDEX " );
215- vault = allVaults [vaultIndex];
214+ require (vaultIndex < _allVaults .length , "INVALID_VAULT_INDEX " );
215+ vault = _allVaults [vaultIndex];
216216 ATokenVault vaultContract = ATokenVault (vault);
217217 underlying = address (vaultContract.UNDERLYING ());
218218 }
@@ -223,6 +223,6 @@ contract ATokenVaultFactory {
223223 * @return True if the vault was deployed by this factory
224224 */
225225 function isDeployedVault (address vault ) external view returns (bool ) {
226- return isVaultDeployed [vault];
226+ return _isVaultDeployed [vault];
227227 }
228- }
228+ }
0 commit comments