Skip to content

Commit

Permalink
fix: update references from depositGuardian to depositor across contr…
Browse files Browse the repository at this point in the history
…acts
  • Loading branch information
DiRaiks committed Feb 18, 2025
1 parent 0bbf207 commit d42777e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion contracts/0.8.25/vaults/Permissions.sol
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ abstract contract Permissions is AccessControlVoteable {
bytes calldata _pubkey,
address _recipient
) internal onlyRole(PDG_WITHDRAWAL_ROLE) returns (uint128) {
return PredepositGuarantee(stakingVault().depositGuardian()).withdrawDisprovenPredeposit(_pubkey, _recipient);
return PredepositGuarantee(stakingVault().depositor()).withdrawDisprovenPredeposit(_pubkey, _recipient);
}

function _transferStakingVaultOwnership(address _newOwner) internal onlyIfVotedBy(_votingCommittee()) {
Expand Down
4 changes: 2 additions & 2 deletions contracts/0.8.25/vaults/VaultHub.sol
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ abstract contract VaultHub is PausableUntilWithRoles {
bytes32 vaultProxyCodehash = address(_vault).codehash;
if (!$.vaultProxyCodehash[vaultProxyCodehash]) revert VaultProxyNotAllowed(_vault);

if (IStakingVault(_vault).depositGuardian() != LIDO_LOCATOR.predepositGuarantee())
revert VaultDepositGuardianNotAllowed(IStakingVault(_vault).depositGuardian());
if (IStakingVault(_vault).depositor() != LIDO_LOCATOR.predepositGuarantee())
revert VaultDepositGuardianNotAllowed(IStakingVault(_vault).depositor());

VaultSocket memory vr = VaultSocket(
_vault,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ contract StakingVault__HarnessForTestUpgrade is IStakingVault, OwnableUpgradeabl
uint128 locked;
int128 inOutDelta;
address nodeOperator;
address depositGuardian;
address depositor;
}

uint64 private constant _version = 2;
Expand All @@ -41,7 +41,7 @@ contract StakingVault__HarnessForTestUpgrade is IStakingVault, OwnableUpgradeabl
function initialize(
address _owner,
address _nodeOperator,
address _depositGuardian,
address _depositor,
bytes calldata /* _params */
) external reinitializer(_version) {
if (owner() != address(0)) {
Expand All @@ -51,11 +51,11 @@ contract StakingVault__HarnessForTestUpgrade is IStakingVault, OwnableUpgradeabl
__StakingVault_init_v2();
__Ownable_init(_owner);
_getVaultStorage().nodeOperator = _nodeOperator;
_getVaultStorage().depositGuardian = _depositGuardian;
_getVaultStorage().depositor = _depositor;
}

function depositGuardian() external view returns (address) {
return _getVaultStorage().depositGuardian;
function depositor() external view returns (address) {
return _getVaultStorage().depositor;
}

function finalizeUpgrade_v2() public reinitializer(_version) {
Expand Down

0 comments on commit d42777e

Please sign in to comment.