pub struct SigningHints { /* private fields */ }Expand description
Optional hints to override auto-resolved transaction parameters.
All fields default to None / false. Unset fields are resolved automatically from the
RPC node during FyndClient::swap_payload.
Build via the setter methods; all options are unset by default.
Implementations§
Source§impl SigningHints
impl SigningHints
Sourcepub fn with_sender(self, sender: Address) -> Self
pub fn with_sender(self, sender: Address) -> Self
Override the sender address. If not set, falls back to the address configured on the
client via FyndClientBuilder::with_sender.
Sourcepub fn with_nonce(self, nonce: u64) -> Self
pub fn with_nonce(self, nonce: u64) -> Self
Override the transaction nonce. If not set, fetched via eth_getTransactionCount.
Sourcepub fn with_max_fee_per_gas(self, max_fee_per_gas: u128) -> Self
pub fn with_max_fee_per_gas(self, max_fee_per_gas: u128) -> Self
Override maxFeePerGas (wei). If not set, estimated via eth_feeHistory.
Sourcepub fn with_max_priority_fee_per_gas(
self,
max_priority_fee_per_gas: u128,
) -> Self
pub fn with_max_priority_fee_per_gas( self, max_priority_fee_per_gas: u128, ) -> Self
Override maxPriorityFeePerGas (wei). If not set, estimated alongside max_fee_per_gas.
Sourcepub fn with_gas_limit(self, gas_limit: u64) -> Self
pub fn with_gas_limit(self, gas_limit: u64) -> Self
Override the gas limit. If not set, estimated via eth_estimateGas against the
current chain state. Set explicitly to opt out (e.g. use quote.gas_estimate()
as a pre-buffered fallback).
Sourcepub fn with_simulate(self, simulate: bool) -> Self
pub fn with_simulate(self, simulate: bool) -> Self
When true, simulate the transaction via eth_call before returning. A simulation
failure results in FyndError::SimulationFailed.
Sourcepub fn sender(&self) -> Option<Address>
pub fn sender(&self) -> Option<Address>
The configured sender override, or None to fall back to the client default.
Sourcepub fn nonce(&self) -> Option<u64>
pub fn nonce(&self) -> Option<u64>
The configured nonce override, or None to fetch from the RPC node.
Sourcepub fn max_fee_per_gas(&self) -> Option<u128>
pub fn max_fee_per_gas(&self) -> Option<u128>
The configured maxFeePerGas override (wei), or None to estimate.
Sourcepub fn max_priority_fee_per_gas(&self) -> Option<u128>
pub fn max_priority_fee_per_gas(&self) -> Option<u128>
The configured maxPriorityFeePerGas override (wei), or None to estimate.
Trait Implementations§
Source§impl Default for SigningHints
impl Default for SigningHints
Source§fn default() -> SigningHints
fn default() -> SigningHints
Auto Trait Implementations§
impl Freeze for SigningHints
impl RefUnwindSafe for SigningHints
impl Send for SigningHints
impl Sync for SigningHints
impl Unpin for SigningHints
impl UnsafeUnpin for SigningHints
impl UnwindSafe for SigningHints
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
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>
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>
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