Struct ethcore::account_provider::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 Transactionpub 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 Transactionpub fn hash(&self, chain_id: Option<u64>) -> H256[src]
pub fn hash(&self, chain_id: Option<u64>) -> H256The 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>) -> SignedTransactionSigns 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>
) -> UnverifiedTransactionSigns the transaction with signature.
pub fn fake_sign(self, from: H160) -> SignedTransaction[src]
pub fn fake_sign(self, from: H160) -> SignedTransactionSpecify 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) -> SignedTransactionAdd 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
) -> u64Get 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) -> u64Get the transaction cost in gas for this transaction.
Trait Implementations
impl Default for Transaction[src]
impl Default for Transactionfn default() -> Transaction[src]
fn default() -> TransactionReturns the "default value" for a type. Read more
impl HeapSizeOf for Transaction[src]
impl HeapSizeOf for Transactionfn heap_size_of_children(&self) -> usize[src]
fn heap_size_of_children(&self) -> usizeMeasure 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
impl Eq for Transaction[src]
impl Eq for Transactionimpl PartialEq<Transaction> for Transaction[src]
impl PartialEq<Transaction> for Transactionfn eq(&self, other: &Transaction) -> bool[src]
fn eq(&self, other: &Transaction) -> boolThis 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) -> boolThis method tests for !=.
impl Clone for Transaction[src]
impl Clone for Transactionfn clone(&self) -> Transaction[src]
fn clone(&self) -> TransactionReturns 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 Debug for Transaction[src]
impl Debug for TransactionAuto Trait Implementations
impl Send for Transaction
impl Send for Transactionimpl Sync for Transaction
impl Sync for Transaction