Module com.hedera.hashgraph.sdk
Package com.hedera.hashgraph.sdk.proto
Class ContractCallTransactionBody.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<ContractCallTransactionBody,ContractCallTransactionBody.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<ContractCallTransactionBody,ContractCallTransactionBody.Builder>
com.hedera.hashgraph.sdk.proto.ContractCallTransactionBody.Builder
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,ContractCallTransactionBodyOrBuilder,Cloneable
- Enclosing class:
ContractCallTransactionBody
public static final class ContractCallTransactionBody.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<ContractCallTransactionBody,ContractCallTransactionBody.Builder>
implements ContractCallTransactionBodyOrBuilder
*
Call a function of a given smart contract, providing function parameter
inputs as needed.
Resource ("gas") charges SHALL include all relevant fees incurred by the
contract execution, including any storage required.<br/>
The total transaction fee SHALL incorporate all of the "gas" actually
consumed as well as the standard fees for transaction handling, data
transfers, signature verification, etc...<br/>
The response SHALL contain the output returned by the function call.
### Block Stream Effects
A `CallContractOutput` message SHALL be emitted for each transaction.
Protobuf type proto.ContractCallTransactionBody-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance -
Method Summary
Modifier and TypeMethodDescription* An amount of tinybar sent via this contract call.* The ID of a smart contract to call.* The smart contract function to call.clearGas()* A maximum limit to the amount of gas to use for this call.long* An amount of tinybar sent via this contract call.* The ID of a smart contract to call.com.google.protobuf.ByteString* The smart contract function to call.longgetGas()* A maximum limit to the amount of gas to use for this call.boolean* The ID of a smart contract to call.mergeContractID(ContractID value) * The ID of a smart contract to call.setAmount(long value) * An amount of tinybar sent via 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.setGas(long value) * A maximum limit to the amount of gas to use for this 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
-
hasContractID
public boolean hasContractID()* The ID of a smart contract to call.
.proto.ContractID contractID = 1;- Specified by:
hasContractIDin interfaceContractCallTransactionBodyOrBuilder- Returns:
- Whether the contractID field is set.
-
getContractID
* The ID of a smart contract to call.
.proto.ContractID contractID = 1;- Specified by:
getContractIDin interfaceContractCallTransactionBodyOrBuilder- Returns:
- The contractID.
-
setContractID
* The ID of a smart contract to call.
.proto.ContractID contractID = 1; -
setContractID
* The ID of a smart contract to call.
.proto.ContractID contractID = 1; -
mergeContractID
* The ID of a smart contract to call.
.proto.ContractID contractID = 1; -
clearContractID
* The ID of a smart contract to call.
.proto.ContractID contractID = 1; -
getGas
public long getGas()* A maximum limit to the amount of gas to use for this call. <p> The network SHALL charge the greater of the following, but SHALL NOT charge more than the value of this field. <ol> <li>The actual gas consumed by the smart contract call.</li> <li>`80%` of this value.</li> </ol> The `80%` factor encourages reasonable estimation, while allowing for some overage to ensure successful execution.
int64 gas = 2;- Specified by:
getGasin interfaceContractCallTransactionBodyOrBuilder- Returns:
- The gas.
-
setGas
* A maximum limit to the amount of gas to use for this call. <p> The network SHALL charge the greater of the following, but SHALL NOT charge more than the value of this field. <ol> <li>The actual gas consumed by the smart contract call.</li> <li>`80%` of this value.</li> </ol> The `80%` factor encourages reasonable estimation, while allowing for some overage to ensure successful execution.
int64 gas = 2;- Parameters:
value- The gas to set.- Returns:
- This builder for chaining.
-
clearGas
* A maximum limit to the amount of gas to use for this call. <p> The network SHALL charge the greater of the following, but SHALL NOT charge more than the value of this field. <ol> <li>The actual gas consumed by the smart contract call.</li> <li>`80%` of this value.</li> </ol> The `80%` factor encourages reasonable estimation, while allowing for some overage to ensure successful execution.
int64 gas = 2;- Returns:
- This builder for chaining.
-
getAmount
public long getAmount()* An amount of tinybar sent via this contract call. <p> If this is non-zero, the function MUST be `payable`.
int64 amount = 3;- Specified by:
getAmountin interfaceContractCallTransactionBodyOrBuilder- Returns:
- The amount.
-
setAmount
* An amount of tinybar sent via this contract call. <p> If this is non-zero, the function MUST be `payable`.
int64 amount = 3;- Parameters:
value- The amount to set.- Returns:
- This builder for chaining.
-
clearAmount
* An amount of tinybar sent via this contract call. <p> If this is non-zero, the function MUST be `payable`.
int64 amount = 3;- Returns:
- This builder for chaining.
-
getFunctionParameters
public com.google.protobuf.ByteString getFunctionParameters()* The smart contract function to call. <p> This MUST contain The application binary interface (ABI) encoding of the function call per the Ethereum contract ABI standard, giving the function signature and arguments being passed to the function.
bytes functionParameters = 4;- Specified by:
getFunctionParametersin interfaceContractCallTransactionBodyOrBuilder- Returns:
- The functionParameters.
-
setFunctionParameters
public ContractCallTransactionBody.Builder setFunctionParameters(com.google.protobuf.ByteString value) * The smart contract function to call. <p> This MUST contain The application binary interface (ABI) encoding of the function call per the Ethereum contract ABI standard, giving the function signature and arguments being passed to the function.
bytes functionParameters = 4;- Parameters:
value- The functionParameters to set.- Returns:
- This builder for chaining.
-
clearFunctionParameters
* The smart contract function to call. <p> This MUST contain The application binary interface (ABI) encoding of the function call per the Ethereum contract ABI standard, giving the function signature and arguments being passed to the function.
bytes functionParameters = 4;- Returns:
- This builder for chaining.
-