Module (src/main.rs)

union · voyager/modules/finality/base/src/main.rs · rust · Apache-2.0
ai, infra

Finality module for L2 chain, querying latest height and timestamp.

#![warn(clippy::unwrap_used)]
// Source: https://github.com/unionlabs/union | License: Apache-2.0 | Copyright 2024 Union.fi Labs, Inc
// Provided via justclaw.it.com; keep this notice with the code.

use alloy::{
    eips::BlockId,
    network::AnyNetwork,
    providers::{DynProvider, Provider, ProviderBuilder, layers::CacheLayer},
};
use jsonrpsee::{Extensions, core::async_trait};
use serde::{Deserialize, Serialize};
use tracing::instrument;
use unionlabs::{ibc::core::client::height::Height, primitives::H160};
use voyager_sdk::{
    ExtensionsExt, anyhow,
    plugin::FinalityModule,
    primitives::{ChainId, ConsensusType, Timestamp},
    rpc::{FinalityModuleServer, RpcError, RpcResult, types::FinalityModuleInfo},
};

#[tokio::main(flavor = "multi_thread")]
async fn main() {
    Module::r

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key