[−][src]Struct clarity::transaction::Transaction
Transaction as explained in the Ethereum Yellow paper section 4.2
Fields
nonce: Uint256
gas_price: Uint256
gas_limit: Uint256
to: Address
value: Uint256
data: Vec<u8>
signature: Option<Signature>
Methods
impl Transaction
[src]
impl Transaction
pub fn is_valid(&self) -> bool
[src]
pub fn is_valid(&self) -> bool
pub fn intrinsic_gas_used(&self) -> Uint256
[src]
pub fn intrinsic_gas_used(&self) -> Uint256
pub fn sign(&self, key: &PrivateKey, network_id: Option<u64>) -> Transaction
[src]
pub fn sign(&self, key: &PrivateKey, network_id: Option<u64>) -> Transaction
Creates a Transaction with new
pub fn sender(&self) -> Result<Address, Error>
[src]
pub fn sender(&self) -> Result<Address, Error>
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]
pub fn hash(&self) -> Vec<u8>
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]
pub fn to_bytes(&self) -> Result<Vec<u8>, Error>
Creates a byte representation of this transaction
Trait Implementations
impl Clone for Transaction
[src]
impl Clone for Transaction
fn clone(&self) -> Transaction
[src]
fn clone(&self) -> Transaction
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl PartialEq<Transaction> for Transaction
[src]
impl PartialEq<Transaction> for Transaction
fn eq(&self, other: &Transaction) -> bool
[src]
fn eq(&self, other: &Transaction) -> bool
fn ne(&self, other: &Transaction) -> bool
[src]
fn ne(&self, other: &Transaction) -> bool
impl Debug for Transaction
[src]
impl Debug for Transaction
impl Serialize for Transaction
[src]
impl Serialize for Transaction
Auto Trait Implementations
impl Send for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Sync for Transaction
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
impl<T> Same for T
impl<T> Same for T
type Output = T
Should always be Self