pub struct PodTransactionRequest {
pub inner: TransactionRequest,
}Fields§
§inner: TransactionRequestMethods from Deref<Target = TransactionRequest>§
Sourcepub fn fee_cap(&self) -> Option<u128>
pub fn fee_cap(&self) -> Option<u128>
Returns the configured fee cap, if any.
The returns gas_price (legacy) if set or max_fee_per_gas (EIP1559)
Sourcepub fn populate_blob_hashes(&mut self)
pub fn populate_blob_hashes(&mut self)
Populate the blob_versioned_hashes key, if a sidecar exists. No
effect otherwise.
Sourcepub fn get_invalid_common_fields(&self) -> Vec<&'static str>
pub fn get_invalid_common_fields(&self) -> Vec<&'static str>
Gets invalid fields for all transaction types
Sourcepub fn get_invalid_1559_fields(&self) -> Vec<&'static str>
pub fn get_invalid_1559_fields(&self) -> Vec<&'static str>
Gets invalid fields for EIP-1559 transaction type
Sourcepub fn trim_conflicting_keys(&mut self)
pub fn trim_conflicting_keys(&mut self)
Trim field conflicts, based on the preferred type
This is used to ensure that the request will not be rejected by the server due to conflicting keys, and should only be called before submission via rpc.
Sourcepub fn preferred_type(&self) -> TxType
pub fn preferred_type(&self) -> TxType
Check this builder’s preferred type, based on the fields that are set.
Types are preferred as follows:
- EIP-7702 if authorization_list is set
- EIP-4844 if sidecar or max_blob_fee_per_gas is set
- EIP-2930 if access_list is set
- Legacy if gas_price is set and access_list is unset
- EIP-1559 in all other cases
Sourcepub fn missing_keys(&self) -> Result<TxType, (TxType, Vec<&'static str>)>
pub fn missing_keys(&self) -> Result<TxType, (TxType, Vec<&'static str>)>
Check if all necessary keys are present to build a transaction.
§Returns
- Ok(type) if all necessary keys are present to build the preferred type.
- Err((type, missing)) if some keys are missing to build the preferred type.
Sourcepub fn complete_4844(&self) -> Result<(), Vec<&'static str>>
pub fn complete_4844(&self) -> Result<(), Vec<&'static str>>
Check if all necessary keys are present to build a 4844 transaction, returning a list of keys that are missing.
NOTE: sidecar must be present, even if blob_versioned_hashes is set.
Sourcepub fn complete_1559(&self) -> Result<(), Vec<&'static str>>
pub fn complete_1559(&self) -> Result<(), Vec<&'static str>>
Check if all necessary keys are present to build a 1559 transaction, returning a list of keys that are missing.
Sourcepub fn complete_2930(&self) -> Result<(), Vec<&'static str>>
pub fn complete_2930(&self) -> Result<(), Vec<&'static str>>
Check if all necessary keys are present to build a 2930 transaction, returning a list of keys that are missing.
Sourcepub fn complete_7702(&self) -> Result<(), Vec<&'static str>>
pub fn complete_7702(&self) -> Result<(), Vec<&'static str>>
Check if all necessary keys are present to build a 7702 transaction, returning a list of keys that are missing.
Sourcepub fn complete_legacy(&self) -> Result<(), Vec<&'static str>>
pub fn complete_legacy(&self) -> Result<(), Vec<&'static str>>
Check if all necessary keys are present to build a legacy transaction, returning a list of keys that are missing.
Sourcepub fn buildable_type(&self) -> Option<TxType>
pub fn buildable_type(&self) -> Option<TxType>
Return the tx type this request can be built as. Computed by checking the preferred type, and then checking for completeness.
Trait Implementations§
Source§impl Clone for PodTransactionRequest
impl Clone for PodTransactionRequest
Source§fn clone(&self) -> PodTransactionRequest
fn clone(&self) -> PodTransactionRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PodTransactionRequest
impl Debug for PodTransactionRequest
Source§impl Default for PodTransactionRequest
impl Default for PodTransactionRequest
Source§impl Deref for PodTransactionRequest
impl Deref for PodTransactionRequest
Source§impl DerefMut for PodTransactionRequest
impl DerefMut for PodTransactionRequest
Source§impl<'de> Deserialize<'de> for PodTransactionRequest
impl<'de> Deserialize<'de> for PodTransactionRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<EthereumTxEnvelope<TxEip4844Variant>> for PodTransactionRequest
impl From<EthereumTxEnvelope<TxEip4844Variant>> for PodTransactionRequest
Source§fn from(value: TxEnvelope) -> Self
fn from(value: TxEnvelope) -> Self
Source§impl From<EthereumTypedTransaction<TxEip4844Variant>> for PodTransactionRequest
impl From<EthereumTypedTransaction<TxEip4844Variant>> for PodTransactionRequest
Source§fn from(value: TypedTransaction) -> Self
fn from(value: TypedTransaction) -> Self
Source§impl Serialize for PodTransactionRequest
impl Serialize for PodTransactionRequest
Source§impl TransactionBuilder<PodNetwork> for PodTransactionRequest
impl TransactionBuilder<PodNetwork> for PodTransactionRequest
Source§fn set_chain_id(&mut self, chain_id: ChainId)
fn set_chain_id(&mut self, chain_id: ChainId)
Source§fn clear_kind(&mut self)
fn clear_kind(&mut self)
Source§fn set_gas_price(&mut self, gas_price: u128)
fn set_gas_price(&mut self, gas_price: u128)
Source§fn max_fee_per_gas(&self) -> Option<u128>
fn max_fee_per_gas(&self) -> Option<u128>
Source§fn set_max_fee_per_gas(&mut self, max_fee_per_gas: u128)
fn set_max_fee_per_gas(&mut self, max_fee_per_gas: u128)
Source§fn max_priority_fee_per_gas(&self) -> Option<u128>
fn max_priority_fee_per_gas(&self) -> Option<u128>
Source§fn set_max_priority_fee_per_gas(&mut self, max_priority_fee_per_gas: u128)
fn set_max_priority_fee_per_gas(&mut self, max_priority_fee_per_gas: u128)
Source§fn set_gas_limit(&mut self, gas_limit: u64)
fn set_gas_limit(&mut self, gas_limit: u64)
Source§fn access_list(&self) -> Option<&AccessList>
fn access_list(&self) -> Option<&AccessList>
Source§fn set_access_list(&mut self, access_list: AccessList)
fn set_access_list(&mut self, access_list: AccessList)
Source§fn complete_type(&self, ty: TxType) -> Result<(), Vec<&'static str>>
fn complete_type(&self, ty: TxType) -> Result<(), Vec<&'static str>>
Source§fn can_submit(&self) -> bool
fn can_submit(&self) -> bool
eth_sendTransaction endpoint.Source§fn can_build(&self) -> bool
fn can_build(&self) -> bool
Source§fn output_tx_type(&self) -> TxType
fn output_tx_type(&self) -> TxType
Source§fn output_tx_type_checked(&self) -> Option<TxType>
fn output_tx_type_checked(&self) -> Option<TxType>
None if
the builder is not ready to build.Source§fn prep_for_submission(&mut self)
fn prep_for_submission(&mut self)
Source§fn build_unsigned(self) -> BuildResult<TypedTransaction, PodNetwork>
fn build_unsigned(self) -> BuildResult<TypedTransaction, PodNetwork>
Source§async fn build<W: NetworkWallet<PodNetwork>>(
self,
wallet: &W,
) -> Result<<PodNetwork as Network>::TxEnvelope, TransactionBuilderError<PodNetwork>>
async fn build<W: NetworkWallet<PodNetwork>>( self, wallet: &W, ) -> Result<<PodNetwork as Network>::TxEnvelope, TransactionBuilderError<PodNetwork>>
Source§fn with_chain_id(self, chain_id: u64) -> Self
fn with_chain_id(self, chain_id: u64) -> Self
Source§fn with_nonce(self, nonce: u64) -> Self
fn with_nonce(self, nonce: u64) -> Self
Source§fn with_input<T>(self, input: T) -> Self
fn with_input<T>(self, input: T) -> Self
Source§fn with_kind(self, kind: TxKind) -> Self
fn with_kind(self, kind: TxKind) -> Self
Source§fn set_create(&mut self)
fn set_create(&mut self)
to field to a create call.Source§fn into_create(self) -> Self
fn into_create(self) -> Self
to field to a create call.Source§fn set_deploy_code<T>(&mut self, code: T)
fn set_deploy_code<T>(&mut self, code: T)
to field to TxKind::Create.Source§fn with_deploy_code<T>(self, code: T) -> Self
fn with_deploy_code<T>(self, code: T) -> Self
to field to TxKind::Create.Source§fn set_call<T>(&mut self, t: &T)where
T: SolCall,
fn set_call<T>(&mut self, t: &T)where
T: SolCall,
to field
if it is set to TxKind::Create.Source§fn calculate_create_address(&self) -> Option<Address>
fn calculate_create_address(&self) -> Option<Address>
Source§fn with_value(self, value: Uint<256, 4>) -> Self
fn with_value(self, value: Uint<256, 4>) -> Self
Source§fn with_gas_price(self, gas_price: u128) -> Self
fn with_gas_price(self, gas_price: u128) -> Self
Source§fn with_max_fee_per_gas(self, max_fee_per_gas: u128) -> Self
fn with_max_fee_per_gas(self, max_fee_per_gas: u128) -> Self
Source§fn with_max_priority_fee_per_gas(self, max_priority_fee_per_gas: u128) -> Self
fn with_max_priority_fee_per_gas(self, max_priority_fee_per_gas: u128) -> Self
Source§fn with_gas_limit(self, gas_limit: u64) -> Self
fn with_gas_limit(self, gas_limit: u64) -> Self
Source§fn with_access_list(self, access_list: AccessList) -> Self
fn with_access_list(self, access_list: AccessList) -> Self
Source§fn complete_preferred(&self) -> Result<(), Vec<&'static str>>
fn complete_preferred(&self) -> Result<(), Vec<&'static str>>
Source§fn assert_preferred(&self, ty: <N as Network>::TxType)
fn assert_preferred(&self, ty: <N as Network>::TxType)
dbg_assert_eq! to check the builder status, and will have no affect
in release builds.Source§fn assert_preferred_chained(self, ty: <N as Network>::TxType) -> Self
fn assert_preferred_chained(self, ty: <N as Network>::TxType) -> Self
dbg_assert_eq! to check the builder status, and will have no affect
in release builds.Auto Trait Implementations§
impl !Freeze for PodTransactionRequest
impl RefUnwindSafe for PodTransactionRequest
impl Send for PodTransactionRequest
impl Sync for PodTransactionRequest
impl Unpin for PodTransactionRequest
impl UnwindSafe for PodTransactionRequest
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> 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> 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