Struct fuels_types::transaction::ScriptTransaction
source · pub struct ScriptTransaction {
pub tx: Script,
}
Fields§
§tx: Script
Implementations§
source§impl ScriptTransaction
impl ScriptTransaction
pub fn script(&self) -> &Vec<u8> ⓘ
pub fn with_script(self, script: Vec<u8>) -> Self
pub fn script_data(&self) -> &Vec<u8> ⓘ
pub fn with_script_data(self, script_data: Vec<u8>) -> Self
pub fn new( inputs: Vec<Input>, outputs: Vec<Output>, params: TxParameters ) -> ScriptTransaction
sourcepub fn build_contract_transfer_tx(
to: ContractId,
amount: u64,
asset_id: AssetId,
inputs: Vec<Input>,
outputs: Vec<Output>,
params: TxParameters
) -> ScriptTransaction
pub fn build_contract_transfer_tx( to: ContractId, amount: u64, asset_id: AssetId, inputs: Vec<Input>, outputs: Vec<Output>, params: TxParameters ) -> ScriptTransaction
Craft a transaction used to transfer funds to a contract.
sourcepub fn build_message_to_output_tx(
to: Address,
amount: u64,
inputs: Vec<Input>,
params: TxParameters
) -> ScriptTransaction
pub fn build_message_to_output_tx( to: Address, amount: u64, inputs: Vec<Input>, params: TxParameters ) -> ScriptTransaction
Craft a transaction used to transfer funds to the base chain.
Trait Implementations§
source§impl Clone for ScriptTransaction
impl Clone for ScriptTransaction
source§fn clone(&self) -> ScriptTransaction
fn clone(&self) -> ScriptTransaction
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ScriptTransaction
impl Debug for ScriptTransaction
source§impl Default for ScriptTransaction
impl Default for ScriptTransaction
source§impl From<Script> for ScriptTransaction
impl From<Script> for ScriptTransaction
source§impl From<ScriptTransaction> for FuelTransaction
impl From<ScriptTransaction> for FuelTransaction
source§fn from(tx: ScriptTransaction) -> Self
fn from(tx: ScriptTransaction) -> Self
Converts to this type from the input type.
source§impl From<ScriptTransaction> for Script
impl From<ScriptTransaction> for Script
source§fn from(tx: ScriptTransaction) -> Self
fn from(tx: ScriptTransaction) -> Self
Converts to this type from the input type.
source§impl Transaction for ScriptTransaction
impl Transaction for ScriptTransaction
fn fee_checked_from_tx( &self, params: &ConsensusParameters ) -> Option<TransactionFee>
fn check_without_signatures( &self, block_height: u64, parameters: &ConsensusParameters ) -> Result<(), Error>
fn id(&self) -> Bytes32
fn maturity(&self) -> u64
fn with_maturity(self, maturity: u64) -> Self
fn gas_price(&self) -> u64
fn with_gas_price(self, gas_price: u64) -> Self
fn gas_limit(&self) -> u64
fn with_gas_limit(self, gas_limit: u64) -> Self
fn with_tx_params(self, tx_params: TxParameters) -> Self
fn metered_bytes_size(&self) -> usize
fn inputs(&self) -> &Vec<Input> ⓘ
fn inputs_mut(&mut self) -> &mut Vec<Input> ⓘ
fn with_inputs(self, inputs: Vec<Input>) -> Self
fn outputs(&self) -> &Vec<Output> ⓘ
fn outputs_mut(&mut self) -> &mut Vec<Output> ⓘ
fn with_outputs(self, outputs: Vec<Output>) -> Self
fn witnesses(&self) -> &Vec<Witness> ⓘ
fn witnesses_mut(&mut self) -> &mut Vec<Witness> ⓘ
fn with_witnesses(self, witnesses: Vec<Witness>) -> Self
Auto Trait Implementations§
impl RefUnwindSafe for ScriptTransaction
impl Send for ScriptTransaction
impl Sync for ScriptTransaction
impl Unpin for ScriptTransaction
impl UnwindSafe for ScriptTransaction
Blanket Implementations§
§impl<T> AnyDebug for Twhere
T: Any + Debug,
impl<T> AnyDebug for Twhere T: Any + Debug,
§fn as_any_ref(&self) -> &(dyn Any + 'static)
fn as_any_ref(&self) -> &(dyn Any + 'static)
Returns a reference to the underlying type as
Any
.