Hedera Schedule Service

Overview

The Hedera Schedule Service (HSS) system contract exposes functions that enable smart contracts to interact with Hedera's native schedule service. The schedule service allows transactions to be scheduled for future execution, simplifies multi-sig coordination, and automates execution once all required signatures are collected. This eliminates the need for off-ledger signature coordination and reduces the complexity of multi-sig workflows in decentralized applications (dApps).

Additionally, the HSS includes expiration handling, where scheduled transactions that fail to collect and verify all required signatures within the specified expiration window are automatically removed from the network.

The IHederaScheduleService interface, introduced in HIP-755, allows accounts to interact with the schedule transaction service via smart contracts. Following system contract conventions, HSS will be callable at the reserved 0x16b address and will expose the following functions callable within smart contracts.

Function Name
Consensus Node Release Version
HIP
Function Interface

signSchedule

signSchedule() external returns (int64 responseCode)

authroizeSchedule

authorizeSchedule(address) external returns (int64 responseCode)

signSchedule()

  • Callable only by an externally owned account (EOA) or wallet, not callable from a smart contract.

  • Signs the specified schedule transaction using the public key of the caller.

  • Executed through a system proxy contract to support safe and easy first calls by an EOA and ensure compliance with Hedera's security model.

  • Returns a responseCode indicating the success or failure of the signature addition attempt.

authorizeSchedule(address)

  • Signs the schedule transaction identified by the pass-in parameter (address) with a ContractKey using the format 0.0.<ContractId of the calling contract>.

  • Allows contracts to sign schedule transactions using their own contract key.

  • The address parameter is the unique identifier of the schedule transaction that specifies the transaction to be signed.

  • Returns a responseCode indicating the success or failure of the authorization attempt.

Behavior and Costs

Behavior

  • Scheduled transactions must collect all required signatures before they can be executed. These signatures can be added asynchronously using the signSchedule function.

  • If all required signatures are not received within the specified expiration window, the transaction expires and is removed from the network.

  • The execution of a schedule transaction occurs automatically when the final required signature is submitted.

Costs

  • Schedule transaction fees are the same as a HAPI sign schedule transaction, with a 20% markup for using system contracts.

  • Fees include gas costs for EVM execution, storage costs, and network fees for consensus.

  • Expired transactions cost no additional fees beyond the initial scheduling and signature costs.

Reference: HIP-755

Last updated

Was this helpful?