V2 agents (#1227)
parent
f4a2462364
commit
a23c1a8d2a
@ -0,0 +1,148 @@ |
||||
use std::fmt::Debug; |
||||
use std::sync::Arc; |
||||
|
||||
use async_trait::async_trait; |
||||
use ethers::core::types::H256; |
||||
use ethers::types::U256; |
||||
use eyre::Result; |
||||
use futures_util::future::select_all; |
||||
use tokio::task::JoinHandle; |
||||
use tracing::instrument::Instrumented; |
||||
use tracing::{info_span, Instrument}; |
||||
|
||||
use abacus_core::db::AbacusDB; |
||||
use abacus_core::{ |
||||
AbacusContract, AbacusMessage, ChainCommunicationError, Checkpoint, Mailbox, MailboxIndexer, |
||||
TxCostEstimate, TxOutcome, |
||||
}; |
||||
|
||||
use crate::chains::IndexSettings; |
||||
use crate::{ContractSync, ContractSyncMetrics}; |
||||
|
||||
/// Caching Mailbox type
|
||||
#[derive(Debug, Clone)] |
||||
pub struct CachingMailbox { |
||||
mailbox: Arc<dyn Mailbox>, |
||||
db: AbacusDB, |
||||
indexer: Arc<dyn MailboxIndexer>, |
||||
} |
||||
|
||||
impl std::fmt::Display for CachingMailbox { |
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
||||
write!(f, "{self:?}") |
||||
} |
||||
} |
||||
|
||||
impl CachingMailbox { |
||||
/// Instantiate new CachingMailbox
|
||||
pub fn new(mailbox: Arc<dyn Mailbox>, db: AbacusDB, indexer: Arc<dyn MailboxIndexer>) -> Self { |
||||
Self { |
||||
mailbox, |
||||
db, |
||||
indexer, |
||||
} |
||||
} |
||||
|
||||
/// Return handle on mailbox object
|
||||
pub fn mailbox(&self) -> &Arc<dyn Mailbox> { |
||||
&self.mailbox |
||||
} |
||||
|
||||
/// Return handle on AbacusDB
|
||||
pub fn db(&self) -> &AbacusDB { |
||||
&self.db |
||||
} |
||||
|
||||
/// Spawn a task that syncs the CachingMailbox's db with the on-chain event
|
||||
/// data
|
||||
pub fn sync( |
||||
&self, |
||||
index_settings: IndexSettings, |
||||
metrics: ContractSyncMetrics, |
||||
) -> Instrumented<JoinHandle<Result<()>>> { |
||||
let span = info_span!("MailboxContractSync", self = %self); |
||||
|
||||
let sync = ContractSync::new( |
||||
self.mailbox.chain_name().into(), |
||||
self.db.clone(), |
||||
self.indexer.clone(), |
||||
index_settings, |
||||
metrics, |
||||
); |
||||
|
||||
tokio::spawn(async move { |
||||
let tasks = vec![sync.sync_dispatched_messages()]; |
||||
|
||||
let (_, _, remaining) = select_all(tasks).await; |
||||
for task in remaining.into_iter() { |
||||
cancel_task!(task); |
||||
} |
||||
|
||||
Ok(()) |
||||
}) |
||||
.instrument(span) |
||||
} |
||||
} |
||||
|
||||
#[async_trait] |
||||
impl Mailbox for CachingMailbox { |
||||
fn local_domain(&self) -> u32 { |
||||
self.mailbox.local_domain() |
||||
} |
||||
|
||||
fn local_domain_hash(&self) -> H256 { |
||||
self.mailbox.local_domain_hash() |
||||
} |
||||
|
||||
async fn count(&self) -> Result<u32, ChainCommunicationError> { |
||||
self.mailbox.count().await |
||||
} |
||||
|
||||
/// Fetch the status of a message
|
||||
async fn delivered(&self, id: H256) -> Result<bool, ChainCommunicationError> { |
||||
self.mailbox.delivered(id).await |
||||
} |
||||
|
||||
async fn latest_checkpoint( |
||||
&self, |
||||
maybe_lag: Option<u64>, |
||||
) -> Result<Checkpoint, ChainCommunicationError> { |
||||
self.mailbox.latest_checkpoint(maybe_lag).await |
||||
} |
||||
|
||||
/// Fetch the current default interchain security module value
|
||||
async fn default_ism(&self) -> Result<H256, ChainCommunicationError> { |
||||
self.mailbox.default_ism().await |
||||
} |
||||
|
||||
async fn process( |
||||
&self, |
||||
message: &AbacusMessage, |
||||
metadata: &[u8], |
||||
tx_gas_limit: Option<U256>, |
||||
) -> Result<TxOutcome, ChainCommunicationError> { |
||||
self.mailbox.process(message, metadata, tx_gas_limit).await |
||||
} |
||||
|
||||
async fn process_estimate_costs( |
||||
&self, |
||||
message: &AbacusMessage, |
||||
metadata: &[u8], |
||||
) -> Result<TxCostEstimate> { |
||||
self.mailbox.process_estimate_costs(message, metadata).await |
||||
} |
||||
|
||||
fn process_calldata(&self, message: &AbacusMessage, metadata: &[u8]) -> Vec<u8> { |
||||
self.mailbox.process_calldata(message, metadata) |
||||
} |
||||
} |
||||
|
||||
impl AbacusContract for CachingMailbox { |
||||
fn chain_name(&self) -> &str { |
||||
self.mailbox.chain_name() |
||||
} |
||||
|
||||
fn address(&self) -> H256 { |
||||
self.mailbox.address() |
||||
} |
||||
} |
@ -1,171 +0,0 @@ |
||||
use std::fmt::Debug; |
||||
use std::sync::Arc; |
||||
|
||||
use async_trait::async_trait; |
||||
use ethers::core::types::H256; |
||||
use eyre::Result; |
||||
use futures_util::future::select_all; |
||||
use tokio::task::JoinHandle; |
||||
use tokio::time::{sleep, Duration}; |
||||
use tracing::instrument::Instrumented; |
||||
use tracing::{info_span, Instrument}; |
||||
|
||||
use abacus_core::db::AbacusDB; |
||||
use abacus_core::{ |
||||
AbacusCommon, AbacusContract, ChainCommunicationError, Checkpoint, Message, Outbox, |
||||
OutboxEvents, OutboxIndexer, OutboxState, RawCommittedMessage, TxOutcome, |
||||
}; |
||||
|
||||
use crate::{ContractSync, ContractSyncMetrics, IndexSettings}; |
||||
|
||||
/// Caching Outbox type
|
||||
#[derive(Debug, Clone)] |
||||
pub struct CachingOutbox { |
||||
outbox: Arc<dyn Outbox>, |
||||
db: AbacusDB, |
||||
indexer: Arc<dyn OutboxIndexer>, |
||||
} |
||||
|
||||
impl std::fmt::Display for CachingOutbox { |
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
||||
write!(f, "{:?}", self) |
||||
} |
||||
} |
||||
|
||||
impl CachingOutbox { |
||||
/// Instantiate new CachingOutbox
|
||||
pub fn new(outbox: Arc<dyn Outbox>, db: AbacusDB, indexer: Arc<dyn OutboxIndexer>) -> Self { |
||||
Self { |
||||
outbox, |
||||
db, |
||||
indexer, |
||||
} |
||||
} |
||||
|
||||
/// Return handle on outbox object
|
||||
pub fn outbox(&self) -> &Arc<dyn Outbox> { |
||||
&self.outbox |
||||
} |
||||
|
||||
/// Return handle on AbacusDB
|
||||
pub fn db(&self) -> &AbacusDB { |
||||
&self.db |
||||
} |
||||
|
||||
/// Spawn a task that syncs the CachingOutbox's db with the on-chain event
|
||||
/// data
|
||||
pub fn sync( |
||||
&self, |
||||
index_settings: IndexSettings, |
||||
metrics: ContractSyncMetrics, |
||||
) -> Instrumented<JoinHandle<Result<()>>> { |
||||
let span = info_span!("OutboxContractSync", self = %self); |
||||
|
||||
let sync = ContractSync::new( |
||||
self.outbox.chain_name().into(), |
||||
self.db.clone(), |
||||
self.indexer.clone(), |
||||
index_settings, |
||||
metrics, |
||||
); |
||||
|
||||
tokio::spawn(async move { |
||||
let tasks = vec![sync.sync_outbox_messages()]; |
||||
|
||||
let (_, _, remaining) = select_all(tasks).await; |
||||
for task in remaining.into_iter() { |
||||
cancel_task!(task); |
||||
} |
||||
|
||||
Ok(()) |
||||
}) |
||||
.instrument(span) |
||||
} |
||||
} |
||||
|
||||
#[async_trait] |
||||
impl Outbox for CachingOutbox { |
||||
async fn state(&self) -> Result<OutboxState, ChainCommunicationError> { |
||||
self.outbox.state().await |
||||
} |
||||
|
||||
async fn count(&self) -> Result<u32, ChainCommunicationError> { |
||||
self.outbox.count().await |
||||
} |
||||
|
||||
async fn dispatch(&self, message: &Message) -> Result<TxOutcome, ChainCommunicationError> { |
||||
self.outbox.dispatch(message).await |
||||
} |
||||
|
||||
async fn cache_checkpoint(&self) -> Result<TxOutcome, ChainCommunicationError> { |
||||
self.outbox.cache_checkpoint().await |
||||
} |
||||
|
||||
async fn latest_cached_root(&self) -> Result<H256, ChainCommunicationError> { |
||||
self.outbox.latest_cached_root().await |
||||
} |
||||
|
||||
async fn latest_cached_checkpoint(&self) -> Result<Checkpoint, ChainCommunicationError> { |
||||
self.outbox.latest_cached_checkpoint().await |
||||
} |
||||
|
||||
async fn latest_checkpoint( |
||||
&self, |
||||
maybe_lag: Option<u64>, |
||||
) -> Result<Checkpoint, ChainCommunicationError> { |
||||
self.outbox.latest_checkpoint(maybe_lag).await |
||||
} |
||||
} |
||||
|
||||
#[async_trait] |
||||
impl OutboxEvents for CachingOutbox { |
||||
#[tracing::instrument(err, skip(self))] |
||||
async fn raw_message_by_leaf( |
||||
&self, |
||||
leaf: H256, |
||||
) -> Result<Option<RawCommittedMessage>, ChainCommunicationError> { |
||||
loop { |
||||
if let Some(message) = self.db.message_by_leaf(leaf)? { |
||||
return Ok(Some(message)); |
||||
} |
||||
sleep(Duration::from_millis(500)).await; |
||||
} |
||||
} |
||||
|
||||
async fn leaf_by_tree_index( |
||||
&self, |
||||
tree_index: usize, |
||||
) -> Result<Option<H256>, ChainCommunicationError> { |
||||
loop { |
||||
if let Some(leaf) = self.db.leaf_by_leaf_index(tree_index as u32)? { |
||||
return Ok(Some(leaf)); |
||||
} |
||||
sleep(Duration::from_millis(500)).await; |
||||
} |
||||
} |
||||
} |
||||
|
||||
impl AbacusContract for CachingOutbox { |
||||
fn chain_name(&self) -> &str { |
||||
self.outbox.chain_name() |
||||
} |
||||
|
||||
fn address(&self) -> H256 { |
||||
self.outbox.address() |
||||
} |
||||
} |
||||
|
||||
#[async_trait] |
||||
impl AbacusCommon for CachingOutbox { |
||||
fn local_domain(&self) -> u32 { |
||||
self.outbox.local_domain() |
||||
} |
||||
|
||||
async fn status(&self, txid: H256) -> Result<Option<TxOutcome>, ChainCommunicationError> { |
||||
self.outbox.status(txid).await |
||||
} |
||||
|
||||
async fn validator_manager(&self) -> Result<H256, ChainCommunicationError> { |
||||
self.outbox.validator_manager().await |
||||
} |
||||
} |
@ -1,52 +0,0 @@ |
||||
use eyre::bail; |
||||
|
||||
/// Contract states
|
||||
#[repr(u8)] |
||||
#[derive(Debug, Copy, Clone, Eq, PartialEq)] |
||||
pub enum OutboxState { |
||||
/// Before initialize function is called.
|
||||
/// Note: the contract is initialized at deploy time, so it should never be in this state
|
||||
UnInitialized = 0, |
||||
/// As long as the contract has not become fraudulent.
|
||||
Active = 1, |
||||
/// After a valid fraud proof has been submitted; contract will no longer accept updates or new
|
||||
/// messages
|
||||
Failed = 2, |
||||
} |
||||
|
||||
impl TryFrom<u8> for OutboxState { |
||||
type Error = eyre::Report; |
||||
|
||||
fn try_from(value: u8) -> Result<Self, Self::Error> { |
||||
use OutboxState::*; |
||||
Ok(match value { |
||||
0 => UnInitialized, |
||||
1 => Active, |
||||
2 => Failed, |
||||
_ => bail!("Invalid state value"), |
||||
}) |
||||
} |
||||
} |
||||
|
||||
/// The status of a message in the inbox
|
||||
#[repr(u8)] |
||||
#[derive(Debug, Copy, Clone, Eq, PartialEq)] |
||||
pub enum MessageStatus { |
||||
/// Message is unknown
|
||||
None = 0, |
||||
/// Message has been processed
|
||||
Processed = 1, |
||||
} |
||||
|
||||
impl TryFrom<u8> for MessageStatus { |
||||
type Error = eyre::Report; |
||||
|
||||
fn try_from(value: u8) -> Result<Self, Self::Error> { |
||||
use MessageStatus::*; |
||||
Ok(match value { |
||||
0 => None, |
||||
1 => Processed, |
||||
_ => bail!("Invalid message status value"), |
||||
}) |
||||
} |
||||
} |
@ -1,25 +0,0 @@ |
||||
use std::fmt::Debug; |
||||
|
||||
use async_trait::async_trait; |
||||
use auto_impl::auto_impl; |
||||
use ethers::core::types::H256; |
||||
use eyre::Result; |
||||
|
||||
use crate::{ |
||||
traits::{AbacusCommon, ChainCommunicationError}, |
||||
Address, MessageStatus, |
||||
}; |
||||
|
||||
/// Interface for on-chain inboxes
|
||||
#[async_trait] |
||||
#[auto_impl(Box, Arc)] |
||||
pub trait Inbox: AbacusCommon + Send + Sync + Debug { |
||||
/// Return the domain of the inbox's linked outbox
|
||||
async fn remote_domain(&self) -> Result<u32, ChainCommunicationError>; |
||||
|
||||
/// Fetch the status of a message
|
||||
async fn message_status(&self, leaf: H256) -> Result<MessageStatus, ChainCommunicationError>; |
||||
|
||||
/// The on-chain address of the inbox contract.
|
||||
fn contract_address(&self) -> Address; |
||||
} |
@ -0,0 +1,60 @@ |
||||
use std::fmt::Debug; |
||||
|
||||
use async_trait::async_trait; |
||||
use auto_impl::auto_impl; |
||||
use ethers::{core::types::H256, types::U256}; |
||||
use eyre::Result; |
||||
|
||||
use crate::{ |
||||
traits::{ChainCommunicationError, TxOutcome}, |
||||
utils::domain_hash, |
||||
AbacusContract, AbacusMessage, Checkpoint, TxCostEstimate, |
||||
}; |
||||
|
||||
/// Interface for the Mailbox chain contract. Allows abstraction over different
|
||||
/// chains
|
||||
#[async_trait] |
||||
#[auto_impl(Box, Arc)] |
||||
pub trait Mailbox: AbacusContract + Send + Sync + Debug { |
||||
/// Return the domain ID
|
||||
fn local_domain(&self) -> u32; |
||||
|
||||
/// Return the domain hash
|
||||
fn local_domain_hash(&self) -> H256 { |
||||
domain_hash(self.address(), self.local_domain()) |
||||
} |
||||
|
||||
/// Gets the current leaf count of the merkle tree
|
||||
async fn count(&self) -> Result<u32, ChainCommunicationError>; |
||||
|
||||
/// Fetch the status of a message
|
||||
async fn delivered(&self, id: H256) -> Result<bool, ChainCommunicationError>; |
||||
|
||||
/// Get the latest checkpoint.
|
||||
async fn latest_checkpoint( |
||||
&self, |
||||
lag: Option<u64>, |
||||
) -> Result<Checkpoint, ChainCommunicationError>; |
||||
|
||||
/// Fetch the current default interchain security module value
|
||||
async fn default_ism(&self) -> Result<H256, ChainCommunicationError>; |
||||
|
||||
/// Process a message with a proof against the provided signed checkpoint
|
||||
async fn process( |
||||
&self, |
||||
message: &AbacusMessage, |
||||
metadata: &[u8], |
||||
tx_gas_limit: Option<U256>, |
||||
) -> Result<TxOutcome, ChainCommunicationError>; |
||||
|
||||
/// Estimate transaction costs to process a message.
|
||||
async fn process_estimate_costs( |
||||
&self, |
||||
message: &AbacusMessage, |
||||
metadata: &[u8], |
||||
) -> Result<TxCostEstimate>; |
||||
|
||||
/// Get the calldata for a transaction to process a message with a proof
|
||||
/// against the provided signed checkpoint
|
||||
fn process_calldata(&self, message: &AbacusMessage, metadata: &[u8]) -> Vec<u8>; |
||||
} |
@ -0,0 +1,30 @@ |
||||
use std::fmt::Debug; |
||||
|
||||
use async_trait::async_trait; |
||||
use auto_impl::auto_impl; |
||||
use ethers::types::{H160, U256}; |
||||
use eyre::Result; |
||||
|
||||
use crate::{ |
||||
accumulator::merkle::Proof, traits::ChainCommunicationError, AbacusContract, |
||||
MultisigSignedCheckpoint, |
||||
}; |
||||
|
||||
/// Interface for the MultisigIsm chain contract. Allows abstraction over different
|
||||
/// chains
|
||||
#[async_trait] |
||||
#[auto_impl(Box, Arc)] |
||||
pub trait MultisigIsm: AbacusContract + Send + Sync + Debug { |
||||
/// Returns the metadata needed by the contract's verify function
|
||||
async fn format_metadata( |
||||
&self, |
||||
checkpoint: &MultisigSignedCheckpoint, |
||||
proof: Proof, |
||||
) -> Result<Vec<u8>, ChainCommunicationError>; |
||||
|
||||
/// Fetch the threshold for the provided domain
|
||||
async fn threshold(&self, domain: u32) -> Result<U256, ChainCommunicationError>; |
||||
|
||||
/// Fetch the validators for the provided domain
|
||||
async fn validators(&self, domain: u32) -> Result<Vec<H160>, ChainCommunicationError>; |
||||
} |
@ -1,78 +0,0 @@ |
||||
use std::convert::TryFrom; |
||||
use std::fmt::Debug; |
||||
|
||||
use async_trait::async_trait; |
||||
use auto_impl::auto_impl; |
||||
use ethers::core::types::H256; |
||||
use eyre::Result; |
||||
|
||||
use crate::{ |
||||
traits::{ChainCommunicationError, TxOutcome}, |
||||
AbacusCommon, Checkpoint, CommittedMessage, Message, OutboxState, RawCommittedMessage, |
||||
}; |
||||
|
||||
/// Interface for the Outbox chain contract. Allows abstraction over different
|
||||
/// chains
|
||||
#[async_trait] |
||||
#[auto_impl(Box, Arc)] |
||||
pub trait Outbox: AbacusCommon + Send + Sync + Debug { |
||||
/// Fetch the current state.
|
||||
async fn state(&self) -> Result<OutboxState, ChainCommunicationError>; |
||||
|
||||
/// Gets the current leaf count of the merkle tree
|
||||
async fn count(&self) -> Result<u32, ChainCommunicationError>; |
||||
|
||||
/// Dispatch a message.
|
||||
async fn dispatch(&self, message: &Message) -> Result<TxOutcome, ChainCommunicationError>; |
||||
|
||||
/// Caches the latest checkpoint.
|
||||
async fn cache_checkpoint(&self) -> Result<TxOutcome, ChainCommunicationError>; |
||||
|
||||
/// Fetch the latest cached root.
|
||||
async fn latest_cached_root(&self) -> Result<H256, ChainCommunicationError>; |
||||
|
||||
/// Return the latest cached checkpoint.
|
||||
async fn latest_cached_checkpoint(&self) -> Result<Checkpoint, ChainCommunicationError>; |
||||
|
||||
/// Get the latest checkpoint.
|
||||
async fn latest_checkpoint( |
||||
&self, |
||||
lag: Option<u64>, |
||||
) -> Result<Checkpoint, ChainCommunicationError>; |
||||
} |
||||
|
||||
/// Interface for retrieving event data emitted specifically by the outbox
|
||||
#[async_trait] |
||||
#[auto_impl(Box, Arc)] |
||||
pub trait OutboxEvents: Outbox + Send + Sync + Debug { |
||||
/// Look up a message by its hash.
|
||||
/// This should fetch events from the chain API
|
||||
async fn raw_message_by_leaf( |
||||
&self, |
||||
leaf: H256, |
||||
) -> Result<Option<RawCommittedMessage>, ChainCommunicationError>; |
||||
|
||||
/// Look up a message by its hash.
|
||||
/// This should fetch events from the chain API
|
||||
async fn message_by_leaf( |
||||
&self, |
||||
leaf: H256, |
||||
) -> Result<Option<CommittedMessage>, ChainCommunicationError> { |
||||
self.raw_message_by_leaf(leaf) |
||||
.await? |
||||
.map(CommittedMessage::try_from) |
||||
.transpose() |
||||
.map_err(Into::into) |
||||
} |
||||
|
||||
/// Fetch the tree_index-th leaf inserted into the merkle tree.
|
||||
/// Returns `Ok(None)` if no leaf exists for given `tree_size` (`Ok(None)`
|
||||
/// serves as the return value for an index error). If tree_index == 0,
|
||||
/// this will return the first inserted leaf. This is because the Outbox
|
||||
/// emits the index at which the leaf was inserted in (`tree.count() - 1`),
|
||||
/// thus the first inserted leaf has an index of 0.
|
||||
async fn leaf_by_tree_index( |
||||
&self, |
||||
tree_index: usize, |
||||
) -> Result<Option<H256>, ChainCommunicationError>; |
||||
} |
@ -1,46 +0,0 @@ |
||||
use std::fmt::Debug; |
||||
|
||||
use async_trait::async_trait; |
||||
use auto_impl::auto_impl; |
||||
use ethers::types::U256; |
||||
use eyre::Result; |
||||
|
||||
use crate::{ |
||||
accumulator::merkle::Proof, |
||||
traits::{ChainCommunicationError, TxOutcome}, |
||||
AbacusMessage, Address, MultisigSignedCheckpoint, TxCostEstimate, |
||||
}; |
||||
|
||||
/// Interface for an InboxValidatorManager
|
||||
#[async_trait] |
||||
#[auto_impl(Box, Arc)] |
||||
pub trait InboxValidatorManager: Send + Sync + Debug { |
||||
/// Process a message with a proof against the provided signed checkpoint
|
||||
async fn process( |
||||
&self, |
||||
multisig_signed_checkpoint: &MultisigSignedCheckpoint, |
||||
message: &AbacusMessage, |
||||
proof: &Proof, |
||||
tx_gas_limit: Option<U256>, |
||||
) -> Result<TxOutcome, ChainCommunicationError>; |
||||
|
||||
/// Estimate transaction costs to process a message.
|
||||
async fn process_estimate_costs( |
||||
&self, |
||||
multisig_signed_checkpoint: &MultisigSignedCheckpoint, |
||||
message: &AbacusMessage, |
||||
proof: &Proof, |
||||
) -> Result<TxCostEstimate>; |
||||
|
||||
/// Get the calldata for a transaction to process a message with a proof
|
||||
/// against the provided signed checkpoint
|
||||
fn process_calldata( |
||||
&self, |
||||
multisig_signed_checkpoint: &MultisigSignedCheckpoint, |
||||
message: &AbacusMessage, |
||||
proof: &Proof, |
||||
) -> Vec<u8>; |
||||
|
||||
/// The on-chain address of the inbox validator manager contract.
|
||||
fn contract_address(&self) -> Address; |
||||
} |
@ -1,84 +0,0 @@ |
||||
#![allow(non_snake_case)] |
||||
|
||||
use async_trait::async_trait; |
||||
use mockall::*; |
||||
|
||||
use ethers::types::H256; |
||||
|
||||
use abacus_core::{accumulator::merkle::Proof, *}; |
||||
|
||||
mock! { |
||||
pub InboxContract { |
||||
// Inbox
|
||||
pub fn _address(&self) -> H256 {} |
||||
|
||||
pub fn _local_domain(&self) -> u32 {} |
||||
|
||||
pub fn _contract_address(&self) -> Address {} |
||||
|
||||
pub fn _remote_domain(&self) -> Result<u32, ChainCommunicationError> {} |
||||
|
||||
pub fn _prove(&self, proof: &Proof) -> Result<TxOutcome, ChainCommunicationError> {} |
||||
|
||||
pub fn _checkpoint( |
||||
&self, |
||||
signed_checkpoint: &SignedCheckpoint, |
||||
) -> Result<TxOutcome, ChainCommunicationError> {} |
||||
|
||||
// AbacusCommon
|
||||
pub fn _status(&self, txid: H256) -> Result<Option<TxOutcome>, ChainCommunicationError> {} |
||||
|
||||
pub fn _validator_manager(&self) -> Result<H256, ChainCommunicationError> {} |
||||
|
||||
pub fn _message_status(&self, leaf: H256) -> Result<MessageStatus, ChainCommunicationError> {} |
||||
|
||||
// AbacusContract
|
||||
pub fn _chain_name(&self) -> &str {} |
||||
} |
||||
} |
||||
|
||||
impl std::fmt::Debug for MockInboxContract { |
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
||||
write!(f, "MockInboxContract") |
||||
} |
||||
} |
||||
|
||||
#[async_trait] |
||||
impl Inbox for MockInboxContract { |
||||
async fn remote_domain(&self) -> Result<u32, ChainCommunicationError> { |
||||
self._remote_domain() |
||||
} |
||||
|
||||
async fn message_status(&self, leaf: H256) -> Result<MessageStatus, ChainCommunicationError> { |
||||
self._message_status(leaf) |
||||
} |
||||
|
||||
fn contract_address(&self) -> Address { |
||||
self._contract_address() |
||||
} |
||||
} |
||||
|
||||
impl AbacusContract for MockInboxContract { |
||||
fn chain_name(&self) -> &str { |
||||
self._chain_name() |
||||
} |
||||
|
||||
fn address(&self) -> H256 { |
||||
self._address() |
||||
} |
||||
} |
||||
|
||||
#[async_trait] |
||||
impl AbacusCommon for MockInboxContract { |
||||
fn local_domain(&self) -> u32 { |
||||
self._local_domain() |
||||
} |
||||
|
||||
async fn status(&self, txid: H256) -> Result<Option<TxOutcome>, ChainCommunicationError> { |
||||
self._status(txid) |
||||
} |
||||
|
||||
async fn validator_manager(&self) -> Result<H256, ChainCommunicationError> { |
||||
self._validator_manager() |
||||
} |
||||
} |
@ -0,0 +1,123 @@ |
||||
#![allow(non_snake_case)] |
||||
|
||||
use async_trait::async_trait; |
||||
use eyre::Result; |
||||
use mockall::*; |
||||
|
||||
use ethers::{core::types::H256, types::U256}; |
||||
|
||||
use abacus_core::*; |
||||
|
||||
mock! { |
||||
pub MailboxContract { |
||||
// Mailbox
|
||||
pub fn _address(&self) -> H256 {} |
||||
|
||||
pub fn _local_domain(&self) -> u32 {} |
||||
|
||||
pub fn _domain_hash(&self) -> H256 {} |
||||
|
||||
pub fn _raw_message_by_id( |
||||
&self, |
||||
leaf: H256, |
||||
) -> Result<Option<RawAbacusMessage>, ChainCommunicationError> {} |
||||
|
||||
pub fn _id_by_nonce( |
||||
&self, |
||||
nonce: usize, |
||||
) -> Result<Option<H256>, ChainCommunicationError> {} |
||||
|
||||
pub fn _count(&self) -> Result<u32, ChainCommunicationError> {} |
||||
|
||||
pub fn _latest_checkpoint(&self, maybe_lag: Option<u64>) -> Result<Checkpoint, ChainCommunicationError> {} |
||||
|
||||
pub fn _default_ism(&self) -> Result<H256, ChainCommunicationError> {} |
||||
|
||||
pub fn _delivered(&self, id: H256) -> Result<bool, ChainCommunicationError> {} |
||||
|
||||
pub fn process( |
||||
&self, |
||||
message: &AbacusMessage, |
||||
metadata: &[u8], |
||||
tx_gas_limit: Option<U256>, |
||||
) -> Result<TxOutcome, ChainCommunicationError> {} |
||||
|
||||
pub fn process_estimate_costs( |
||||
&self, |
||||
message: &AbacusMessage, |
||||
metadata: &[u8], |
||||
) -> Result<TxCostEstimate> {} |
||||
|
||||
pub fn process_calldata( |
||||
&self, |
||||
message: &AbacusMessage, |
||||
metadata: &[u8], |
||||
) -> Vec<u8> {} |
||||
|
||||
// AbacusContract
|
||||
pub fn _chain_name(&self) -> &str {} |
||||
} |
||||
} |
||||
|
||||
impl std::fmt::Debug for MockMailboxContract { |
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
||||
write!(f, "MockMailboxContract") |
||||
} |
||||
} |
||||
|
||||
#[async_trait] |
||||
impl Mailbox for MockMailboxContract { |
||||
async fn count(&self) -> Result<u32, ChainCommunicationError> { |
||||
self._count() |
||||
} |
||||
|
||||
async fn latest_checkpoint( |
||||
&self, |
||||
maybe_lag: Option<u64>, |
||||
) -> Result<Checkpoint, ChainCommunicationError> { |
||||
self._latest_checkpoint(maybe_lag) |
||||
} |
||||
|
||||
fn local_domain(&self) -> u32 { |
||||
self._local_domain() |
||||
} |
||||
|
||||
async fn default_ism(&self) -> Result<H256, ChainCommunicationError> { |
||||
self._default_ism() |
||||
} |
||||
|
||||
async fn delivered(&self, id: H256) -> Result<bool, ChainCommunicationError> { |
||||
self._delivered(id) |
||||
} |
||||
|
||||
async fn process( |
||||
&self, |
||||
message: &AbacusMessage, |
||||
metadata: &[u8], |
||||
tx_gas_limit: Option<U256>, |
||||
) -> Result<TxOutcome, ChainCommunicationError> { |
||||
self.process(message, metadata, tx_gas_limit) |
||||
} |
||||
|
||||
async fn process_estimate_costs( |
||||
&self, |
||||
message: &AbacusMessage, |
||||
metadata: &[u8], |
||||
) -> Result<TxCostEstimate> { |
||||
self.process_estimate_costs(message, metadata) |
||||
} |
||||
|
||||
fn process_calldata(&self, message: &AbacusMessage, metadata: &[u8]) -> Vec<u8> { |
||||
self.process_calldata(message, metadata) |
||||
} |
||||
} |
||||
|
||||
impl AbacusContract for MockMailboxContract { |
||||
fn chain_name(&self) -> &str { |
||||
self._chain_name() |
||||
} |
||||
|
||||
fn address(&self) -> H256 { |
||||
self._address() |
||||
} |
||||
} |
@ -1,11 +1,8 @@ |
||||
/// Mock outbox contract
|
||||
pub mod outbox; |
||||
|
||||
/// Mock inbox contract
|
||||
pub mod inbox; |
||||
/// Mock mailbox contract
|
||||
pub mod mailbox; |
||||
|
||||
/// Mock indexer
|
||||
pub mod indexer; |
||||
|
||||
pub use indexer::MockIndexer; |
||||
pub use outbox::MockOutboxContract; |
||||
pub use mailbox::MockMailboxContract; |
||||
|
@ -1,116 +0,0 @@ |
||||
#![allow(non_snake_case)] |
||||
|
||||
use async_trait::async_trait; |
||||
use mockall::*; |
||||
|
||||
use ethers::core::types::H256; |
||||
|
||||
use abacus_core::*; |
||||
|
||||
mock! { |
||||
pub OutboxContract { |
||||
// Outbox
|
||||
pub fn _address(&self) -> H256 {} |
||||
|
||||
pub fn _local_domain(&self) -> u32 {} |
||||
|
||||
pub fn _domain_hash(&self) -> H256 {} |
||||
|
||||
pub fn _raw_message_by_leaf( |
||||
&self, |
||||
leaf: H256, |
||||
) -> Result<Option<RawCommittedMessage>, ChainCommunicationError> {} |
||||
|
||||
pub fn _leaf_by_tree_index( |
||||
&self, |
||||
tree_index: usize, |
||||
) -> Result<Option<H256>, ChainCommunicationError> {} |
||||
|
||||
pub fn _dispatch(&self, message: &Message) -> Result<TxOutcome, ChainCommunicationError> {} |
||||
|
||||
pub fn _count(&self) -> Result<u32, ChainCommunicationError> {} |
||||
|
||||
pub fn _cache_checkpoint(&self) -> Result<TxOutcome, ChainCommunicationError> {} |
||||
|
||||
pub fn _latest_cached_root(&self) -> Result<H256, ChainCommunicationError> {} |
||||
|
||||
pub fn _latest_cached_checkpoint(&self) -> Result<Checkpoint, ChainCommunicationError> {} |
||||
|
||||
pub fn _latest_checkpoint(&self, maybe_lag: Option<u64>) -> Result<Checkpoint, ChainCommunicationError> {} |
||||
|
||||
// AbacusCommon
|
||||
pub fn _status(&self, txid: H256) -> Result<Option<TxOutcome>, ChainCommunicationError> {} |
||||
|
||||
pub fn _validator_manager(&self) -> Result<H256, ChainCommunicationError> {} |
||||
|
||||
pub fn _state(&self) -> Result<OutboxState, ChainCommunicationError> {} |
||||
|
||||
// AbacusContract
|
||||
pub fn _chain_name(&self) -> &str {} |
||||
} |
||||
} |
||||
|
||||
impl std::fmt::Debug for MockOutboxContract { |
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
||||
write!(f, "MockOutboxContract") |
||||
} |
||||
} |
||||
|
||||
#[async_trait] |
||||
impl Outbox for MockOutboxContract { |
||||
async fn state(&self) -> Result<OutboxState, ChainCommunicationError> { |
||||
self._state() |
||||
} |
||||
|
||||
async fn count(&self) -> Result<u32, ChainCommunicationError> { |
||||
self._count() |
||||
} |
||||
|
||||
async fn dispatch(&self, message: &Message) -> Result<TxOutcome, ChainCommunicationError> { |
||||
self._dispatch(message) |
||||
} |
||||
|
||||
async fn cache_checkpoint(&self) -> Result<TxOutcome, ChainCommunicationError> { |
||||
self._cache_checkpoint() |
||||
} |
||||
|
||||
async fn latest_cached_root(&self) -> Result<H256, ChainCommunicationError> { |
||||
self._latest_cached_root() |
||||
} |
||||
|
||||
async fn latest_cached_checkpoint(&self) -> Result<Checkpoint, ChainCommunicationError> { |
||||
self._latest_cached_checkpoint() |
||||
} |
||||
|
||||
async fn latest_checkpoint( |
||||
&self, |
||||
maybe_lag: Option<u64>, |
||||
) -> Result<Checkpoint, ChainCommunicationError> { |
||||
self._latest_checkpoint(maybe_lag) |
||||
} |
||||
} |
||||
|
||||
impl AbacusContract for MockOutboxContract { |
||||
fn chain_name(&self) -> &str { |
||||
self._chain_name() |
||||
} |
||||
|
||||
fn address(&self) -> H256 { |
||||
self._address() |
||||
} |
||||
} |
||||
|
||||
#[async_trait] |
||||
impl AbacusCommon for MockOutboxContract { |
||||
fn local_domain(&self) -> u32 { |
||||
self._local_domain() |
||||
} |
||||
|
||||
async fn status(&self, txid: H256) -> Result<Option<TxOutcome>, ChainCommunicationError> { |
||||
self._status(txid) |
||||
} |
||||
|
||||
async fn validator_manager(&self) -> Result<H256, ChainCommunicationError> { |
||||
self._validator_manager() |
||||
} |
||||
} |
@ -1,13 +1,14 @@ |
||||
use std::collections::HashMap; |
||||
|
||||
use abacus_base::chains::IndexSettings; |
||||
use abacus_base::decl_settings; |
||||
use abacus_base::{ChainSetup, IndexSettings, OutboxAddresses}; |
||||
use abacus_base::ChainSetup; |
||||
|
||||
// TODO: Make it so the inherited settings better communicate that the `outbox`
|
||||
// config is not needed for the scraper.
|
||||
decl_settings!(Scraper { |
||||
/// Configurations for contracts on the outbox chains
|
||||
outboxes: HashMap<String, ChainSetup<OutboxAddresses>>, |
||||
outboxes: HashMap<String, ChainSetup>, |
||||
/// Index settings by chain
|
||||
indexes: HashMap<String, IndexSettings>, |
||||
}); |
||||
|
@ -1,239 +0,0 @@ |
||||
[ |
||||
{ |
||||
"inputs": [ |
||||
{ |
||||
"internalType": "uint32", |
||||
"name": "_localDomain", |
||||
"type": "uint32" |
||||
} |
||||
], |
||||
"stateMutability": "nonpayable", |
||||
"type": "constructor" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "uint8", |
||||
"name": "version", |
||||
"type": "uint8" |
||||
} |
||||
], |
||||
"name": "Initialized", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": true, |
||||
"internalType": "address", |
||||
"name": "previousOwner", |
||||
"type": "address" |
||||
}, |
||||
{ |
||||
"indexed": true, |
||||
"internalType": "address", |
||||
"name": "newOwner", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"name": "OwnershipTransferred", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": true, |
||||
"internalType": "bytes32", |
||||
"name": "messageHash", |
||||
"type": "bytes32" |
||||
} |
||||
], |
||||
"name": "Process", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "address", |
||||
"name": "validatorManager", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"name": "ValidatorManagerSet", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "VERSION", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "uint8", |
||||
"name": "", |
||||
"type": "uint8" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [ |
||||
{ |
||||
"internalType": "uint32", |
||||
"name": "_remoteDomain", |
||||
"type": "uint32" |
||||
}, |
||||
{ |
||||
"internalType": "address", |
||||
"name": "_validatorManager", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"name": "initialize", |
||||
"outputs": [], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "localDomain", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "uint32", |
||||
"name": "", |
||||
"type": "uint32" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [ |
||||
{ |
||||
"internalType": "bytes32", |
||||
"name": "", |
||||
"type": "bytes32" |
||||
} |
||||
], |
||||
"name": "messages", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "enum Inbox.MessageStatus", |
||||
"name": "", |
||||
"type": "uint8" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "owner", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "address", |
||||
"name": "", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [ |
||||
{ |
||||
"internalType": "bytes32", |
||||
"name": "_root", |
||||
"type": "bytes32" |
||||
}, |
||||
{ |
||||
"internalType": "uint256", |
||||
"name": "_index", |
||||
"type": "uint256" |
||||
}, |
||||
{ |
||||
"internalType": "bytes", |
||||
"name": "_message", |
||||
"type": "bytes" |
||||
}, |
||||
{ |
||||
"internalType": "bytes32[32]", |
||||
"name": "_proof", |
||||
"type": "bytes32[32]" |
||||
}, |
||||
{ |
||||
"internalType": "uint256", |
||||
"name": "_leafIndex", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"name": "process", |
||||
"outputs": [], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "remoteDomain", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "uint32", |
||||
"name": "", |
||||
"type": "uint32" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "renounceOwnership", |
||||
"outputs": [], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [ |
||||
{ |
||||
"internalType": "address", |
||||
"name": "_validatorManager", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"name": "setValidatorManager", |
||||
"outputs": [], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [ |
||||
{ |
||||
"internalType": "address", |
||||
"name": "newOwner", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"name": "transferOwnership", |
||||
"outputs": [], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "validatorManager", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "address", |
||||
"name": "", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
} |
||||
] |
@ -1,321 +0,0 @@ |
||||
[ |
||||
{ |
||||
"inputs": [ |
||||
{ |
||||
"internalType": "uint32", |
||||
"name": "_remoteDomain", |
||||
"type": "uint32" |
||||
}, |
||||
{ |
||||
"internalType": "address[]", |
||||
"name": "_validators", |
||||
"type": "address[]" |
||||
}, |
||||
{ |
||||
"internalType": "uint256", |
||||
"name": "_threshold", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"stateMutability": "nonpayable", |
||||
"type": "constructor" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": true, |
||||
"internalType": "address", |
||||
"name": "previousOwner", |
||||
"type": "address" |
||||
}, |
||||
{ |
||||
"indexed": true, |
||||
"internalType": "address", |
||||
"name": "newOwner", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"name": "OwnershipTransferred", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "uint256", |
||||
"name": "threshold", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"name": "ThresholdSet", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": true, |
||||
"internalType": "address", |
||||
"name": "validator", |
||||
"type": "address" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "uint256", |
||||
"name": "validatorCount", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"name": "ValidatorEnrolled", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": true, |
||||
"internalType": "address", |
||||
"name": "validator", |
||||
"type": "address" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "uint256", |
||||
"name": "validatorCount", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"name": "ValidatorUnenrolled", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "domain", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "uint32", |
||||
"name": "", |
||||
"type": "uint32" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "domainHash", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "bytes32", |
||||
"name": "", |
||||
"type": "bytes32" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [ |
||||
{ |
||||
"internalType": "address", |
||||
"name": "_validator", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"name": "enrollValidator", |
||||
"outputs": [], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [ |
||||
{ |
||||
"internalType": "bytes32", |
||||
"name": "_root", |
||||
"type": "bytes32" |
||||
}, |
||||
{ |
||||
"internalType": "uint256", |
||||
"name": "_index", |
||||
"type": "uint256" |
||||
}, |
||||
{ |
||||
"internalType": "bytes[]", |
||||
"name": "_signatures", |
||||
"type": "bytes[]" |
||||
} |
||||
], |
||||
"name": "isQuorum", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "bool", |
||||
"name": "", |
||||
"type": "bool" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [ |
||||
{ |
||||
"internalType": "address", |
||||
"name": "_validator", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"name": "isValidator", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "bool", |
||||
"name": "", |
||||
"type": "bool" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "owner", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "address", |
||||
"name": "", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [ |
||||
{ |
||||
"internalType": "contract IInbox", |
||||
"name": "_inbox", |
||||
"type": "address" |
||||
}, |
||||
{ |
||||
"internalType": "bytes32", |
||||
"name": "_root", |
||||
"type": "bytes32" |
||||
}, |
||||
{ |
||||
"internalType": "uint256", |
||||
"name": "_index", |
||||
"type": "uint256" |
||||
}, |
||||
{ |
||||
"internalType": "bytes[]", |
||||
"name": "_signatures", |
||||
"type": "bytes[]" |
||||
}, |
||||
{ |
||||
"internalType": "bytes", |
||||
"name": "_message", |
||||
"type": "bytes" |
||||
}, |
||||
{ |
||||
"internalType": "bytes32[32]", |
||||
"name": "_proof", |
||||
"type": "bytes32[32]" |
||||
}, |
||||
{ |
||||
"internalType": "uint256", |
||||
"name": "_leafIndex", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"name": "process", |
||||
"outputs": [], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "renounceOwnership", |
||||
"outputs": [], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [ |
||||
{ |
||||
"internalType": "uint256", |
||||
"name": "_threshold", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"name": "setThreshold", |
||||
"outputs": [], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "threshold", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "uint256", |
||||
"name": "", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [ |
||||
{ |
||||
"internalType": "address", |
||||
"name": "newOwner", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"name": "transferOwnership", |
||||
"outputs": [], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [ |
||||
{ |
||||
"internalType": "address", |
||||
"name": "_validator", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"name": "unenrollValidator", |
||||
"outputs": [], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "validatorCount", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "uint256", |
||||
"name": "", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "validators", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "address[]", |
||||
"name": "", |
||||
"type": "address[]" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
} |
||||
] |
@ -0,0 +1,324 @@ |
||||
[ |
||||
{ |
||||
"inputs": [], |
||||
"stateMutability": "nonpayable", |
||||
"type": "constructor" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": true, |
||||
"internalType": "address", |
||||
"name": "previousOwner", |
||||
"type": "address" |
||||
}, |
||||
{ |
||||
"indexed": true, |
||||
"internalType": "address", |
||||
"name": "newOwner", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"name": "OwnershipTransferred", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": true, |
||||
"internalType": "uint32", |
||||
"name": "domain", |
||||
"type": "uint32" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "uint256", |
||||
"name": "threshold", |
||||
"type": "uint256" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "bytes32", |
||||
"name": "commitment", |
||||
"type": "bytes32" |
||||
} |
||||
], |
||||
"name": "ThresholdSet", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": true, |
||||
"internalType": "uint32", |
||||
"name": "domain", |
||||
"type": "uint32" |
||||
}, |
||||
{ |
||||
"indexed": true, |
||||
"internalType": "address", |
||||
"name": "validator", |
||||
"type": "address" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "uint256", |
||||
"name": "validatorCount", |
||||
"type": "uint256" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "bytes32", |
||||
"name": "commitment", |
||||
"type": "bytes32" |
||||
} |
||||
], |
||||
"name": "ValidatorEnrolled", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"anonymous": false, |
||||
"inputs": [ |
||||
{ |
||||
"indexed": true, |
||||
"internalType": "uint32", |
||||
"name": "domain", |
||||
"type": "uint32" |
||||
}, |
||||
{ |
||||
"indexed": true, |
||||
"internalType": "address", |
||||
"name": "validator", |
||||
"type": "address" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "uint256", |
||||
"name": "validatorCount", |
||||
"type": "uint256" |
||||
}, |
||||
{ |
||||
"indexed": false, |
||||
"internalType": "bytes32", |
||||
"name": "commitment", |
||||
"type": "bytes32" |
||||
} |
||||
], |
||||
"name": "ValidatorUnenrolled", |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"inputs": [ |
||||
{ |
||||
"internalType": "uint32", |
||||
"name": "", |
||||
"type": "uint32" |
||||
} |
||||
], |
||||
"name": "commitment", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "bytes32", |
||||
"name": "", |
||||
"type": "bytes32" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [ |
||||
{ |
||||
"internalType": "uint32", |
||||
"name": "_domain", |
||||
"type": "uint32" |
||||
}, |
||||
{ |
||||
"internalType": "address", |
||||
"name": "_validator", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"name": "enrollValidator", |
||||
"outputs": [], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [ |
||||
{ |
||||
"internalType": "uint32", |
||||
"name": "_domain", |
||||
"type": "uint32" |
||||
}, |
||||
{ |
||||
"internalType": "address", |
||||
"name": "_address", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"name": "isEnrolled", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "bool", |
||||
"name": "", |
||||
"type": "bool" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "owner", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "address", |
||||
"name": "", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [], |
||||
"name": "renounceOwnership", |
||||
"outputs": [], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [ |
||||
{ |
||||
"internalType": "uint32", |
||||
"name": "_domain", |
||||
"type": "uint32" |
||||
}, |
||||
{ |
||||
"internalType": "uint256", |
||||
"name": "_threshold", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"name": "setThreshold", |
||||
"outputs": [], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [ |
||||
{ |
||||
"internalType": "uint32", |
||||
"name": "", |
||||
"type": "uint32" |
||||
} |
||||
], |
||||
"name": "threshold", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "uint256", |
||||
"name": "", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [ |
||||
{ |
||||
"internalType": "address", |
||||
"name": "newOwner", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"name": "transferOwnership", |
||||
"outputs": [], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [ |
||||
{ |
||||
"internalType": "uint32", |
||||
"name": "_domain", |
||||
"type": "uint32" |
||||
}, |
||||
{ |
||||
"internalType": "address", |
||||
"name": "_validator", |
||||
"type": "address" |
||||
} |
||||
], |
||||
"name": "unenrollValidator", |
||||
"outputs": [], |
||||
"stateMutability": "nonpayable", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [ |
||||
{ |
||||
"internalType": "uint32", |
||||
"name": "_domain", |
||||
"type": "uint32" |
||||
} |
||||
], |
||||
"name": "validatorCount", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "uint256", |
||||
"name": "", |
||||
"type": "uint256" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [ |
||||
{ |
||||
"internalType": "uint32", |
||||
"name": "_domain", |
||||
"type": "uint32" |
||||
} |
||||
], |
||||
"name": "validators", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "address[]", |
||||
"name": "", |
||||
"type": "address[]" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"inputs": [ |
||||
{ |
||||
"internalType": "bytes", |
||||
"name": "_metadata", |
||||
"type": "bytes" |
||||
}, |
||||
{ |
||||
"internalType": "bytes", |
||||
"name": "_message", |
||||
"type": "bytes" |
||||
} |
||||
], |
||||
"name": "verify", |
||||
"outputs": [ |
||||
{ |
||||
"internalType": "bool", |
||||
"name": "", |
||||
"type": "bool" |
||||
} |
||||
], |
||||
"stateMutability": "view", |
||||
"type": "function" |
||||
} |
||||
] |
@ -1,142 +0,0 @@ |
||||
#![allow(clippy::enum_variant_names)] |
||||
#![allow(missing_docs)] |
||||
|
||||
use std::collections::HashMap; |
||||
use std::fmt::Display; |
||||
use std::{error::Error as StdError, sync::Arc}; |
||||
|
||||
use async_trait::async_trait; |
||||
use ethers::prelude::*; |
||||
use eyre::Result; |
||||
|
||||
use abacus_core::{ |
||||
AbacusAbi, AbacusCommon, AbacusContract, Address, ChainCommunicationError, ContractLocator, |
||||
Inbox, MessageStatus, TxOutcome, |
||||
}; |
||||
|
||||
use crate::contracts::inbox::{Inbox as EthereumInboxInternal, INBOX_ABI}; |
||||
use crate::trait_builder::MakeableWithProvider; |
||||
|
||||
impl<M> Display for EthereumInboxInternal<M> |
||||
where |
||||
M: Middleware, |
||||
{ |
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
||||
write!(f, "{:?}", self) |
||||
} |
||||
} |
||||
|
||||
pub struct InboxBuilder {} |
||||
|
||||
impl MakeableWithProvider for InboxBuilder { |
||||
type Output = Box<dyn Inbox>; |
||||
|
||||
fn make_with_provider<M: Middleware + 'static>( |
||||
&self, |
||||
provider: M, |
||||
locator: &ContractLocator, |
||||
) -> Self::Output { |
||||
Box::new(EthereumInbox::new(Arc::new(provider), locator)) |
||||
} |
||||
} |
||||
|
||||
/// A struct that provides access to an Ethereum inbox contract
|
||||
#[derive(Debug)] |
||||
pub struct EthereumInbox<M> |
||||
where |
||||
M: Middleware, |
||||
{ |
||||
contract: Arc<EthereumInboxInternal<M>>, |
||||
domain: u32, |
||||
chain_name: String, |
||||
} |
||||
|
||||
impl<M> EthereumInbox<M> |
||||
where |
||||
M: Middleware, |
||||
{ |
||||
/// Create a reference to a inbox at a specific Ethereum address on some
|
||||
/// chain
|
||||
pub fn new( |
||||
provider: Arc<M>, |
||||
ContractLocator { |
||||
chain_name, |
||||
domain, |
||||
address, |
||||
}: &ContractLocator, |
||||
) -> Self { |
||||
Self { |
||||
contract: Arc::new(EthereumInboxInternal::new(address, provider)), |
||||
domain: *domain, |
||||
chain_name: chain_name.to_owned(), |
||||
} |
||||
} |
||||
} |
||||
|
||||
impl<M> AbacusContract for EthereumInbox<M> |
||||
where |
||||
M: Middleware + 'static, |
||||
{ |
||||
fn chain_name(&self) -> &str { |
||||
&self.chain_name |
||||
} |
||||
|
||||
fn address(&self) -> H256 { |
||||
self.contract.address().into() |
||||
} |
||||
} |
||||
|
||||
#[async_trait] |
||||
impl<M> AbacusCommon for EthereumInbox<M> |
||||
where |
||||
M: Middleware + 'static, |
||||
{ |
||||
fn local_domain(&self) -> u32 { |
||||
self.domain |
||||
} |
||||
|
||||
#[tracing::instrument(err)] |
||||
async fn status(&self, txid: H256) -> Result<Option<TxOutcome>, ChainCommunicationError> { |
||||
let receipt_opt = self |
||||
.contract |
||||
.client() |
||||
.get_transaction_receipt(txid) |
||||
.await |
||||
.map_err(|e| Box::new(e) as Box<dyn StdError + Send + Sync>)?; |
||||
|
||||
Ok(receipt_opt.map(Into::into)) |
||||
} |
||||
|
||||
#[tracing::instrument(err)] |
||||
async fn validator_manager(&self) -> Result<H256, ChainCommunicationError> { |
||||
Ok(self.contract.validator_manager().call().await?.into()) |
||||
} |
||||
} |
||||
|
||||
#[async_trait] |
||||
impl<M> Inbox for EthereumInbox<M> |
||||
where |
||||
M: Middleware + 'static, |
||||
{ |
||||
async fn remote_domain(&self) -> Result<u32, ChainCommunicationError> { |
||||
Ok(self.contract.remote_domain().call().await?) |
||||
} |
||||
|
||||
#[tracing::instrument(err)] |
||||
async fn message_status(&self, leaf: H256) -> Result<MessageStatus, ChainCommunicationError> { |
||||
let status = self.contract.messages(leaf.into()).call().await?; |
||||
Ok(MessageStatus::try_from(status).expect("Bad status from solidity")) |
||||
} |
||||
|
||||
fn contract_address(&self) -> Address { |
||||
self.contract.address().into() |
||||
} |
||||
} |
||||
|
||||
pub struct EthereumInboxAbi; |
||||
|
||||
impl AbacusAbi for EthereumInboxAbi { |
||||
fn fn_map() -> HashMap<Selector, &'static str> { |
||||
super::extract_fn_map(&INBOX_ABI) |
||||
} |
||||
} |
@ -0,0 +1,302 @@ |
||||
#![allow(clippy::enum_variant_names)] |
||||
#![allow(missing_docs)] |
||||
|
||||
use std::collections::HashMap; |
||||
use std::sync::Arc; |
||||
|
||||
use async_trait::async_trait; |
||||
use ethers::abi::AbiEncode; |
||||
use ethers::prelude::*; |
||||
use ethers_contract::builders::ContractCall; |
||||
use eyre::{eyre, Result}; |
||||
use tracing::instrument; |
||||
|
||||
use abacus_core::{ |
||||
AbacusAbi, AbacusContract, AbacusMessage, ChainCommunicationError, Checkpoint, ContractLocator, |
||||
Indexer, LogMeta, Mailbox, MailboxIndexer, RawAbacusMessage, TxCostEstimate, TxOutcome, |
||||
}; |
||||
|
||||
use crate::contracts::mailbox::{Mailbox as EthereumMailboxInternal, ProcessCall, MAILBOX_ABI}; |
||||
use crate::trait_builder::MakeableWithProvider; |
||||
use crate::tx::report_tx; |
||||
|
||||
impl<M> std::fmt::Display for EthereumMailboxInternal<M> |
||||
where |
||||
M: Middleware, |
||||
{ |
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
||||
write!(f, "{:?}", self) |
||||
} |
||||
} |
||||
|
||||
pub struct MailboxIndexerBuilder { |
||||
pub finality_blocks: u32, |
||||
} |
||||
|
||||
impl MakeableWithProvider for MailboxIndexerBuilder { |
||||
type Output = Box<dyn MailboxIndexer>; |
||||
|
||||
fn make_with_provider<M: Middleware + 'static>( |
||||
&self, |
||||
provider: M, |
||||
locator: &ContractLocator, |
||||
) -> Self::Output { |
||||
Box::new(EthereumMailboxIndexer::new( |
||||
Arc::new(provider), |
||||
locator, |
||||
self.finality_blocks, |
||||
)) |
||||
} |
||||
} |
||||
|
||||
#[derive(Debug)] |
||||
/// Struct that retrieves event data for an Ethereum mailbox
|
||||
pub struct EthereumMailboxIndexer<M> |
||||
where |
||||
M: Middleware, |
||||
{ |
||||
contract: Arc<EthereumMailboxInternal<M>>, |
||||
provider: Arc<M>, |
||||
finality_blocks: u32, |
||||
} |
||||
|
||||
impl<M> EthereumMailboxIndexer<M> |
||||
where |
||||
M: Middleware + 'static, |
||||
{ |
||||
/// Create new EthereumMailboxIndexer
|
||||
pub fn new(provider: Arc<M>, locator: &ContractLocator, finality_blocks: u32) -> Self { |
||||
let contract = Arc::new(EthereumMailboxInternal::new( |
||||
&locator.address, |
||||
provider.clone(), |
||||
)); |
||||
Self { |
||||
contract, |
||||
provider, |
||||
finality_blocks, |
||||
} |
||||
} |
||||
} |
||||
|
||||
#[async_trait] |
||||
impl<M> Indexer for EthereumMailboxIndexer<M> |
||||
where |
||||
M: Middleware + 'static, |
||||
{ |
||||
#[instrument(err, skip(self))] |
||||
async fn get_finalized_block_number(&self) -> Result<u32> { |
||||
Ok(self |
||||
.provider |
||||
.get_block_number() |
||||
.await? |
||||
.as_u32() |
||||
.saturating_sub(self.finality_blocks)) |
||||
} |
||||
} |
||||
|
||||
#[async_trait] |
||||
impl<M> MailboxIndexer for EthereumMailboxIndexer<M> |
||||
where |
||||
M: Middleware + 'static, |
||||
{ |
||||
#[instrument(err, skip(self))] |
||||
async fn fetch_sorted_messages( |
||||
&self, |
||||
from: u32, |
||||
to: u32, |
||||
) -> Result<Vec<(AbacusMessage, LogMeta)>> { |
||||
let mut events: Vec<(AbacusMessage, LogMeta)> = self |
||||
.contract |
||||
.dispatch_filter() |
||||
.from_block(from) |
||||
.to_block(to) |
||||
.query_with_meta() |
||||
.await? |
||||
.into_iter() |
||||
.map(|(event, meta)| (AbacusMessage::from(event.message.to_vec()), meta.into())) |
||||
.collect(); |
||||
|
||||
events.sort_by(|a, b| a.0.nonce.cmp(&b.0.nonce)); |
||||
Ok(events) |
||||
} |
||||
} |
||||
|
||||
pub struct MailboxBuilder {} |
||||
|
||||
impl MakeableWithProvider for MailboxBuilder { |
||||
type Output = Box<dyn Mailbox>; |
||||
|
||||
fn make_with_provider<M: Middleware + 'static>( |
||||
&self, |
||||
provider: M, |
||||
locator: &ContractLocator, |
||||
) -> Self::Output { |
||||
Box::new(EthereumMailbox::new(Arc::new(provider), locator)) |
||||
} |
||||
} |
||||
|
||||
/// A reference to an Mailbox contract on some Ethereum chain
|
||||
#[derive(Debug)] |
||||
pub struct EthereumMailbox<M> |
||||
where |
||||
M: Middleware, |
||||
{ |
||||
contract: Arc<EthereumMailboxInternal<M>>, |
||||
domain: u32, |
||||
chain_name: String, |
||||
provider: Arc<M>, |
||||
} |
||||
|
||||
impl<M> EthereumMailbox<M> |
||||
where |
||||
M: Middleware + 'static, |
||||
{ |
||||
/// Create a reference to a mailbox at a specific Ethereum address on some
|
||||
/// chain
|
||||
pub fn new(provider: Arc<M>, locator: &ContractLocator) -> Self { |
||||
Self { |
||||
contract: Arc::new(EthereumMailboxInternal::new( |
||||
&locator.address, |
||||
provider.clone(), |
||||
)), |
||||
domain: locator.domain, |
||||
chain_name: locator.chain_name.to_owned(), |
||||
provider, |
||||
} |
||||
} |
||||
|
||||
/// Returns a ContractCall that processes the provided message.
|
||||
/// If the provided tx_gas_limit is None, gas estimation occurs.
|
||||
async fn process_contract_call( |
||||
&self, |
||||
message: &AbacusMessage, |
||||
metadata: &[u8], |
||||
tx_gas_limit: Option<U256>, |
||||
) -> Result<ContractCall<M, ()>, ChainCommunicationError> { |
||||
let tx = self.contract.process( |
||||
metadata.to_vec().into(), |
||||
RawAbacusMessage::from(message).to_vec().into(), |
||||
); |
||||
|
||||
let gas_limit = if let Some(gas_limit) = tx_gas_limit { |
||||
gas_limit |
||||
} else { |
||||
tx.estimate_gas().await?.saturating_add(U256::from(100000)) |
||||
}; |
||||
Ok(tx.gas(gas_limit)) |
||||
} |
||||
} |
||||
|
||||
impl<M> AbacusContract for EthereumMailbox<M> |
||||
where |
||||
M: Middleware + 'static, |
||||
{ |
||||
fn chain_name(&self) -> &str { |
||||
&self.chain_name |
||||
} |
||||
|
||||
fn address(&self) -> H256 { |
||||
self.contract.address().into() |
||||
} |
||||
} |
||||
|
||||
#[async_trait] |
||||
impl<M> Mailbox for EthereumMailbox<M> |
||||
where |
||||
M: Middleware + 'static, |
||||
{ |
||||
#[tracing::instrument(err, skip(self))] |
||||
async fn count(&self) -> Result<u32, ChainCommunicationError> { |
||||
Ok(self.contract.count().call().await?) |
||||
} |
||||
|
||||
#[tracing::instrument(err, skip(self))] |
||||
async fn latest_checkpoint( |
||||
&self, |
||||
maybe_lag: Option<u64>, |
||||
) -> Result<Checkpoint, ChainCommunicationError> { |
||||
let base_call = self.contract.latest_checkpoint(); |
||||
let call_with_lag = match maybe_lag { |
||||
Some(lag) => { |
||||
let tip = self |
||||
.provider |
||||
.get_block_number() |
||||
.await |
||||
.map_err(|x| ChainCommunicationError::CustomError(Box::new(x)))? |
||||
.as_u64(); |
||||
base_call.block(if lag > tip { 0 } else { tip - lag }) |
||||
} |
||||
None => base_call, |
||||
}; |
||||
let (root, index) = call_with_lag.call().await?; |
||||
Ok(Checkpoint { |
||||
mailbox_address: self.address(), |
||||
mailbox_domain: self.domain, |
||||
root: root.into(), |
||||
index, |
||||
}) |
||||
} |
||||
|
||||
fn local_domain(&self) -> u32 { |
||||
self.domain |
||||
} |
||||
|
||||
#[tracing::instrument(err, skip(self))] |
||||
async fn default_ism(&self) -> Result<H256, ChainCommunicationError> { |
||||
Ok(self.contract.default_ism().call().await?.into()) |
||||
} |
||||
|
||||
#[tracing::instrument(err)] |
||||
async fn delivered(&self, id: H256) -> Result<bool, ChainCommunicationError> { |
||||
Ok(self.contract.delivered(id.into()).call().await?) |
||||
} |
||||
|
||||
#[tracing::instrument(skip(self))] |
||||
async fn process( |
||||
&self, |
||||
message: &AbacusMessage, |
||||
metadata: &[u8], |
||||
tx_gas_limit: Option<U256>, |
||||
) -> Result<TxOutcome, ChainCommunicationError> { |
||||
let contract_call = self |
||||
.process_contract_call(message, metadata, tx_gas_limit) |
||||
.await?; |
||||
let receipt = report_tx(contract_call).await?; |
||||
Ok(receipt.into()) |
||||
} |
||||
|
||||
async fn process_estimate_costs( |
||||
&self, |
||||
message: &AbacusMessage, |
||||
metadata: &[u8], |
||||
) -> Result<TxCostEstimate> { |
||||
let contract_call = self.process_contract_call(message, metadata, None).await?; |
||||
|
||||
let gas_limit = contract_call |
||||
.tx |
||||
.gas() |
||||
.ok_or_else(|| eyre!("Expected gas limit for process contract call"))?; |
||||
let gas_price = self.provider.get_gas_price().await?; |
||||
|
||||
Ok(TxCostEstimate { |
||||
gas_limit: *gas_limit, |
||||
gas_price, |
||||
}) |
||||
} |
||||
|
||||
fn process_calldata(&self, message: &AbacusMessage, metadata: &[u8]) -> Vec<u8> { |
||||
let process_call = ProcessCall { |
||||
message: RawAbacusMessage::from(message).to_vec().into(), |
||||
metadata: metadata.to_vec().into(), |
||||
}; |
||||
process_call.encode() |
||||
} |
||||
} |
||||
|
||||
pub struct EthereumMailboxAbi; |
||||
|
||||
impl AbacusAbi for EthereumMailboxAbi { |
||||
fn fn_map() -> HashMap<Selector, &'static str> { |
||||
super::extract_fn_map(&MAILBOX_ABI) |
||||
} |
||||
} |
@ -0,0 +1,235 @@ |
||||
#![allow(clippy::enum_variant_names)] |
||||
#![allow(missing_docs)] |
||||
|
||||
use std::collections::HashMap; |
||||
use std::sync::Arc; |
||||
use std::time::{Duration, Instant}; |
||||
|
||||
use abacus_core::accumulator::merkle::Proof; |
||||
use async_trait::async_trait; |
||||
use ethers::abi::Token; |
||||
use ethers::providers::Middleware; |
||||
use ethers::types::{Selector, H160, H256, U256}; |
||||
use eyre::Result; |
||||
use std::hash::Hash; |
||||
use tokio::sync::RwLock; |
||||
|
||||
use abacus_core::{ |
||||
AbacusAbi, AbacusContract, ChainCommunicationError, ContractLocator, MultisigIsm, |
||||
MultisigSignedCheckpoint, |
||||
}; |
||||
|
||||
use crate::contracts::multisig_ism::{MultisigIsm as EthereumMultisigIsmInternal, MULTISIGISM_ABI}; |
||||
use crate::trait_builder::MakeableWithProvider; |
||||
|
||||
#[derive(Debug)] |
||||
struct Timestamped<Value> { |
||||
t: Instant, |
||||
value: Value, |
||||
} |
||||
|
||||
impl<Value> Timestamped<Value> { |
||||
fn new(value: Value) -> Timestamped<Value> { |
||||
Timestamped { |
||||
t: Instant::now(), |
||||
value, |
||||
} |
||||
} |
||||
} |
||||
|
||||
#[derive(Debug)] |
||||
pub struct ExpiringCache<Key, Value> |
||||
where |
||||
Key: Eq + Hash, |
||||
{ |
||||
expiry: Duration, // cache endurance
|
||||
cache: HashMap<Key, Timestamped<Value>>, // hashmap containing references to cached items
|
||||
} |
||||
|
||||
impl<Key, Value> ExpiringCache<Key, Value> |
||||
where |
||||
Key: Copy + Eq + Hash + tracing::Value, |
||||
Value: Clone, |
||||
{ |
||||
pub fn new(expiry: Duration) -> ExpiringCache<Key, Value> { |
||||
ExpiringCache { |
||||
expiry, |
||||
cache: HashMap::new(), |
||||
} |
||||
} |
||||
|
||||
pub fn put(&mut self, key: Key, value: Value) { |
||||
self.cache.insert(key, Timestamped::new(value)); |
||||
} |
||||
|
||||
pub fn get(&self, key: Key) -> Option<&Value> { |
||||
if let Some(entry) = self.cache.get(&key) { |
||||
if entry.t.elapsed() > self.expiry { |
||||
None |
||||
} else { |
||||
Some(&entry.value) |
||||
} |
||||
} else { |
||||
None |
||||
} |
||||
} |
||||
} |
||||
|
||||
impl<M> std::fmt::Display for EthereumMultisigIsmInternal<M> |
||||
where |
||||
M: Middleware, |
||||
{ |
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
||||
write!(f, "{:?}", self) |
||||
} |
||||
} |
||||
|
||||
pub struct MultisigIsmBuilder {} |
||||
|
||||
impl MakeableWithProvider for MultisigIsmBuilder { |
||||
type Output = Box<dyn MultisigIsm>; |
||||
|
||||
fn make_with_provider<M: Middleware + 'static>( |
||||
&self, |
||||
provider: M, |
||||
locator: &ContractLocator, |
||||
) -> Self::Output { |
||||
Box::new(EthereumMultisigIsm::new(Arc::new(provider), locator)) |
||||
} |
||||
} |
||||
|
||||
/// A reference to an MultisigIsm contract on some Ethereum chain
|
||||
#[derive(Debug)] |
||||
pub struct EthereumMultisigIsm<M> |
||||
where |
||||
M: Middleware, |
||||
{ |
||||
contract: Arc<EthereumMultisigIsmInternal<M>>, |
||||
#[allow(dead_code)] |
||||
domain: u32, |
||||
chain_name: String, |
||||
#[allow(dead_code)] |
||||
provider: Arc<M>, |
||||
threshold_cache: RwLock<ExpiringCache<u32, U256>>, |
||||
validators_cache: RwLock<ExpiringCache<u32, Vec<H160>>>, |
||||
} |
||||
|
||||
impl<M> EthereumMultisigIsm<M> |
||||
where |
||||
M: Middleware + 'static, |
||||
{ |
||||
/// Create a reference to a mailbox at a specific Ethereum address on some
|
||||
/// chain
|
||||
pub fn new(provider: Arc<M>, locator: &ContractLocator) -> Self { |
||||
Self { |
||||
contract: Arc::new(EthereumMultisigIsmInternal::new( |
||||
&locator.address, |
||||
provider.clone(), |
||||
)), |
||||
domain: locator.domain, |
||||
chain_name: locator.chain_name.to_owned(), |
||||
provider, |
||||
threshold_cache: RwLock::new(ExpiringCache::new(Duration::from_secs(60))), |
||||
validators_cache: RwLock::new(ExpiringCache::new(Duration::from_secs(60))), |
||||
} |
||||
} |
||||
} |
||||
|
||||
impl<M> AbacusContract for EthereumMultisigIsm<M> |
||||
where |
||||
M: Middleware + 'static, |
||||
{ |
||||
fn chain_name(&self) -> &str { |
||||
&self.chain_name |
||||
} |
||||
|
||||
fn address(&self) -> H256 { |
||||
self.contract.address().into() |
||||
} |
||||
} |
||||
|
||||
#[async_trait] |
||||
impl<M> MultisigIsm for EthereumMultisigIsm<M> |
||||
where |
||||
M: Middleware + 'static, |
||||
{ |
||||
/// Returns the metadata needed by the contract's verify function
|
||||
async fn format_metadata( |
||||
&self, |
||||
checkpoint: &MultisigSignedCheckpoint, |
||||
proof: Proof, |
||||
) -> Result<Vec<u8>, ChainCommunicationError> { |
||||
let threshold = self.threshold(checkpoint.checkpoint.mailbox_domain).await?; |
||||
let validators: Vec<H256> = self |
||||
.validators(checkpoint.checkpoint.mailbox_domain) |
||||
.await? |
||||
.iter() |
||||
.map(|&x| H256::from(x)) |
||||
.collect(); |
||||
let validator_tokens: Vec<Token> = validators |
||||
.iter() |
||||
.map(|x| Token::FixedBytes(x.to_fixed_bytes().into())) |
||||
.collect(); |
||||
let proof_tokens: Vec<Token> = proof |
||||
.path |
||||
.iter() |
||||
.map(|x| Token::FixedBytes(x.to_fixed_bytes().into())) |
||||
.collect(); |
||||
let prefix = ethers::abi::encode(&[ |
||||
Token::FixedBytes(checkpoint.checkpoint.root.to_fixed_bytes().into()), |
||||
Token::Uint(U256::from(checkpoint.checkpoint.index)), |
||||
Token::FixedBytes( |
||||
checkpoint |
||||
.checkpoint |
||||
.mailbox_address |
||||
.to_fixed_bytes() |
||||
.into(), |
||||
), |
||||
Token::FixedArray(proof_tokens), |
||||
Token::Uint(threshold), |
||||
]); |
||||
let suffix = ethers::abi::encode(&[Token::FixedArray(validator_tokens)]); |
||||
// The ethers encoder likes to zero-pad non word-aligned byte arrays.
|
||||
// Thus, we pack the signatures, which are not word-aligned, ourselves.
|
||||
let signature_vecs: Vec<Vec<u8>> = |
||||
checkpoint.signatures.iter().map(|x| x.to_vec()).collect(); |
||||
let signature_bytes = signature_vecs.concat(); |
||||
let metadata = [prefix, signature_bytes, suffix].concat(); |
||||
Ok(metadata) |
||||
} |
||||
|
||||
#[tracing::instrument(err, skip(self))] |
||||
async fn threshold(&self, domain: u32) -> Result<U256, ChainCommunicationError> { |
||||
let entry = self.threshold_cache.read().await.get(domain).cloned(); |
||||
if let Some(threshold) = entry { |
||||
Ok(threshold) |
||||
} else { |
||||
let threshold = self.contract.threshold(domain).call().await?; |
||||
self.threshold_cache.write().await.put(domain, threshold); |
||||
Ok(threshold) |
||||
} |
||||
} |
||||
|
||||
#[tracing::instrument(err, skip(self))] |
||||
async fn validators(&self, domain: u32) -> Result<Vec<H160>, ChainCommunicationError> { |
||||
let entry = self.validators_cache.read().await.get(domain).cloned(); |
||||
if let Some(validators) = entry { |
||||
Ok(validators) |
||||
} else { |
||||
let validators = self.contract.validators(domain).call().await?; |
||||
self.validators_cache |
||||
.write() |
||||
.await |
||||
.put(domain, validators.clone()); |
||||
Ok(validators) |
||||
} |
||||
} |
||||
} |
||||
|
||||
pub struct EthereumMultisigIsmAbi; |
||||
|
||||
impl AbacusAbi for EthereumMultisigIsmAbi { |
||||
fn fn_map() -> HashMap<Selector, &'static str> { |
||||
super::extract_fn_map(&MULTISIGISM_ABI) |
||||
} |
||||
} |
@ -1,327 +0,0 @@ |
||||
#![allow(clippy::enum_variant_names)] |
||||
#![allow(missing_docs)] |
||||
|
||||
use std::collections::HashMap; |
||||
use std::{error::Error as StdError, sync::Arc}; |
||||
|
||||
use async_trait::async_trait; |
||||
use ethers::prelude::*; |
||||
use eyre::Result; |
||||
use tracing::instrument; |
||||
|
||||
use abacus_core::{ |
||||
AbacusAbi, AbacusCommon, AbacusContract, ChainCommunicationError, Checkpoint, ContractLocator, |
||||
Indexer, LogMeta, Message, Outbox, OutboxIndexer, OutboxState, RawCommittedMessage, TxOutcome, |
||||
}; |
||||
|
||||
use crate::contracts::outbox::{Outbox as EthereumOutboxInternal, OUTBOX_ABI}; |
||||
use crate::trait_builder::MakeableWithProvider; |
||||
use crate::tx::report_tx; |
||||
|
||||
impl<M> std::fmt::Display for EthereumOutboxInternal<M> |
||||
where |
||||
M: Middleware, |
||||
{ |
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
||||
write!(f, "{:?}", self) |
||||
} |
||||
} |
||||
|
||||
pub struct OutboxIndexerBuilder { |
||||
pub finality_blocks: u32, |
||||
} |
||||
|
||||
impl MakeableWithProvider for OutboxIndexerBuilder { |
||||
type Output = Box<dyn OutboxIndexer>; |
||||
|
||||
fn make_with_provider<M: Middleware + 'static>( |
||||
&self, |
||||
provider: M, |
||||
locator: &ContractLocator, |
||||
) -> Self::Output { |
||||
Box::new(EthereumOutboxIndexer::new( |
||||
Arc::new(provider), |
||||
locator, |
||||
self.finality_blocks, |
||||
)) |
||||
} |
||||
} |
||||
|
||||
#[derive(Debug)] |
||||
/// Struct that retrieves event data for an Ethereum outbox
|
||||
pub struct EthereumOutboxIndexer<M> |
||||
where |
||||
M: Middleware, |
||||
{ |
||||
contract: Arc<EthereumOutboxInternal<M>>, |
||||
provider: Arc<M>, |
||||
finality_blocks: u32, |
||||
outbox_domain: u32, |
||||
} |
||||
|
||||
impl<M> EthereumOutboxIndexer<M> |
||||
where |
||||
M: Middleware + 'static, |
||||
{ |
||||
/// Create new EthereumOutboxIndexer
|
||||
pub fn new(provider: Arc<M>, locator: &ContractLocator, finality_blocks: u32) -> Self { |
||||
let contract = Arc::new(EthereumOutboxInternal::new( |
||||
&locator.address, |
||||
provider.clone(), |
||||
)); |
||||
Self { |
||||
contract, |
||||
provider, |
||||
finality_blocks, |
||||
outbox_domain: locator.domain, |
||||
} |
||||
} |
||||
} |
||||
|
||||
#[async_trait] |
||||
impl<M> Indexer for EthereumOutboxIndexer<M> |
||||
where |
||||
M: Middleware + 'static, |
||||
{ |
||||
#[instrument(err, skip(self))] |
||||
async fn get_finalized_block_number(&self) -> Result<u32> { |
||||
Ok(self |
||||
.provider |
||||
.get_block_number() |
||||
.await? |
||||
.as_u32() |
||||
.saturating_sub(self.finality_blocks)) |
||||
} |
||||
} |
||||
|
||||
#[async_trait] |
||||
impl<M> OutboxIndexer for EthereumOutboxIndexer<M> |
||||
where |
||||
M: Middleware + 'static, |
||||
{ |
||||
#[instrument(err, skip(self))] |
||||
async fn fetch_sorted_messages( |
||||
&self, |
||||
from: u32, |
||||
to: u32, |
||||
) -> Result<Vec<(RawCommittedMessage, LogMeta)>> { |
||||
let mut events: Vec<(RawCommittedMessage, LogMeta)> = self |
||||
.contract |
||||
.dispatch_filter() |
||||
.from_block(from) |
||||
.to_block(to) |
||||
.query_with_meta() |
||||
.await? |
||||
.into_iter() |
||||
.map(|(event, meta)| { |
||||
( |
||||
RawCommittedMessage { |
||||
leaf_index: event.leaf_index.as_u32(), |
||||
message: event.message.to_vec(), |
||||
}, |
||||
meta.into(), |
||||
) |
||||
}) |
||||
.collect(); |
||||
events.sort_by(|a, b| a.0.leaf_index.cmp(&b.0.leaf_index)); |
||||
Ok(events) |
||||
} |
||||
|
||||
#[instrument(err, skip(self))] |
||||
async fn fetch_sorted_cached_checkpoints( |
||||
&self, |
||||
from: u32, |
||||
to: u32, |
||||
) -> Result<Vec<(Checkpoint, LogMeta)>> { |
||||
let mut events: Vec<(Checkpoint, LogMeta)> = self |
||||
.contract |
||||
.checkpoint_cached_filter() |
||||
.from_block(from) |
||||
.to_block(to) |
||||
.query_with_meta() |
||||
.await? |
||||
.into_iter() |
||||
.map(|(event, meta)| { |
||||
( |
||||
Checkpoint { |
||||
outbox_domain: self.outbox_domain, |
||||
root: event.root.into(), |
||||
index: event.index.as_u32(), |
||||
}, |
||||
meta.into(), |
||||
) |
||||
}) |
||||
.collect(); |
||||
events.sort_by(|a, b| a.1.cmp(&b.1)); |
||||
Ok(events) |
||||
} |
||||
} |
||||
|
||||
pub struct OutboxBuilder {} |
||||
|
||||
impl MakeableWithProvider for OutboxBuilder { |
||||
type Output = Box<dyn Outbox>; |
||||
|
||||
fn make_with_provider<M: Middleware + 'static>( |
||||
&self, |
||||
provider: M, |
||||
locator: &ContractLocator, |
||||
) -> Self::Output { |
||||
Box::new(EthereumOutbox::new(Arc::new(provider), locator)) |
||||
} |
||||
} |
||||
|
||||
/// A reference to an Outbox contract on some Ethereum chain
|
||||
#[derive(Debug)] |
||||
pub struct EthereumOutbox<M> |
||||
where |
||||
M: Middleware, |
||||
{ |
||||
contract: Arc<EthereumOutboxInternal<M>>, |
||||
domain: u32, |
||||
chain_name: String, |
||||
provider: Arc<M>, |
||||
} |
||||
|
||||
impl<M> EthereumOutbox<M> |
||||
where |
||||
M: Middleware + 'static, |
||||
{ |
||||
/// Create a reference to a outbox at a specific Ethereum address on some
|
||||
/// chain
|
||||
pub fn new(provider: Arc<M>, locator: &ContractLocator) -> Self { |
||||
Self { |
||||
contract: Arc::new(EthereumOutboxInternal::new( |
||||
&locator.address, |
||||
provider.clone(), |
||||
)), |
||||
domain: locator.domain, |
||||
chain_name: locator.chain_name.to_owned(), |
||||
provider, |
||||
} |
||||
} |
||||
} |
||||
|
||||
impl<M> AbacusContract for EthereumOutbox<M> |
||||
where |
||||
M: Middleware + 'static, |
||||
{ |
||||
fn chain_name(&self) -> &str { |
||||
&self.chain_name |
||||
} |
||||
|
||||
fn address(&self) -> H256 { |
||||
self.contract.address().into() |
||||
} |
||||
} |
||||
|
||||
#[async_trait] |
||||
impl<M> AbacusCommon for EthereumOutbox<M> |
||||
where |
||||
M: Middleware + 'static, |
||||
{ |
||||
fn local_domain(&self) -> u32 { |
||||
self.domain |
||||
} |
||||
|
||||
#[tracing::instrument(err, skip(self))] |
||||
async fn status(&self, txid: H256) -> Result<Option<TxOutcome>, ChainCommunicationError> { |
||||
let receipt_opt = self |
||||
.contract |
||||
.client() |
||||
.get_transaction_receipt(txid) |
||||
.await |
||||
.map_err(|e| Box::new(e) as Box<dyn StdError + Send + Sync>)?; |
||||
|
||||
Ok(receipt_opt.map(Into::into)) |
||||
} |
||||
|
||||
#[tracing::instrument(err, skip(self))] |
||||
async fn validator_manager(&self) -> Result<H256, ChainCommunicationError> { |
||||
Ok(self.contract.validator_manager().call().await?.into()) |
||||
} |
||||
} |
||||
|
||||
#[async_trait] |
||||
impl<M> Outbox for EthereumOutbox<M> |
||||
where |
||||
M: Middleware + 'static, |
||||
{ |
||||
#[tracing::instrument(err, skip(self))] |
||||
async fn dispatch(&self, message: &Message) -> Result<TxOutcome, ChainCommunicationError> { |
||||
let tx = self.contract.dispatch( |
||||
message.destination, |
||||
message.recipient.to_fixed_bytes(), |
||||
message.body.clone().into(), |
||||
); |
||||
|
||||
Ok(report_tx(tx).await?.into()) |
||||
} |
||||
|
||||
#[tracing::instrument(err, skip(self))] |
||||
async fn state(&self) -> Result<OutboxState, ChainCommunicationError> { |
||||
let state = self.contract.state().call().await?; |
||||
Ok(OutboxState::try_from(state).expect("Invalid state received from contract")) |
||||
} |
||||
|
||||
#[tracing::instrument(err, skip(self))] |
||||
async fn count(&self) -> Result<u32, ChainCommunicationError> { |
||||
Ok(self.contract.count().call().await?.as_u32()) |
||||
} |
||||
|
||||
#[tracing::instrument(err, skip(self))] |
||||
async fn cache_checkpoint(&self) -> Result<TxOutcome, ChainCommunicationError> { |
||||
let tx = self.contract.cache_checkpoint(); |
||||
|
||||
Ok(report_tx(tx).await?.into()) |
||||
} |
||||
|
||||
#[tracing::instrument(err, skip(self))] |
||||
async fn latest_cached_root(&self) -> Result<H256, ChainCommunicationError> { |
||||
Ok(self.contract.latest_cached_root().call().await?.into()) |
||||
} |
||||
|
||||
#[tracing::instrument(err, skip(self))] |
||||
async fn latest_cached_checkpoint(&self) -> Result<Checkpoint, ChainCommunicationError> { |
||||
let (root, index) = self.contract.latest_cached_checkpoint().call().await?; |
||||
Ok(Checkpoint { |
||||
outbox_domain: self.domain, |
||||
root: root.into(), |
||||
index: index.as_u32(), |
||||
}) |
||||
} |
||||
|
||||
#[tracing::instrument(err, skip(self))] |
||||
async fn latest_checkpoint( |
||||
&self, |
||||
maybe_lag: Option<u64>, |
||||
) -> Result<Checkpoint, ChainCommunicationError> { |
||||
let base_call = self.contract.latest_checkpoint(); |
||||
let call_with_lag = match maybe_lag { |
||||
Some(lag) => { |
||||
let tip = self |
||||
.provider |
||||
.get_block_number() |
||||
.await |
||||
.map_err(|x| ChainCommunicationError::CustomError(Box::new(x)))? |
||||
.as_u64(); |
||||
base_call.block(if lag > tip { 0 } else { tip - lag }) |
||||
} |
||||
None => base_call, |
||||
}; |
||||
let (root, index) = call_with_lag.call().await?; |
||||
Ok(Checkpoint { |
||||
outbox_domain: self.domain, |
||||
root: root.into(), |
||||
index: index.as_u32(), |
||||
}) |
||||
} |
||||
} |
||||
|
||||
pub struct EthereumOutboxAbi; |
||||
|
||||
impl AbacusAbi for EthereumOutboxAbi { |
||||
fn fn_map() -> HashMap<Selector, &'static str> { |
||||
super::extract_fn_map(&OUTBOX_ABI) |
||||
} |
||||
} |
@ -1,207 +0,0 @@ |
||||
#![allow(clippy::enum_variant_names)] |
||||
#![allow(missing_docs)] |
||||
|
||||
use std::fmt::Display; |
||||
use std::sync::Arc; |
||||
|
||||
use abacus_core::TxCostEstimate; |
||||
use async_trait::async_trait; |
||||
use ethers::abi::AbiEncode; |
||||
use ethers::prelude::*; |
||||
use ethers_contract::builders::ContractCall; |
||||
use eyre::{eyre, Result}; |
||||
|
||||
use abacus_core::{ |
||||
accumulator::merkle::Proof, AbacusMessage, ChainCommunicationError, ContractLocator, Encode, |
||||
InboxValidatorManager, MultisigSignedCheckpoint, TxOutcome, |
||||
}; |
||||
|
||||
use crate::contracts::inbox_validator_manager::{ |
||||
InboxValidatorManager as EthereumInboxValidatorManagerInternal, ProcessCall, |
||||
}; |
||||
use crate::trait_builder::MakeableWithProvider; |
||||
use crate::tx::report_tx; |
||||
|
||||
pub use crate::contracts::inbox_validator_manager::INBOXVALIDATORMANAGER_ABI; |
||||
|
||||
impl<M> Display for EthereumInboxValidatorManagerInternal<M> |
||||
where |
||||
M: Middleware, |
||||
{ |
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
||||
write!(f, "{:?}", self) |
||||
} |
||||
} |
||||
|
||||
pub struct InboxValidatorManagerBuilder { |
||||
pub inbox_address: Address, |
||||
} |
||||
|
||||
impl MakeableWithProvider for InboxValidatorManagerBuilder { |
||||
type Output = Box<dyn InboxValidatorManager>; |
||||
|
||||
fn make_with_provider<M: Middleware + 'static>( |
||||
&self, |
||||
provider: M, |
||||
locator: &ContractLocator, |
||||
) -> Self::Output { |
||||
Box::new(EthereumInboxValidatorManager::new( |
||||
Arc::new(provider), |
||||
locator, |
||||
self.inbox_address, |
||||
)) |
||||
} |
||||
} |
||||
|
||||
/// A struct that provides access to an Ethereum InboxValidatorManager contract
|
||||
#[derive(Debug)] |
||||
pub struct EthereumInboxValidatorManager<M> |
||||
where |
||||
M: Middleware, |
||||
{ |
||||
contract: Arc<EthereumInboxValidatorManagerInternal<M>>, |
||||
#[allow(unused)] |
||||
domain: u32, |
||||
#[allow(unused)] |
||||
chain_name: String, |
||||
#[allow(unused)] |
||||
provider: Arc<M>, |
||||
inbox_address: Address, |
||||
} |
||||
|
||||
impl<M> EthereumInboxValidatorManager<M> |
||||
where |
||||
M: Middleware, |
||||
{ |
||||
/// Create a reference to a inbox at a specific Ethereum address on some
|
||||
/// chain
|
||||
pub fn new(provider: Arc<M>, locator: &ContractLocator, inbox_address: Address) -> Self { |
||||
Self { |
||||
contract: Arc::new(EthereumInboxValidatorManagerInternal::new( |
||||
&locator.address, |
||||
provider.clone(), |
||||
)), |
||||
domain: locator.domain, |
||||
chain_name: locator.chain_name.to_owned(), |
||||
provider, |
||||
inbox_address, |
||||
} |
||||
} |
||||
} |
||||
|
||||
#[async_trait] |
||||
impl<M> InboxValidatorManager for EthereumInboxValidatorManager<M> |
||||
where |
||||
M: Middleware + 'static, |
||||
{ |
||||
#[tracing::instrument(skip(self))] |
||||
async fn process( |
||||
&self, |
||||
multisig_signed_checkpoint: &MultisigSignedCheckpoint, |
||||
message: &AbacusMessage, |
||||
proof: &Proof, |
||||
tx_gas_limit: Option<U256>, |
||||
) -> Result<TxOutcome, ChainCommunicationError> { |
||||
let contract_call = self |
||||
.process_contract_call(multisig_signed_checkpoint, message, proof, tx_gas_limit) |
||||
.await?; |
||||
let receipt = report_tx(contract_call).await?; |
||||
Ok(receipt.into()) |
||||
} |
||||
|
||||
async fn process_estimate_costs( |
||||
&self, |
||||
multisig_signed_checkpoint: &MultisigSignedCheckpoint, |
||||
message: &AbacusMessage, |
||||
proof: &Proof, |
||||
) -> Result<TxCostEstimate> { |
||||
let contract_call = self |
||||
.process_contract_call(multisig_signed_checkpoint, message, proof, None) |
||||
.await?; |
||||
|
||||
let gas_limit = contract_call |
||||
.tx |
||||
.gas() |
||||
.ok_or_else(|| eyre!("Expected gas limit for process contract call"))?; |
||||
let gas_price = self.provider.get_gas_price().await?; |
||||
|
||||
Ok(TxCostEstimate { |
||||
gas_limit: *gas_limit, |
||||
gas_price, |
||||
}) |
||||
} |
||||
|
||||
fn process_calldata( |
||||
&self, |
||||
multisig_signed_checkpoint: &MultisigSignedCheckpoint, |
||||
message: &AbacusMessage, |
||||
proof: &Proof, |
||||
) -> Vec<u8> { |
||||
let mut sol_proof: [[u8; 32]; 32] = Default::default(); |
||||
sol_proof |
||||
.iter_mut() |
||||
.enumerate() |
||||
.for_each(|(i, elem)| *elem = proof.path[i].to_fixed_bytes()); |
||||
|
||||
let process_call = ProcessCall { |
||||
inbox: self.inbox_address, |
||||
root: multisig_signed_checkpoint.checkpoint.root.to_fixed_bytes(), |
||||
index: multisig_signed_checkpoint.checkpoint.index.into(), |
||||
signatures: multisig_signed_checkpoint |
||||
.signatures |
||||
.iter() |
||||
.map(|s| s.to_vec().into()) |
||||
.collect(), |
||||
message: message.to_vec().into(), |
||||
proof: sol_proof, |
||||
leaf_index: proof.index.into(), |
||||
}; |
||||
|
||||
process_call.encode() |
||||
} |
||||
|
||||
fn contract_address(&self) -> abacus_core::Address { |
||||
self.contract.address().into() |
||||
} |
||||
} |
||||
|
||||
impl<M> EthereumInboxValidatorManager<M> |
||||
where |
||||
M: Middleware + 'static, |
||||
{ |
||||
/// Returns a ContractCall that processes the provided message.
|
||||
/// If the provided tx_gas_limit is None, gas estimation occurs.
|
||||
async fn process_contract_call( |
||||
&self, |
||||
multisig_signed_checkpoint: &MultisigSignedCheckpoint, |
||||
message: &AbacusMessage, |
||||
proof: &Proof, |
||||
tx_gas_limit: Option<U256>, |
||||
) -> Result<ContractCall<M, ()>, ChainCommunicationError> { |
||||
let mut sol_proof: [[u8; 32]; 32] = Default::default(); |
||||
sol_proof |
||||
.iter_mut() |
||||
.enumerate() |
||||
.for_each(|(i, elem)| *elem = proof.path[i].to_fixed_bytes()); |
||||
|
||||
let tx = self.contract.process( |
||||
self.inbox_address, |
||||
multisig_signed_checkpoint.checkpoint.root.to_fixed_bytes(), |
||||
multisig_signed_checkpoint.checkpoint.index.into(), |
||||
multisig_signed_checkpoint |
||||
.signatures |
||||
.iter() |
||||
.map(|s| s.to_vec().into()) |
||||
.collect(), |
||||
message.to_vec().into(), |
||||
sol_proof, |
||||
proof.index.into(), |
||||
); |
||||
let gas_limit = if let Some(gas_limit) = tx_gas_limit { |
||||
gas_limit |
||||
} else { |
||||
tx.estimate_gas().await?.saturating_add(U256::from(100000)) |
||||
}; |
||||
Ok(tx.gas(gas_limit)) |
||||
} |
||||
} |
@ -1,126 +0,0 @@ |
||||
{ |
||||
"environment": "mainnet", |
||||
"signers": {}, |
||||
"inboxes": { |
||||
"bsc": { |
||||
"domain": "6452067", |
||||
"name": "bsc", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "15", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x79b3D752cc9494eCB93800712471a7a62954C8AE", |
||||
"validatorManager": "0x61DDB465eEA5bc3708Cf8B53156aC91a77A2f029" |
||||
} |
||||
}, |
||||
"avalanche": { |
||||
"domain": "1635148152", |
||||
"name": "avalanche", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "3", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x552D41c0B5c774F529C956E7CC77d0e054D7aFa8", |
||||
"validatorManager": "0x23ce76645EC601148fa451e751eeB75785b97A00" |
||||
} |
||||
}, |
||||
"polygon": { |
||||
"domain": "1886350457", |
||||
"name": "polygon", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "256", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x5060eCD5dFAD300A90592C04e504600A7cdcF70b", |
||||
"validatorManager": "0x4E1c88DD261BEe2941e6c1814597e30F53330428" |
||||
} |
||||
}, |
||||
"celo": { |
||||
"domain": "1667591279", |
||||
"name": "celo", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x4E1c88DD261BEe2941e6c1814597e30F53330428", |
||||
"validatorManager": "0xC077A0Cc408173349b1c9870C667B40FE3C01dd7" |
||||
} |
||||
}, |
||||
"optimism": { |
||||
"domain": "28528", |
||||
"name": "optimism", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x2Fa570E83009eaEef3a1cbd496a9a30F05266634", |
||||
"validatorManager": "0x931dFCc8c1141D6F532FD023bd87DAe0080c835d" |
||||
} |
||||
}, |
||||
"ethereum": { |
||||
"domain": "6648936", |
||||
"name": "ethereum", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "20", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x7082e975Fde8D85B0C56B4512b437efFb46F0a09", |
||||
"validatorManager": "0xCA41932888D323B3d99f5eA48F86D502055C0322" |
||||
} |
||||
}, |
||||
"moonbeam": { |
||||
"domain": "1836002669", |
||||
"name": "moonbeam", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "1", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xCA41932888D323B3d99f5eA48F86D502055C0322", |
||||
"validatorManager": "0x71b2644183ECA86401c13577f5332fcc5e48352a" |
||||
} |
||||
} |
||||
}, |
||||
"outbox": { |
||||
"addresses": { |
||||
"outbox": "0x0761b0827849abbf7b0cC09CE14e1C93D87f5004", |
||||
"interchainGasPaymaster": "0x376aD181E8cd45eAd5403F78d5A871D08c3c4D77" |
||||
}, |
||||
"domain": "6386274", |
||||
"name": "arbitrum", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
}, |
||||
"tracing": { |
||||
"level": "debug", |
||||
"fmt": "json" |
||||
}, |
||||
"db": "db_path", |
||||
"index": { |
||||
"from": "14751425" |
||||
} |
||||
} |
@ -1,123 +0,0 @@ |
||||
{ |
||||
"environment": "mainnet", |
||||
"signers": {}, |
||||
"inboxes": { |
||||
"bsc": { |
||||
"domain": "6452067", |
||||
"name": "bsc", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "15", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x182E8d7c5F1B06201b102123FC7dF0EaeB445a7B", |
||||
"validatorManager": "0xd83A4F747fE80Ed98839e05079B1B7Fe037b1638" |
||||
} |
||||
}, |
||||
"polygon": { |
||||
"domain": "1886350457", |
||||
"name": "polygon", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "256", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xA805695C20ED9F4ce9905cd1aFaE7877A81ec0d7", |
||||
"validatorManager": "0x97423A68BAe94b5De52d767a17aBCc54c157c0E5" |
||||
} |
||||
}, |
||||
"celo": { |
||||
"domain": "1667591279", |
||||
"name": "celo", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x97423A68BAe94b5De52d767a17aBCc54c157c0E5", |
||||
"validatorManager": "0xf9DbC8776Bc2812c4DBEc45383A1783Ac758Fb55" |
||||
} |
||||
}, |
||||
"arbitrum": { |
||||
"domain": "6386274", |
||||
"name": "arbitrum", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x02d16BC51af6BfD153d67CA61754cF912E82C4d9", |
||||
"validatorManager": "0x2f9DB5616fa3fAd1aB06cB2C906830BA63d135e3" |
||||
} |
||||
}, |
||||
"optimism": { |
||||
"domain": "28528", |
||||
"name": "optimism", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x79b3D752cc9494eCB93800712471a7a62954C8AE", |
||||
"validatorManager": "0x61DDB465eEA5bc3708Cf8B53156aC91a77A2f029" |
||||
} |
||||
}, |
||||
"ethereum": { |
||||
"domain": "6648936", |
||||
"name": "ethereum", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "20", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x95Ad03405aC24c0bc247bdFDC113B01955A71761", |
||||
"validatorManager": "0x4B44e4305B42405382b7BeC717F64D0552a9D9Fe" |
||||
} |
||||
}, |
||||
"moonbeam": { |
||||
"domain": "1836002669", |
||||
"name": "moonbeam", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "1", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x4B44e4305B42405382b7BeC717F64D0552a9D9Fe", |
||||
"validatorManager": "0x398633D19f4371e1DB5a8EFE90468eB70B1176AA" |
||||
} |
||||
} |
||||
}, |
||||
"outbox": { |
||||
"addresses": { |
||||
"outbox": "0x0761b0827849abbf7b0cC09CE14e1C93D87f5004", |
||||
"interchainGasPaymaster": "0xed9a722c543883FB7e07E78F3879762DE09eA7D5" |
||||
}, |
||||
"domain": "1635148152", |
||||
"name": "avalanche", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "1", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
}, |
||||
"tracing": { |
||||
"level": "debug", |
||||
"fmt": "json" |
||||
}, |
||||
"db": "db_path" |
||||
} |
@ -1,126 +0,0 @@ |
||||
{ |
||||
"environment": "mainnet", |
||||
"signers": {}, |
||||
"inboxes": { |
||||
"avalanche": { |
||||
"domain": "1635148152", |
||||
"name": "avalanche", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "3", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x4B44e4305B42405382b7BeC717F64D0552a9D9Fe", |
||||
"validatorManager": "0x398633D19f4371e1DB5a8EFE90468eB70B1176AA" |
||||
} |
||||
}, |
||||
"polygon": { |
||||
"domain": "1886350457", |
||||
"name": "polygon", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "256", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x9fA986ACB22953c504Fcf5985DFA476d481C3b1B", |
||||
"validatorManager": "0x0BD07E3934D1C4cc8Db0eA2a5cDAc8C8d8eb9824" |
||||
} |
||||
}, |
||||
"celo": { |
||||
"domain": "1667591279", |
||||
"name": "celo", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xdB670e1a1e312BF17425b08cE55Bdf2cD8F8eD54", |
||||
"validatorManager": "0x83c2DB237e93Ce52565AB110124f78fdf159E3f4" |
||||
} |
||||
}, |
||||
"arbitrum": { |
||||
"domain": "6386274", |
||||
"name": "arbitrum", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x3a867fCfFeC2B790970eeBDC9023E75B0a172aa7", |
||||
"validatorManager": "0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7" |
||||
} |
||||
}, |
||||
"optimism": { |
||||
"domain": "28528", |
||||
"name": "optimism", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x66DC49405Ae2956f7E87FEAa9fE8f506C8987462", |
||||
"validatorManager": "0xaad207a0Fd7a4e3C927Ccc78ac8134baF586B852" |
||||
} |
||||
}, |
||||
"ethereum": { |
||||
"domain": "6648936", |
||||
"name": "ethereum", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "20", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x81a92A1a272cb09d7b4970b07548463dC7aE0cB7", |
||||
"validatorManager": "0xC343A7054838FE9F249D7E3Ec1Fa6f1D108694b8" |
||||
} |
||||
}, |
||||
"moonbeam": { |
||||
"domain": "1836002669", |
||||
"name": "moonbeam", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "1", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x552D41c0B5c774F529C956E7CC77d0e054D7aFa8", |
||||
"validatorManager": "0x23ce76645EC601148fa451e751eeB75785b97A00" |
||||
} |
||||
} |
||||
}, |
||||
"outbox": { |
||||
"addresses": { |
||||
"outbox": "0xc3F23848Ed2e04C0c6d41bd7804fa8f89F940B94", |
||||
"interchainGasPaymaster": "0x47bf94790241B1764fC41A35a8329A15569E121C" |
||||
}, |
||||
"domain": "6452067", |
||||
"name": "bsc", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "15", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
}, |
||||
"tracing": { |
||||
"level": "debug", |
||||
"fmt": "json" |
||||
}, |
||||
"db": "db_path", |
||||
"index": { |
||||
"from": "18722839" |
||||
} |
||||
} |
@ -1,126 +0,0 @@ |
||||
{ |
||||
"environment": "mainnet", |
||||
"signers": {}, |
||||
"inboxes": { |
||||
"bsc": { |
||||
"domain": "6452067", |
||||
"name": "bsc", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "15", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x66DC49405Ae2956f7E87FEAa9fE8f506C8987462", |
||||
"validatorManager": "0x5E01d8F34b629E3f92d69546bbc4142A7Adee7e9" |
||||
} |
||||
}, |
||||
"avalanche": { |
||||
"domain": "1635148152", |
||||
"name": "avalanche", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "3", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x3a867fCfFeC2B790970eeBDC9023E75B0a172aa7", |
||||
"validatorManager": "0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7" |
||||
} |
||||
}, |
||||
"polygon": { |
||||
"domain": "1886350457", |
||||
"name": "polygon", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "256", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x8358D8291e3bEDb04804975eEa0fe9fe0fAfB147", |
||||
"validatorManager": "0x086eF95a2F74582Ee30E7D698518a872fb18301f" |
||||
} |
||||
}, |
||||
"arbitrum": { |
||||
"domain": "6386274", |
||||
"name": "arbitrum", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x4B44e4305B42405382b7BeC717F64D0552a9D9Fe", |
||||
"validatorManager": "0x398633D19f4371e1DB5a8EFE90468eB70B1176AA" |
||||
} |
||||
}, |
||||
"optimism": { |
||||
"domain": "28528", |
||||
"name": "optimism", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xE0C452DDA7506f0F4dE5C8C1d383F7aD866eA4F0", |
||||
"validatorManager": "0x6Fae4D9935E2fcb11fC79a64e917fb2BF14DaFaa" |
||||
} |
||||
}, |
||||
"ethereum": { |
||||
"domain": "6648936", |
||||
"name": "ethereum", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "20", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xCB5C99F908410add8241b558299fe9aadC06bA99", |
||||
"validatorManager": "0x552D41c0B5c774F529C956E7CC77d0e054D7aFa8" |
||||
} |
||||
}, |
||||
"moonbeam": { |
||||
"domain": "1836002669", |
||||
"name": "moonbeam", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "1", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x02d16BC51af6BfD153d67CA61754cF912E82C4d9", |
||||
"validatorManager": "0x3a867fCfFeC2B790970eeBDC9023E75B0a172aa7" |
||||
} |
||||
} |
||||
}, |
||||
"outbox": { |
||||
"addresses": { |
||||
"outbox": "0xe042D1fbDf59828dd16b9649Ede7abFc856F7a6c", |
||||
"interchainGasPaymaster": "0xCDeb368Db32ecCefaf7018e152DA9120565cb572" |
||||
}, |
||||
"domain": "1667591279", |
||||
"name": "celo", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
}, |
||||
"tracing": { |
||||
"level": "debug", |
||||
"fmt": "json" |
||||
}, |
||||
"db": "db_path", |
||||
"index": { |
||||
"from": "13551287" |
||||
} |
||||
} |
@ -1,126 +0,0 @@ |
||||
{ |
||||
"environment": "mainnet", |
||||
"signers": {}, |
||||
"inboxes": { |
||||
"bsc": { |
||||
"domain": "6452067", |
||||
"name": "bsc", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "15", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xE0C452DDA7506f0F4dE5C8C1d383F7aD866eA4F0", |
||||
"validatorManager": "0x6Fae4D9935E2fcb11fC79a64e917fb2BF14DaFaa" |
||||
} |
||||
}, |
||||
"avalanche": { |
||||
"domain": "1635148152", |
||||
"name": "avalanche", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "3", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x0E3239277501d215e17a4d31c487F86a425E110B", |
||||
"validatorManager": "0x28EFBCadA00A7ed6772b3666F3898d276e88CAe3" |
||||
} |
||||
}, |
||||
"polygon": { |
||||
"domain": "1886350457", |
||||
"name": "polygon", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "256", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x6A55822cf11f9fcBc4c75BC2638AfE8Eb942cAdd", |
||||
"validatorManager": "0x8105a095368f1a184CceA86cCe21318B5Ee5BE28" |
||||
} |
||||
}, |
||||
"celo": { |
||||
"domain": "1667591279", |
||||
"name": "celo", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x8105a095368f1a184CceA86cCe21318B5Ee5BE28", |
||||
"validatorManager": "0x2Fca7f6eC3d4A0408900f2BB30004d4616eE985E" |
||||
} |
||||
}, |
||||
"arbitrum": { |
||||
"domain": "6386274", |
||||
"name": "arbitrum", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x552D41c0B5c774F529C956E7CC77d0e054D7aFa8", |
||||
"validatorManager": "0x23ce76645EC601148fa451e751eeB75785b97A00" |
||||
} |
||||
}, |
||||
"optimism": { |
||||
"domain": "28528", |
||||
"name": "optimism", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xea820f9BCFD5E16a0dd42071EB61A29874Ad81A4", |
||||
"validatorManager": "0xB3fCcD379ad66CED0c91028520C64226611A48c9" |
||||
} |
||||
}, |
||||
"moonbeam": { |
||||
"domain": "1836002669", |
||||
"name": "moonbeam", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "1", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x14c3CEee8F431aE947364f43429a98EA89800238", |
||||
"validatorManager": "0x8428a1a7E97Fc75Fb7Ba5c4aec31B55e52bbe9D6" |
||||
} |
||||
} |
||||
}, |
||||
"outbox": { |
||||
"addresses": { |
||||
"outbox": "0x2f9DB5616fa3fAd1aB06cB2C906830BA63d135e3", |
||||
"interchainGasPaymaster": "0x17E216fBb22dF4ef8A6640ae9Cb147C92710ac84" |
||||
}, |
||||
"domain": "6648936", |
||||
"name": "ethereum", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "20", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
}, |
||||
"tracing": { |
||||
"level": "debug", |
||||
"fmt": "json" |
||||
}, |
||||
"db": "db_path", |
||||
"index": { |
||||
"from": "14970190" |
||||
} |
||||
} |
@ -1,126 +0,0 @@ |
||||
{ |
||||
"environment": "mainnet", |
||||
"signers": {}, |
||||
"inboxes": { |
||||
"bsc": { |
||||
"domain": "6452067", |
||||
"name": "bsc", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "15", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x79e25126E1dAB135734e0261E8aB93674131fD2b", |
||||
"validatorManager": "0x319f058FeedA044bD20E949FDCA31AEbb19b0063" |
||||
} |
||||
}, |
||||
"avalanche": { |
||||
"domain": "1635148152", |
||||
"name": "avalanche", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "3", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x32af5Df81fEd5E26119F6640FBB13f3d63a94CDe", |
||||
"validatorManager": "0xDd0D36E55078c643cefDc17936b63BACC71c50Da" |
||||
} |
||||
}, |
||||
"polygon": { |
||||
"domain": "1886350457", |
||||
"name": "polygon", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "256", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x6267Dbfc38f7Af897536563c15f07B89634cb656", |
||||
"validatorManager": "0x0c7b67793c56eD93773cEee07A43B3D7aDF533b7" |
||||
} |
||||
}, |
||||
"celo": { |
||||
"domain": "1667591279", |
||||
"name": "celo", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xEb4ca142644172878Bee23E44C8BDae215E92430", |
||||
"validatorManager": "0x0D11258092e5BC4a813478ff8837887C2A1a6e89" |
||||
} |
||||
}, |
||||
"arbitrum": { |
||||
"domain": "6386274", |
||||
"name": "arbitrum", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x88AcaD5222Fbb66C23d0E9532FDd32e57C68a53F", |
||||
"validatorManager": "0x76b76307f778CB98Cc71DF9f00cBF99C32544C03" |
||||
} |
||||
}, |
||||
"optimism": { |
||||
"domain": "28528", |
||||
"name": "optimism", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xCDaebcc592DA5c982B05E95039FF5f3467420223", |
||||
"validatorManager": "0xdc47eDc036daaE45D3F019CCfD443Bf72fBD981c" |
||||
} |
||||
}, |
||||
"ethereum": { |
||||
"domain": "6648936", |
||||
"name": "ethereum", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "20", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xdc47eDc036daaE45D3F019CCfD443Bf72fBD981c", |
||||
"validatorManager": "0x1Dcf599693707f41375695488589F4C6Af3845e8" |
||||
} |
||||
} |
||||
}, |
||||
"outbox": { |
||||
"addresses": { |
||||
"outbox": "0xeA87ae93Fa0019a82A727bfd3eBd1cFCa8f64f1D", |
||||
"interchainGasPaymaster": "0xEb9FcFDC9EfDC17c1EC5E1dc085B98485da213D6" |
||||
}, |
||||
"domain": "1836002669", |
||||
"name": "moonbeam", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "1", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
}, |
||||
"tracing": { |
||||
"level": "debug", |
||||
"fmt": "json" |
||||
}, |
||||
"db": "db_path", |
||||
"index": { |
||||
"from": "2050158" |
||||
} |
||||
} |
@ -1,126 +0,0 @@ |
||||
{ |
||||
"environment": "mainnet", |
||||
"signers": {}, |
||||
"inboxes": { |
||||
"bsc": { |
||||
"domain": "6452067", |
||||
"name": "bsc", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "15", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xA1ac41d8A663fd317cc3BD94C7de92dC4BA4a882", |
||||
"validatorManager": "0x8F1E22d309baa69D398a03cc88E9b46037e988AA" |
||||
} |
||||
}, |
||||
"avalanche": { |
||||
"domain": "1635148152", |
||||
"name": "avalanche", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "3", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x14c3CEee8F431aE947364f43429a98EA89800238", |
||||
"validatorManager": "0x8428a1a7E97Fc75Fb7Ba5c4aec31B55e52bbe9D6" |
||||
} |
||||
}, |
||||
"polygon": { |
||||
"domain": "1886350457", |
||||
"name": "polygon", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "256", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xc22B646edf6c9A43d83fDBc8D5E1B3c6DAfACb83", |
||||
"validatorManager": "0xF5165f115ba4E1Adc09f0EB392232D65F219806a" |
||||
} |
||||
}, |
||||
"celo": { |
||||
"domain": "1667591279", |
||||
"name": "celo", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xF5165f115ba4E1Adc09f0EB392232D65F219806a", |
||||
"validatorManager": "0x781bE492F1232E66990d83a9D3AC3Ec26f56DAfB" |
||||
} |
||||
}, |
||||
"arbitrum": { |
||||
"domain": "6386274", |
||||
"name": "arbitrum", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x0E3239277501d215e17a4d31c487F86a425E110B", |
||||
"validatorManager": "0x28EFBCadA00A7ed6772b3666F3898d276e88CAe3" |
||||
} |
||||
}, |
||||
"ethereum": { |
||||
"domain": "6648936", |
||||
"name": "ethereum", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "20", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xF7af65596A16740b16CF755F3A43206C96285da0", |
||||
"validatorManager": "0xF5739A4AF21346Aa937bF7fEB5d3B21c2d230138" |
||||
} |
||||
}, |
||||
"moonbeam": { |
||||
"domain": "1836002669", |
||||
"name": "moonbeam", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "1", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xF5739A4AF21346Aa937bF7fEB5d3B21c2d230138", |
||||
"validatorManager": "0xBC9cd961BF6c224FAc51fb049aB6788e38e4A9C0" |
||||
} |
||||
} |
||||
}, |
||||
"outbox": { |
||||
"addresses": { |
||||
"outbox": "0x0be2Ae2f6D02a3e0e00ECB57D3E1fCbb7f8F38F4", |
||||
"interchainGasPaymaster": "0xc5D6aCaafBCcEC6D7fD7d92F4509befce641c563" |
||||
}, |
||||
"domain": "28528", |
||||
"name": "optimism", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
}, |
||||
"tracing": { |
||||
"level": "debug", |
||||
"fmt": "json" |
||||
}, |
||||
"db": "db_path", |
||||
"index": { |
||||
"from": "11966568" |
||||
} |
||||
} |
@ -1,126 +0,0 @@ |
||||
{ |
||||
"environment": "mainnet", |
||||
"signers": {}, |
||||
"inboxes": { |
||||
"bsc": { |
||||
"domain": "6452067", |
||||
"name": "bsc", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "15", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xaad207a0Fd7a4e3C927Ccc78ac8134baF586B852", |
||||
"validatorManager": "0x8f4BeB6552b76aA38Cd9994701c0Da7bC829648B" |
||||
} |
||||
}, |
||||
"avalanche": { |
||||
"domain": "1635148152", |
||||
"name": "avalanche", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "3", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x02d16BC51af6BfD153d67CA61754cF912E82C4d9", |
||||
"validatorManager": "0x2f9DB5616fa3fAd1aB06cB2C906830BA63d135e3" |
||||
} |
||||
}, |
||||
"celo": { |
||||
"domain": "1667591279", |
||||
"name": "celo", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x086eF95a2F74582Ee30E7D698518a872fb18301f", |
||||
"validatorManager": "0x95878Fd41bC26f7045C0b98e381c22f010745A75" |
||||
} |
||||
}, |
||||
"arbitrum": { |
||||
"domain": "6386274", |
||||
"name": "arbitrum", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x14c3CEee8F431aE947364f43429a98EA89800238", |
||||
"validatorManager": "0x8428a1a7E97Fc75Fb7Ba5c4aec31B55e52bbe9D6" |
||||
} |
||||
}, |
||||
"optimism": { |
||||
"domain": "28528", |
||||
"name": "optimism", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xA1ac41d8A663fd317cc3BD94C7de92dC4BA4a882", |
||||
"validatorManager": "0x8F1E22d309baa69D398a03cc88E9b46037e988AA" |
||||
} |
||||
}, |
||||
"ethereum": { |
||||
"domain": "6648936", |
||||
"name": "ethereum", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "20", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xF59557dfacDc5a1cb8A36Af43aA4819a6A891e88", |
||||
"validatorManager": "0x0E3239277501d215e17a4d31c487F86a425E110B" |
||||
} |
||||
}, |
||||
"moonbeam": { |
||||
"domain": "1836002669", |
||||
"name": "moonbeam", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "1", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x0E3239277501d215e17a4d31c487F86a425E110B", |
||||
"validatorManager": "0x28EFBCadA00A7ed6772b3666F3898d276e88CAe3" |
||||
} |
||||
} |
||||
}, |
||||
"outbox": { |
||||
"addresses": { |
||||
"outbox": "0x8249cD1275855F2BB20eE71f0B9fA3c9155E5FaB", |
||||
"interchainGasPaymaster": "0x60B8d195f1b2EcaC26d54b95C69E6399cFD64b53" |
||||
}, |
||||
"domain": "1886350457", |
||||
"name": "polygon", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "256", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
}, |
||||
"tracing": { |
||||
"level": "debug", |
||||
"fmt": "json" |
||||
}, |
||||
"db": "db_path", |
||||
"index": { |
||||
"from": "29616068" |
||||
} |
||||
} |
@ -1,249 +0,0 @@ |
||||
{ |
||||
"environment": "mainnet", |
||||
"signers": {}, |
||||
"inboxes": { |
||||
"arbitrum": { |
||||
"domain": "6386274", |
||||
"name": "arbitrum", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x02d16BC51af6BfD153d67CA61754cF912E82C4d9", |
||||
"validatorManager": "0x2f9DB5616fa3fAd1aB06cB2C906830BA63d135e3" |
||||
} |
||||
}, |
||||
"avalanche": { |
||||
"domain": "1635148152", |
||||
"name": "avalanche", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "3", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x552D41c0B5c774F529C956E7CC77d0e054D7aFa8", |
||||
"validatorManager": "0x23ce76645EC601148fa451e751eeB75785b97A00" |
||||
} |
||||
}, |
||||
"bsc": { |
||||
"domain": "6452067", |
||||
"name": "bsc", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "15", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x79b3D752cc9494eCB93800712471a7a62954C8AE", |
||||
"validatorManager": "0x61DDB465eEA5bc3708Cf8B53156aC91a77A2f029" |
||||
} |
||||
}, |
||||
"celo": { |
||||
"domain": "1667591279", |
||||
"name": "celo", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x4E1c88DD261BEe2941e6c1814597e30F53330428", |
||||
"validatorManager": "0xC077A0Cc408173349b1c9870C667B40FE3C01dd7" |
||||
} |
||||
}, |
||||
"ethereum": { |
||||
"domain": "6648936", |
||||
"name": "ethereum", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "20", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x7082e975Fde8D85B0C56B4512b437efFb46F0a09", |
||||
"validatorManager": "0xCA41932888D323B3d99f5eA48F86D502055C0322" |
||||
} |
||||
}, |
||||
"optimism": { |
||||
"domain": "28528", |
||||
"name": "optimism", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x2Fa570E83009eaEef3a1cbd496a9a30F05266634", |
||||
"validatorManager": "0x931dFCc8c1141D6F532FD023bd87DAe0080c835d" |
||||
} |
||||
}, |
||||
"polygon": { |
||||
"domain": "1886350457", |
||||
"name": "polygon", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "256", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x5060eCD5dFAD300A90592C04e504600A7cdcF70b", |
||||
"validatorManager": "0x4E1c88DD261BEe2941e6c1814597e30F53330428" |
||||
} |
||||
} |
||||
}, |
||||
"outbox": { |
||||
"addresses": { |
||||
"outbox": "", |
||||
"interchainGasPaymaster": "" |
||||
}, |
||||
"domain": "0", |
||||
"name": "IGNORED", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
}, |
||||
"outboxes": { |
||||
"arbitrum": { |
||||
"addresses": { |
||||
"outbox": "0x0761b0827849abbf7b0cC09CE14e1C93D87f5004", |
||||
"interchainGasPaymaster": "0x376aD181E8cd45eAd5403F78d5A871D08c3c4D77" |
||||
}, |
||||
"domain": "6386274", |
||||
"name": "arbitrum", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
}, |
||||
"avalanche": { |
||||
"addresses": { |
||||
"outbox": "0x0761b0827849abbf7b0cC09CE14e1C93D87f5004", |
||||
"interchainGasPaymaster": "0xed9a722c543883FB7e07E78F3879762DE09eA7D5" |
||||
}, |
||||
"domain": "1635148152", |
||||
"name": "avalanche", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "1", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
}, |
||||
"bsc": { |
||||
"addresses": { |
||||
"outbox": "0xc3F23848Ed2e04C0c6d41bd7804fa8f89F940B94", |
||||
"interchainGasPaymaster": "0x47bf94790241B1764fC41A35a8329A15569E121C" |
||||
}, |
||||
"domain": "6452067", |
||||
"name": "bsc", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "15", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
}, |
||||
"celo": { |
||||
"addresses": { |
||||
"outbox": "0xe042D1fbDf59828dd16b9649Ede7abFc856F7a6c", |
||||
"interchainGasPaymaster": "0xCDeb368Db32ecCefaf7018e152DA9120565cb572" |
||||
}, |
||||
"domain": "1667591279", |
||||
"name": "celo", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
}, |
||||
"ethereum": { |
||||
"addresses": { |
||||
"outbox": "0x2f9DB5616fa3fAd1aB06cB2C906830BA63d135e3", |
||||
"interchainGasPaymaster": "0x17E216fBb22dF4ef8A6640ae9Cb147C92710ac84" |
||||
}, |
||||
"domain": "6648936", |
||||
"name": "ethereum", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "20", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
}, |
||||
"optimism": { |
||||
"addresses": { |
||||
"outbox": "0x0be2Ae2f6D02a3e0e00ECB57D3E1fCbb7f8F38F4", |
||||
"interchainGasPaymaster": "0xc5D6aCaafBCcEC6D7fD7d92F4509befce641c563" |
||||
}, |
||||
"domain": "28528", |
||||
"name": "optimism", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
}, |
||||
"polygon": { |
||||
"addresses": { |
||||
"outbox": "0x8249cD1275855F2BB20eE71f0B9fA3c9155E5FaB", |
||||
"interchainGasPaymaster": "0x60B8d195f1b2EcaC26d54b95C69E6399cFD64b53" |
||||
}, |
||||
"domain": "1886350457", |
||||
"name": "polygon", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "256", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
} |
||||
}, |
||||
"tracing": { |
||||
"level": "debug", |
||||
"fmt": "json" |
||||
}, |
||||
"db": "db_path", |
||||
"index": { |
||||
"from": "" |
||||
}, |
||||
"indexes": { |
||||
"arbitrum": { |
||||
"from": "14751425" |
||||
}, |
||||
"avalanche": { |
||||
"from": "16077239" |
||||
}, |
||||
"bsc": { |
||||
"from": "18722839" |
||||
}, |
||||
"celo": { |
||||
"from": "13551287" |
||||
}, |
||||
"ethereum": { |
||||
"from": "14970190" |
||||
}, |
||||
"optimism": { |
||||
"from": "11966568" |
||||
}, |
||||
"polygon": { |
||||
"from": "29616068" |
||||
} |
||||
} |
||||
} |
@ -1,56 +0,0 @@ |
||||
{ |
||||
"environment": "test", |
||||
"signers": {}, |
||||
"inboxes": { |
||||
"test2": { |
||||
"domain": "13372", |
||||
"name": "test2", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "1", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xc3e53F4d16Ae77Db1c982e75a937B9f60FE63690", |
||||
"validatorManager": "0xc5a5C42992dECbae36851359345FE25997F5C42d" |
||||
} |
||||
}, |
||||
"test3": { |
||||
"domain": "13373", |
||||
"name": "test3", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "2", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x4c5859f0F772848b2D91F1D83E2Fe57935348029", |
||||
"validatorManager": "0x5eb3Bc0a489C5A8288765d2336659EbCA68FCd00" |
||||
} |
||||
} |
||||
}, |
||||
"outbox": { |
||||
"addresses": { |
||||
"outbox": "0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6", |
||||
"interchainGasPaymaster": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9" |
||||
}, |
||||
"domain": "13371", |
||||
"name": "test1", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
}, |
||||
"tracing": { |
||||
"level": "debug", |
||||
"fmt": "json" |
||||
}, |
||||
"db": "db_path", |
||||
"index": { |
||||
"from": "1" |
||||
} |
||||
} |
@ -1,56 +0,0 @@ |
||||
{ |
||||
"environment": "test", |
||||
"signers": {}, |
||||
"inboxes": { |
||||
"test1": { |
||||
"domain": "13371", |
||||
"name": "test1", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82", |
||||
"validatorManager": "0x610178dA211FEF7D417bC0e6FeD39F05609AD788" |
||||
} |
||||
}, |
||||
"test3": { |
||||
"domain": "13373", |
||||
"name": "test3", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "2", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xb7278A61aa25c888815aFC32Ad3cC52fF24fE575", |
||||
"validatorManager": "0x5f3f1dBD7B74C6B46e8c44f98792A1dAf8d69154" |
||||
} |
||||
} |
||||
}, |
||||
"outbox": { |
||||
"addresses": { |
||||
"outbox": "0x7a2088a1bFc9d81c55368AE168C2C02570cB814F", |
||||
"interchainGasPaymaster": "0x59b670e9fA9D0A427751Af201D676719a970857b" |
||||
}, |
||||
"domain": "13372", |
||||
"name": "test2", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "1", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
}, |
||||
"tracing": { |
||||
"level": "debug", |
||||
"fmt": "json" |
||||
}, |
||||
"db": "db_path", |
||||
"index": { |
||||
"from": "19" |
||||
} |
||||
} |
@ -1,56 +0,0 @@ |
||||
{ |
||||
"environment": "test", |
||||
"signers": {}, |
||||
"inboxes": { |
||||
"test1": { |
||||
"domain": "13371", |
||||
"name": "test1", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x959922bE3CAee4b8Cd9a407cc3ac1C251C2007B1", |
||||
"validatorManager": "0x0B306BF915C4d645ff596e518fAf3F9669b97016" |
||||
} |
||||
}, |
||||
"test2": { |
||||
"domain": "13372", |
||||
"name": "test2", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "1", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xa82fF9aFd8f496c3d6ac40E2a0F282E47488CFc9", |
||||
"validatorManager": "0x9E545E3C0baAB3E08CdfD552C960A1050f373042" |
||||
} |
||||
} |
||||
}, |
||||
"outbox": { |
||||
"addresses": { |
||||
"outbox": "0x8f86403A4DE0BB5791fa46B8e795C547942fE4Cf", |
||||
"interchainGasPaymaster": "0x998abeb3E57409262aE5b751f60747921B33613E" |
||||
}, |
||||
"domain": "13373", |
||||
"name": "test3", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "2", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
}, |
||||
"tracing": { |
||||
"level": "debug", |
||||
"fmt": "json" |
||||
}, |
||||
"db": "db_path", |
||||
"index": { |
||||
"from": "38" |
||||
} |
||||
} |
@ -0,0 +1,65 @@ |
||||
{ |
||||
"environment": "test", |
||||
"chains": { |
||||
"test1": { |
||||
"name": "test1", |
||||
"domain": "13371", |
||||
"addresses": { |
||||
"mailbox": "0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e", |
||||
"interchainGasPaymaster": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9", |
||||
"multisigIsm": "0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9" |
||||
}, |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"index": { |
||||
"from": "4" |
||||
} |
||||
}, |
||||
"test2": { |
||||
"name": "test2", |
||||
"domain": "13372", |
||||
"addresses": { |
||||
"mailbox": "0x322813Fd9A801c5507c9de605d63CEA4f2CE6c44", |
||||
"interchainGasPaymaster": "0x0B306BF915C4d645ff596e518fAf3F9669b97016", |
||||
"multisigIsm": "0x959922bE3CAee4b8Cd9a407cc3ac1C251C2007B1" |
||||
}, |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "1", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"index": { |
||||
"from": "16" |
||||
} |
||||
}, |
||||
"test3": { |
||||
"name": "test3", |
||||
"domain": "13373", |
||||
"addresses": { |
||||
"mailbox": "0x1613beB3B2C4f22Ee086B2b38C1476A3cE7f78E8", |
||||
"interchainGasPaymaster": "0x09635F643e140090A9A8Dcd712eD6285858ceBef", |
||||
"multisigIsm": "0xc5a5C42992dECbae36851359345FE25997F5C42d" |
||||
}, |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "2", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"index": { |
||||
"from": "28" |
||||
} |
||||
} |
||||
}, |
||||
"signers": {}, |
||||
"db": "db_path", |
||||
"tracing": { |
||||
"level": "debug", |
||||
"fmt": "json" |
||||
} |
||||
} |
@ -1,98 +0,0 @@ |
||||
{ |
||||
"environment": "testnet2", |
||||
"signers": {}, |
||||
"inboxes": { |
||||
"fuji": { |
||||
"domain": "43113", |
||||
"name": "fuji", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xaf578f7f9a4D835aaCB5909AD5F39139022173fB", |
||||
"validatorManager": "0x4904f38433583f0F72609C0bb8788d3296bd0E3B" |
||||
} |
||||
}, |
||||
"mumbai": { |
||||
"domain": "80001", |
||||
"name": "mumbai", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "32", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x772926Ffc5FE8B3ae9a85cB085700748606aE283", |
||||
"validatorManager": "0x99A42d6Bf191127667f55297Af0259708bd8c59e" |
||||
} |
||||
}, |
||||
"bsctestnet": { |
||||
"domain": "1651715444", |
||||
"name": "bsctestnet", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "9", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xFfA20C4c8e3b2A2C1220134684FEe23EEB8872d0", |
||||
"validatorManager": "0x5B30De0c322F7720D144df2AB2e82b160Eba0EBF" |
||||
} |
||||
}, |
||||
"goerli": { |
||||
"domain": "5", |
||||
"name": "goerli", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "7", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xD3d062a5dcBA85ae863618d4c264d2358300c283", |
||||
"validatorManager": "0xB08d78F439e55D02C398519eef61606A5926245F" |
||||
} |
||||
}, |
||||
"moonbasealpha": { |
||||
"domain": "1836002657", |
||||
"name": "moonbasealpha", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "1", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x46f7C5D896bbeC89bE1B19e4485e59b4Be49e9Cc", |
||||
"validatorManager": "0xDDcFEcF17586D08A5740B7D91735fcCE3dfe3eeD" |
||||
} |
||||
} |
||||
}, |
||||
"outbox": { |
||||
"addresses": { |
||||
"outbox": "0x5C7D9B5f38022dB78416D6C0132bf8c404deDe27", |
||||
"interchainGasPaymaster": "0x1Fb165396FB26AC4178ca4240b3724039F75EED7" |
||||
}, |
||||
"domain": "1000", |
||||
"name": "alfajores", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
}, |
||||
"tracing": { |
||||
"level": "debug", |
||||
"fmt": "json" |
||||
}, |
||||
"db": "db_path", |
||||
"index": { |
||||
"from": "11877043" |
||||
} |
||||
} |
@ -1,98 +0,0 @@ |
||||
{ |
||||
"environment": "testnet2", |
||||
"signers": {}, |
||||
"inboxes": { |
||||
"alfajores": { |
||||
"domain": "1000", |
||||
"name": "alfajores", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x3582d1238cBC812165981E4fFaB0E8D9a4518910", |
||||
"validatorManager": "0x0AfCCF2ffc1D7A42b3F8616C4270Da27f2729F5F" |
||||
} |
||||
}, |
||||
"fuji": { |
||||
"domain": "43113", |
||||
"name": "fuji", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x4e49616d6f26C3080277b2fBDA242690AD403420", |
||||
"validatorManager": "0x15569bE4B03593A9eA93Bd519bB74928B1eF5fB2" |
||||
} |
||||
}, |
||||
"mumbai": { |
||||
"domain": "80001", |
||||
"name": "mumbai", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "32", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xFd9387BB1506F4Eb4Ac1a1f8c8128FB89b83e64c", |
||||
"validatorManager": "0x3572a9d808738922194921b275B2A55414BcDA57" |
||||
} |
||||
}, |
||||
"goerli": { |
||||
"domain": "5", |
||||
"name": "goerli", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "7", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x7914A3349107A7295Bbf2374db5A973d73D1b324", |
||||
"validatorManager": "0x598facE78a4302f11E3de0bee1894Da0b2Cb71F8" |
||||
} |
||||
}, |
||||
"moonbasealpha": { |
||||
"domain": "1836002657", |
||||
"name": "moonbasealpha", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "1", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xef48bd850E5827B96B55C4D28FB32Bbaa73616F2", |
||||
"validatorManager": "0x666a24F62f7A97BA33c151776Eb3D9441a059eB8" |
||||
} |
||||
} |
||||
}, |
||||
"outbox": { |
||||
"addresses": { |
||||
"outbox": "0xE023239c8dfc172FF008D8087E7442d3eBEd9350", |
||||
"interchainGasPaymaster": "0x155b1F1801030Ea4dF038107d3cc1b4bA496916e" |
||||
}, |
||||
"domain": "1651715444", |
||||
"name": "bsctestnet", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "9", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
}, |
||||
"tracing": { |
||||
"level": "debug", |
||||
"fmt": "json" |
||||
}, |
||||
"db": "db_path", |
||||
"index": { |
||||
"from": "20035396" |
||||
} |
||||
} |
@ -1,98 +0,0 @@ |
||||
{ |
||||
"environment": "testnet2", |
||||
"signers": {}, |
||||
"inboxes": { |
||||
"alfajores": { |
||||
"domain": "1000", |
||||
"name": "alfajores", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xac5e56b6eF335bbE4413eE48965dB6B538415E49", |
||||
"validatorManager": "0x793b4c911362c8900372cE6Da5f9dA96457E8c1B" |
||||
} |
||||
}, |
||||
"mumbai": { |
||||
"domain": "80001", |
||||
"name": "mumbai", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "32", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x56c09458cC7863fff1Cc6Bcb6652Dcc3412FcA86", |
||||
"validatorManager": "0xd09D08a19C6609a1B51e1ca6a055861E7e7A4400" |
||||
} |
||||
}, |
||||
"bsctestnet": { |
||||
"domain": "1651715444", |
||||
"name": "bsctestnet", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "9", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xE3D93F9296FA3dF262E1a54f0de02F71E845af6b", |
||||
"validatorManager": "0x6d6a9bDDea1456673062633b7a4823dB13bDB9fb" |
||||
} |
||||
}, |
||||
"goerli": { |
||||
"domain": "5", |
||||
"name": "goerli", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "7", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xfc8d0D2E15A36f1A3F3aE3Cb127B706c1f23Aadc", |
||||
"validatorManager": "0xF7F0DaB0BECE4498dAc7eb616e288809D4499371" |
||||
} |
||||
}, |
||||
"moonbasealpha": { |
||||
"domain": "1836002657", |
||||
"name": "moonbasealpha", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "1", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x1D5EbC3e15e9ECDe0e3530C85899556797eeaea5", |
||||
"validatorManager": "0x7FE7EA170cf08A25C2ff315814D96D93C311E692" |
||||
} |
||||
} |
||||
}, |
||||
"outbox": { |
||||
"addresses": { |
||||
"outbox": "0xc507A7c848b59469cC44A3653F8a582aa8BeC71E", |
||||
"interchainGasPaymaster": "0x4834a491f78BBF48e983F9Ce0E20D1E4DbE013D8" |
||||
}, |
||||
"domain": "43113", |
||||
"name": "fuji", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
}, |
||||
"tracing": { |
||||
"level": "debug", |
||||
"fmt": "json" |
||||
}, |
||||
"db": "db_path", |
||||
"index": { |
||||
"from": "10542676" |
||||
} |
||||
} |
@ -1,98 +0,0 @@ |
||||
{ |
||||
"environment": "testnet2", |
||||
"signers": {}, |
||||
"inboxes": { |
||||
"alfajores": { |
||||
"domain": "1000", |
||||
"name": "alfajores", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x5C96BfCBD87E4E8A5208fD080A28c74F8Ca12285", |
||||
"validatorManager": "0x80B24aFeC7dD9B67CaEF0f06592753ed5e52783F" |
||||
} |
||||
}, |
||||
"fuji": { |
||||
"domain": "43113", |
||||
"name": "fuji", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "3", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xa5D5EdF366F0D8FF135EBb31555E10b07f096427", |
||||
"validatorManager": "0x63C619FF7caE1d565149EB6381E24CA53F957704" |
||||
} |
||||
}, |
||||
"mumbai": { |
||||
"domain": "80001", |
||||
"name": "mumbai", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "3", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x934809a3a89CAdaB30F0A8C703619C3E02c37616", |
||||
"validatorManager": "0x412219094B1E49e7b53fDE9F5Cd793fE9dD07615" |
||||
} |
||||
}, |
||||
"bsctestnet": { |
||||
"domain": "1651715444", |
||||
"name": "bsctestnet", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "9", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xb51D33b294aF850E47CcEdD7C4580A547507f675", |
||||
"validatorManager": "0xEd23982947054CfeDD759163cbbC5CDA911A43d5" |
||||
} |
||||
}, |
||||
"moonbasealpha": { |
||||
"domain": "1836002657", |
||||
"name": "moonbasealpha", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "1", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x679Dc08cC3A4acFeea2f7CAFAa37561aE0b41Ce7", |
||||
"validatorManager": "0x58483b754Abb1E8947BE63d6b95DF75b8249543A" |
||||
} |
||||
} |
||||
}, |
||||
"outbox": { |
||||
"addresses": { |
||||
"outbox": "0xDDcFEcF17586D08A5740B7D91735fcCE3dfe3eeD", |
||||
"interchainGasPaymaster": "0x44b764045BfDC68517e10e783E69B376cef196B2" |
||||
}, |
||||
"domain": "5", |
||||
"name": "goerli", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "7", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
}, |
||||
"tracing": { |
||||
"level": "debug", |
||||
"fmt": "json" |
||||
}, |
||||
"index": { |
||||
"from": "7061415" |
||||
}, |
||||
"db": "db_path" |
||||
} |
@ -1,98 +0,0 @@ |
||||
{ |
||||
"environment": "testnet2", |
||||
"signers": {}, |
||||
"inboxes": { |
||||
"alfajores": { |
||||
"domain": "1000", |
||||
"name": "alfajores", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xBE3541E3D391751Ae73cC0A52F48CCe45120f74B", |
||||
"validatorManager": "0xdE1a1f41871ebD2D1B8ddac6BAC3a2F4898a1747" |
||||
} |
||||
}, |
||||
"fuji": { |
||||
"domain": "43113", |
||||
"name": "fuji", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "3", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xb31b0a575a151E0E72D438999f5a65e08802466f", |
||||
"validatorManager": "0x8a14566c8649C2b72600c920F40aF161FB435846" |
||||
} |
||||
}, |
||||
"mumbai": { |
||||
"domain": "80001", |
||||
"name": "mumbai", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "3", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xEf9bae5E38c552bEc367b6B4f7a4D0a5e663B898", |
||||
"validatorManager": "0xeAD058dc774892e71403C4EB4600850A89524EaD" |
||||
} |
||||
}, |
||||
"bsctestnet": { |
||||
"domain": "1651715444", |
||||
"name": "bsctestnet", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "9", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x963f552583E56ddBc58d12Aa5f8f85187A72E142", |
||||
"validatorManager": "0x5F3aA4De5132688c2c1750D3780AdD49d72FAaBC" |
||||
} |
||||
}, |
||||
"goerli": { |
||||
"domain": "5", |
||||
"name": "goerli", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "7", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x98AAE089CaD930C64a76dD2247a2aC5773a4B8cE", |
||||
"validatorManager": "0x4926a10788306D84202A2aDbd290b7743146Cc17" |
||||
} |
||||
} |
||||
}, |
||||
"outbox": { |
||||
"addresses": { |
||||
"outbox": "0x54148470292C24345fb828B003461a9444414517", |
||||
"interchainGasPaymaster": "0xeb6f11189197223c656807a83B0DD374f9A6dF44" |
||||
}, |
||||
"domain": "1836002657", |
||||
"name": "moonbasealpha", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "1", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
}, |
||||
"tracing": { |
||||
"level": "debug", |
||||
"fmt": "json" |
||||
}, |
||||
"index": { |
||||
"from": "2309252" |
||||
}, |
||||
"db": "db_path" |
||||
} |
@ -1,98 +0,0 @@ |
||||
{ |
||||
"environment": "testnet2", |
||||
"signers": {}, |
||||
"inboxes": { |
||||
"alfajores": { |
||||
"domain": "1000", |
||||
"name": "alfajores", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x06a919Ec005Be1c7319c18ab7a51A4C62a69Fe2A", |
||||
"validatorManager": "0x50d45EEe9C2903Ad204d393F5411Aa75A6CB02c4" |
||||
} |
||||
}, |
||||
"fuji": { |
||||
"domain": "43113", |
||||
"name": "fuji", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x04268B83eE9684F8767eB4e83cf7fBb7B86Ed597", |
||||
"validatorManager": "0x5e976f063FbE35d29d6E575f8ee504e59D19fcc6" |
||||
} |
||||
}, |
||||
"bsctestnet": { |
||||
"domain": "1651715444", |
||||
"name": "bsctestnet", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "9", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x14EE2f01907707Ce8d13C4F5DBC40778b5b664e0", |
||||
"validatorManager": "0xDa5177080f7fC5d9255eB32cC64B9b4e5136A716" |
||||
} |
||||
}, |
||||
"goerli": { |
||||
"domain": "5", |
||||
"name": "goerli", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "7", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x666a24F62f7A97BA33c151776Eb3D9441a059eB8", |
||||
"validatorManager": "0xd785272D240B07719e417622cbd2cfA0E584d1bd" |
||||
} |
||||
}, |
||||
"moonbasealpha": { |
||||
"domain": "1836002657", |
||||
"name": "moonbasealpha", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "1", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x0526E47C49742C15F8817ef8cf0d8FFc72139D4F", |
||||
"validatorManager": "0xfc8d0D2E15A36f1A3F3aE3Cb127B706c1f23Aadc" |
||||
} |
||||
} |
||||
}, |
||||
"outbox": { |
||||
"addresses": { |
||||
"outbox": "0xe17c37212d785760E8331D4A4395B17b34Ba8cDF", |
||||
"interchainGasPaymaster": "0x9A27744C249A11f68B3B56f09D280599585DFBb8" |
||||
}, |
||||
"domain": "80001", |
||||
"name": "mumbai", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "32", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
}, |
||||
"tracing": { |
||||
"level": "debug", |
||||
"fmt": "json" |
||||
}, |
||||
"db": "db_path", |
||||
"index": { |
||||
"from": "26666833" |
||||
} |
||||
} |
@ -1,218 +0,0 @@ |
||||
{ |
||||
"environment": "testnet2", |
||||
"signers": {}, |
||||
"inboxes": { |
||||
"alfajores": { |
||||
"domain": "1000", |
||||
"name": "alfajores", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x5939e17FE19669Ba22f06603CA2eBE18C836c6Ab", |
||||
"validatorManager": "0xAf4778deef817E02c63076d803D687596067179d" |
||||
} |
||||
}, |
||||
"fuji": { |
||||
"domain": "43113", |
||||
"name": "fuji", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xaf578f7f9a4D835aaCB5909AD5F39139022173fB", |
||||
"validatorManager": "0x4904f38433583f0F72609C0bb8788d3296bd0E3B" |
||||
} |
||||
}, |
||||
"mumbai": { |
||||
"domain": "80001", |
||||
"name": "mumbai", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "32", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x772926Ffc5FE8B3ae9a85cB085700748606aE283", |
||||
"validatorManager": "0x99A42d6Bf191127667f55297Af0259708bd8c59e" |
||||
} |
||||
}, |
||||
"bsctestnet": { |
||||
"domain": "1651715444", |
||||
"name": "bsctestnet", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "9", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xFfA20C4c8e3b2A2C1220134684FEe23EEB8872d0", |
||||
"validatorManager": "0x5B30De0c322F7720D144df2AB2e82b160Eba0EBF" |
||||
} |
||||
}, |
||||
"goerli": { |
||||
"domain": "5", |
||||
"name": "goerli", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "7", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0xD3d062a5dcBA85ae863618d4c264d2358300c283", |
||||
"validatorManager": "0xB08d78F439e55D02C398519eef61606A5926245F" |
||||
} |
||||
}, |
||||
"moonbasealpha": { |
||||
"domain": "1836002657", |
||||
"name": "moonbasealpha", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "1", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
}, |
||||
"addresses": { |
||||
"inbox": "0x46f7C5D896bbeC89bE1B19e4485e59b4Be49e9Cc", |
||||
"validatorManager": "0xDDcFEcF17586D08A5740B7D91735fcCE3dfe3eeD" |
||||
} |
||||
} |
||||
}, |
||||
"outbox": { |
||||
"addresses": { |
||||
"outbox": "", |
||||
"interchainGasPaymaster": "" |
||||
}, |
||||
"domain": "0", |
||||
"name": "IGNORED", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
}, |
||||
"outboxes": { |
||||
"alfajores": { |
||||
"addresses": { |
||||
"outbox": "0x5C7D9B5f38022dB78416D6C0132bf8c404deDe27", |
||||
"interchainGasPaymaster": "0x1Fb165396FB26AC4178ca4240b3724039F75EED7" |
||||
}, |
||||
"domain": "1000", |
||||
"name": "alfajores", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
}, |
||||
"bsctestnet": { |
||||
"addresses": { |
||||
"outbox": "0xE023239c8dfc172FF008D8087E7442d3eBEd9350", |
||||
"interchainGasPaymaster": "0x155b1F1801030Ea4dF038107d3cc1b4bA496916e" |
||||
}, |
||||
"domain": "1651715444", |
||||
"name": "bsctestnet", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "9", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
}, |
||||
"fuji": { |
||||
"addresses": { |
||||
"outbox": "0xc507A7c848b59469cC44A3653F8a582aa8BeC71E", |
||||
"interchainGasPaymaster": "0x4834a491f78BBF48e983F9Ce0E20D1E4DbE013D8" |
||||
}, |
||||
"domain": "43113", |
||||
"name": "fuji", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "0", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
}, |
||||
"goerli": { |
||||
"addresses": { |
||||
"outbox": "0xDDcFEcF17586D08A5740B7D91735fcCE3dfe3eeD", |
||||
"interchainGasPaymaster": "0x44b764045BfDC68517e10e783E69B376cef196B2" |
||||
}, |
||||
"domain": "5", |
||||
"name": "goerli", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "7", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
}, |
||||
"moonbasealpha": { |
||||
"addresses": { |
||||
"outbox": "0x54148470292C24345fb828B003461a9444414517", |
||||
"interchainGasPaymaster": "0xeb6f11189197223c656807a83B0DD374f9A6dF44" |
||||
}, |
||||
"domain": "1836002657", |
||||
"name": "moonbasealpha", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "1", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
}, |
||||
"mumbai": { |
||||
"addresses": { |
||||
"outbox": "0xe17c37212d785760E8331D4A4395B17b34Ba8cDF", |
||||
"interchainGasPaymaster": "0x9A27744C249A11f68B3B56f09D280599585DFBb8" |
||||
}, |
||||
"domain": "80001", |
||||
"name": "mumbai", |
||||
"rpcStyle": "ethereum", |
||||
"finalityBlocks": "32", |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "" |
||||
} |
||||
} |
||||
}, |
||||
"tracing": { |
||||
"level": "debug", |
||||
"fmt": "json" |
||||
}, |
||||
"db": "db_path", |
||||
"index": { |
||||
"from": "" |
||||
}, |
||||
"indexes": { |
||||
"alfajores": { |
||||
"from": "11877043" |
||||
}, |
||||
"bsctestnet": { |
||||
"from": "20035396" |
||||
}, |
||||
"fuji": { |
||||
"from": "10542676" |
||||
}, |
||||
"goerli": { |
||||
"from": "7061415" |
||||
}, |
||||
"moonbasealpha": { |
||||
"from": "2309252" |
||||
}, |
||||
"mumbai": { |
||||
"from": "26666833" |
||||
} |
||||
} |
||||
} |
@ -1,4 +1,4 @@ |
||||
export { AgentConfig, RustConfig, RustChainConfig } from './agent'; |
||||
export { AgentConfig, RustConfig, RustChainSetup } from './agent'; |
||||
export { CoreEnvironmentConfig, DeployEnvironment } from './environment'; |
||||
export { HelloWorldConfig } from './helloworld'; |
||||
export { InfrastructureConfig } from './infrastructure'; |
||||
|
Loading…
Reference in new issue