Struct hyperfuel_format::Transaction

source ·
pub struct Transaction {
Show 41 fields pub block_height: UInt, pub id: Hash, pub input_asset_ids: Option<Vec<Hash>>, pub input_contracts: Option<Vec<FixedSizeData<32>>>, pub input_contract_utxo_id: Option<Hash>, pub input_contract_balance_root: Option<Hash>, pub input_contract_state_root: Option<Hash>, pub input_contract_tx_pointer_block_height: Option<UInt>, pub input_contract_tx_pointer_tx_index: Option<UInt>, pub input_contract: Option<FixedSizeData<32>>, pub policies_tip: Option<UInt>, pub policies_witness_limit: Option<UInt>, pub policies_maturity: Option<UInt>, pub policies_max_fee: Option<UInt>, pub script_gas_limit: Option<UInt>, pub maturity: Option<UInt>, pub mint_amount: Option<UInt>, pub mint_asset_id: Option<Hash>, pub mint_gas_price: Option<UInt>, pub tx_pointer_block_height: Option<UInt>, pub tx_pointer_tx_index: Option<UInt>, pub tx_type: TransactionType, pub output_contract_input_index: Option<UInt>, pub output_contract_balance_root: Option<Hash>, pub output_contract_state_root: Option<Hash>, pub witnesses: Option<Data>, pub receipts_root: Option<Hash>, pub status: TransactionStatus, pub time: UInt, pub reason: Option<String>, pub script: Option<Data>, pub script_data: Option<Data>, pub bytecode_witness_index: Option<UInt>, pub bytecode_root: Option<Hash>, pub subsection_index: Option<UInt>, pub subsections_number: Option<UInt>, pub proof_set: Option<Data>, pub consensus_parameters_upgrade_purpose_witness_index: Option<UInt>, pub consensus_parameters_upgrade_purpose_checksum: Option<Data>, pub state_transition_upgrade_purpose_root: Option<Hash>, pub salt: Option<Data>,
}
Expand description

An object containing information about a transaction.

Fields§

§block_height: UInt

block the transaction is in.

§id: Hash

A unique transaction id.

§input_asset_ids: Option<Vec<Hash>>

An array of asset ids used for the transaction inputs.

§input_contracts: Option<Vec<FixedSizeData<32>>>

An array of contracts used for the transaction inputs.

§input_contract_utxo_id: Option<Hash>

A contract used for the transaction input. A unique 32 byte identifier for the UTXO for a contract used for the transaction input.

§input_contract_balance_root: Option<Hash>

The root of amount of coins owned by contract before transaction execution for a contract used for the transaction input.

§input_contract_state_root: Option<Hash>

The state root of contract before transaction execution for a contract used for the transaction input.

§input_contract_tx_pointer_block_height: Option<UInt>

A pointer to the TX whose output is being spent for a contract used for the transaction input.

§input_contract_tx_pointer_tx_index: Option<UInt>

A pointer to the TX whose output is being spent for a contract used for the transaction input.

§input_contract: Option<FixedSizeData<32>>

The contract id for a contract used for the transaction input.

§policies_tip: Option<UInt>§policies_witness_limit: Option<UInt>§policies_maturity: Option<UInt>§policies_max_fee: Option<UInt>§script_gas_limit: Option<UInt>

The gas limit for the script.

§maturity: Option<UInt>

The minimum block height that the transaction can be included at.

§mint_amount: Option<UInt>

The amount minted in the transaction.

§mint_asset_id: Option<Hash>

The asset ID for coins minted in the transaction.

§mint_gas_price: Option<UInt>§tx_pointer_block_height: Option<UInt>

The location of the transaction in the block.

§tx_pointer_tx_index: Option<UInt>§tx_type: TransactionType

Script, creating a new contract, or minting new coins

§output_contract_input_index: Option<UInt>

The index of the input from a transaction that changed the state of a contract.

§output_contract_balance_root: Option<Hash>

The root of amount of coins owned by contract after transaction execution from a transaction that changed the state of a contract.

§output_contract_state_root: Option<Hash>

The state root of contract after transaction execution from a transaction that changed the state of a contract.

§witnesses: Option<Data>

An array of witnesses.

§receipts_root: Option<Hash>

The root of the receipts.

§status: TransactionStatus

The status type of the transaction.

§time: UInt

for SubmittedStatus, SuccessStatus, and FailureStatus, the time a transaction was submitted, successful, or failed

§reason: Option<String>

for SuccessStatus, the state of the program execution for SqueezedOutStatus & FailureStatus, the reason the transaction was squeezed out or failed

§script: Option<Data>

The script to execute.

§script_data: Option<Data>

The script input parameters.

§bytecode_witness_index: Option<UInt>

The witness index of contract bytecode.

§bytecode_root: Option<Hash>§subsection_index: Option<UInt>§subsections_number: Option<UInt>§proof_set: Option<Data>§consensus_parameters_upgrade_purpose_witness_index: Option<UInt>§consensus_parameters_upgrade_purpose_checksum: Option<Data>§state_transition_upgrade_purpose_root: Option<Hash>§salt: Option<Data>

The salt value for the transaction.

Trait Implementations§

source§

impl Clone for Transaction

source§

fn clone(&self) -> Transaction

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Transaction

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Transaction

source§

fn default() -> Transaction

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Transaction

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for Transaction

source§

fn eq(&self, other: &Transaction) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Transaction

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for Transaction

source§

impl StructuralPartialEq for Transaction

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,