Vault
WagyuStakerWagyuStaker
WagyuStaker 🥩 Wagyu Staker 🥩This contract stakes Ether inside of the BeaconChainDepositContract directly
Methods
BEACON_CHAIN_DEPOSIT_CONTRACT
The Canonical Address of the BeaconChainDepositContract
Returns
| Name | Type | Description |
|---|---|---|
| _0 | contract IBeaconDepositContract | undefined |
VALIDATOR_DEPOSIT_SIZE
Validator deposit size.
Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | undefined |
addAdmin
addAdmin() function allows an admin to add a new admin to the contract.
This function is only accessible to the existing admins and requires the address of the new admin. If the new admin is already set, the function will revert. Otherwise, the adminsCounter will be incremented and the new admin will be added to the admins mapping. An AdminAdded event will be emitted.
Parameters
| Name | Type | Description |
|---|---|---|
| newAdmin | address | undefined |
addOperator
Adds a new operator to the list of operators
Only the admin can add a new operator
Parameters
| Name | Type | Description |
|---|---|---|
| newOperator | address | The address of the new operator |
admins
Parameters
| Name | Type | Description |
|---|---|---|
| _0 | address | undefined |
Returns
| Name | Type | Description |
|---|---|---|
| _0 | bool | undefined |
batchMigrate
Parameters
| Name | Type | Description |
|---|---|---|
| batchData | IStakingModule.ValidatorData[] | undefined |
deleteAdmin
Deletes an admin from the list of admins.
Only admins can delete other admins. If the adminsCounter is 0, the transaction will revert.
Parameters
| Name | Type | Description |
|---|---|---|
| oldAdmin | address | undefined |
deleteOperator
Parameters
| Name | Type | Description |
|---|---|---|
| oldOperator | address | undefined |
deposit
Parameters
| Name | Type | Description |
|---|---|---|
| data | IStakingModule.ValidatorData | undefined |
| latestDepositRoot | bytes32 | undefined |
mevEth
The address of the MevEth contract
Returns
| Name | Type | Description |
|---|---|---|
| _0 | address | undefined |
operators
Parameters
| Name | Type | Description |
|---|---|---|
| _0 | address | undefined |
Returns
| Name | Type | Description |
|---|---|---|
| _0 | bool | undefined |
payRewards
Function to pay rewards to the MevEth contract
Only callable by an operator
Parameters
| Name | Type | Description |
|---|---|---|
| rewards | uint256 | rewards to pay to the MevEth contract |
payValidatorWithdraw
Function to pay MevEth when withdrawing funds from a validator
This function is only callable by an operator and emits an event for offchain validator registry tracking.
record
Record of total deposits, withdraws, rewards paid and validators exited
Returns
| Name | Type | Description |
|---|---|---|
| totalDeposited | uint128 | undefined |
| totalWithdrawn | uint128 | undefined |
| totalRewardsPaid | uint128 | undefined |
| totalValidatorExitsPaid | uint128 | undefined |
recoverToken
Function to recover tokens sent to the contract.
This function is only callable by an admin.
Parameters
| Name | Type | Description |
|---|---|---|
| token | address | undefined |
| recipient | address | undefined |
| amount | uint256 | undefined |
registerExit
registerExit() allows users to exit the system.
registerExit() is a function that allows users to exit the system. It is triggered by an external call.
setNewMevEth
Function to set a new mevEth address.#### Parameters
| Name | Type | Description |
|---|---|---|
| newMevEth | address | undefined |
validators
The number of validators on the consensus layer registered under this contract
Returns
| Name | Type | Description | | ---- | ------- | ----------- | --------- | | _0 | uint256 | undefined | ## Events |
AdminAdded
Parameters
| Name | Type | Description |
|---|---|---|
newAdmin indexed | address | undefined |
AdminDeleted
Parameters
| Name | Type | Description |
|---|---|---|
oldAdmin indexed | address | undefined |
MevEthUpdated
Event emitted when the mevEth address is updated.#### Parameters
| Name | Type | Description |
|---|---|---|
meveth indexed | address | undefined |
NewValidator
Event emitted when a validator is registered#### Parameters
| Name | Type | Description |
|---|---|---|
operator indexed | address | undefined |
| pubkey | bytes | undefined |
| withdrawalCredentials | bytes32 | undefined |
| signature | bytes | undefined |
| deposit_data_root | bytes32 | undefined |
OperatorAdded
Parameters
| Name | Type | Description |
|---|---|---|
newOperator indexed | address | undefined |
OperatorDeleted
Parameters
| Name | Type | Description |
|---|---|---|
oldOperator indexed | address | undefined |
RewardsPaid
Event emitted when rewards are paid to the MevEth contract.#### Parameters
| Name | Type | Description |
|---|---|---|
amount indexed | uint256 | undefined |
TokenRecovered
Event emitted when tokens are recovered from the contract.#### Parameters
| Name | Type | Description |
|---|---|---|
recipient indexed | address | undefined |
token indexed | address | undefined |
amount indexed | uint256 | undefined |
ValidatorWithdraw
Event emitted when funds representing a validator withdrawal are sent to the MevEth contract.#### Parameters
| Name | Type | Description | | ------ | ------- | ----------- | --------- | | sender | address | undefined | | amount | uint256 | undefined | ## Errors |