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

source

pub fn get_contract_id(&self) -> Option<ContractId>

Returns the contract instance to call.

source

pub fn contract_id(&mut self, contract_id: ContractId) -> &mut Self

Sets the contract instance to call.

source

pub fn get_gas(&self) -> u64

Returns the maximum amount of gas to use for the call.

source

pub fn gas(&mut self, gas: u64) -> &mut Self

Sets the maximum amount of gas to use for the call.

source

pub fn get_payable_amount(&self) -> Hbar

Returns the number of hbars to be sent with this function call.

source

pub fn payable_amount(&mut self, amount: Hbar) -> &mut Self

Sets the number of hbars to be sent with this function call.

source

pub fn get_function_parameters(&self) -> &[u8]

Returns the function parameters as their raw bytes.

source

pub fn function_parameters(&mut self, data: Vec<u8>) -> &mut Self

Sets the function parameters as their raw bytes.

source

pub fn function(&mut self, name: &str) -> &mut Self

Sets the function with no parameters.

source

pub fn function_with_parameters( &mut self, name: &str, parameters: &ContractFunctionParameters ) -> &mut Self

Sets the function with parameters.