# Struct ethcore::transaction::Transaction [−] [src]

    pub struct Transaction {
        pub nonce: U256,
        pub gas_price: U256,
        pub gas: U256,
        pub action: Action,
        pub value: U256,
        pub data: Bytes,
    }

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: Bytes`

Transaction data.

## Methods

### `impl Transaction`
[src]

#### `fn rlp_append_unsigned_transaction(&self,
s: &mut RlpStream,
network_id: Option<u64>)`

Append object with a without signature into RLP stream

### `impl Transaction`
[src]

#### `fn hash(&self, network_id: Option<u64>) -> H256`

The message hash of the transaction.

#### `fn sign(self, secret: &Secret, network_id: Option<u64>) -> SignedTransaction`

Signs the transaction as coming from `sender`.

#### `fn with_signature(self,
sig: Signature,
network_id: Option<u64>)
-> UnverifiedTransaction`

Signs the transaction with signature.

#### `fn fake_sign(self, from: Address) -> SignedTransaction`

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

#### `fn gas_required_for(is_create: bool, data: &[u8], schedule: &Schedule) -> u64`

Get the transaction cost in gas for the given params.

#### `fn gas_required(&self, schedule: &Schedule) -> u64`

Get the transaction cost in gas for this transaction.

## Trait Implementations

### `impl Default for Transaction`
[src]

#### `fn default() -> Transaction`

Returns the "default value" for a type. Read more

### `impl Debug for Transaction`
[src]

#### `fn fmt(&self, __arg_0: &mut Formatter) -> Result`

Formats the value using the given formatter.

### `impl Clone for Transaction`
[src]

#### `fn clone(&self) -> Transaction`

Returns a copy of the value. Read more

#### `fn clone_from(&mut self, source: &Self)`
1.0.0

Performs copy-assignment from `source`. Read more

### `impl PartialEq for Transaction`
[src]

#### `fn eq(&self, __arg_0: &Transaction) -> bool`

This method tests for `self` and `other` values to be equal, and is used by `==`. Read more

#### `fn ne(&self, __arg_0: &Transaction) -> bool`

This method tests for `!=`.

### `impl Eq for Transaction`
[src]

### `impl HeapSizeOf for Transaction`
[src]

#### `fn heap_size_of_children(&self) -> usize`

Measure the size of any heap-allocated structures that hang off this value, but not the space taken up by the value itself (i.e. what size_of::<T> measures, more or less); that space is handled by the implementation of HeapSizeOf for Box<T> below. Read more

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result
+
  Collapse/expand all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)