Struct fuel_tx::CheckedTransaction
source · [−]pub struct CheckedTransaction { /* private fields */ }
Implementations
sourceimpl CheckedTransaction
impl CheckedTransaction
sourcepub fn check(
transaction: Transaction,
block_height: Word,
params: &ConsensusParameters
) -> Result<Self, ValidationError>
pub fn check(
transaction: Transaction,
block_height: Word,
params: &ConsensusParameters
) -> Result<Self, ValidationError>
Fully verify transaction, including signatures.
sourcepub fn check_unsigned(
transaction: Transaction,
block_height: Word,
params: &ConsensusParameters
) -> Result<Self, ValidationError>
pub fn check_unsigned(
transaction: Transaction,
block_height: Word,
params: &ConsensusParameters
) -> Result<Self, ValidationError>
Verify transaction, without signature checks.
pub const fn transaction(&self) -> &TransactionⓘNotable traits for Transactionimpl Read for Transactionimpl Write for Transaction
pub fn free_balances(&self) -> impl Iterator<Item = (&AssetId, &Word)>
pub const fn block_height(&self) -> Word
pub const fn max_fee(&self) -> Word
pub const fn min_fee(&self) -> Word
pub const fn checked_signatures(&self) -> bool
pub const fn metadata(&self) -> Option<&Metadata>
pub fn tx_bytes(&mut self) -> Vec<u8>
pub fn tx_output_to_mem(&mut self, idx: usize, buf: &mut [u8]) -> Result<usize>
pub fn tx_set_receipts_root(&mut self, root: Bytes32) -> Option<Bytes32>
pub fn tx_replace_message_output(
&mut self,
idx: usize,
output: Output
) -> Result<(), PanicReason>
pub fn tx_replace_variable_output(
&mut self,
idx: usize,
output: Output
) -> Result<(), PanicReason>
sourcepub fn update_outputs<I>(
&mut self,
params: &ConsensusParameters,
revert: bool,
remaining_gas: Word,
balances: &I
) -> Result<(), ValidationError> where
I: for<'a> Index<&'a AssetId, Output = Word>,
pub fn update_outputs<I>(
&mut self,
params: &ConsensusParameters,
revert: bool,
remaining_gas: Word,
balances: &I
) -> Result<(), ValidationError> where
I: for<'a> Index<&'a AssetId, Output = Word>,
Update change and variable outputs.
revert
will signal if the execution was reverted. It will refund the unused gas cost to
the base asset and reset output changes to their initial balances.
remaining_gas
expects the raw content of $ggas
balances
will contain the current state of the free balances
sourcepub fn prepare_init_script(&mut self) -> Result<&mut Self>
pub fn prepare_init_script(&mut self) -> Result<&mut Self>
Prepare the transaction for VM initialization for script execution
sourcepub fn prepare_init_predicate(&mut self) -> &mut Self
pub fn prepare_init_predicate(&mut self) -> &mut Self
Prepare the transaction for VM initialization for predicate verification
Trait Implementations
sourceimpl AsRef<Transaction> for CheckedTransaction
impl AsRef<Transaction> for CheckedTransaction
sourcefn as_ref(&self) -> &TransactionⓘNotable traits for Transactionimpl Read for Transactionimpl Write for Transaction
fn as_ref(&self) -> &TransactionⓘNotable traits for Transactionimpl Read for Transactionimpl Write for Transaction
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl Borrow<Transaction> for CheckedTransaction
impl Borrow<Transaction> for CheckedTransaction
sourcefn borrow(&self) -> &TransactionⓘNotable traits for Transactionimpl Read for Transactionimpl Write for Transaction
fn borrow(&self) -> &TransactionⓘNotable traits for Transactionimpl Read for Transactionimpl Write for Transaction
Immutably borrows from an owned value. Read more
sourceimpl Clone for CheckedTransaction
impl Clone for CheckedTransaction
sourcefn clone(&self) -> CheckedTransaction
fn clone(&self) -> CheckedTransaction
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for CheckedTransaction
impl Debug for CheckedTransaction
sourceimpl Default for CheckedTransaction
impl Default for CheckedTransaction
sourceimpl From<CheckedTransaction> for Transaction
impl From<CheckedTransaction> for Transaction
sourcefn from(tx: CheckedTransaction) -> Self
fn from(tx: CheckedTransaction) -> Self
Converts to this type from the input type.
sourceimpl Hash for CheckedTransaction
impl Hash for CheckedTransaction
sourceimpl PartialEq<CheckedTransaction> for CheckedTransaction
impl PartialEq<CheckedTransaction> for CheckedTransaction
sourcefn eq(&self, other: &CheckedTransaction) -> bool
fn eq(&self, other: &CheckedTransaction) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &CheckedTransaction) -> bool
fn ne(&self, other: &CheckedTransaction) -> bool
This method tests for !=
.
impl Eq for CheckedTransaction
impl StructuralEq for CheckedTransaction
impl StructuralPartialEq for CheckedTransaction
Auto Trait Implementations
impl RefUnwindSafe for CheckedTransaction
impl Send for CheckedTransaction
impl Sync for CheckedTransaction
impl Unpin for CheckedTransaction
impl UnwindSafe for CheckedTransaction
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more