Class ContractCallLocalQuery

java.lang.Object
com.google.protobuf.AbstractMessageLite<ContractCallLocalQuery,ContractCallLocalQuery.Builder>
com.google.protobuf.GeneratedMessageLite<ContractCallLocalQuery,ContractCallLocalQuery.Builder>
com.hedera.hashgraph.sdk.proto.ContractCallLocalQuery
All Implemented Interfaces:
com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, ContractCallLocalQueryOrBuilder

@Generated public final class ContractCallLocalQuery extends com.google.protobuf.GeneratedMessageLite<ContractCallLocalQuery,ContractCallLocalQuery.Builder> implements ContractCallLocalQueryOrBuilder
 *
 Call a view function of a given smart contract<br/>
 The call must provide function parameter inputs as needed.<br/>
 This is potentially useful for calling view functions that will not revert
 when executed in a static EVM context. Many such use cases will be better
 served by using a Mirror Node API, however.

 This is performed locally on the particular node that the client is
 communicating with. Executing the call locally is faster and less costly,
 but imposes certain restrictions.<br/>
 The call MUST NOT change the state of the contract instance. This also
 precludes any expenditure or transfer of HBAR or other tokens.<br/>
 The call SHALL NOT have a separate consensus timestamp.<br/>
 The call SHALL NOT generate a record nor a receipt.<br/>
 The response SHALL contain the output returned by the function call.<br/>
 Any contract call that would use the `STATICCALL` opcode MAY be called via
 contract call local with performance and cost benefits.

 Unlike a ContractCall transaction, the node SHALL always consume the
 _entire_ amount of offered "gas" in determining the fee for this query, so
 accurate gas estimation is important.
 
