hedera 0.3.0

Hedera SDK for Rust
Documentation
syntax = "proto3";

package proto;

option java_package = "com.hederahashgraph.api.proto.java";
option java_multiple_files = true;

import "BasicTypes.proto";
import "QueryHeader.proto";
import "ResponseHeader.proto";

/* The log information for an event returned by a smart contract function call. One function call may return several such events. */
message ContractLoginfo {
    ContractID contractID = 1; // address of a contract that emitted the event
    bytes bloom = 2; //bloom filter for a particular log
    repeated bytes topic = 3; // topics of a particular event
    bytes data = 4; // event data
}

/* The result returned by a call to a smart contract function. This is part of the response to a ContractCallLocal query, and is in the record for a ContractCall or ContractCreateInstance transaction. The ContractCreateInstance transaction record has the results of the call to the constructor. */
message ContractFunctionResult {
    ContractID contractID = 1; // the smart contract instance whose function was called
    bytes contractCallResult = 2; // the result returned by the function
    string errorMessage = 3; // message In case there was an error during smart contract execution
    bytes bloom = 4; // bloom filter for record
    uint64 gasUsed = 5; //units of gas used  to execute contract
    repeated ContractLoginfo logInfo = 6; // the log info for events returned by the function
}

/* Call a function of the given smart contract instance, giving it functionParameters as its inputs. It can use the given amount of gas, and any unspent gas will be refunded to the paying account.
 *
 * This is performed locally on the particular node that the client is communicating with. It cannot change the state of the contract instance (and so, cannot spend anything from the instance's cryptocurrency account). It will not have a consensus timestamp. It cannot generate a record or a receipt. The response will contain the output returned by the function call.  This is useful for calling getter functions, which purely read the state and don't change it. It is faster and cheaper than a normal call, because it is purely local to a single  node. */
message ContractCallLocalQuery {
    QueryHeader header = 1; // standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither).
    ContractID contractID = 2; // the contract instance to call, in the format used in transactions
    int64 gas = 3; // the amount of gas to use for the call
    bytes functionParameters = 4; // which function to call, and the parameters to pass to the function
    int64 maxResultSize = 5; // max number of bytes that the result might include. The run will fail if it would have returned more than this number of bytes.
}

/* Response when the client sends the node ContractCallLocalQuery */
message ContractCallLocalResponse {
    ResponseHeader header = 1; //standard response from node to client, including the requested fields: cost, or state proof, or both, or neither
    ContractFunctionResult functionResult = 2; // the value returned by the function (if it completed and didn't fail)
}