Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

paginate_transactions

Fetch every record in the indexer's transactions connection, paginating forward.

Signature

pub async fn paginate_transactions(
    &self,
    page_size: i64,
    variables: transactions::Variables,
) -> Result<Vec<transactions::TransactionsTransactionsNodes>, anyhow::Error>;

Example

use {
    anyhow::Result,
    dango_sdk::{HttpClient, transactions},
};
 
#[tokio::main]
async fn main() -> Result<()> {
    let client = HttpClient::new("https://api-mainnet.dango.zone")?;
 
    let txs = client
        .paginate_transactions(100, transactions::Variables {
            sender_address: Some("0x0000000000000000000000000000000000000000".into()),
            ..Default::default()
        })
        .await?;
 
    println!("{} transactions", txs.len());
    Ok(())
}

Parameters

page_sizei64. Items per request. Indexer caps first at 100.

variablestransactions::Variables. Filters; pagination fields are overwritten by the loop.

Returns

Vec<transactions::TransactionsTransactionsNodes> — every transaction matching the filter, in the indexer's natural order.

See also

  • paginate_all — generic, supports backward pagination.
  • search_tx — single transaction lookup by hash.