Class ContractCreateTransactionBody.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<ContractCreateTransactionBody,ContractCreateTransactionBody.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<ContractCreateTransactionBody,ContractCreateTransactionBody.Builder>
com.hedera.hashgraph.sdk.proto.ContractCreateTransactionBody.Builder
All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, ContractCreateTransactionBodyOrBuilder, Cloneable
Enclosing class:
ContractCreateTransactionBody

public static final class ContractCreateTransactionBody.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<ContractCreateTransactionBody,ContractCreateTransactionBody.Builder> implements ContractCreateTransactionBodyOrBuilder
 *
 Create a new smart contract.

 If this transaction succeeds, the `ContractID` for the new smart contract
 SHALL be set in the transaction receipt.<br/>
 The contract is defined by the initial bytecode (or `initcode`). The
 `initcode` SHALL be stored either in a previously created file, or in the
 transaction body itself for very small contracts.

 As part of contract creation, the constructor defined for the new smart
 contract SHALL run with the parameters provided in the
 `constructorParameters` field.<br/>
 The gas to "power" that constructor MUST be provided via the `gas` field,
 and SHALL be charged to the payer for this transaction.<br/>
 If the contract _constructor_ stores information, it is charged gas for that
 storage. There is a separate fee in HBAR to maintain that storage until the
 expiration, and that fee SHALL be added to this transaction as part of the
 _transaction fee_, rather than gas.

 ### Block Stream Effects
 A `CreateContractOutput` message SHALL be emitted for each transaction.
 
