Module com.hedera.hashgraph.sdk
Package com.hedera.hashgraph.sdk.proto
Class ContractCallLocalQuery.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<ContractCallLocalQuery,ContractCallLocalQuery.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<ContractCallLocalQuery,ContractCallLocalQuery.Builder>
com.hedera.hashgraph.sdk.proto.ContractCallLocalQuery.Builder
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,ContractCallLocalQueryOrBuilder,Cloneable
- Enclosing class:
ContractCallLocalQuery
public static final class ContractCallLocalQuery.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<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-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance -
Method Summary
Modifier and TypeMethodDescription* The ID of a smart contract to call.* The smart contract function to call, and the parameters to pass to that function.clearGas()* 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).Deprecated.proto.ContractCallLocalQuery.maxResultSize is deprecated.* The account that is the "sender" for this contract call.* 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.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.mergeContractID(ContractID value) * The ID of a smart contract to call.mergeHeader(QueryHeader value) * 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).mergeSenderId(AccountID value) * The account that is the "sender" for this contract call.setContractID(ContractID value) * The ID of a smart contract to call.setContractID(ContractID.Builder builderForValue) * The ID of a smart contract to call.setFunctionParameters(com.google.protobuf.ByteString value) * The smart contract function to call, and the parameters to pass to that function.setGas(long value) * The amount of "gas" to use for this call.setHeader(QueryHeader value) * 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).setHeader(QueryHeader.Builder builderForValue) * 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).setMaxResultSize(long value) Deprecated.proto.ContractCallLocalQuery.maxResultSize is deprecated.setSenderId(AccountID value) * The account that is the "sender" for this contract call.setSenderId(AccountID.Builder builderForValue) * The account that is the "sender" for this contract call.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFromMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
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.
-
setHeader
* 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; -
setHeader
* 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; -
mergeHeader
* 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; -
clearHeader
* 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; -
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.
-
setContractID
* The ID of a smart contract to call.
.proto.ContractID contractID = 2; -
setContractID
* The ID of a smart contract to call.
.proto.ContractID contractID = 2; -
mergeContractID
* The ID of a smart contract to call.
.proto.ContractID contractID = 2; -
clearContractID
* The ID of a smart contract to call.
.proto.ContractID contractID = 2; -
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.
-
setGas
* 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;- Parameters:
value- The gas to set.- Returns:
- This builder for chaining.
-
clearGas
* 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;- Returns:
- This builder for chaining.
-
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.
-
setFunctionParameters
* 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;- Parameters:
value- The functionParameters to set.- Returns:
- This builder for chaining.
-
clearFunctionParameters
* 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;- Returns:
- This builder for chaining.
-
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.
-
setMaxResultSize
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];- Parameters:
value- The maxResultSize to set.- Returns:
- This builder for chaining.
-
clearMaxResultSize
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];- Returns:
- This builder for chaining.
-
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.
-
setSenderId
* 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; -
setSenderId
* 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; -
mergeSenderId
* 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; -
clearSenderId
* 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;
-