Struct hyperfuel_format::Receipt

source ·
pub struct Receipt {
Show 31 fields pub receipt_index: UInt, pub root_contract_id: Option<FixedSizeData<32>>, pub tx_id: Hash, pub block_height: UInt, pub pc: Option<UInt>, pub is: Option<UInt>, pub to: Option<FixedSizeData<32>>, pub to_address: Option<Address>, pub amount: Option<UInt>, pub asset_id: Option<Hash>, pub gas: Option<UInt>, pub param1: Option<UInt>, pub param2: Option<UInt>, pub val: Option<UInt>, pub ptr: Option<UInt>, pub digest: Option<Hash>, pub reason: Option<UInt>, pub ra: Option<UInt>, pub rb: Option<UInt>, pub rc: Option<UInt>, pub rd: Option<UInt>, pub len: Option<UInt>, pub receipt_type: ReceiptType, pub result: Option<UInt>, pub gas_used: Option<UInt>, pub data: Option<Data>, pub sender: Option<Address>, pub recipient: Option<Address>, pub nonce: Option<Quantity>, pub contract_id: Option<FixedSizeData<32>>, pub sub_id: Option<Hash>,
}
Expand description

An object representing all possible types of receipts.

Fields§

§receipt_index: UInt

Index of the receipt in the block

§root_contract_id: Option<FixedSizeData<32>>

Contract that produced the receipt

§tx_id: Hash

transaction that this receipt originated from

§block_height: UInt

block that the receipt originated in

§pc: Option<UInt>

The value of the program counter register $pc, which is the memory address of the current instruction.

§is: Option<UInt>

The value of register $is, which is the pointer to the start of the currently-executing code.

§to: Option<FixedSizeData<32>>

The recipient contract

§to_address: Option<Address>

The recipient address

§amount: Option<UInt>

The amount of coins transferred.

§asset_id: Option<Hash>

The asset id of the coins transferred.

§gas: Option<UInt>

The gas used for the transaction.

§param1: Option<UInt>

The first parameter for a CALL receipt type, holds the function selector.

§param2: Option<UInt>

The second parameter for a CALL receipt type, typically used for the user-specified input to the ABI function being selected.

§val: Option<UInt>

The value of registers at the end of execution, used for debugging.

§ptr: Option<UInt>

The value of the pointer register, used for debugging.

§digest: Option<Hash>

A 32-byte hash of MEM[$rC, $rD]. The syntax MEM[x, y] means the memory range starting at byte x, of length y bytes.

§reason: Option<UInt>

The decimal string representation of an 8-bit unsigned integer for the panic reason. Only returned if the receipt type is PANIC.

§ra: Option<UInt>

The value of register $rA.

§rb: Option<UInt>

The value of register $rB.

§rc: Option<UInt>

The value of register $rC.

§rd: Option<UInt>

The value of register $rD.

§len: Option<UInt>

The length of the receipt.

§receipt_type: ReceiptType

The type of receipt.

§result: Option<UInt>

0 if script exited successfully, any otherwise.

§gas_used: Option<UInt>

The amount of gas consumed by the script.

§data: Option<Data>

The receipt data.

§sender: Option<Address>

The address of the message sender.

§recipient: Option<Address>

The address of the message recipient.

§nonce: Option<Quantity>

The nonce value for a message.

§contract_id: Option<FixedSizeData<32>>

Current context if in an internal context. null otherwise

§sub_id: Option<Hash>

The sub id.

Trait Implementations§

source§

impl Clone for Receipt

source§

fn clone(&self) -> Receipt

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 Receipt

source§

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

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

impl Default for Receipt

source§

fn default() -> Receipt

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

impl<'de> Deserialize<'de> for Receipt

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 Receipt

source§

fn eq(&self, other: &Receipt) -> 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 Receipt

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 Receipt

source§

impl StructuralPartialEq for Receipt

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>,