treeget_deposit_root

Read the current deposit Merkle root from the deposit contract

Read the current deposit Merkle root from the Seismic deposit contract. The deposit root is used by the consensus layer to verify validator deposits.


Overview

The Seismic deposit contract maintains a Merkle tree of all validator deposits. The root of this tree is used by the consensus layer to:

  • Verify that deposits have been included

  • Validate deposit proofs

  • Track the deposit history

This method queries the current root hash.


Signatures

Sync
Async

Parameters

Parameter
Type
Default
Description

address

str

Address of the deposit contract to query

The default address is the genesis deposit contract (DEPOSIT_CONTRACT_ADDRESS).


Returns

Type: bytes (32 bytes)

A 32-byte hash representing the current Merkle root of all deposits.


Examples

Sync Usage

Async Usage

With Wallet Client

Custom Contract Address

Monitoring Deposits

Comparing with Deposit Count


Implementation Details

Contract Call

This method calls the deposit contract's get_deposit_root() function:

The call is made via eth_call with the contract address and encoded function selector.

Encoding

The SDK:

  1. Encodes the function call using the deposit contract ABI

  2. Calls eth_call to the deposit contract

  3. Extracts the first 32 bytes of the response

  4. Returns them as bytes

Genesis Contract

The default deposit contract address (DEPOSIT_CONTRACT_ADDRESS) is deployed at genesis on all Seismic networks.


Merkle Tree Structure

Deposit Tree

The deposit contract maintains a Merkle tree where each leaf is:

The tree is built incrementally as deposits are made. The root is updated after each deposit.

Verification

The consensus layer uses the deposit root to:

  1. Verify that a deposit is included in the tree

  2. Validate the deposit count matches the tree size

  3. Ensure deposit data hasn't been tampered with


Use Cases

Validator Deposits

Before making a deposit, you might want to verify the current root:

Consensus Verification

Consensus clients can query the deposit root to ensure they have the latest deposit data:

Monitoring Tools

Build monitoring tools that track deposit activity:


Notes

Public Method

get_deposit_root() is available on both:

  • Public clients (create_public_client) — Read-only, no private key

  • Wallet clients (create_wallet_client) — Full capabilities

Read-Only

This is a view function that does not modify state. It does not consume gas or require a transaction.

Deposit Contract

The deposit contract is a special system contract deployed at genesis. It is used for:

  • Accepting validator deposits

  • Tracking deposit history

  • Providing deposit proofs to the consensus layer


Error Handling


See Also

Last updated