pub trait DomainsTransfersTracker<Balance> {
type Error;
// Required methods
fn initialize_domain_balance(
domain_id: DomainId,
amount: Balance,
) -> Result<(), Self::Error>;
fn note_transfer(
from_chain_id: ChainId,
to_chain_id: ChainId,
amount: Balance,
) -> Result<(), Self::Error>;
fn confirm_transfer(
from_chain_id: ChainId,
to_chain_id: ChainId,
amount: Balance,
) -> Result<(), Self::Error>;
fn claim_rejected_transfer(
from_chain_id: ChainId,
to_chain_id: ChainId,
amount: Balance,
) -> Result<(), Self::Error>;
fn reject_transfer(
from_chain_id: ChainId,
to_chain_id: ChainId,
amount: Balance,
) -> Result<(), Self::Error>;
fn reduce_domain_balance(
domain_id: DomainId,
amount: Balance,
) -> Result<(), Self::Error>;
}
Expand description
Trait that tracks the balances on Domains.
Required Associated Types§
Required Methods§
sourcefn initialize_domain_balance(
domain_id: DomainId,
amount: Balance,
) -> Result<(), Self::Error>
fn initialize_domain_balance( domain_id: DomainId, amount: Balance, ) -> Result<(), Self::Error>
Initializes the domain balance
sourcefn note_transfer(
from_chain_id: ChainId,
to_chain_id: ChainId,
amount: Balance,
) -> Result<(), Self::Error>
fn note_transfer( from_chain_id: ChainId, to_chain_id: ChainId, amount: Balance, ) -> Result<(), Self::Error>
Notes a transfer between chains. Balance on from_chain_id is reduced if it is a domain chain
sourcefn confirm_transfer(
from_chain_id: ChainId,
to_chain_id: ChainId,
amount: Balance,
) -> Result<(), Self::Error>
fn confirm_transfer( from_chain_id: ChainId, to_chain_id: ChainId, amount: Balance, ) -> Result<(), Self::Error>
Confirms a transfer between chains.
sourcefn claim_rejected_transfer(
from_chain_id: ChainId,
to_chain_id: ChainId,
amount: Balance,
) -> Result<(), Self::Error>
fn claim_rejected_transfer( from_chain_id: ChainId, to_chain_id: ChainId, amount: Balance, ) -> Result<(), Self::Error>
Claims a rejected transfer between chains.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.