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
  • Method Details

    • hasContractID

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

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

      public ContractCallTransactionBody.Builder setContractID(ContractID value)
       *
       The ID of a smart contract to call.
       
      .proto.ContractID contractID = 1;
    • setContractID

      public ContractCallTransactionBody.Builder setContractID(ContractID.Builder builderForValue)
       *
       The ID of a smart contract to call.
       
      .proto.ContractID contractID = 1;
    • mergeContractID

      public ContractCallTransactionBody.Builder mergeContractID(ContractID value)
       *
       The ID of a smart contract to call.
       
      .proto.ContractID contractID = 1;
    • clearContractID

      public ContractCallTransactionBody.Builder 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:
      getGas in interface ContractCallTransactionBodyOrBuilder
      Returns:
      The gas.
    • setGas

      public ContractCallTransactionBody.Builder setGas(long value)
       *
       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:
      getAmount in interface ContractCallTransactionBodyOrBuilder
      Returns:
      The amount.
    • setAmount

      public ContractCallTransactionBody.Builder setAmount(long value)
       *
       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:
      getFunctionParameters in interface ContractCallTransactionBodyOrBuilder
      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

      public ContractCallTransactionBody.Builder 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.