Module com.hedera.hashgraph.sdk
Package com.hedera.hashgraph.sdk.proto
Interface ContractCreateTransactionBodyOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder
- All Known Implementing Classes:
ContractCreateTransactionBody,ContractCreateTransactionBody.Builder
@Generated
public interface ContractCreateTransactionBodyOrBuilder
extends com.google.protobuf.MessageLiteOrBuilder
-
Method Summary
Modifier and TypeMethodDescription* Access control for modification of the smart contract after it is created.* 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.* 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.com.google.protobuf.ByteString* An array of bytes containing the EVM-encoded parameters to pass to the smart contract constructor defined in the smart contract init code provided.boolean* A flag indicating that this smart contract declines to receive any reward for staking its HBAR balance to help secure the network.* The source for the smart contract EVM bytecode.longgetGas()* A maximum limit to the amount of gas to use for the constructor call.getHookCreationDetails(int index) * Details of hooks to add immediately after creating this contract.int* Details of hooks to add immediately after creating this contract.* Details of hooks to add immediately after creating this contract.com.google.protobuf.ByteString* The source for the smart contract EVM bytecode.long* The amount of HBAR to use as an initial balance for the account representing the new smart contract.int* The maximum number of tokens that can be auto-associated with this smart contract.getMemo()* A short memo for this smart contract.com.google.protobuf.ByteString* A short memo for this smart contract.* <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.Deprecated.proto.ContractCreateTransactionBody.proxyAccountID is deprecated.* <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>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.* An account ID.long* The ID of a network node.boolean* Access control for modification of the smart contract after it is created.boolean* 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.boolean* 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.boolean* The source for the smart contract EVM bytecode.boolean* The source for the smart contract EVM bytecode.boolean* <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.booleanDeprecated.proto.ContractCreateTransactionBody.proxyAccountID is deprecated.boolean* <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.boolean* <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.boolean* An account ID.boolean* The ID of a network node.Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
hasFileID
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;- Returns:
- Whether the fileID field is set.
-
getFileID
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;- Returns:
- The fileID.
-
hasInitcode
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;- Returns:
- Whether the initcode field is set.
-
getInitcode
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;- Returns:
- The initcode.
-
hasAdminKey
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;- Returns:
- Whether the adminKey field is set.
-
getAdminKey
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;- Returns:
- The adminKey.
-
getGas
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;- Returns:
- The gas.
-
getInitialBalance
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;- Returns:
- The initialBalance.
-
hasProxyAccountID
Deprecated.proto.ContractCreateTransactionBody.proxyAccountID is deprecated. See contract_create.proto;l=145* 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];- Returns:
- Whether the proxyAccountID field is set.
-
getProxyAccountID
Deprecated.proto.ContractCreateTransactionBody.proxyAccountID is deprecated. See contract_create.proto;l=145* 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];- Returns:
- The proxyAccountID.
-
hasAutoRenewPeriod
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;- Returns:
- Whether the autoRenewPeriod field is set.
-
getAutoRenewPeriod
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;- Returns:
- The autoRenewPeriod.
-
getConstructorParameters
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;- Returns:
- The constructorParameters.
-
hasShardID
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;- Returns:
- Whether the shardID field is set.
-
getShardID
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;- Returns:
- The shardID.
-
hasRealmID
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;- Returns:
- Whether the realmID field is set.
-
getRealmID
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;- Returns:
- The realmID.
-
hasNewRealmAdminKey
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;- Returns:
- Whether the newRealmAdminKey field is set.
-
getNewRealmAdminKey
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;- Returns:
- The newRealmAdminKey.
-
getMemo
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;- Returns:
- The memo.
-
getMemoBytes
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;- Returns:
- The bytes for memo.
-
getMaxAutomaticTokenAssociations
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;- Returns:
- The maxAutomaticTokenAssociations.
-
hasAutoRenewAccountId
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;- Returns:
- Whether the autoRenewAccountId field is set.
-
getAutoRenewAccountId
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;- Returns:
- The autoRenewAccountId.
-
hasStakedAccountId
boolean hasStakedAccountId()* An account ID. <p> This smart contract SHALL stake its HBAR via this account as proxy.
.proto.AccountID staked_account_id = 17;- Returns:
- Whether the stakedAccountId field is set.
-
getStakedAccountId
AccountID getStakedAccountId()* An account ID. <p> This smart contract SHALL stake its HBAR via this account as proxy.
.proto.AccountID staked_account_id = 17;- Returns:
- The stakedAccountId.
-
hasStakedNodeId
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;- Returns:
- Whether the stakedNodeId field is set.
-
getStakedNodeId
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;- Returns:
- The stakedNodeId.
-
getDeclineReward
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;- Returns:
- The declineReward.
-
getHookCreationDetailsList
List<HookCreationDetails> getHookCreationDetailsList()* Details of hooks to add immediately after creating this contract.
repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 20; -
getHookCreationDetails
* Details of hooks to add immediately after creating this contract.
repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 20; -
getHookCreationDetailsCount
int getHookCreationDetailsCount()* Details of hooks to add immediately after creating this contract.
repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 20; -
getInitcodeSourceCase
ContractCreateTransactionBody.InitcodeSourceCase getInitcodeSourceCase() -
getStakedIdCase
ContractCreateTransactionBody.StakedIdCase getStakedIdCase()
-