pub trait OracleExt<AccountId, BlockNumber> {
    fn is_oracle_enabled() -> bool;
    fn is_market_maker(account_id: AccountId) -> Result<bool, DispatchError>;
    fn add_new_swap_in_queue(
        account_id: AccountId,
        asset_id_from: CurrencyId,
        amount_from: Balance,
        asset_id_to: CurrencyId,
        amount_to: Balance,
        block_number: BlockNumber,
        extrinsic_hash: [u8; 32],
        is_market_maker: bool,
        swap_type: SwapType,
        slippage_tolerance: Permill
    ) -> Result<(Hash, Swap<AccountId, BlockNumber>), DispatchError>; fn remove_swap_from_queue(
        requester: AccountId,
        request_id: Hash
    ) -> Result<(), DispatchError>; }
Expand description

Oracle traits to share with pallets.

Required Methods§

Get current Oracle status.

Check if the account is an official market maker.

Add a new swap to the queue.

Cancel swap and release funds.

Implementors§