Trait brontes_pricing::protocols::UpdatableProtocol

source ·
pub trait UpdatableProtocol {
    // Required methods
    fn address(&self) -> Address;
    fn tokens(&self) -> Vec<Address>;
    fn calculate_price(
        &self,
        base_token: Address,
    ) -> Result<Rational, ArithmeticError>;
    fn sync_from_action(&mut self, action: Action) -> Result<(), AmmError>;
    fn sync_from_log(&mut self, log: Log) -> Result<(), AmmError>;
}

Required Methods§

source

fn address(&self) -> Address

source

fn tokens(&self) -> Vec<Address>

source

fn calculate_price( &self, base_token: Address, ) -> Result<Rational, ArithmeticError>

source

fn sync_from_action(&mut self, action: Action) -> Result<(), AmmError>

source

fn sync_from_log(&mut self, log: Log) -> Result<(), AmmError>

Implementors§