Skip to content

Commit

Permalink
compile
Browse files Browse the repository at this point in the history
  • Loading branch information
sanbir committed Jun 12, 2024
1 parent fc01c53 commit bbf0fe3
Show file tree
Hide file tree
Showing 7 changed files with 569 additions and 254 deletions.
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ coverage
.env
.*
README.md
coverage.json
coverage.json
contracts
4 changes: 2 additions & 2 deletions contracts/constants/P2pConstants.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ pragma solidity 0.8.24;
uint256 constant VALIDATORS_MAX_AMOUNT = 400;

/// @dev EIP-7251 MIN_ACTIVATION_BALANCE
uint256 constant MIN_ACTIVATION_BALANCE = 32 ether;
uint96 constant MIN_ACTIVATION_BALANCE = 32 ether;

/// @dev EIP-7251 MAX_EFFECTIVE_BALANCE
uint256 constant MAX_EFFECTIVE_BALANCE = 2048 ether;
uint96 constant MAX_EFFECTIVE_BALANCE = 2048 ether;

/// @dev Minimal 1 time deposit
uint256 constant MIN_DEPOSIT = 1 ether;
Expand Down
2 changes: 1 addition & 1 deletion contracts/feeDistributor/BaseFeeDistributor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ abstract contract BaseFeeDistributor is Erc4337Account, OwnableTokenRecoverer, O
}

/// @inheritdoc IOwnable
function owner() public view override(Erc4337Account, OwnableBase, Ownable) returns (address) {
function owner() public view override(Erc4337Account, OwnableBase, Ownable, IOwnable) returns (address) {
return i_factory.owner();
}

Expand Down
19 changes: 11 additions & 8 deletions contracts/p2pEth2Depositor/IP2pOrgUnlimitedEthDepositor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import "../structs/P2pStructs.sol";

/// @dev External interface of P2pOrgUnlimitedEthDepositor declared to support ERC165 detection.
interface IP2pOrgUnlimitedEthDepositor is IERC165 {

/// @notice Emits when a client adds ETH for staking
/// @param _depositId ID of client deposit (derived from ETH2 WithdrawalCredentials, ETH amount per validator in wei, fee distributor instance address)
/// @param _sender address who sent ETH
Expand Down Expand Up @@ -88,16 +87,18 @@ interface IP2pOrgUnlimitedEthDepositor is IERC165 {
/// @param _referrerConfig address and basis points (percent * 100) of the referrer.
/// @param _extraData any other data to pass to the event listener
/// @return depositId ID of client deposit (derived from ETH2 WithdrawalCredentials, ETH amount per validator in wei, fee distributor instance address)
/// @return feeDistributorInstance client FeeDistributor instance
function addEth(
bytes32 _eth2WithdrawalCredentials,
uint96 _ethAmountPerValidatorInWei,

address _referenceFeeDistributor,
FeeRecipient calldata _clientConfig,
FeeRecipient calldata _referrerConfig,

bytes calldata _extraData
) external payable returns(bytes32 depositId);
)
external
payable
returns (bytes32 depositId, address feeDistributorInstance);

/// @notice Reject the service for a given ID of client deposit.
/// @dev Allows the client to avoid waiting for expiration to get a refund.
Expand Down Expand Up @@ -132,7 +133,6 @@ interface IP2pOrgUnlimitedEthDepositor is IERC165 {
bytes32 _eth2WithdrawalCredentials,
uint96 _ethAmountPerValidatorInWei,
address _feeDistributorInstance,

bytes[] calldata _pubkeys,
bytes[] calldata _signatures,
bytes32[] calldata _depositDataRoots
Expand Down Expand Up @@ -163,7 +163,6 @@ interface IP2pOrgUnlimitedEthDepositor is IERC165 {
function getDepositId(
bytes32 _eth2WithdrawalCredentials,
uint96 _ethAmountPerValidatorInWei,

address _referenceFeeDistributor,
FeeRecipient calldata _clientConfig,
FeeRecipient calldata _referrerConfig
Expand All @@ -177,10 +176,14 @@ interface IP2pOrgUnlimitedEthDepositor is IERC165 {
/// @notice Returns the block timestamp after which the client will be able to get a refund
/// @param _depositId ID of client deposit (derived from ETH2 WithdrawalCredentials, ETH amount per validator in wei, fee distributor instance address)
/// @return uint40 block timestamp
function depositExpiration(bytes32 _depositId) external view returns (uint40);
function depositExpiration(
bytes32 _depositId
) external view returns (uint40);

/// @notice Returns the status of the deposit
/// @param _depositId ID of client deposit (derived from ETH2 WithdrawalCredentials, ETH amount per validator in wei, fee distributor instance address)
/// @return ClientDepositStatus status
function depositStatus(bytes32 _depositId) external view returns (ClientDepositStatus);
function depositStatus(
bytes32 _depositId
) external view returns (ClientDepositStatus);
}
Loading

0 comments on commit bbf0fe3

Please sign in to comment.