Protobuf type proto.ContractCreateTransactionBody
  • Method Details

    • getInitcodeSourceCase

      public ContractCreateTransactionBody.InitcodeSourceCase getInitcodeSourceCase()
      Specified by:
      getInitcodeSourceCase in interface ContractCreateTransactionBodyOrBuilder
    • clearInitcodeSource

      public ContractCreateTransactionBody.Builder clearInitcodeSource()
    • getStakedIdCase

      Specified by:
      getStakedIdCase in interface ContractCreateTransactionBodyOrBuilder
    • clearStakedId

      public ContractCreateTransactionBody.Builder clearStakedId()
    • hasFileID

      public boolean hasFileID()
       *
       The source for the smart contract EVM bytecode.
       <p>
       The file containing the smart contract initcode.
       A copy of the contents SHALL be made and held as `bytes`
       in smart contract state.<br/>
       The contract bytecode is limited in size only by the
       network file size limit.
       
      .proto.FileID fileID = 1;
      Specified by:
      hasFileID in interface ContractCreateTransactionBodyOrBuilder
      Returns:
      Whether the fileID field is set.
    • getFileID

      public FileID getFileID()
       *
       The source for the smart contract EVM bytecode.
       <p>
       The file containing the smart contract initcode.
       A copy of the contents SHALL be made and held as `bytes`
       in smart contract state.<br/>
       The contract bytecode is limited in size only by the
       network file size limit.
       
      .proto.FileID fileID = 1;
      Specified by:
      getFileID in interface ContractCreateTransactionBodyOrBuilder
      Returns:
      The fileID.
    • setFileID

       *
       The source for the smart contract EVM bytecode.
       <p>
       The file containing the smart contract initcode.
       A copy of the contents SHALL be made and held as `bytes`
       in smart contract state.<br/>
       The contract bytecode is limited in size only by the
       network file size limit.
       
      .proto.FileID fileID = 1;
    • setFileID

      public ContractCreateTransactionBody.Builder setFileID(FileID.Builder builderForValue)
       *
       The source for the smart contract EVM bytecode.
       <p>
       The file containing the smart contract initcode.
       A copy of the contents SHALL be made and held as `bytes`
       in smart contract state.<br/>
       The contract bytecode is limited in size only by the
       network file size limit.
       
      .proto.FileID fileID = 1;
    • mergeFileID

      public ContractCreateTransactionBody.Builder mergeFileID(FileID value)
       *
       The source for the smart contract EVM bytecode.
       <p>
       The file containing the smart contract initcode.
       A copy of the contents SHALL be made and held as `bytes`
       in smart contract state.<br/>
       The contract bytecode is limited in size only by the
       network file size limit.
       
      .proto.FileID fileID = 1;
    • clearFileID

       *
       The source for the smart contract EVM bytecode.
       <p>
       The file containing the smart contract initcode.
       A copy of the contents SHALL be made and held as `bytes`
       in smart contract state.<br/>
       The contract bytecode is limited in size only by the
       network file size limit.
       
      .proto.FileID fileID = 1;
    • hasInitcode

      public boolean hasInitcode()
       *
       The source for the smart contract EVM bytecode.
       <p>
       The bytes of the smart contract initcode. A copy of the contents
       SHALL be made and held as `bytes` in smart contract state.<br/>
       This value is limited in length by the network transaction size
       limit. This entire transaction, including all fields and signatures,
       MUST be less than the network transaction size limit.
       
      bytes initcode = 16;
      Specified by:
      hasInitcode in interface ContractCreateTransactionBodyOrBuilder
      Returns:
      Whether the initcode field is set.
    • getInitcode

      public com.google.protobuf.ByteString getInitcode()
       *
       The source for the smart contract EVM bytecode.
       <p>
       The bytes of the smart contract initcode. A copy of the contents
       SHALL be made and held as `bytes` in smart contract state.<br/>
       This value is limited in length by the network transaction size
       limit. This entire transaction, including all fields and signatures,
       MUST be less than the network transaction size limit.
       
      bytes initcode = 16;
      Specified by:
      getInitcode in interface ContractCreateTransactionBodyOrBuilder
      Returns:
      The initcode.
    • setInitcode

      public ContractCreateTransactionBody.Builder setInitcode(com.google.protobuf.ByteString value)
       *
       The source for the smart contract EVM bytecode.
       <p>
       The bytes of the smart contract initcode. A copy of the contents
       SHALL be made and held as `bytes` in smart contract state.<br/>
       This value is limited in length by the network transaction size
       limit. This entire transaction, including all fields and signatures,
       MUST be less than the network transaction size limit.
       
      bytes initcode = 16;
      Parameters:
      value - The initcode to set.
      Returns:
      This builder for chaining.
    • clearInitcode

      public ContractCreateTransactionBody.Builder clearInitcode()
       *
       The source for the smart contract EVM bytecode.
       <p>
       The bytes of the smart contract initcode. A copy of the contents
       SHALL be made and held as `bytes` in smart contract state.<br/>
       This value is limited in length by the network transaction size
       limit. This entire transaction, including all fields and signatures,
       MUST be less than the network transaction size limit.
       
      bytes initcode = 16;
      Returns:
      This builder for chaining.
    • hasAdminKey

      public boolean hasAdminKey()
       *
       Access control for modification of the smart contract after
       it is created.
       <p>
       If this field is set, that key MUST sign this transaction.<br/>
       If this field is set, that key MUST sign each future transaction to
       update or delete the contract.<br/>
       An updateContract transaction that _only_ extends the topic
       expirationTime (a "manual renewal" transaction) SHALL NOT require
       admin key signature.
       <p>
       A contract without an admin key SHALL be immutable, except for
       expiration and renewal.
       
      .proto.Key adminKey = 3;
      Specified by:
      hasAdminKey in interface ContractCreateTransactionBodyOrBuilder
      Returns:
      Whether the adminKey field is set.
    • getAdminKey

      public Key getAdminKey()
       *
       Access control for modification of the smart contract after
       it is created.
       <p>
       If this field is set, that key MUST sign this transaction.<br/>
       If this field is set, that key MUST sign each future transaction to
       update or delete the contract.<br/>
       An updateContract transaction that _only_ extends the topic
       expirationTime (a "manual renewal" transaction) SHALL NOT require
       admin key signature.
       <p>
       A contract without an admin key SHALL be immutable, except for
       expiration and renewal.
       
      .proto.Key adminKey = 3;
      Specified by:
      getAdminKey in interface ContractCreateTransactionBodyOrBuilder
      Returns:
      The adminKey.
    • setAdminKey

      public ContractCreateTransactionBody.Builder setAdminKey(Key value)
       *
       Access control for modification of the smart contract after
       it is created.
       <p>
       If this field is set, that key MUST sign this transaction.<br/>
       If this field is set, that key MUST sign each future transaction to
       update or delete the contract.<br/>
       An updateContract transaction that _only_ extends the topic
       expirationTime (a "manual renewal" transaction) SHALL NOT require
       admin key signature.
       <p>
       A contract without an admin key SHALL be immutable, except for
       expiration and renewal.
       
      .proto.Key adminKey = 3;
    • setAdminKey

      public ContractCreateTransactionBody.Builder setAdminKey(Key.Builder builderForValue)
       *
       Access control for modification of the smart contract after
       it is created.
       <p>
       If this field is set, that key MUST sign this transaction.<br/>
       If this field is set, that key MUST sign each future transaction to
       update or delete the contract.<br/>
       An updateContract transaction that _only_ extends the topic
       expirationTime (a "manual renewal" transaction) SHALL NOT require
       admin key signature.
       <p>
       A contract without an admin key SHALL be immutable, except for
       expiration and renewal.
       
      .proto.Key adminKey = 3;
    • mergeAdminKey

      public ContractCreateTransactionBody.Builder mergeAdminKey(Key value)
       *
       Access control for modification of the smart contract after
       it is created.
       <p>
       If this field is set, that key MUST sign this transaction.<br/>
       If this field is set, that key MUST sign each future transaction to
       update or delete the contract.<br/>
       An updateContract transaction that _only_ extends the topic
       expirationTime (a "manual renewal" transaction) SHALL NOT require
       admin key signature.
       <p>
       A contract without an admin key SHALL be immutable, except for
       expiration and renewal.
       
      .proto.Key adminKey = 3;
    • clearAdminKey

      public ContractCreateTransactionBody.Builder clearAdminKey()
       *
       Access control for modification of the smart contract after
       it is created.
       <p>
       If this field is set, that key MUST sign this transaction.<br/>
       If this field is set, that key MUST sign each future transaction to
       update or delete the contract.<br/>
       An updateContract transaction that _only_ extends the topic
       expirationTime (a "manual renewal" transaction) SHALL NOT require
       admin key signature.
       <p>
       A contract without an admin key SHALL be immutable, except for
       expiration and renewal.
       
      .proto.Key adminKey = 3;
    • getGas

      public long getGas()
       *
       A maximum limit to the amount of gas to use for the constructor 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
       constructor 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 = 4;
      Specified by:
      getGas in interface ContractCreateTransactionBodyOrBuilder
      Returns:
      The gas.
    • setGas

      public ContractCreateTransactionBody.Builder setGas(long value)
       *
       A maximum limit to the amount of gas to use for the constructor 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
       constructor 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 = 4;
      Parameters:
      value - The gas to set.
      Returns:
      This builder for chaining.
    • clearGas

       *
       A maximum limit to the amount of gas to use for the constructor 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
       constructor 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 = 4;
      Returns:
      This builder for chaining.
    • getInitialBalance

      public long getInitialBalance()
       *
       The amount of HBAR to use as an initial balance for the account
       representing the new smart contract.
       <p>
       This value is presented in tinybar
       (10<sup><strong>-</strong>8</sup> HBAR).<br/>
       The HBAR provided here will be withdrawn from the payer account that
       signed this transaction.
       
      int64 initialBalance = 5;
      Specified by:
      getInitialBalance in interface ContractCreateTransactionBodyOrBuilder
      Returns:
      The initialBalance.
    • setInitialBalance

      public ContractCreateTransactionBody.Builder setInitialBalance(long value)
       *
       The amount of HBAR to use as an initial balance for the account
       representing the new smart contract.
       <p>
       This value is presented in tinybar
       (10<sup><strong>-</strong>8</sup> HBAR).<br/>
       The HBAR provided here will be withdrawn from the payer account that
       signed this transaction.
       
      int64 initialBalance = 5;
      Parameters:
      value - The initialBalance to set.
      Returns:
      This builder for chaining.
    • clearInitialBalance

      public ContractCreateTransactionBody.Builder clearInitialBalance()
       *
       The amount of HBAR to use as an initial balance for the account
       representing the new smart contract.
       <p>
       This value is presented in tinybar
       (10<sup><strong>-</strong>8</sup> HBAR).<br/>
       The HBAR provided here will be withdrawn from the payer account that
       signed this transaction.
       
      int64 initialBalance = 5;
      Returns:
      This builder for chaining.
    • hasProxyAccountID

      @Deprecated public boolean hasProxyAccountID()
      Deprecated.
       *
       Proxy account staking is handled via `staked_id`.
       <p>
       Former field to designate a proxy account for HBAR staking.
       This field MUST NOT be set.
       
      .proto.AccountID proxyAccountID = 6 [deprecated = true];
      Specified by:
      hasProxyAccountID in interface ContractCreateTransactionBodyOrBuilder
      Returns:
      Whether the proxyAccountID field is set.
    • getProxyAccountID

      @Deprecated public AccountID getProxyAccountID()
      Deprecated.
       *
       Proxy account staking is handled via `staked_id`.
       <p>
       Former field to designate a proxy account for HBAR staking.
       This field MUST NOT be set.
       
      .proto.AccountID proxyAccountID = 6 [deprecated = true];
      Specified by:
      getProxyAccountID in interface ContractCreateTransactionBodyOrBuilder
      Returns:
      The proxyAccountID.
    • setProxyAccountID

      Deprecated.
       *
       Proxy account staking is handled via `staked_id`.
       <p>
       Former field to designate a proxy account for HBAR staking.
       This field MUST NOT be set.
       
      .proto.AccountID proxyAccountID = 6 [deprecated = true];
    • setProxyAccountID

      @Deprecated public ContractCreateTransactionBody.Builder setProxyAccountID(AccountID.Builder builderForValue)
      Deprecated.
       *
       Proxy account staking is handled via `staked_id`.
       <p>
       Former field to designate a proxy account for HBAR staking.
       This field MUST NOT be set.
       
      .proto.AccountID proxyAccountID = 6 [deprecated = true];
    • mergeProxyAccountID

      @Deprecated public ContractCreateTransactionBody.Builder mergeProxyAccountID(AccountID value)
      Deprecated.
       *
       Proxy account staking is handled via `staked_id`.
       <p>
       Former field to designate a proxy account for HBAR staking.
       This field MUST NOT be set.
       
      .proto.AccountID proxyAccountID = 6 [deprecated = true];
    • clearProxyAccountID

      @Deprecated public ContractCreateTransactionBody.Builder clearProxyAccountID()
      Deprecated.
       *
       Proxy account staking is handled via `staked_id`.
       <p>
       Former field to designate a proxy account for HBAR staking.
       This field MUST NOT be set.
       
      .proto.AccountID proxyAccountID = 6 [deprecated = true];
    • hasAutoRenewPeriod

      public boolean hasAutoRenewPeriod()
       *
       The initial lifetime, in seconds, for the smart contract, and the number
       of seconds for which the smart contract will be automatically renewed
       upon expiration.
       <p>
       This value MUST be set.<br/>
       This value MUST be greater than the configured MIN_AUTORENEW_PERIOD.<br/>
       This value MUST be less than the configured MAX_AUTORENEW_PERIOD.<br/>
       
      .proto.Duration autoRenewPeriod = 8;
      Specified by:
      hasAutoRenewPeriod in interface ContractCreateTransactionBodyOrBuilder
      Returns:
      Whether the autoRenewPeriod field is set.
    • getAutoRenewPeriod

      public Duration getAutoRenewPeriod()
       *
       The initial lifetime, in seconds, for the smart contract, and the number
       of seconds for which the smart contract will be automatically renewed
       upon expiration.
       <p>
       This value MUST be set.<br/>
       This value MUST be greater than the configured MIN_AUTORENEW_PERIOD.<br/>
       This value MUST be less than the configured MAX_AUTORENEW_PERIOD.<br/>
       
      .proto.Duration autoRenewPeriod = 8;
      Specified by:
      getAutoRenewPeriod in interface ContractCreateTransactionBodyOrBuilder
      Returns:
      The autoRenewPeriod.
    • setAutoRenewPeriod

      public ContractCreateTransactionBody.Builder setAutoRenewPeriod(Duration value)
       *
       The initial lifetime, in seconds, for the smart contract, and the number
       of seconds for which the smart contract will be automatically renewed
       upon expiration.
       <p>
       This value MUST be set.<br/>
       This value MUST be greater than the configured MIN_AUTORENEW_PERIOD.<br/>
       This value MUST be less than the configured MAX_AUTORENEW_PERIOD.<br/>
       
      .proto.Duration autoRenewPeriod = 8;
    • setAutoRenewPeriod

      public ContractCreateTransactionBody.Builder setAutoRenewPeriod(Duration.Builder builderForValue)
       *
       The initial lifetime, in seconds, for the smart contract, and the number
       of seconds for which the smart contract will be automatically renewed
       upon expiration.
       <p>
       This value MUST be set.<br/>
       This value MUST be greater than the configured MIN_AUTORENEW_PERIOD.<br/>
       This value MUST be less than the configured MAX_AUTORENEW_PERIOD.<br/>
       
      .proto.Duration autoRenewPeriod = 8;
    • mergeAutoRenewPeriod

      public ContractCreateTransactionBody.Builder mergeAutoRenewPeriod(Duration value)
       *
       The initial lifetime, in seconds, for the smart contract, and the number
       of seconds for which the smart contract will be automatically renewed
       upon expiration.
       <p>
       This value MUST be set.<br/>
       This value MUST be greater than the configured MIN_AUTORENEW_PERIOD.<br/>
       This value MUST be less than the configured MAX_AUTORENEW_PERIOD.<br/>
       
      .proto.Duration autoRenewPeriod = 8;
    • clearAutoRenewPeriod

      public ContractCreateTransactionBody.Builder clearAutoRenewPeriod()
       *
       The initial lifetime, in seconds, for the smart contract, and the number
       of seconds for which the smart contract will be automatically renewed
       upon expiration.
       <p>
       This value MUST be set.<br/>
       This value MUST be greater than the configured MIN_AUTORENEW_PERIOD.<br/>
       This value MUST be less than the configured MAX_AUTORENEW_PERIOD.<br/>
       
      .proto.Duration autoRenewPeriod = 8;
    • getConstructorParameters

      public com.google.protobuf.ByteString getConstructorParameters()
       *
       An array of bytes containing the EVM-encoded parameters to pass to
       the smart contract constructor defined in the smart contract init
       code provided.
       
      bytes constructorParameters = 9;
      Specified by:
      getConstructorParameters in interface ContractCreateTransactionBodyOrBuilder
      Returns:
      The constructorParameters.
    • setConstructorParameters

      public ContractCreateTransactionBody.Builder setConstructorParameters(com.google.protobuf.ByteString value)
       *
       An array of bytes containing the EVM-encoded parameters to pass to
       the smart contract constructor defined in the smart contract init
       code provided.
       
      bytes constructorParameters = 9;
      Parameters:
      value - The constructorParameters to set.
      Returns:
      This builder for chaining.
    • clearConstructorParameters

      public ContractCreateTransactionBody.Builder clearConstructorParameters()
       *
       An array of bytes containing the EVM-encoded parameters to pass to
       the smart contract constructor defined in the smart contract init
       code provided.
       
      bytes constructorParameters = 9;
      Returns:
      This builder for chaining.
    • hasShardID

      public boolean hasShardID()
       *
       <blockquote>Review Question<br/>
       <blockquote>Should this be deprecated?<br/>
       It's never been used and probably never should be used...<br/>
       Shard should be determined by the node the transaction is submitted to.
       </blockquote></blockquote>
       <p>
       The shard in which to create the new smart contract.<br/>
       This value is currently ignored.
       
      .proto.ShardID shardID = 10;
      Specified by:
      hasShardID in interface ContractCreateTransactionBodyOrBuilder
      Returns:
      Whether the shardID field is set.
    • getShardID

      public ShardID getShardID()
       *
       <blockquote>Review Question<br/>
       <blockquote>Should this be deprecated?<br/>
       It's never been used and probably never should be used...<br/>
       Shard should be determined by the node the transaction is submitted to.
       </blockquote></blockquote>
       <p>
       The shard in which to create the new smart contract.<br/>
       This value is currently ignored.
       
      .proto.ShardID shardID = 10;
      Specified by:
      getShardID in interface ContractCreateTransactionBodyOrBuilder
      Returns:
      The shardID.
    • setShardID

       *
       <blockquote>Review Question<br/>
       <blockquote>Should this be deprecated?<br/>
       It's never been used and probably never should be used...<br/>
       Shard should be determined by the node the transaction is submitted to.
       </blockquote></blockquote>
       <p>
       The shard in which to create the new smart contract.<br/>
       This value is currently ignored.
       
      .proto.ShardID shardID = 10;
    • setShardID

      public ContractCreateTransactionBody.Builder setShardID(ShardID.Builder builderForValue)
       *
       <blockquote>Review Question<br/>
       <blockquote>Should this be deprecated?<br/>
       It's never been used and probably never should be used...<br/>
       Shard should be determined by the node the transaction is submitted to.
       </blockquote></blockquote>
       <p>
       The shard in which to create the new smart contract.<br/>
       This value is currently ignored.
       
      .proto.ShardID shardID = 10;
    • mergeShardID

      public ContractCreateTransactionBody.Builder mergeShardID(ShardID value)
       *
       <blockquote>Review Question<br/>
       <blockquote>Should this be deprecated?<br/>
       It's never been used and probably never should be used...<br/>
       Shard should be determined by the node the transaction is submitted to.
       </blockquote></blockquote>
       <p>
       The shard in which to create the new smart contract.<br/>
       This value is currently ignored.
       
      .proto.ShardID shardID = 10;
    • clearShardID

       *
       <blockquote>Review Question<br/>
       <blockquote>Should this be deprecated?<br/>
       It's never been used and probably never should be used...<br/>
       Shard should be determined by the node the transaction is submitted to.
       </blockquote></blockquote>
       <p>
       The shard in which to create the new smart contract.<br/>
       This value is currently ignored.
       
      .proto.ShardID shardID = 10;
    • hasRealmID

      public boolean hasRealmID()
       *
       <blockquote>Review Question<br/>
       <blockquote>Should this be deprecated?<br/>
       It's never been used and probably never should be used...<br/>
       Realm should be determined by node and network parameters.
       </blockquote></blockquote>
       <p>
       The shard/realm in which to create the new smart contract.<br/>
       This value is currently ignored.
       
      .proto.RealmID realmID = 11;
      Specified by:
      hasRealmID in interface ContractCreateTransactionBodyOrBuilder
      Returns:
      Whether the realmID field is set.
    • getRealmID

      public RealmID getRealmID()
       *
       <blockquote>Review Question<br/>
       <blockquote>Should this be deprecated?<br/>
       It's never been used and probably never should be used...<br/>
       Realm should be determined by node and network parameters.
       </blockquote></blockquote>
       <p>
       The shard/realm in which to create the new smart contract.<br/>
       This value is currently ignored.
       
      .proto.RealmID realmID = 11;
      Specified by:
      getRealmID in interface ContractCreateTransactionBodyOrBuilder
      Returns:
      The realmID.
    • setRealmID

       *
       <blockquote>Review Question<br/>
       <blockquote>Should this be deprecated?<br/>
       It's never been used and probably never should be used...<br/>
       Realm should be determined by node and network parameters.
       </blockquote></blockquote>
       <p>
       The shard/realm in which to create the new smart contract.<br/>
       This value is currently ignored.
       
      .proto.RealmID realmID = 11;
    • setRealmID

      public ContractCreateTransactionBody.Builder setRealmID(RealmID.Builder builderForValue)
       *
       <blockquote>Review Question<br/>
       <blockquote>Should this be deprecated?<br/>
       It's never been used and probably never should be used...<br/>
       Realm should be determined by node and network parameters.
       </blockquote></blockquote>
       <p>
       The shard/realm in which to create the new smart contract.<br/>
       This value is currently ignored.
       
      .proto.RealmID realmID = 11;
    • mergeRealmID

      public ContractCreateTransactionBody.Builder mergeRealmID(RealmID value)
       *
       <blockquote>Review Question<br/>
       <blockquote>Should this be deprecated?<br/>
       It's never been used and probably never should be used...<br/>
       Realm should be determined by node and network parameters.
       </blockquote></blockquote>
       <p>
       The shard/realm in which to create the new smart contract.<br/>
       This value is currently ignored.
       
      .proto.RealmID realmID = 11;
    • clearRealmID

       *
       <blockquote>Review Question<br/>
       <blockquote>Should this be deprecated?<br/>
       It's never been used and probably never should be used...<br/>
       Realm should be determined by node and network parameters.
       </blockquote></blockquote>
       <p>
       The shard/realm in which to create the new smart contract.<br/>
       This value is currently ignored.
       
      .proto.RealmID realmID = 11;
    • hasNewRealmAdminKey

      public boolean hasNewRealmAdminKey()
       *
       <blockquote>Review Question<br/>
       <blockquote>Should this be deprecated?<br/>
       It's never been used and probably never should be used...<br/>
       If a realm is used, it must already exist; we shouldn't be creating it
       without a separate transaction.</blockquote></blockquote>
       <p>
       This was intended to provide an admin key for any new realm created
       during the creation of the smart contract.<br/>
       This value is currently ignored. a new realm SHALL NOT be created,
       regardless of the value of `realmID`.
       
      .proto.Key newRealmAdminKey = 12;
      Specified by:
      hasNewRealmAdminKey in interface ContractCreateTransactionBodyOrBuilder
      Returns:
      Whether the newRealmAdminKey field is set.
    • getNewRealmAdminKey

      public Key getNewRealmAdminKey()
       *
       <blockquote>Review Question<br/>
       <blockquote>Should this be deprecated?<br/>
       It's never been used and probably never should be used...<br/>
       If a realm is used, it must already exist; we shouldn't be creating it
       without a separate transaction.</blockquote></blockquote>
       <p>
       This was intended to provide an admin key for any new realm created
       during the creation of the smart contract.<br/>
       This value is currently ignored. a new realm SHALL NOT be created,
       regardless of the value of `realmID`.
       
      .proto.Key newRealmAdminKey = 12;
      Specified by:
      getNewRealmAdminKey in interface ContractCreateTransactionBodyOrBuilder
      Returns:
      The newRealmAdminKey.
    • setNewRealmAdminKey

      public ContractCreateTransactionBody.Builder setNewRealmAdminKey(Key value)
       *
       <blockquote>Review Question<br/>
       <blockquote>Should this be deprecated?<br/>
       It's never been used and probably never should be used...<br/>
       If a realm is used, it must already exist; we shouldn't be creating it
       without a separate transaction.</blockquote></blockquote>
       <p>
       This was intended to provide an admin key for any new realm created
       during the creation of the smart contract.<br/>
       This value is currently ignored. a new realm SHALL NOT be created,
       regardless of the value of `realmID`.
       
      .proto.Key newRealmAdminKey = 12;
    • setNewRealmAdminKey

      public ContractCreateTransactionBody.Builder setNewRealmAdminKey(Key.Builder builderForValue)
       *
       <blockquote>Review Question<br/>
       <blockquote>Should this be deprecated?<br/>
       It's never been used and probably never should be used...<br/>
       If a realm is used, it must already exist; we shouldn't be creating it
       without a separate transaction.</blockquote></blockquote>
       <p>
       This was intended to provide an admin key for any new realm created
       during the creation of the smart contract.<br/>
       This value is currently ignored. a new realm SHALL NOT be created,
       regardless of the value of `realmID`.
       
      .proto.Key newRealmAdminKey = 12;
    • mergeNewRealmAdminKey

      public ContractCreateTransactionBody.Builder mergeNewRealmAdminKey(Key value)
       *
       <blockquote>Review Question<br/>
       <blockquote>Should this be deprecated?<br/>
       It's never been used and probably never should be used...<br/>
       If a realm is used, it must already exist; we shouldn't be creating it
       without a separate transaction.</blockquote></blockquote>
       <p>
       This was intended to provide an admin key for any new realm created
       during the creation of the smart contract.<br/>
       This value is currently ignored. a new realm SHALL NOT be created,
       regardless of the value of `realmID`.
       
      .proto.Key newRealmAdminKey = 12;
    • clearNewRealmAdminKey

      public ContractCreateTransactionBody.Builder clearNewRealmAdminKey()
       *
       <blockquote>Review Question<br/>
       <blockquote>Should this be deprecated?<br/>
       It's never been used and probably never should be used...<br/>
       If a realm is used, it must already exist; we shouldn't be creating it
       without a separate transaction.</blockquote></blockquote>
       <p>
       This was intended to provide an admin key for any new realm created
       during the creation of the smart contract.<br/>
       This value is currently ignored. a new realm SHALL NOT be created,
       regardless of the value of `realmID`.
       
      .proto.Key newRealmAdminKey = 12;
    • getMemo

      public String getMemo()
       *
       A short memo for this smart contract.
       <p>
       This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes`
       (default 100) bytes when encoded as UTF-8.
       
      string memo = 13;
      Specified by:
      getMemo in interface ContractCreateTransactionBodyOrBuilder
      Returns:
      The memo.
    • getMemoBytes

      public com.google.protobuf.ByteString getMemoBytes()
       *
       A short memo for this smart contract.
       <p>
       This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes`
       (default 100) bytes when encoded as UTF-8.
       
      string memo = 13;
      Specified by:
      getMemoBytes in interface ContractCreateTransactionBodyOrBuilder
      Returns:
      The bytes for memo.
    • setMemo

       *
       A short memo for this smart contract.
       <p>
       This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes`
       (default 100) bytes when encoded as UTF-8.
       
      string memo = 13;
      Parameters:
      value - The memo to set.
      Returns:
      This builder for chaining.
    • clearMemo

       *
       A short memo for this smart contract.
       <p>
       This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes`
       (default 100) bytes when encoded as UTF-8.
       
      string memo = 13;
      Returns:
      This builder for chaining.
    • setMemoBytes

      public ContractCreateTransactionBody.Builder setMemoBytes(com.google.protobuf.ByteString value)
       *
       A short memo for this smart contract.
       <p>
       This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes`
       (default 100) bytes when encoded as UTF-8.
       
      string memo = 13;
      Parameters:
      value - The bytes for memo to set.
      Returns:
      This builder for chaining.
    • getMaxAutomaticTokenAssociations

      public int getMaxAutomaticTokenAssociations()
       *
       The maximum number of tokens that can be auto-associated with this
       smart contract.
       <p>
       If this is less than or equal to `used_auto_associations` (or 0), then
       this contract MUST manually associate with a token before transacting
       in that token.<br/>
       Following HIP-904 This value may also be `-1` to indicate no limit.<br/>
       This value MUST NOT be less than `-1`.
       
      int32 max_automatic_token_associations = 14;
      Specified by:
      getMaxAutomaticTokenAssociations in interface ContractCreateTransactionBodyOrBuilder
      Returns:
      The maxAutomaticTokenAssociations.
    • setMaxAutomaticTokenAssociations

      public ContractCreateTransactionBody.Builder setMaxAutomaticTokenAssociations(int value)
       *
       The maximum number of tokens that can be auto-associated with this
       smart contract.
       <p>
       If this is less than or equal to `used_auto_associations` (or 0), then
       this contract MUST manually associate with a token before transacting
       in that token.<br/>
       Following HIP-904 This value may also be `-1` to indicate no limit.<br/>
       This value MUST NOT be less than `-1`.
       
      int32 max_automatic_token_associations = 14;
      Parameters:
      value - The maxAutomaticTokenAssociations to set.
      Returns:
      This builder for chaining.
    • clearMaxAutomaticTokenAssociations

      public ContractCreateTransactionBody.Builder clearMaxAutomaticTokenAssociations()
       *
       The maximum number of tokens that can be auto-associated with this
       smart contract.
       <p>
       If this is less than or equal to `used_auto_associations` (or 0), then
       this contract MUST manually associate with a token before transacting
       in that token.<br/>
       Following HIP-904 This value may also be `-1` to indicate no limit.<br/>
       This value MUST NOT be less than `-1`.
       
      int32 max_automatic_token_associations = 14;
      Returns:
      This builder for chaining.
    • hasAutoRenewAccountId

      public boolean hasAutoRenewAccountId()
       *
       The id of an account, in the same shard and realm as this smart
       contract, that has signed this transaction, allowing the network to use
       its balance, when needed, to automatically extend this contract's
       expiration time.
       <p>
       If this field is set, that key MUST sign this transaction.<br/>
       If this field is set, then the network SHALL deduct the necessary fees
       from the designated auto renew account, if that account has sufficient
       balance. If the auto renew account does not have sufficient balance,
       then the fees for contract renewal SHALL be deducted from the HBAR
       balance held by the smart contract.<br/>
       If this field is not set, then all renewal fees SHALL be deducted from
       the HBAR balance held by this contract.
       
      .proto.AccountID auto_renew_account_id = 15;
      Specified by:
      hasAutoRenewAccountId in interface ContractCreateTransactionBodyOrBuilder
      Returns:
      Whether the autoRenewAccountId field is set.
    • getAutoRenewAccountId

      public AccountID getAutoRenewAccountId()
       *
       The id of an account, in the same shard and realm as this smart
       contract, that has signed this transaction, allowing the network to use
       its balance, when needed, to automatically extend this contract's
       expiration time.
       <p>
       If this field is set, that key MUST sign this transaction.<br/>
       If this field is set, then the network SHALL deduct the necessary fees
       from the designated auto renew account, if that account has sufficient
       balance. If the auto renew account does not have sufficient balance,
       then the fees for contract renewal SHALL be deducted from the HBAR
       balance held by the smart contract.<br/>
       If this field is not set, then all renewal fees SHALL be deducted from
       the HBAR balance held by this contract.
       
      .proto.AccountID auto_renew_account_id = 15;
      Specified by:
      getAutoRenewAccountId in interface ContractCreateTransactionBodyOrBuilder
      Returns:
      The autoRenewAccountId.
    • setAutoRenewAccountId

      public ContractCreateTransactionBody.Builder setAutoRenewAccountId(AccountID value)
       *
       The id of an account, in the same shard and realm as this smart
       contract, that has signed this transaction, allowing the network to use
       its balance, when needed, to automatically extend this contract's
       expiration time.
       <p>
       If this field is set, that key MUST sign this transaction.<br/>
       If this field is set, then the network SHALL deduct the necessary fees
       from the designated auto renew account, if that account has sufficient
       balance. If the auto renew account does not have sufficient balance,
       then the fees for contract renewal SHALL be deducted from the HBAR
       balance held by the smart contract.<br/>
       If this field is not set, then all renewal fees SHALL be deducted from
       the HBAR balance held by this contract.
       
      .proto.AccountID auto_renew_account_id = 15;
    • setAutoRenewAccountId

      public ContractCreateTransactionBody.Builder setAutoRenewAccountId(AccountID.Builder builderForValue)
       *
       The id of an account, in the same shard and realm as this smart
       contract, that has signed this transaction, allowing the network to use
       its balance, when needed, to automatically extend this contract's
       expiration time.
       <p>
       If this field is set, that key MUST sign this transaction.<br/>
       If this field is set, then the network SHALL deduct the necessary fees
       from the designated auto renew account, if that account has sufficient
       balance. If the auto renew account does not have sufficient balance,
       then the fees for contract renewal SHALL be deducted from the HBAR
       balance held by the smart contract.<br/>
       If this field is not set, then all renewal fees SHALL be deducted from
       the HBAR balance held by this contract.
       
      .proto.AccountID auto_renew_account_id = 15;
    • mergeAutoRenewAccountId

      public ContractCreateTransactionBody.Builder mergeAutoRenewAccountId(AccountID value)
       *
       The id of an account, in the same shard and realm as this smart
       contract, that has signed this transaction, allowing the network to use
       its balance, when needed, to automatically extend this contract's
       expiration time.
       <p>
       If this field is set, that key MUST sign this transaction.<br/>
       If this field is set, then the network SHALL deduct the necessary fees
       from the designated auto renew account, if that account has sufficient
       balance. If the auto renew account does not have sufficient balance,
       then the fees for contract renewal SHALL be deducted from the HBAR
       balance held by the smart contract.<br/>
       If this field is not set, then all renewal fees SHALL be deducted from
       the HBAR balance held by this contract.
       
      .proto.AccountID auto_renew_account_id = 15;
    • clearAutoRenewAccountId

      public ContractCreateTransactionBody.Builder clearAutoRenewAccountId()
       *
       The id of an account, in the same shard and realm as this smart
       contract, that has signed this transaction, allowing the network to use
       its balance, when needed, to automatically extend this contract's
       expiration time.
       <p>
       If this field is set, that key MUST sign this transaction.<br/>
       If this field is set, then the network SHALL deduct the necessary fees
       from the designated auto renew account, if that account has sufficient
       balance. If the auto renew account does not have sufficient balance,
       then the fees for contract renewal SHALL be deducted from the HBAR
       balance held by the smart contract.<br/>
       If this field is not set, then all renewal fees SHALL be deducted from
       the HBAR balance held by this contract.
       
      .proto.AccountID auto_renew_account_id = 15;
    • hasStakedAccountId

      public boolean hasStakedAccountId()
       *
       An account ID.
       <p>
       This smart contract SHALL stake its HBAR via this account as proxy.
       
      .proto.AccountID staked_account_id = 17;
      Specified by:
      hasStakedAccountId in interface ContractCreateTransactionBodyOrBuilder
      Returns:
      Whether the stakedAccountId field is set.
    • getStakedAccountId

      public AccountID getStakedAccountId()
       *
       An account ID.
       <p>
       This smart contract SHALL stake its HBAR via this account as proxy.
       
      .proto.AccountID staked_account_id = 17;
      Specified by:
      getStakedAccountId in interface ContractCreateTransactionBodyOrBuilder
      Returns:
      The stakedAccountId.
    • setStakedAccountId

      public ContractCreateTransactionBody.Builder setStakedAccountId(AccountID value)
       *
       An account ID.
       <p>
       This smart contract SHALL stake its HBAR via this account as proxy.
       
      .proto.AccountID staked_account_id = 17;
    • setStakedAccountId

      public ContractCreateTransactionBody.Builder setStakedAccountId(AccountID.Builder builderForValue)
       *
       An account ID.
       <p>
       This smart contract SHALL stake its HBAR via this account as proxy.
       
      .proto.AccountID staked_account_id = 17;
    • mergeStakedAccountId

      public ContractCreateTransactionBody.Builder mergeStakedAccountId(AccountID value)
       *
       An account ID.
       <p>
       This smart contract SHALL stake its HBAR via this account as proxy.
       
      .proto.AccountID staked_account_id = 17;
    • clearStakedAccountId

      public ContractCreateTransactionBody.Builder clearStakedAccountId()
       *
       An account ID.
       <p>
       This smart contract SHALL stake its HBAR via this account as proxy.
       
      .proto.AccountID staked_account_id = 17;
    • hasStakedNodeId

      public boolean hasStakedNodeId()
       *
       The ID of a network node.
       <p>
       This smart contract SHALL stake its HBAR to this node.
       <p>
       <blockquote>Note: node IDs do fluctuate as node operators change.
       Most contracts are immutable, and a contract staking to an invalid
       node ID SHALL NOT participate in staking. Immutable contracts MAY
       find it more reliable to use a proxy account for staking
       (via `staked_account_id`) to enable updating the _effective_ staking
       node ID when necessary through updating the proxy
       account.</blockquote>
       
      int64 staked_node_id = 18;
      Specified by:
      hasStakedNodeId in interface ContractCreateTransactionBodyOrBuilder
      Returns:
      Whether the stakedNodeId field is set.
    • getStakedNodeId

      public long getStakedNodeId()
       *
       The ID of a network node.
       <p>
       This smart contract SHALL stake its HBAR to this node.
       <p>
       <blockquote>Note: node IDs do fluctuate as node operators change.
       Most contracts are immutable, and a contract staking to an invalid
       node ID SHALL NOT participate in staking. Immutable contracts MAY
       find it more reliable to use a proxy account for staking
       (via `staked_account_id`) to enable updating the _effective_ staking
       node ID when necessary through updating the proxy
       account.</blockquote>
       
      int64 staked_node_id = 18;
      Specified by:
      getStakedNodeId in interface ContractCreateTransactionBodyOrBuilder
      Returns:
      The stakedNodeId.
    • setStakedNodeId

      public ContractCreateTransactionBody.Builder setStakedNodeId(long value)
       *
       The ID of a network node.
       <p>
       This smart contract SHALL stake its HBAR to this node.
       <p>
       <blockquote>Note: node IDs do fluctuate as node operators change.
       Most contracts are immutable, and a contract staking to an invalid
       node ID SHALL NOT participate in staking. Immutable contracts MAY
       find it more reliable to use a proxy account for staking
       (via `staked_account_id`) to enable updating the _effective_ staking
       node ID when necessary through updating the proxy
       account.</blockquote>
       
      int64 staked_node_id = 18;
      Parameters:
      value - The stakedNodeId to set.
      Returns:
      This builder for chaining.
    • clearStakedNodeId

      public ContractCreateTransactionBody.Builder clearStakedNodeId()
       *
       The ID of a network node.
       <p>
       This smart contract SHALL stake its HBAR to this node.
       <p>
       <blockquote>Note: node IDs do fluctuate as node operators change.
       Most contracts are immutable, and a contract staking to an invalid
       node ID SHALL NOT participate in staking. Immutable contracts MAY
       find it more reliable to use a proxy account for staking
       (via `staked_account_id`) to enable updating the _effective_ staking
       node ID when necessary through updating the proxy
       account.</blockquote>
       
      int64 staked_node_id = 18;
      Returns:
      This builder for chaining.
    • getDeclineReward

      public boolean getDeclineReward()
       *
       A flag indicating that this smart contract declines to receive any
       reward for staking its HBAR balance to help secure the network.
       <p>
       If set to true, this smart contract SHALL NOT receive any reward for
       staking its HBAR balance to help secure the network, regardless of
       staking configuration, but MAY stake HBAR to support the network
       without reward.
       
      bool decline_reward = 19;
      Specified by:
      getDeclineReward in interface ContractCreateTransactionBodyOrBuilder
      Returns:
      The declineReward.
    • setDeclineReward

      public ContractCreateTransactionBody.Builder setDeclineReward(boolean value)
       *
       A flag indicating that this smart contract declines to receive any
       reward for staking its HBAR balance to help secure the network.
       <p>
       If set to true, this smart contract SHALL NOT receive any reward for
       staking its HBAR balance to help secure the network, regardless of
       staking configuration, but MAY stake HBAR to support the network
       without reward.
       
      bool decline_reward = 19;
      Parameters:
      value - The declineReward to set.
      Returns:
      This builder for chaining.
    • clearDeclineReward

      public ContractCreateTransactionBody.Builder clearDeclineReward()
       *
       A flag indicating that this smart contract declines to receive any
       reward for staking its HBAR balance to help secure the network.
       <p>
       If set to true, this smart contract SHALL NOT receive any reward for
       staking its HBAR balance to help secure the network, regardless of
       staking configuration, but MAY stake HBAR to support the network
       without reward.
       
      bool decline_reward = 19;
      Returns:
      This builder for chaining.
    • getHookCreationDetailsList

      public List<HookCreationDetails> getHookCreationDetailsList()
       *
       Details of hooks to add immediately after creating this contract.
       
      repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 20;
      Specified by:
      getHookCreationDetailsList in interface ContractCreateTransactionBodyOrBuilder
    • getHookCreationDetailsCount

      public int getHookCreationDetailsCount()
       *
       Details of hooks to add immediately after creating this contract.
       
      repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 20;
      Specified by:
      getHookCreationDetailsCount in interface ContractCreateTransactionBodyOrBuilder
    • getHookCreationDetails

      public HookCreationDetails getHookCreationDetails(int index)
       *
       Details of hooks to add immediately after creating this contract.
       
      repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 20;
      Specified by:
      getHookCreationDetails in interface ContractCreateTransactionBodyOrBuilder
    • setHookCreationDetails

      public ContractCreateTransactionBody.Builder setHookCreationDetails(int index, HookCreationDetails value)
       *
       Details of hooks to add immediately after creating this contract.
       
      repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 20;
    • setHookCreationDetails

      public ContractCreateTransactionBody.Builder setHookCreationDetails(int index, HookCreationDetails.Builder builderForValue)
       *
       Details of hooks to add immediately after creating this contract.
       
      repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 20;
    • addHookCreationDetails

      public ContractCreateTransactionBody.Builder addHookCreationDetails(HookCreationDetails value)
       *
       Details of hooks to add immediately after creating this contract.
       
      repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 20;
    • addHookCreationDetails

      public ContractCreateTransactionBody.Builder addHookCreationDetails(int index, HookCreationDetails value)
       *
       Details of hooks to add immediately after creating this contract.
       
      repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 20;
    • addHookCreationDetails

      public ContractCreateTransactionBody.Builder addHookCreationDetails(HookCreationDetails.Builder builderForValue)
       *
       Details of hooks to add immediately after creating this contract.
       
      repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 20;
    • addHookCreationDetails

      public ContractCreateTransactionBody.Builder addHookCreationDetails(int index, HookCreationDetails.Builder builderForValue)
       *
       Details of hooks to add immediately after creating this contract.
       
      repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 20;
    • addAllHookCreationDetails

      public ContractCreateTransactionBody.Builder addAllHookCreationDetails(Iterable<? extends HookCreationDetails> values)
       *
       Details of hooks to add immediately after creating this contract.
       
      repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 20;
    • clearHookCreationDetails

      public ContractCreateTransactionBody.Builder clearHookCreationDetails()
       *
       Details of hooks to add immediately after creating this contract.
       
      repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 20;
    • removeHookCreationDetails

      public ContractCreateTransactionBody.Builder removeHookCreationDetails(int index)
       *
       Details of hooks to add immediately after creating this contract.
       
      repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 20;