pub struct EthereumTransaction<N: EthereumNetwork> {
pub sender: Option<EthereumAddress>,
pub parameters: EthereumTransactionParameters,
pub signature: Option<EthereumTransactionSignature>,
/* private fields */
}Expand description
Represents an Ethereum transaction
Fields§
§sender: Option<EthereumAddress>The address of the sender
parameters: EthereumTransactionParametersThe transaction parameters (gas, gas_price, nonce, data)
signature: Option<EthereumTransactionSignature>The transaction signature
Trait Implementations§
source§impl<N: Clone + EthereumNetwork> Clone for EthereumTransaction<N>
impl<N: Clone + EthereumNetwork> Clone for EthereumTransaction<N>
source§fn clone(&self) -> EthereumTransaction<N>
fn clone(&self) -> EthereumTransaction<N>
Returns a copy 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<N: Debug + EthereumNetwork> Debug for EthereumTransaction<N>
impl<N: Debug + EthereumNetwork> Debug for EthereumTransaction<N>
source§impl<N: EthereumNetwork> Display for EthereumTransaction<N>
impl<N: EthereumNetwork> Display for EthereumTransaction<N>
source§impl<N: EthereumNetwork> FromStr for EthereumTransaction<N>
impl<N: EthereumNetwork> FromStr for EthereumTransaction<N>
source§impl<N: Hash + EthereumNetwork> Hash for EthereumTransaction<N>
impl<N: Hash + EthereumNetwork> Hash for EthereumTransaction<N>
source§impl<N: PartialEq + EthereumNetwork> PartialEq for EthereumTransaction<N>
impl<N: PartialEq + EthereumNetwork> PartialEq for EthereumTransaction<N>
source§fn eq(&self, other: &EthereumTransaction<N>) -> bool
fn eq(&self, other: &EthereumTransaction<N>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<N: EthereumNetwork> Transaction for EthereumTransaction<N>
impl<N: EthereumNetwork> Transaction for EthereumTransaction<N>
source§fn new(
parameters: &Self::TransactionParameters,
) -> Result<Self, TransactionError>
fn new( parameters: &Self::TransactionParameters, ) -> Result<Self, TransactionError>
Returns an unsigned transaction given the transaction parameters.
source§fn sign(&mut self, rs: Vec<u8>, recid: u8) -> Result<Vec<u8>, TransactionError>
fn sign(&mut self, rs: Vec<u8>, recid: u8) -> Result<Vec<u8>, TransactionError>
Returns a signed transaction given the {r,s,recid}.
source§fn from_bytes(transaction: &[u8]) -> Result<Self, TransactionError>
fn from_bytes(transaction: &[u8]) -> Result<Self, TransactionError>
Returns a transaction given the transaction bytes. https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md
source§fn to_bytes(&self) -> Result<Vec<u8>, TransactionError>
fn to_bytes(&self) -> Result<Vec<u8>, TransactionError>
Returns the transaction in bytes. https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md
source§fn to_transaction_id(&self) -> Result<Self::TransactionId, TransactionError>
fn to_transaction_id(&self) -> Result<Self::TransactionId, TransactionError>
Returns the hash of the signed transaction, if the signature is present. Otherwise, returns the hash of the raw transaction.
type Address = EthereumAddress
type Format = EthereumFormat
type PublicKey = EthereumPublicKey
type TransactionId = EthereumTransactionId
type TransactionParameters = EthereumTransactionParameters
impl<N: Eq + EthereumNetwork> Eq for EthereumTransaction<N>
impl<N: EthereumNetwork> StructuralPartialEq for EthereumTransaction<N>
Auto Trait Implementations§
impl<N> Freeze for EthereumTransaction<N>
impl<N> RefUnwindSafe for EthereumTransaction<N>where
N: RefUnwindSafe,
impl<N> Send for EthereumTransaction<N>
impl<N> Sync for EthereumTransaction<N>
impl<N> Unpin for EthereumTransaction<N>where
N: Unpin,
impl<N> UnwindSafe for EthereumTransaction<N>where
N: UnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)