state.schedule.schedule.proto Maven / Gradle / Ivy
syntax = "proto3";
package proto;
/*-
*
* Hedera Network Services Protobuf
*
* Copyright (C) 2023 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.
*
*/
import "basic_types.proto";
import "timestamp.proto";
import "schedulable_transaction_body.proto";
import "transaction_body.proto";
option java_package = "com.hederahashgraph.api.proto.java";
// <<>> This comment is special code for setting PBJ Compiler java package
option java_multiple_files = true;
/**
* Representation of a Hedera Schedule entry in the network Merkle tree.
*
* As with all network entities, a schedule has a unique entity number, which is usually given along
* with the network's shard and realm in the form of a shard.realm.number id.
*/
message Schedule {
/**
* This schedule's unique ID within the global network state.
*/
ScheduleID schedule_id = 1;
/**
* The schedule deleted flag
* A schedule will either be executed or deleted, but never both.
*/
bool deleted = 2;
/**
* The schedule executed flag
* A schedule will either be executed or deleted, but never both.
*/
bool executed = 3;
/**
* The schedule flag to wait for expiration
* A schedule will be executed immediately when all necessary signatures are gathered, unless
* this flag is set. If this flag is set, the schedule will wait until the consensus time
* reaches expiration_time_provided, when signatures will again be verified, and if all
* required signatures are present at that time, the schedule will be executed. Otherwise
* the schedule will expire without execution.
* Note that a schedule is always removed from state when it expires, regardless of whether it
* was executed or not.
*/
bool wait_for_expiry = 4;
/**
* The memo associated with this schedule.
*/
string memo = 5;
/**
* The schedule account for this schedule. This is the account that submitted the original
* ScheduleCreate transaction.
*/
AccountID scheduler_account_id = 6;
/**
* The explicit payer account for the scheduled transaction.
* This account is added to the accounts that must sign the schedule before it will execute.
*/
AccountID payer_account_id = 7;
/**
* The admin key for this schedule.
* If this is not set, then the schedule cannot be deleted.
*/
Key admin_key = 8;
/**
* The transaction valid start value from the transaction that created this schedule.
*/
Timestamp schedule_valid_start = 9;
/**
* The requested expiration time of the schedule as provided by the user.
* The actual calculated expiration time may be "earlier" than this, but will not be later.
*/
int64 provided_expiration_second = 10;
/**
* The calculated expiration time of the schedule. This is calculated based on the requested
* expiration time from the create transaction, and the maximum expiration permitted by the
* network.
* The schedule will be removed from global network state after the network reaches a consensus
* time greater than or equal to this value.
*/
int64 calculated_expiration_second = 11;
/**
* The consensus timestamp of the transaction that executed or deleted this schedule.
*/
Timestamp resolution_time = 12;
/**
* The scheduled transaction to execute.
*/
SchedulableTransactionBody scheduled_transaction = 13;
/**
* The full transaction that created this schedule. This is primarily used for duplicate
* schedule create detection. This is also the source of the parent transaction ID, from
* which the child transaction ID is derived.
*/
TransactionBody original_create_transaction = 14;
/**
* All the primitive keys that have already signed this schedule.
* The scheduled transaction will not be executed before this list is
* sufficient to "activate" the required keys for the scheduled transaction.
*/
repeated Key signatories = 15;
}
/**
* A message for storing a list of schedules in state.
* This is used to store lists of schedules that expire at a particular time or that have the same
* simplified hash code.
*/
message ScheduleList {
/**
* a list of schedules, in no particular order.
*/
repeated Schedule schedules = 1;
}