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 ClassesModifier and TypeClassDescriptionstatic 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
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageLite
unknownFieldsFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionprotected final ObjectdynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) * The ID of a smart contract to call.static ContractCallLocalQuerycom.google.protobuf.ByteString* The smart contract function to call, and the parameters to pass to that function.longgetGas()* 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).longDeprecated.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.newBuilder(ContractCallLocalQuery prototype) static ContractCallLocalQueryparseDelimitedFrom(InputStream input) static ContractCallLocalQueryparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ContractCallLocalQueryparseFrom(byte[] data) static ContractCallLocalQueryparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ContractCallLocalQueryparseFrom(com.google.protobuf.ByteString data) static ContractCallLocalQueryparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ContractCallLocalQueryparseFrom(com.google.protobuf.CodedInputStream input) static ContractCallLocalQueryparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ContractCallLocalQueryparseFrom(InputStream input) static ContractCallLocalQueryparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ContractCallLocalQueryparseFrom(ByteBuffer data) static ContractCallLocalQueryparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<ContractCallLocalQuery> parser()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, writeToMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:
hasHeaderin interfaceContractCallLocalQueryOrBuilder- Returns:
- Whether the header field is set.
-
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:
getHeaderin interfaceContractCallLocalQueryOrBuilder- Returns:
- The header.
-
hasContractID
public boolean hasContractID()* The ID of a smart contract to call.
.proto.ContractID contractID = 2;- Specified by:
hasContractIDin interfaceContractCallLocalQueryOrBuilder- Returns:
- Whether the contractID field is set.
-
getContractID
* The ID of a smart contract to call.
.proto.ContractID contractID = 2;- Specified by:
getContractIDin interfaceContractCallLocalQueryOrBuilder- 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:
getGasin interfaceContractCallLocalQueryOrBuilder- 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:
getFunctionParametersin interfaceContractCallLocalQueryOrBuilder- Returns:
- The functionParameters.
-
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:
getMaxResultSizein interfaceContractCallLocalQueryOrBuilder- 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:
hasSenderIdin interfaceContractCallLocalQueryOrBuilder- Returns:
- Whether the senderId field is set.
-
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:
getSenderIdin interfaceContractCallLocalQueryOrBuilder- 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
- Throws:
IOException
-
parseFrom
public static ContractCallLocalQuery parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- 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
-
newBuilder
-
dynamicMethod
protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) - Specified by:
dynamicMethodin classcom.google.protobuf.GeneratedMessageLite<ContractCallLocalQuery,ContractCallLocalQuery.Builder>
-
getDefaultInstance
-
parser
-