Skip to content
🚧 Under Development! May be incomplete.Some pages/links may be incomplete or subject to change.

BeaconDeposit

0x4242424242424242424242424242424242424242 | ABI JSON

The contract handling validators deposits. Its events are used by the beacon chain to manage the staking process.

Functions

getOperator

Get the operator address for a given pubkey.

Returns zero address if the pubkey is not registered.

solidity
function getOperator(bytes calldata pubkey) external view returns (address);

Parameters

NameTypeDescription
pubkeybytesThe pubkey of the validator.

Returns

NameTypeDescription
<none>addressThe operator address for the given pubkey.

deposit

Submit a deposit message to the Beaconchain.

This will be used to create a new validator or to top up an existing one, increasing stake.

emits the Deposit event upon successful deposit.

Reverts if the operator is already set and caller passed non-zero operator.

solidity
function deposit(
    bytes calldata pubkey,
    bytes calldata credentials,
    bytes calldata signature,
    address operator
)
    external
    payable;

Parameters

NameTypeDescription
pubkeybytesis the consensus public key of the validator.
credentialsbytesis the withdrawal credentials of the validator.
signaturebytesis the signature used only on the first deposit.
operatoraddressis the address of the operator used for POL mechanics.

requestOperatorChange

Request to change the operator of a validator.

Only the current operator can request a change.

solidity
function requestOperatorChange(bytes calldata pubkey, address newOperator) external;

Parameters

NameTypeDescription
pubkeybytesThe pubkey of the validator.
newOperatoraddressThe new operator address.

cancelOperatorChange

Cancel the operator change of a validator.

Only the current operator can cancel the change.

solidity
function cancelOperatorChange(bytes calldata pubkey) external;

Parameters

NameTypeDescription
pubkeybytesThe pubkey of the validator.

acceptOperatorChange

Accept the operator change of a validator.

Only the new operator can accept the change.

Reverts if the queue delay has not passed.

solidity
function acceptOperatorChange(bytes calldata pubkey) external;

Parameters

NameTypeDescription
pubkeybytesThe pubkey of the validator.

Events

Deposit

Emitted when a deposit is made, which could mean a new validator or a top up of an existing one.

solidity
event Deposit(bytes pubkey, bytes credentials, uint64 amount, bytes signature, uint64 index);

Parameters

NameTypeDescription
pubkeybytesthe public key of the validator.
credentialsbytesis the withdrawal credentials of the validator.
amountuint64the amount of stake being deposited, in Gwei.
signaturebytesthe signature of the deposit message.
indexuint64the index of the deposit.

OperatorChangeQueued

Emitted when the operator change of a validator is queued.

solidity
event OperatorChangeQueued(
    bytes indexed pubkey, address queuedOperator, address currentOperator, uint256 queuedTimestamp
);

Parameters

NameTypeDescription
pubkeybytesThe pubkey of the validator.
queuedOperatoraddressThe new queued operator address.
currentOperatoraddressThe current operator address.
queuedTimestampuint256The timestamp when the change was queued.

OperatorChangeCancelled

Emitted when the operator change of a validator is cancelled.

solidity
event OperatorChangeCancelled(bytes indexed pubkey);

Parameters

NameTypeDescription
pubkeybytesThe pubkey of the validator.

OperatorUpdated

Emitted when the operator of a validator is updated.

solidity
event OperatorUpdated(bytes indexed pubkey, address newOperator, address previousOperator);

Parameters

NameTypeDescription
pubkeybytesThe pubkey of the validator.
newOperatoraddressThe new operator address.
previousOperatoraddressThe previous operator address.