pub struct ArbTransaction(pub TxEnv);Expand description
Helper for building Arbitrum-specific TxEnv values.
Handles Arbitrum-specific conversion rules:
- Internal/Deposit txs get 1M gas if zero, gas_price=0
- SubmitRetryable txs use gas_price=0 (no coinbase tips)
- Retry txs preserve value for ETH transfers
Tuple Fields§
§0: TxEnvImplementations§
Source§impl ArbTransaction
impl ArbTransaction
Sourcepub fn from_parts(
sender: Address,
tx_type: ArbTxType,
gas_limit: u64,
gas_price: u128,
value: U256,
to: TxKind,
data: Bytes,
nonce: u64,
chain_id: Option<u64>,
) -> Self
pub fn from_parts( sender: Address, tx_type: ArbTxType, gas_limit: u64, gas_price: u128, value: U256, to: TxKind, data: Bytes, nonce: u64, chain_id: Option<u64>, ) -> Self
Create an ArbTransaction from the raw components of an Arbitrum tx.
Sourcepub fn into_inner(self) -> TxEnv
pub fn into_inner(self) -> TxEnv
Unwrap into the inner TxEnv.
Trait Implementations§
Source§impl ArbTransactionEnv for ArbTransaction
impl ArbTransactionEnv for ArbTransaction
Source§fn set_gas_price(&mut self, gas_price: u128)
fn set_gas_price(&mut self, gas_price: u128)
Set the effective gas price (max_fee_per_gas for EIP-1559, gas_price for legacy).
Source§fn set_gas_priority_fee(&mut self, fee: Option<u128>)
fn set_gas_priority_fee(&mut self, fee: Option<u128>)
Set the max priority fee per gas (tip cap).
Source§impl Clone for ArbTransaction
impl Clone for ArbTransaction
Source§fn clone(&self) -> ArbTransaction
fn clone(&self) -> ArbTransaction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ArbTransaction
impl Debug for ArbTransaction
Source§impl Default for ArbTransaction
impl Default for ArbTransaction
Source§fn default() -> ArbTransaction
fn default() -> ArbTransaction
Returns the “default value” for a type. Read more
Source§impl From<ArbTransaction> for TxEnv
impl From<ArbTransaction> for TxEnv
Source§fn from(arb_tx: ArbTransaction) -> Self
fn from(arb_tx: ArbTransaction) -> Self
Converts to this type from the input type.
Source§impl FromRecoveredTx<ArbTransactionSigned> for ArbTransaction
impl FromRecoveredTx<ArbTransactionSigned> for ArbTransaction
Source§fn from_recovered_tx(tx: &ArbTransactionSigned, sender: Address) -> Self
fn from_recovered_tx(tx: &ArbTransactionSigned, sender: Address) -> Self
Builds a [
TxEnv] from a transaction and a sender address.Source§impl FromRecoveredTx<EthereumTxEnvelope<TxEip4844>> for ArbTransaction
impl FromRecoveredTx<EthereumTxEnvelope<TxEip4844>> for ArbTransaction
Source§fn from_recovered_tx(tx: &TransactionSigned, sender: Address) -> Self
fn from_recovered_tx(tx: &TransactionSigned, sender: Address) -> Self
Builds a [
TxEnv] from a transaction and a sender address.Source§impl FromTxWithEncoded<ArbTransactionSigned> for ArbTransaction
impl FromTxWithEncoded<ArbTransactionSigned> for ArbTransaction
Source§fn from_encoded_tx(
tx: &ArbTransactionSigned,
sender: Address,
_encoded: Bytes,
) -> Self
fn from_encoded_tx( tx: &ArbTransactionSigned, sender: Address, _encoded: Bytes, ) -> Self
Builds a [
TxEnv] from a transaction, its sender, and encoded transaction bytes.Source§impl FromTxWithEncoded<EthereumTxEnvelope<TxEip4844>> for ArbTransaction
impl FromTxWithEncoded<EthereumTxEnvelope<TxEip4844>> for ArbTransaction
Source§fn from_encoded_tx(
tx: &TransactionSigned,
sender: Address,
encoded: Bytes,
) -> Self
fn from_encoded_tx( tx: &TransactionSigned, sender: Address, encoded: Bytes, ) -> Self
Builds a [
TxEnv] from a transaction, its sender, and encoded transaction bytes.Source§impl IntoTxEnv<ArbTransaction> for ArbTransaction
impl IntoTxEnv<ArbTransaction> for ArbTransaction
Source§fn into_tx_env(self) -> ArbTransaction
fn into_tx_env(self) -> ArbTransaction
Converts
self into [TxEnv].Source§impl PartialEq for ArbTransaction
impl PartialEq for ArbTransaction
Source§impl Transaction for ArbTransaction
impl Transaction for ArbTransaction
Source§type AccessListItem<'a> = <TxEnv as Transaction>::AccessListItem<'a>
where
Self: 'a
type AccessListItem<'a> = <TxEnv as Transaction>::AccessListItem<'a> where Self: 'a
EIP-2930 Access list item type.
Source§type Authorization<'a> = <TxEnv as Transaction>::Authorization<'a>
where
Self: 'a
type Authorization<'a> = <TxEnv as Transaction>::Authorization<'a> where Self: 'a
EIP-7702 Authorization type.
Source§fn gas_price(&self) -> u128
fn gas_price(&self) -> u128
Gas price for the transaction.
It is only applicable for Legacy and EIP-2930 transactions.
For Eip1559 it is max_fee_per_gas.
Source§fn access_list(&self) -> Option<impl Iterator<Item = Self::AccessListItem<'_>>>
fn access_list(&self) -> Option<impl Iterator<Item = Self::AccessListItem<'_>>>
Access list for the transaction. Read more
Source§fn blob_versioned_hashes(&self) -> &[B256] ⓘ
fn blob_versioned_hashes(&self) -> &[B256] ⓘ
Returns vector of fixed size hash(32 bytes) Read more
Source§fn max_fee_per_blob_gas(&self) -> u128
fn max_fee_per_blob_gas(&self) -> u128
Max fee per data gas Read more
Returns length of the authorization list. Read more
List of authorizations, that contains the signature that authorizes this
caller to place the code to signer account. Read more
Source§fn max_priority_fee_per_gas(&self) -> Option<u128>
fn max_priority_fee_per_gas(&self) -> Option<u128>
Maximum priority fee per gas.
§fn total_blob_gas(&self) -> u64
fn total_blob_gas(&self) -> u64
Total gas for all blobs. Max number of blocks is already checked
so we dont need to check for overflow.
§fn calc_max_data_fee(&self) -> Uint<256, 4>
fn calc_max_data_fee(&self) -> Uint<256, 4>
Calculates the maximum [EIP-4844]
data_fee of the transaction. Read more§fn max_fee_per_gas(&self) -> u128
fn max_fee_per_gas(&self) -> u128
Returns maximum fee that can be paid for the transaction.
§fn effective_gas_price(&self, base_fee: u128) -> u128
fn effective_gas_price(&self, base_fee: u128) -> u128
Returns effective gas price is gas price field for Legacy and Eip2930 transaction. Read more
§fn max_balance_spending(&self) -> Result<Uint<256, 4>, InvalidTransaction>
fn max_balance_spending(&self) -> Result<Uint<256, 4>, InvalidTransaction>
Returns the maximum balance that can be spent by the transaction. Read more
§fn ensure_enough_balance(
&self,
balance: Uint<256, 4>,
) -> Result<(), InvalidTransaction>
fn ensure_enough_balance( &self, balance: Uint<256, 4>, ) -> Result<(), InvalidTransaction>
Checks if the caller has enough balance to cover the maximum balance spending of this transaction. Read more
Source§impl TransactionEnv for ArbTransaction
impl TransactionEnv for ArbTransaction
Source§fn set_gas_limit(&mut self, gas_limit: u64)
fn set_gas_limit(&mut self, gas_limit: u64)
Set the gas limit.
Source§fn set_access_list(&mut self, access_list: AccessList)
fn set_access_list(&mut self, access_list: AccessList)
Set access list.
§fn with_gas_limit(self, gas_limit: u64) -> Self
fn with_gas_limit(self, gas_limit: u64) -> Self
Set the gas limit.
§fn with_nonce(self, nonce: u64) -> Self
fn with_nonce(self, nonce: u64) -> Self
Sets the nonce.
§fn with_access_list(self, access_list: AccessList) -> Self
fn with_access_list(self, access_list: AccessList) -> Self
Set access list.
impl Eq for ArbTransaction
impl StructuralPartialEq for ArbTransaction
Auto Trait Implementations§
impl !Freeze for ArbTransaction
impl RefUnwindSafe for ArbTransaction
impl Send for ArbTransaction
impl Sync for ArbTransaction
impl Unpin for ArbTransaction
impl UnwindSafe for ArbTransaction
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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,
§impl<T> Conv for T
impl<T> Conv for T
§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
§fn deserialize(
&self,
deserializer: &mut D,
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
Causes
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
Causes
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
Causes
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
Causes
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
Causes
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
Causes
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
Causes
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
Causes
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
Formats each item in a sequence. Read more
§impl<TxEnv, T> FromRecoveredTx<&T> for TxEnvwhere
TxEnv: FromRecoveredTx<T>,
impl<TxEnv, T> FromRecoveredTx<&T> for TxEnvwhere
TxEnv: FromRecoveredTx<T>,
§fn from_recovered_tx(tx: &&T, sender: Address) -> TxEnv
fn from_recovered_tx(tx: &&T, sender: Address) -> TxEnv
Builds a [
TxEnv] from a transaction and a sender address.§impl<TxEnv, T> FromTxWithEncoded<&T> for TxEnvwhere
TxEnv: FromTxWithEncoded<T>,
impl<TxEnv, T> FromTxWithEncoded<&T> for TxEnvwhere
TxEnv: FromTxWithEncoded<T>,
§fn from_encoded_tx(tx: &&T, sender: Address, encoded: Bytes) -> TxEnv
fn from_encoded_tx(tx: &&T, sender: Address, encoded: Bytes) -> TxEnv
Builds a [
TxEnv] from a transaction, its sender, and encoded transaction bytes.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self, then passes self.deref() into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref() only in debug builds, and is erased in release
builds.§impl<T> TryConv for T
impl<T> TryConv for T
§impl<T> Upcastable for T
impl<T> Upcastable for T
§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref
§fn upcast_any_box(self: Box<T>) -> Box<dyn Any>
fn upcast_any_box(self: Box<T>) -> Box<dyn Any>
upcast boxed dyn