pub struct V3Router<P: Provider<Ethereum>> { /* private fields */ }Expand description
The V2 SOR Router contract.
Implementations§
Source§impl<P: Provider<Ethereum>> V3Router<P>
impl<P: Provider<Ethereum>> V3Router<P>
pub fn new(address: Address, provider: P) -> Self
pub async fn owner(&self) -> Result<Address, Error>
pub async fn liquidator_address(&self) -> Result<Address, Error>
pub fn build_swap_router_funds_call( &self, input_token_info: inputTokenInfo, output_token_info: outputTokenInfo, inputs: &SwapInputs, from: Address, ) -> CallBuilder<&P, PhantomData<swapRouterFundsCall>>
pub fn transfer_router_funds( &self, from: Address, token: Address, amount: U256, output_recipient: Address, ) -> CallBuilder<&P, PhantomData<transferRouterFundsCall>>
pub fn transfer_router_funds_calldata( &self, from: Address, token: Address, amount: U256, output_recipient: Address, ) -> Vec<u8> ⓘ
Trait Implementations§
Auto Trait Implementations§
impl<P> Freeze for V3Router<P>where
P: Freeze,
impl<P> RefUnwindSafe for V3Router<P>where
P: RefUnwindSafe,
impl<P> Send for V3Router<P>
impl<P> Sync for V3Router<P>
impl<P> Unpin for V3Router<P>where
P: Unpin,
impl<P> UnwindSafe for V3Router<P>where
P: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more