pub trait TxDependencyExtension: Sized + Sealed {
// Required methods
fn simulate<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn append_variable_outputs(self, num: u64) -> Self;
fn append_contract(self, contract_id: Bech32ContractId) -> Self;
// Provided methods
fn append_missing_dependencies(self, receipts: &[Receipt]) -> Self { ... }
fn estimate_tx_dependencies<'async_trait>(
self,
max_attempts: Option<u64>
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>
where Self: Send + 'async_trait { ... }
}Required Methods§
fn simulate<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
sourcefn append_variable_outputs(self, num: u64) -> Self
fn append_variable_outputs(self, num: u64) -> Self
Appends num fuel_tx::Output::Variables to the transaction.
Note that this is a builder method, i.e. use it as a chain:
ⓘ
my_contract_instance.my_method(...).append_variable_outputs(num).call()
my_script_instance.main(...).append_variable_outputs(num).call()sourcefn append_contract(self, contract_id: Bech32ContractId) -> Self
fn append_contract(self, contract_id: Bech32ContractId) -> Self
Appends additional external contracts as dependencies to this call.
Effectively, this will be used to create additional
fuel_tx::Input::Contract/fuel_tx::Output::Contract
pairs and set them into the transaction. Note that this is a builder
method, i.e. use it as a chain:
ⓘ
my_contract_instance.my_method(...).append_contract(additional_contract_id).call()
my_script_instance.main(...).append_contract(additional_contract_id).call()Provided Methods§
fn append_missing_dependencies(self, receipts: &[Receipt]) -> Self
sourcefn estimate_tx_dependencies<'async_trait>(
self,
max_attempts: Option<u64>
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
fn estimate_tx_dependencies<'async_trait>(
self,
max_attempts: Option<u64>
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
Simulates the call and attempts to resolve missing tx dependencies. Forwards the received error if it cannot be fixed.
Object Safety§
This trait is not object safe.