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: 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.
Methods
impl Transaction
[src]
impl Transaction
pub fn rlp_append_unsigned_transaction(
&self,
s: &mut RlpStream,
chain_id: Option<u64>
)
[src]
pub fn rlp_append_unsigned_transaction(
&self,
s: &mut RlpStream,
chain_id: Option<u64>
)
Append object with a without signature into RLP stream
impl Transaction
[src]
impl Transaction
pub fn hash(&self, chain_id: Option<u64>) -> H256
[src]
pub fn hash(&self, chain_id: Option<u64>) -> H256
The message hash of the transaction.
pub fn sign(self, secret: &Secret, chain_id: Option<u64>) -> SignedTransaction
[src]
pub fn sign(self, secret: &Secret, chain_id: Option<u64>) -> SignedTransaction
Signs the transaction as coming from sender
.
pub fn with_signature(
self,
sig: Signature,
chain_id: Option<u64>
) -> UnverifiedTransaction
[src]
pub fn with_signature(
self,
sig: Signature,
chain_id: Option<u64>
) -> UnverifiedTransaction
Signs the transaction with signature.
pub fn fake_sign(self, from: Address) -> SignedTransaction
[src]
pub fn fake_sign(self, from: Address) -> SignedTransaction
Specify the sender; this won't survive the serialize/deserialize process, but can be cloned.
pub fn null_sign(self, chain_id: u64) -> SignedTransaction
[src]
pub fn null_sign(self, chain_id: u64) -> SignedTransaction
Add EIP-86 compatible empty signature.
pub fn gas_required_for(
is_create: bool,
data: &[u8],
schedule: &Schedule
) -> u64
[src]
pub fn gas_required_for(
is_create: bool,
data: &[u8],
schedule: &Schedule
) -> u64
Get the transaction cost in gas for the given params.
pub fn gas_required(&self, schedule: &Schedule) -> u64
[src]
pub fn gas_required(&self, schedule: &Schedule) -> u64
Get the transaction cost in gas for this transaction.
Trait Implementations
impl Default for Transaction
[src]
impl Default for Transaction
fn default() -> Transaction
[src]
fn default() -> Transaction
Returns the "default value" for a type. Read more
impl Debug for Transaction
[src]
impl Debug for Transaction
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Transaction
[src]
impl Clone for Transaction
fn clone(&self) -> Transaction
[src]
fn clone(&self) -> Transaction
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for Transaction
[src]
impl PartialEq for Transaction
fn eq(&self, other: &Transaction) -> bool
[src]
fn eq(&self, other: &Transaction) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Transaction) -> bool
[src]
fn ne(&self, other: &Transaction) -> bool
This method tests for !=
.
impl Eq for Transaction
[src]
impl Eq for Transaction
impl HeapSizeOf for Transaction
[src]
impl HeapSizeOf for Transaction
fn heap_size_of_children(&self) -> usize
[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:: measures, more or less); that space is handled by the implementation of HeapSizeOf for Box below. Read more
Auto Trait Implementations
impl Send for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Sync for Transaction