Struct hedera::ContractFunctionResult
source · pub struct ContractFunctionResult {Show 13 fields
pub contract_id: ContractId,
pub evm_address: Option<ContractId>,
pub bytes: Vec<u8>,
pub error_message: Option<String>,
pub bloom: Vec<u8>,
pub gas_used: u64,
pub gas: u64,
pub hbar_amount: u64,
pub contract_function_parameters_bytes: Vec<u8>,
pub sender_account_id: Option<AccountId>,
pub logs: Vec<ContractLogInfo>,
pub contract_nonces: Vec<ContractNonceInfo>,
pub signer_nonce: Option<u64>,
}
Expand description
The result returned by a call to a smart contract function.
Fields§
§contract_id: ContractId
The smart contract instance whose function was called.
evm_address: Option<ContractId>
The new contract’s 20-byte EVM address.
bytes: Vec<u8>
The raw bytes returned by the function.
error_message: Option<String>
Message if there was an error during smart contract execution.
bloom: Vec<u8>
Bloom filter for record.
gas_used: u64
Units of gas used to execute contract.
gas: u64
The amount of gas available for the call.
hbar_amount: u64
Number of HBAR sent (the function must be payable if this is nonzero).
contract_function_parameters_bytes: Vec<u8>
The parameters passed into the contract call.
sender_account_id: Option<AccountId>
The account that is the “sender.” If not present it is the accountId from the transactionId.
logs: Vec<ContractLogInfo>
Logs that this call and any called functions produced.
contract_nonces: Vec<ContractNonceInfo>
A list of updated contract account nonces containing the new nonce value for each contract account. This is always empty in a ContractLocalCallQuery response, since no internal creations can happen in a static EVM call.
signer_nonce: Option<u64>
If not null this field specifies what the value of the signer account nonce is post transaction execution. For transactions that don’t update the signer nonce, this field should be null.
Implementations§
source§impl ContractFunctionResult
impl ContractFunctionResult
sourcepub fn get_str(&self, index: usize) -> Option<Cow<'_, str>>
pub fn get_str(&self, index: usize) -> Option<Cow<'_, str>>
Get the value at index
as a solidity string
.
Theoretically, all strings here should be utf8, but this function does lossy conversion.
sourcepub fn get_str_array(&self, index: usize) -> Option<Vec<Cow<'_, str>>>
pub fn get_str_array(&self, index: usize) -> Option<Vec<Cow<'_, str>>>
Get the value at index
as a solidity string[]
.
Theoretically, all strings here should be utf8, but this function does lossy conversion.
sourcepub fn get_bytes(&self, index: usize) -> Option<&[u8]>
pub fn get_bytes(&self, index: usize) -> Option<&[u8]>
Get the value at index
as solidity bytes
.
sourcepub fn get_bytes32(&self, index: usize) -> Option<&[u8; 32]>
pub fn get_bytes32(&self, index: usize) -> Option<&[u8; 32]>
Get the value at index
as solidity bytes32
.
This is the native word size for the solidity ABI.
sourcepub fn get_address(&self, index: usize) -> Option<String>
pub fn get_address(&self, index: usize) -> Option<String>
Get the value at index
as a solidity address
and then hex-encode the result.
sourcepub fn get_bool(&self, index: usize) -> Option<bool>
pub fn get_bool(&self, index: usize) -> Option<bool>
Get the value at index
as a solidity bool
.
Trait Implementations§
source§impl Clone for ContractFunctionResult
impl Clone for ContractFunctionResult
source§fn clone(&self) -> ContractFunctionResult
fn clone(&self) -> ContractFunctionResult
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for ContractFunctionResult
impl RefUnwindSafe for ContractFunctionResult
impl Send for ContractFunctionResult
impl Sync for ContractFunctionResult
impl Unpin for ContractFunctionResult
impl UnwindSafe for ContractFunctionResult
Blanket Implementations§
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request