Type Alias hedera::ContractExecuteTransaction
source · pub type ContractExecuteTransaction = Transaction<ContractExecuteTransactionData>;
Expand description
Call a function of the given smart contract instance, giving it parameters as its inputs.
It can use the given amount of gas, and any unspent gas will be refunded to the paying account.
If this function stores information, it is charged gas to store it. There is a fee in hbars to maintain that storage until the expiration time, and that fee is added as part of the transaction fee.
Aliased Type§
struct ContractExecuteTransaction { /* private fields */ }
Implementations§
source§impl ContractExecuteTransaction
impl ContractExecuteTransaction
sourcepub fn get_contract_id(&self) -> Option<ContractId>
pub fn get_contract_id(&self) -> Option<ContractId>
Returns the contract instance to call.
sourcepub fn contract_id(&mut self, contract_id: ContractId) -> &mut Self
pub fn contract_id(&mut self, contract_id: ContractId) -> &mut Self
Sets the contract instance to call.
sourcepub fn gas(&mut self, gas: u64) -> &mut Self
pub fn gas(&mut self, gas: u64) -> &mut Self
Sets the maximum amount of gas to use for the call.
sourcepub fn get_payable_amount(&self) -> Hbar
pub fn get_payable_amount(&self) -> Hbar
Returns the number of hbars to be sent with this function call.
sourcepub fn payable_amount(&mut self, amount: Hbar) -> &mut Self
pub fn payable_amount(&mut self, amount: Hbar) -> &mut Self
Sets the number of hbars to be sent with this function call.
sourcepub fn get_function_parameters(&self) -> &[u8] ⓘ
pub fn get_function_parameters(&self) -> &[u8] ⓘ
Returns the function parameters as their raw bytes.
sourcepub fn function_parameters(&mut self, data: Vec<u8>) -> &mut Self
pub fn function_parameters(&mut self, data: Vec<u8>) -> &mut Self
Sets the function parameters as their raw bytes.
sourcepub fn function_with_parameters(
&mut self,
name: &str,
parameters: &ContractFunctionParameters
) -> &mut Self
pub fn function_with_parameters( &mut self, name: &str, parameters: &ContractFunctionParameters ) -> &mut Self
Sets the function with parameters.