[][src]Struct clarity::transaction::Transaction

pub struct Transaction {
    pub nonce: Uint256,
    pub gas_price: Uint256,
    pub gas_limit: Uint256,
    pub to: Address,
    pub value: Uint256,
    pub data: Vec<u8>,
    pub signature: Option<Signature>,
}

Transaction as explained in the Ethereum Yellow paper section 4.2

Fields

nonce: Uint256gas_price: Uint256gas_limit: Uint256to: Addressvalue: Uint256data: Vec<u8>signature: Option<Signature>

Methods

impl Transaction
[src]

pub fn is_valid(&self) -> bool
[src]

pub fn intrinsic_gas_used(&self) -> Uint256
[src]

pub fn sign(&self, key: &PrivateKey, network_id: Option<u64>) -> Transaction
[src]

Creates a Transaction with new

pub fn sender(&self) -> Result<Address, Error>
[src]

Get the sender's Address; derived from the signature field, null ETH address if the field is None.

pub fn hash(&self) -> Vec<u8>
[src]

Creates a hash of a transaction given all TX attributes including signature (VRS) whether it is present, or not.

pub fn to_bytes(&self) -> Result<Vec<u8>, Error>
[src]

Creates a byte representation of this transaction

Trait Implementations

impl Eq for Transaction
[src]

impl PartialEq<Transaction> for Transaction
[src]

impl Clone for Transaction
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Transaction
[src]

impl Display for Transaction
[src]

impl UpperHex for Transaction
[src]

impl LowerHex for Transaction
[src]

impl Hash for Transaction
[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Serialize for Transaction
[src]

Auto Trait Implementations

impl Send for Transaction

impl Sync for Transaction

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same for T

type Output = T

Should always be Self