Protobuf type proto.ContractCallLocalQuery
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    * Call a view function of a given smart contract<br/> The call must provide function parameter inputs as needed.<br/> This is potentially useful for calling view functions that will not revert when executed in a static EVM context.

    Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageLite

    com.google.protobuf.GeneratedMessageLite.DefaultInstanceBasedParser<T extends com.google.protobuf.GeneratedMessageLite<T,?>>, com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.GeneratedExtension<ContainingType extends com.google.protobuf.MessageLite,Type>, com.google.protobuf.GeneratedMessageLite.MethodToInvoke, com.google.protobuf.GeneratedMessageLite.SerializedForm

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     

    Fields inherited from class com.google.protobuf.GeneratedMessageLite

    unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Method Summary

    Modifier and Type
    Method
    Description
    protected final Object
    dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
     
    * The ID of a smart contract to call.
     
    com.google.protobuf.ByteString
    * The smart contract function to call, and the parameters to pass to that function.
    long
    * The amount of "gas" to use for this call.
    * Standard information sent with every query operation.<br/> This includes the signed payment and what kind of response is requested (cost, state proof, both, or neither).
    long
    Deprecated.
    proto.ContractCallLocalQuery.maxResultSize is deprecated.
    * The account that is the "sender" for this contract call.
    boolean
    * The ID of a smart contract to call.
    boolean
    * Standard information sent with every query operation.<br/> This includes the signed payment and what kind of response is requested (cost, state proof, both, or neither).
    boolean
    * The account that is the "sender" for this contract call.
     
     
     
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(byte[] data)
     
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.ByteString data)
     
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<ContractCallLocalQuery>
     

    Methods inherited from class com.google.protobuf.GeneratedMessageLite

    createBuilder, createBuilder, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, emptyProtobufList, equals, getDefaultInstanceForType, getParserForType, getSerializedSize, hashCode, isInitialized, makeImmutable, mergeLengthDelimitedField, mergeUnknownFields, mergeVarintField, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType, newMessageInfo, newRepeatedGeneratedExtension, newSingularGeneratedExtension, parseDelimitedFrom, parseDelimitedFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parsePartialFrom, parseUnknownField, registerDefaultInstance, toBuilder, toString, writeTo

    Methods inherited from class com.google.protobuf.AbstractMessageLite

    addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder

    getDefaultInstanceForType, isInitialized
  • Field Details

    • HEADER_FIELD_NUMBER

      public static final int HEADER_FIELD_NUMBER
      See Also:
    • CONTRACTID_FIELD_NUMBER

      public static final int CONTRACTID_FIELD_NUMBER
      See Also:
    • GAS_FIELD_NUMBER

      public static final int GAS_FIELD_NUMBER
      See Also:
    • FUNCTIONPARAMETERS_FIELD_NUMBER

      public static final int FUNCTIONPARAMETERS_FIELD_NUMBER
      See Also:
    • MAXRESULTSIZE_FIELD_NUMBER

      public static final int MAXRESULTSIZE_FIELD_NUMBER
      See Also:
    • SENDER_ID_FIELD_NUMBER

      public static final int SENDER_ID_FIELD_NUMBER
      See Also:
  • Method Details

    • hasHeader

      public boolean hasHeader()
       *
       Standard information sent with every query operation.<br/>
       This includes the signed payment and what kind of response is requested
       (cost, state proof, both, or neither).
       <p>
       The payment MUST be sufficient for the base fees _and_ the full amount
       in the `gas` field.
       
      .proto.QueryHeader header = 1;
      Specified by:
      hasHeader in interface ContractCallLocalQueryOrBuilder
      Returns:
      Whether the header field is set.
    • getHeader

      public QueryHeader getHeader()
       *
       Standard information sent with every query operation.<br/>
       This includes the signed payment and what kind of response is requested
       (cost, state proof, both, or neither).
       <p>
       The payment MUST be sufficient for the base fees _and_ the full amount
       in the `gas` field.
       
      .proto.QueryHeader header = 1;
      Specified by:
      getHeader in interface ContractCallLocalQueryOrBuilder
      Returns:
      The header.
    • hasContractID

      public boolean hasContractID()
       *
       The ID of a smart contract to call.
       
      .proto.ContractID contractID = 2;
      Specified by:
      hasContractID in interface ContractCallLocalQueryOrBuilder
      Returns:
      Whether the contractID field is set.
    • getContractID

      public ContractID getContractID()
       *
       The ID of a smart contract to call.
       
      .proto.ContractID contractID = 2;
      Specified by:
      getContractID in interface ContractCallLocalQueryOrBuilder
      Returns:
      The contractID.
    • getGas

      public long getGas()
       *
       The amount of "gas" to use for this call.
       <p>
       This transaction SHALL consume all of the gas offered and charge the
       corresponding fee according to the current exchange rate between
       HBAR and "gas".
       
      int64 gas = 3;
      Specified by:
      getGas in interface ContractCallLocalQueryOrBuilder
      Returns:
      The gas.
    • getFunctionParameters

      public com.google.protobuf.ByteString getFunctionParameters()
       *
       The smart contract function to call, and the parameters to pass to that
       function.
       <p>
       These SHALL be presented in EVM bytecode function call format.
       
      bytes functionParameters = 4;
      Specified by:
      getFunctionParameters in interface ContractCallLocalQueryOrBuilder
      Returns:
      The functionParameters.
    • getMaxResultSize

      @Deprecated public long getMaxResultSize()
      Deprecated.
      proto.ContractCallLocalQuery.maxResultSize is deprecated. See contract_call_local.proto;l=88
       *
       Do not use this field; it is ignored in the current software.
       <p>
       The maximum number of bytes that the result might include.<br/>
       The call will fail if it would have returned more than this number
       of bytes.
       
      int64 maxResultSize = 5 [deprecated = true];
      Specified by:
      getMaxResultSize in interface ContractCallLocalQueryOrBuilder
      Returns:
      The maxResultSize.
    • hasSenderId

      public boolean hasSenderId()
       *
       The account that is the "sender" for this contract call.
       <p>
       If this is not set it SHALL be interpreted as the accountId from the
       associated transactionId.<br/>
       If this is set then either the associated transaction or the foreign
       transaction data MUST be signed by the referenced account.
       
      .proto.AccountID sender_id = 6;
      Specified by:
      hasSenderId in interface ContractCallLocalQueryOrBuilder
      Returns:
      Whether the senderId field is set.
    • getSenderId

      public AccountID getSenderId()
       *
       The account that is the "sender" for this contract call.
       <p>
       If this is not set it SHALL be interpreted as the accountId from the
       associated transactionId.<br/>
       If this is set then either the associated transaction or the foreign
       transaction data MUST be signed by the referenced account.
       
      .proto.AccountID sender_id = 6;
      Specified by:
      getSenderId in interface ContractCallLocalQueryOrBuilder
      Returns:
      The senderId.
    • parseFrom

      public static ContractCallLocalQuery parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ContractCallLocalQuery parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ContractCallLocalQuery parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ContractCallLocalQuery parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ContractCallLocalQuery parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ContractCallLocalQuery parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ContractCallLocalQuery parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ContractCallLocalQuery parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static ContractCallLocalQuery parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static ContractCallLocalQuery parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ContractCallLocalQuery parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ContractCallLocalQuery parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilder

      public static ContractCallLocalQuery.Builder newBuilder()
    • newBuilder

      public static ContractCallLocalQuery.Builder newBuilder(ContractCallLocalQuery prototype)
    • dynamicMethod

      protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
      Specified by:
      dynamicMethod in class com.google.protobuf.GeneratedMessageLite<ContractCallLocalQuery,ContractCallLocalQuery.Builder>
    • getDefaultInstance

      public static ContractCallLocalQuery getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<ContractCallLocalQuery> parser()