All Downloads are FREE. Search and download functionalities are using the official Maven repository.

shgraph.hapi.0.54.2.source-code.contract_call_local.proto Maven / Gradle / Ivy

There is a newer version: 0.54.0
Show newest version
syntax = "proto3";

package proto;

/*-
 * ‌
 * Hedera Network Services Protobuf
 * ​
 * Copyright (C) 2018 - 2022 Hedera Hashgraph, LLC
 * ​
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ‍
 */

option java_package = "com.hederahashgraph.api.proto.java";
// <<>> This comment is special code for setting PBJ Compiler java package
option java_multiple_files = true;

import "basic_types.proto";
import "query_header.proto";
import "response_header.proto";
import "contract_types.proto";

import "google/protobuf/wrappers.proto";

/**
 * The log information for an event returned by a smart contract function call. One function call
 * may return several such events.
 */
message ContractLoginfo {
    /**
     * address of a contract that emitted the event
     */
    ContractID contractID = 1;

    /**
     * bloom filter for a particular log
     */
    bytes bloom = 2;

    /**
     * topics of a particular event
     */
    repeated bytes topic = 3;

    /**
     * event data
     */
    bytes data = 4;
}

/**
 * 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 {
    /**
     * the smart contract instance whose function was called
     */
    ContractID contractID = 1;

    /**
     * the result returned by the function
     */
    bytes contractCallResult = 2;

    /**
     * message In case there was an error during smart contract execution
     */
    string errorMessage = 3;

    /**
     * bloom filter for record
     */
    bytes bloom = 4;

    /**
     * units of gas used to execute contract
     */
    uint64 gasUsed = 5;

    /**
     * the log info for events returned by the function
     */
    repeated ContractLoginfo logInfo = 6;

    /**
     * [DEPRECATED] the list of smart contracts that were created by the function call.
     * 
     * The created ids will now _also_ be externalized through internal transaction 
     * records, where each record has its alias field populated with the new contract's 
     * EVM address. (This is needed for contracts created with CREATE2, since 
     * there is no longer a simple relationship between the new contract's 0.0.X id 
     * and its Solidity address.)
     */
    repeated ContractID createdContractIDs = 7 [deprecated=true];

    reserved 8;

    /**
     * The new contract's 20-byte EVM address. Only populated after release 0.23, 
     * where each created contract will have its own record. (This is an important 
     * point--the field is not repeated because there will be a separate 
     * child record for each created contract.)
     * 
     * Every contract has an EVM address determined by its shard.realm.num id.
     * This address is as follows:
     *   
    *
  1. The first 4 bytes are the big-endian representation of the shard.
  2. *
  3. The next 8 bytes are the big-endian representation of the realm.
  4. *
  5. The final 8 bytes are the big-endian representation of the number.
  6. *
* * Contracts created via CREATE2 have an additional, primary address that is * derived from the EIP-1014 * specification, and does not have a simple relation to a shard.realm.num id. * * (Please do note that CREATE2 contracts can also be referenced by the three-part * EVM address described above.) */ google.protobuf.BytesValue evm_address = 9; /** * The amount of gas available for the call, aka the gasLimit. * * This field should only be populated when the paired TransactionBody in the record stream is not a * ContractCreateTransactionBody or a ContractCallTransactionBody. */ int64 gas = 10; /** * Number of tinybars sent (the function must be payable if this is nonzero). * * This field should only be populated when the paired TransactionBody in the record stream is not a * ContractCreateTransactionBody or a ContractCallTransactionBody. */ int64 amount = 11; /** * The parameters passed into the contract call. * * This field should only be populated when the paired TransactionBody in the record stream is not a * ContractCreateTransactionBody or a ContractCallTransactionBody. */ bytes functionParameters = 12; /** * The account that is the "sender." If not present it is the accountId from the transactionId. * * This field should only be populated when the paired TransactionBody in the record stream is not a * ContractCreateTransactionBody or a ContractCallTransactionBody. */ AccountID sender_id = 13; /** * A list of updated contract account nonces containing the new nonce value for each contract account. * This is always empty in a ContractCallLocalResponse#ContractFunctionResult message, since no internal creations can happen in a static EVM call. */ repeated ContractNonceInfo contract_nonces = 14; /** * 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. */ google.protobuf.Int64Value signer_nonce = 15; } /** * Call a function of the given smart contract instance, giving it functionParameters as its inputs. * 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. * * Unlike a ContractCall transaction, the node will consume the entire amount of provided gas in determining * the fee for this query. */ message ContractCallLocalQuery { /** * standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). The payment must cover the fees and all of the gas offered. */ QueryHeader header = 1; /** * The contract to make a static call against */ ContractID contractID = 2; /** * The amount of gas to use for the call; all of the gas offered will be used and charged a corresponding fee */ int64 gas = 3; /** * which function to call, and the parameters to pass to the function */ bytes functionParameters = 4; /** * max number of bytes that the result might include. The run will fail if it would have returned more than this number of bytes. */ int64 maxResultSize = 5 [deprecated=true]; /** * The account that is the "sender." If not present it is the accountId from the transactionId. * Typically a different value than specified in the transactionId requires a valid signature * over either the hedera transaction or foreign transaction data. */ AccountID sender_id = 6; } /** * Response when the client sends the node ContractCallLocalQuery */ message ContractCallLocalResponse { /** * standard response from node to client, including the requested fields: cost, or state proof, or both, or neither */ ResponseHeader header = 1; /** * the value returned by the function (if it completed and didn't fail) */ ContractFunctionResult functionResult = 2; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy