Struct common_types::transaction::Transaction[][src]

pub struct Transaction {
    pub nonce: U256,
    pub gas_price: U256,
    pub gas: U256,
    pub action: Action,
    pub value: U256,
    pub data: Vec<u8>,
}

A set of information describing an externally-originating message call or contract creation operation.

Fields

nonce: U256

Nonce.

gas_price: U256

Gas price.

gas: U256

Gas paid up front for transaction execution.

action: Action

Action, can be either call or contract create.

value: U256

Transfered value.

data: Vec<u8>

Transaction data.

Implementations

impl Transaction[src]

pub fn rlp_append_unsigned_transaction(
    &self,
    s: &mut RlpStream,
    chain_id: Option<u64>
)
[src]

Append object with a without signature into RLP stream

impl Transaction[src]

pub fn hash(&self, chain_id: Option<u64>) -> H256[src]

The message hash of the transaction.

pub fn sign(self, secret: &Secret, chain_id: Option<u64>) -> SignedTransaction[src]

Signs the transaction as coming from sender.

pub fn with_signature(
    self,
    sig: Signature,
    chain_id: Option<u64>
) -> UnverifiedTransaction
[src]

Signs the transaction with signature.

pub fn fake_sign(self, from: Address) -> SignedTransaction[src]

Specify the sender; this won’t survive the serialize/deserialize process, but can be cloned.

Trait Implementations

impl Clone for Transaction[src]

impl Debug for Transaction[src]

impl Default for Transaction[src]

impl Eq for Transaction[src]

impl MallocSizeOf for Transaction[src]

impl PartialEq<Transaction> for Transaction[src]

impl StructuralEq for Transaction[src]

impl StructuralPartialEq for Transaction[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

impl<T> MallocSizeOfExt for T where
    T: MallocSizeOf
[src]

impl<T> MaybeDebug for T where
    T: Debug

impl<T> MaybeDebug for T where
    T: Debug

impl<T> Same<T> for T

type Output = T

Should always be Self

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,