Struct cfx_rpc_eth_types::TransactionRequest
source · pub struct TransactionRequest {
pub from: Option<H160>,
pub to: Option<H160>,
pub gas_price: Option<U256>,
pub max_fee_per_gas: Option<U256>,
pub max_priority_fee_per_gas: Option<U256>,
pub gas: Option<U256>,
pub value: Option<U256>,
pub input: TransactionInput,
pub nonce: Option<U256>,
pub access_list: Option<AccessList>,
pub transaction_type: Option<U64>,
pub chain_id: Option<U256>,
}
Expand description
Call request
Fields§
§from: Option<H160>
From
to: Option<H160>
To
gas_price: Option<U256>
Gas Price
max_fee_per_gas: Option<U256>
Max fee per gas
max_priority_fee_per_gas: Option<U256>
§gas: Option<U256>
Gas
value: Option<U256>
Value
input: TransactionInput
§nonce: Option<U256>
Nonce
access_list: Option<AccessList>
Access list
transaction_type: Option<U64>
§chain_id: Option<U256>
Implementations§
source§impl TransactionRequest
impl TransactionRequest
pub fn unset_zero_gas_and_price(&mut self)
pub fn transaction_type(&self) -> u8
pub fn has_gas_price(&self) -> bool
pub fn sign_call( self, chain_id: u32, max_gas: Option<U256> ) -> Result<SignedTransaction, Error>
Trait Implementations§
source§impl Debug for TransactionRequest
impl Debug for TransactionRequest
source§impl Default for TransactionRequest
impl Default for TransactionRequest
source§fn default() -> TransactionRequest
fn default() -> TransactionRequest
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for TransactionRequest
impl<'de> Deserialize<'de> for TransactionRequest
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for TransactionRequest
impl PartialEq for TransactionRequest
source§fn eq(&self, other: &TransactionRequest) -> bool
fn eq(&self, other: &TransactionRequest) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for TransactionRequest
Auto Trait Implementations§
impl RefUnwindSafe for TransactionRequest
impl Send for TransactionRequest
impl Sync for TransactionRequest
impl Unpin for TransactionRequest
impl UnwindSafe for TransactionRequest
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