Last updated
Last updated
A ScheduleCreateTransaction
is a consensus node transaction that creates a schedule entity on the Hedera network. The entity ID for a schedule transaction is called a ScheduleID
. After successfully executing a schedule create transaction, you can retrieve the network assigned ScheduleID
by requesting the transaction receipt. The receipt also includes the scheduled transaction ID, which can be used to request the record of the scheduled transaction after its successful execution.
When creating a transaction to schedule you do not need to use .freezeWith(client)
method.
Example:
Refer to this to view the types of transactions that can be scheduled.
Schedule Transaction Duplicate
If two users submit the same ScheduleCreateTransaction
, the first transaction to reach consensus will create the schedule ID.
For example, if User A and User B submit the same scheduled transaction and User A's transaction reaches consensus first, User B's transaction will return the status IDENTICAL_SCHEDULE_ALREADY_CREATED
. If User B is required to sign the scheduled transaction, they must submit and sign a ScheduleSignTransaction
to add their signature.
Schedule Transaction Deletion
To retain the ability to delete a schedule transaction, you will need to set the admin key field when creating a schedule transaction. The admin key will be required to sign the ScheduleDeleteTransaction
to delete the scheduled transaction from the network. If you do not assign an admin key during the creation of the schedule transaction, you will have an immutable schedule transaction.
Transaction Signing Requirements
The signature of the account paying for the creation of the schedule transaction
The signature of the payer account responsible for covering the execution fees of the scheduled transaction. For example, if you are scheduling a transfer transaction, the assigned transaction fee payer must provide a signature. If no transaction fee payer account is specified, the schedule's transaction fee payer account will be used by default to cover the execution fees.
The admin key signature, if set
You can optionally sign with any of the required signatures for the scheduled transaction. Freeze the schedule transaction and call the .sign()
method to add signatures in this transaction.
Transaction Properties