[−][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 intrinsic_gas_used(&self) -> Uint256 | [src] |
pub fn sign(&self, key: &PrivateKey, network_id: Option<u64>) -> Transaction | [src] |
Creates a Transaction with new
pub fn sender(&self) -> Result<Address, Error> | [src] |
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] |
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] |
Creates a byte representation of this transaction
Trait Implementations
impl Eq for Transaction
[src]
impl Eq for Transaction
impl PartialEq<Transaction> for Transaction
[src]
impl PartialEq<Transaction> for Transaction
fn eq(&self, other: &Transaction) -> bool | [src] |
fn ne(&self, other: &Transaction) -> bool | [src] |
impl Clone for Transaction
[src]
impl Clone for Transaction
fn clone(&self) -> Transaction | [src] |
fn clone_from(&mut self, source: &Self) | 1.0.0 [src] |
Performs copy-assignment from source
. Read more
impl Debug for Transaction
[src]
impl Debug for Transaction
impl Display for Transaction
[src]
impl Display for Transaction
impl UpperHex for Transaction
[src]
impl UpperHex for Transaction
impl LowerHex for Transaction
[src]
impl LowerHex for Transaction
impl Hash for Transaction
[src]
impl Hash for Transaction
fn hash<__H: Hasher>(&self, state: &mut __H) | [src] |
fn hash_slice<H>(data: &[Self], state: &mut H) where | 1.3.0 [src] |
Feeds a slice of this type into the given [Hasher
]. Read more
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> ToString for T where
T: Display + ?Sized,
[src]
impl<T> ToString for T where
T: Display + ?Sized,
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] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
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] |
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] |
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] |
impl<T> Same for T
impl<T> Same for T
type Output = T
Should always be Self