[][src]Struct ethers_middleware::nonce_manager::NonceManagerMiddleware

pub struct NonceManagerMiddleware<M> { /* fields omitted */ }

Middleware used for calculating nonces locally, useful for signing multiple consecutive transactions without waiting for them to hit the mempool

Implementations

impl<M> NonceManagerMiddleware<M> where
    M: Middleware
[src]

pub fn new(inner: M, address: Address) -> Self[src]

Instantiates the nonce manager with a 0 nonce. The address should be the address which you'll be sending transactions from

pub fn next(&self) -> U256[src]

Returns the next nonce to be used

Trait Implementations

impl<M: Debug> Debug for NonceManagerMiddleware<M>[src]

impl<M> Middleware for NonceManagerMiddleware<M> where
    M: Middleware
[src]

type Error = NonceManagerError<M>

type Provider = M::Provider

type Inner = M

pub fn send_transaction<'life0, 'async_trait>(
    &'life0 self,
    tx: TransactionRequest,
    block: Option<BlockNumber>
) -> Pin<Box<dyn Future<Output = Result<PendingTransaction<'_, Self::Provider>, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Signs and broadcasts the transaction. The optional parameter block can be passed so that gas cost and nonce calculations take it into account. For simple transactions this can be left to None.

Auto Trait Implementations

impl<M> RefUnwindSafe for NonceManagerMiddleware<M> where
    M: RefUnwindSafe
[src]

impl<M> Send for NonceManagerMiddleware<M> where
    M: Send
[src]

impl<M> Sync for NonceManagerMiddleware<M> where
    M: Sync
[src]

impl<M> Unpin for NonceManagerMiddleware<M> where
    M: Unpin
[src]

impl<M> UnwindSafe for NonceManagerMiddleware<M> where
    M: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,