shgraph.hedera-protobuf-java-api.0.55.0.source-code.contract_update.proto Maven / Gradle / Ivy
The newest version!
syntax = "proto3";
package proto;
/*-
*
* Hedera Network Services Protobuf
*
* Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
option java_package = "com.hederahashgraph.api.proto.java";
// <<>> This comment is special code for setting PBJ Compiler java package
option java_multiple_files = true;
import "basic_types.proto";
import "duration.proto";
import "timestamp.proto";
import "google/protobuf/wrappers.proto";
/**
* At consensus, updates the fields of a smart contract to the given values.
*
* If no value is given for a field, that field is left unchanged on the contract. For an immutable
* smart contract (that is, a contract created without an adminKey), only the expirationTime may be
* updated; setting any other field in this case will cause the transaction status to resolve to
* MODIFYING_IMMUTABLE_CONTRACT.
*
* --- Signing Requirements ---
* 1. Whether or not a contract has an admin key, its expiry can be extended with only the
* transaction payer's signature.
* 2. Updating any other field of a mutable contract requires the admin key's signature.
* 3. If the update transaction includes a new admin key, this new key must also sign unless
* it is exactly an empty KeyList. This special sentinel key removes the existing admin
* key and causes the contract to become immutable. (Other Key structures without a
* constituent Ed25519 key will be rejected with INVALID_ADMIN_KEY.)
* 4. If the update transaction sets the AccountID auto_renew_account_id wrapper field to anything
* other than the sentinel 0.0.0 value, then the key of the referenced account must sign.
*/
message ContractUpdateTransactionBody {
/**
* The id of the contract to be updated
*/
ContractID contractID = 1;
/**
* The new expiry of the contract, no earlier than the current expiry (resolves to
* EXPIRATION_REDUCTION_NOT_ALLOWED otherwise)
*/
Timestamp expirationTime = 2;
/**
* The new key to control updates to the contract
*/
Key adminKey = 3;
/**
* [Deprecated] The new id of the account to which the contract is proxy staked
*/
AccountID proxyAccountID = 6 [deprecated = true];
/**
* If an auto-renew account is in use, the lifetime to be added by each auto-renewal.
*/
Duration autoRenewPeriod = 7;
/**
* This field is unused and will have no impact on the specified smart contract.
*/
FileID fileID = 8 [deprecated = true];
/**
* The new contract memo, assumed to be Unicode encoded with UTF-8 (at most 100 bytes)
*/
oneof memoField {
/**
* [Deprecated] If set with a non-zero length, the new memo to be associated with the account
* (UTF-8 encoding max 100 bytes)
*/
string memo = 9 [deprecated = true];
/**
* If set, the new memo to be associated with the account (UTF-8 encoding max 100 bytes)
*/
google.protobuf.StringValue memoWrapper = 10;
}
/**
* If set, modify the maximum number of tokens that can be auto-associated with the
* contract.
* If this is set and less than or equal to `used_auto_associations`, or 0, then this contract
* MUST manually associate with a token before transacting in that token.
* This value MAY also be `-1` to indicate no limit.
* This value MUST NOT be less than `-1`.
*/
google.protobuf.Int32Value max_automatic_token_associations = 11;
/**
* If set to the sentinel 0.0.0 AccountID, this field removes the contract's auto-renew
* account. Otherwise it updates the contract's auto-renew account to the referenced account.
*/
AccountID auto_renew_account_id = 12;
/**
* ID of the new account or node to which this contract is staking.
*/
oneof staked_id {
/**
* ID of the new account to which this contract is staking. If set to the sentinel 0.0.0 AccountID,
* this field removes the contract's staked account ID.
*/
AccountID staked_account_id = 13;
/**
* ID of the new node this contract is staked to. If set to the sentinel -1, this field
* removes the contract's staked node ID.
*/
int64 staked_node_id = 14;
}
/**
* If true, the contract declines receiving a staking reward.
*/
google.protobuf.BoolValue decline_reward = 15;
}