Pectra Support

Pier Two provides full support for the Pectra Hardfork

👍

New batch deposit contracts available

Read about our batch deposit contracts: Ethereum Batch Deposit Contract

Creating 0x02 type Validators

The createStakeV3 endpoint allows you to create Pectra-era validators with 0x02-prefixed withdrawal credentials.

The Endpoint is similar to the existing createStakeV2 endpoint but instead of specifying the number of validators, you will provide the number of ETH to stake along with an optional maximum ETH staked per validator. We will automatically provision the required number of validators based on your input.

Endpoint

Inputs

Output

/ethereum/createStakeV2 (Shapella)

  • reference
  • label
  • withdrawal address
  • fee recipient
  • validator count

Pier Two Stake record with individual validators (including deposit data)

/ethereum/createStakeV3 (Pectra)

  • reference
  • label
  • withdrawal address
  • fee recipient
  • stake amount
  • max stake per validator

Pier Two Stake record with individual validators (including deposit data)

Differences to batch deposit contract

For Pectra, a new version of the deposit contract is deployed to facilitate differing amounts between the individual validators.

You can fetch the contract addresses for the given environment from this endpoint, the pectra batch deposit contract address can be found at ethereum.pectraBatchDepositContractAddress in the response.

The main batchDepositfunction has a slightly different signature post-pectra

Era

Batch Deposit Signature

Notes

Shapella

function batchDeposit(
    bytes[] pubkeys,
    bytes[] withdrawal_credentials,
    bytes[] signatures,
    bytes32[] deposit_data_roots
)
  • amounts are not specified, the contract implementation hardcodes 32 ETH for all validators
  • bytes array types are used and the contract expects one element per validator for each argument

Pectra


function batchDeposit(
  (bytes,bytes,bytes,uint256)[]
)
  • each deposit is passed as a single element of a Deposits array
  • amount must be specified for each validator deposit