Skip to content

Commit

Permalink
patch: flow updates for RocketPoolRecipient + tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cosminobol committed Jul 25, 2024
1 parent 29912c4 commit dcfe798
Show file tree
Hide file tree
Showing 18 changed files with 1,336 additions and 592 deletions.
12 changes: 6 additions & 6 deletions src/interfaces/external/rocketPool/IRETH.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

interface IRETH {
function burn(uint256 _rethAmount) external;
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

interface IRETH {
function burn(uint256 _rethAmount) external;
}
22 changes: 11 additions & 11 deletions src/interfaces/external/rocketPool/IRocketDepositPool.sol
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

interface IRocketDepositPool {
function getBalance() external view returns (uint256);
function getNodeBalance() external view returns (uint256);
function getUserBalance() external view returns (int256);
function getExcessBalance() external view returns (uint256);
function deposit() external payable;
function getMaximumDepositAmount() external view returns (uint256);
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

interface IRocketDepositPool {
function getBalance() external view returns (uint256);
function getNodeBalance() external view returns (uint256);
function getUserBalance() external view returns (int256);
function getExcessBalance() external view returns (uint256);
function deposit() external payable;
function getMaximumDepositAmount() external view returns (uint256);
}
45 changes: 0 additions & 45 deletions src/interfaces/external/rocketPool/IRocketMinipool.sol

This file was deleted.

7 changes: 7 additions & 0 deletions src/interfaces/external/rocketPool/IRocketMinipoolBase.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

interface IRocketMinipoolBase {
// IRocketMiniPoolDelegate
function getEffectiveDelegate() external view returns (address);
}
50 changes: 50 additions & 0 deletions src/interfaces/external/rocketPool/IRocketMinipoolDelegate.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

interface IRocketMinipoolDelegate {
function version() external view returns (uint8);
function initialise(address _nodeAddress) external;
function getFinalised() external view returns (bool);
function getStatusBlock() external view returns (uint256);
function getStatusTime() external view returns (uint256);
function getScrubVoted(address _member) external view returns (bool);
function getNodeAddress() external view returns (address);
function getNodeFee() external view returns (uint256);
function getNodeDepositBalance() external view returns (uint256);
function getNodeRefundBalance() external view returns (uint256);
function getNodeDepositAssigned() external view returns (bool);
function getPreLaunchValue() external view returns (uint256);
function getNodeTopUpValue() external view returns (uint256);
function getVacant() external view returns (bool);
function getPreMigrationBalance() external view returns (uint256);
function getUserDistributed() external view returns (bool);
function getUserDepositBalance() external view returns (uint256);
function getUserDepositAssigned() external view returns (bool);
function getUserDepositAssignedTime() external view returns (uint256);
function getTotalScrubVotes() external view returns (uint256);
function calculateNodeShare(uint256 _balance) external view returns (uint256);
function calculateUserShare(uint256 _balance) external view returns (uint256);
function preDeposit(
uint256 _bondingValue,
bytes calldata _validatorPubkey,
bytes calldata _validatorSignature,
bytes32 _depositDataRoot
) external payable;
function deposit() external payable;
function userDeposit() external payable;
function distributeBalance(bool _rewardsOnly) external;
function beginUserDistribute() external;
function userDistributeAllowed() external view returns (bool);
function refund() external;
function slash() external;
function finalise() external;
function canStake() external view returns (bool);
function canPromote() external view returns (bool);
function stake(bytes calldata _validatorSignature, bytes32 _depositDataRoot) external;
function prepareVacancy(uint256 _bondAmount, uint256 _currentBalance) external;
function promote() external;
function dissolve() external;
function close() external;
function voteScrub() external;
function reduceBondAmount() external;
}
30 changes: 15 additions & 15 deletions src/interfaces/external/rocketPool/IRocketMinipoolQueue.sol
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

interface IRocketMinipoolQueue {
function getTotalLength() external view returns (uint256);
function getContainsLegacy() external view returns (bool);
function getLength() external view returns (uint256);
function getTotalCapacity() external view returns (uint256);
function getEffectiveCapacity() external view returns (uint256);
function getNextCapacityLegacy() external view returns (uint256);
function enqueueMinipool(address _minipool) external;
function dequeueMinipools(uint256 _maxToDequeue) external returns (address[] memory minipoolAddress);
function getMinipoolAt(uint256 _index) external view returns(address);
function getMinipoolPosition(address _minipool) external view returns (int256);
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

interface IRocketMinipoolQueue {
function getTotalLength() external view returns (uint256);
function getContainsLegacy() external view returns (bool);
function getLength() external view returns (uint256);
function getTotalCapacity() external view returns (uint256);
function getEffectiveCapacity() external view returns (uint256);
function getNextCapacityLegacy() external view returns (uint256);
function enqueueMinipool(address _minipool) external;
function dequeueMinipools(uint256 _maxToDequeue) external returns (address[] memory minipoolAddress);
function getMinipoolAt(uint256 _index) external view returns (address);
function getMinipoolPosition(address _minipool) external view returns (int256);
}
22 changes: 11 additions & 11 deletions src/interfaces/external/rocketPool/IRocketPoolMinipoolManager.sol
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

interface IRocketPoolMinipoolManager {
function getMinipoolExists(address _minipoolAddress) external view returns (bool);
function getMinipoolByPubkey(bytes memory _pubkey) external view returns (address);
function getMinipoolWithdrawalCredentials(address _minipoolAddress) external pure returns (bytes memory);
function getVacantMinipoolCount() external view returns (uint256);
function getVacantMinipoolAt(uint256 _index) external view returns (address);
function setMinipoolPubkey(bytes calldata _pubkey) external;
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

interface IRocketPoolMinipoolManager {
function getMinipoolExists(address _minipoolAddress) external view returns (bool);
function getMinipoolByPubkey(bytes memory _pubkey) external view returns (address);
function getMinipoolWithdrawalCredentials(address _minipoolAddress) external pure returns (bytes memory);
function getVacantMinipoolCount() external view returns (uint256);
function getVacantMinipoolAt(uint256 _index) external view returns (address);
function setMinipoolPubkey(bytes calldata _pubkey) external;
}
24 changes: 12 additions & 12 deletions src/interfaces/external/rocketPool/IRocketPoolStorage.sol
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

interface IRocketPoolStorage {
function getAddress(bytes32 _key) external view returns (address r);
function getUint(bytes32 _key) external view returns (uint256 r);
function getString(bytes32 _key) external view returns (string memory);
function getBytes(bytes32 _key) external view returns (bytes memory);
function getBool(bytes32 _key) external view returns (bool r);
function getInt(bytes32 _key) external view returns (int r);
function getBytes32(bytes32 _key) external view returns (bytes32 r);
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

interface IRocketPoolStorage {
function getAddress(bytes32 _key) external view returns (address r);
function getUint(bytes32 _key) external view returns (uint256 r);
function getString(bytes32 _key) external view returns (string memory);
function getBytes(bytes32 _key) external view returns (bytes memory);
function getBool(bytes32 _key) external view returns (bool r);
function getInt(bytes32 _key) external view returns (int256 r);
function getBytes32(bytes32 _key) external view returns (bytes32 r);
}
Loading

0 comments on commit dcfe798

Please sign in to comment.