pub struct ScriptTransactionBuilder {
pub gas_price: u64,
pub gas_limit: u64,
pub maturity: u32,
pub script: Vec<u8>,
pub script_data: Vec<u8>,
pub inputs: Vec<Input>,
pub outputs: Vec<Output>,
pub witnesses: Vec<Witness>,
/* private fields */
}
Fields§
§gas_price: u64
§gas_limit: u64
§maturity: u32
§script: Vec<u8>
§script_data: Vec<u8>
§inputs: Vec<Input>
§outputs: Vec<Output>
§witnesses: Vec<Witness>
Implementations§
source§impl ScriptTransactionBuilder
impl ScriptTransactionBuilder
pub fn set_script(self, script: Vec<u8>) -> Self
pub fn set_script_data(self, script_data: Vec<u8>) -> Self
pub fn prepare_transfer( inputs: Vec<Input>, outputs: Vec<Output>, params: TxParameters ) -> Self
sourcepub fn prepare_contract_transfer(
to: ContractId,
amount: u64,
asset_id: AssetId,
inputs: Vec<Input>,
outputs: Vec<Output>,
params: TxParameters
) -> Self
pub fn prepare_contract_transfer( to: ContractId, amount: u64, asset_id: AssetId, inputs: Vec<Input>, outputs: Vec<Output>, params: TxParameters ) -> Self
Craft a transaction used to transfer funds to a contract.
sourcepub fn prepare_message_to_output(
to: Address,
amount: u64,
inputs: Vec<Input>,
params: TxParameters
) -> Self
pub fn prepare_message_to_output( to: Address, amount: u64, inputs: Vec<Input>, params: TxParameters ) -> Self
Craft a transaction used to transfer funds to the base chain.
Trait Implementations§
source§impl Clone for ScriptTransactionBuilder
impl Clone for ScriptTransactionBuilder
source§fn clone(&self) -> ScriptTransactionBuilder
fn clone(&self) -> ScriptTransactionBuilder
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 ScriptTransactionBuilder
impl Debug for ScriptTransactionBuilder
source§impl Default for ScriptTransactionBuilder
impl Default for ScriptTransactionBuilder
source§fn default() -> ScriptTransactionBuilder
fn default() -> ScriptTransactionBuilder
Returns the “default value” for a type. Read more
source§impl TransactionBuilder for ScriptTransactionBuilder
impl TransactionBuilder for ScriptTransactionBuilder
type TxType = ScriptTransaction
fn build(self) -> Result<ScriptTransaction>
fn fee_checked_from_tx( &self, params: &ConsensusParameters ) -> Option<TransactionFee>
fn check_without_signatures( &self, block_height: u32, parameters: &ConsensusParameters ) -> Result<()>
fn set_maturity(self, maturity: u32) -> Self
fn set_gas_price(self, gas_price: u64) -> Self
fn set_gas_limit(self, gas_limit: u64) -> Self
fn set_tx_params(self, tx_params: TxParameters) -> Self
fn set_inputs(self, inputs: Vec<Input>) -> Self
fn set_outputs(self, outputs: Vec<Output>) -> Self
fn set_witnesses(self, witnesses: Vec<Witness>) -> Self
fn set_consensus_parameters( self, consensus_parameters: ConsensusParameters ) -> Self
fn inputs(&self) -> &Vec<Input>
fn inputs_mut(&mut self) -> &mut Vec<Input>
fn outputs(&self) -> &Vec<Output>
fn outputs_mut(&mut self) -> &mut Vec<Output>
fn witnesses(&self) -> &Vec<Witness>
fn witnesses_mut(&mut self) -> &mut Vec<Witness>
Auto Trait Implementations§
impl RefUnwindSafe for ScriptTransactionBuilder
impl Send for ScriptTransactionBuilder
impl Sync for ScriptTransactionBuilder
impl Unpin for ScriptTransactionBuilder
impl UnwindSafe for ScriptTransactionBuilder
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
.source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more