Skip to main content
skill CX Codex

hss-system-contract — Claude Code skill: what it does, install

Guides assistants in building scheduled transactions via the Hedera Schedule Service contract at 0x16b. Useful for Solidity developers automating calls or token creation.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add hedera-dev/hedera-skills --skill hss-system-contract -a claude-code
Open on GitHub

What hss-system-contract does

This skill provides code patterns for the Hedera Schedule Service (HSS) via the 0x16b system contract. It guides development across HIP-755, HIP-756, and HIP-1215 standards. Smart contracts can schedule deferred executions, sign schedules with contract keys, or trigger HTS token creation.

Integration relies on inheritance. The IHederaScheduleService interface is completely empty, while internal helper methods live inside the abstract HederaScheduleService contract from @hashgraph/smart-contracts. Developers must check network capacity using hasScheduleCapacity before dispatching a transaction to prevent SCHEDULE_EXPIRY_IS_BUSY errors.

Failure handling requires attention. Scheduling calls like scheduleCall never revert automatically when execution fails. They return (responseCode, address(0)), making manual verification of HederaResponseCodes.SUCCESS mandatory in contract code.

What it helps with

  • schedule future contract executions on Hedera using HIP-1215
  • defer HTS token creation through Solidity using HIP-756
  • sign scheduled transactions with a contract key via authorizeSchedule
  • check network scheduling limits with hasScheduleCapacity

Example prompts for the agent

  • Write a Solidity function that calls scheduleCall with a capacity check
  • Show how to inherit HederaScheduleService for scheduled token creation
  • Implement schedule authorization using authorizeSchedule for address 0x16b

How to install hss-system-contract

1Skills CLI (Vercel)

npx skills add hedera-dev/hedera-skills --skill hss-system-contract -a claude-code

2Manually: put the files in place

~/.claude/skills/hss-system-contract/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/hss-system-contract/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about hss-system-contract

How to install hss-system-contract in Claude Code?

Run npx skills add hedera-dev/hedera-skills --skill hss-system-contract -a claude-code in your terminal.

What does hss-system-contract do?

It provides guidelines and Solidity reference patterns for the Hedera Schedule Service at 0x16b. The skill covers scheduled calls, schedule signing, and token creation logic.

Why does the contract need to inherit HederaScheduleService?

The IHederaScheduleService interface contains no method declarations. The actual internal helpers interacting with 0x16b are implemented inside the abstract HederaScheduleService contract.

Source text

SKILL.md · Apache-2.0
---
name: hss-system-contract
description: Hedera Schedule Service (HSS) smart contract development. Use when creating or interacting with scheduled transactions from Solidity via the Schedule Service system contract at 0x16b (e.g. scheduleNative for token creation, scheduleCall for generalized contract calls, authorizeSchedule, signSchedule, deleteSchedule, or querying scheduled token info).
---

# Hedera Schedule Service (HSS) System Contract

The Hedera Schedule Service system contract at **`0x16b`** exposes functions for creating and managing scheduled transactions from within Solidity. It supports:

- **HIP-755**: Authorizing and signing schedules from contracts
- **HIP-756**: Scheduling native HTS token creation (createFungibleToken, createNonFungibleToken, etc.)
- **HIP-1215**: Generalized scheduled contract calls — schedule arbitrary calls to any contract (or self) for DeFi automation, vesting, DAO operations

## Quick Reference

**Contract address:** `0x16b`

**Imports:**

```solidity
import {HederaScheduleService} from "@hashgraph/smart-contracts/contracts/system-contracts/hedera-schedule-service/HederaScheduleService.sol";
import {IHRC1215ScheduleFacade} from "@hashgraph/smart-contracts/contracts/system-contracts/hedera-schedule-service/IHRC1215ScheduleFacade.sol";
```

`HederaScheduleService` is an abstract contract (like `HederaTokenService` for HTS). Inherit it to get `internal` helper functions that handle the low-level calls to `0x16b`. `HederaResponseCodes` is available transitively.

**Response codes:** SUCCESS = 22 (`HederaResponseCodes.SUCCESS`). See [references/api.md](references/api.md) for full function list and [Hedera response codes](https://github.com/hashgraph/hedera-protobufs/blob/main/services/response_code.proto).

## Critical: Inheritance Pattern

**`IHederaScheduleService` is an empty interface.** Functions are defined in `IHRC755`, `IHRC756`, `IHRC1215` and wrapped as `internal` helpers in `HederaScheduleService`. Your contract must **inherit** `HederaScheduleService`:

```solidity
contract MyScheduler is HederaScheduleService {
    error ScheduleFailed();

    function doSchedule() external {
        (int64 rc, address scheduleAddr) = scheduleCall(target, expiry, gasLimit, 0, data);
        if (rc != HederaResponseCodes.SUCCESS) revert ScheduleFailed();
    }
}
```

## Critical: Non-Reverting Behavior (HIP-1215)

The `scheduleCall`, `scheduleCallWithPayer`, and `executeCallOnPayerSignature` functions **do not revert**. On failure they return `(responseCode, address(0))`. Always check:

```solidity
error ScheduleFailed();

(int64 rc, address scheduleAddr) = scheduleCall(target, expiry, gasLimit, 0, data);
if (rc != HederaResponseCodes.SUCCESS || scheduleAddr == address(0)) {
    revert ScheduleFailed();
}
```

## Capacity and Throttling (HIP-1215)

Scheduled calls are throttled per second. Use `hasScheduleCapacity(expirySecond, gasLimit)` before scheduling to avoid `SCHEDULE_EXPIRY_IS_BUSY`:

```solidity
bool capacity = hasScheduleCapacity(expirySecond, gasLimit);
if (!capacity) {
    // Retry with a later expiry or different gas limit
    // See HIP-1215 findAvailableSecond() pattern for exponential backoff + jitter
}
```

## Common Concepts

- **Scheduled transaction**: Wraps a Hedera transaction (native HTS call or EVM contract call) for deferred execution when signature thresholds are met.
- **Payer**: Account responsible for paying fees. With `scheduleCall`, the calling contract is the payer. With `scheduleCallWithPayer` / `executeCallOnPayerSignature`, a separate payer can be specified.
- **authorizeSchedule**: Signs the schedule with the calling contract's key (ContractKey format `0.0.<ContractId>`).
- **signSchedule**: Adds protobuf-encoded signatures from EOAs or other keys.
- **Expiration**: Schedules that fail to collect all required signatures before `expirySecond` are automatically removed from the network.

## Usage Patterns

### Schedule Native Token Creation (HIP-756)

> **Note:** The payer must have sufficient HBAR when the schedule executes (for the token creation fee).

```solidity
import {HederaScheduleService} from "@hashgraph/smart-contracts/contracts/system-contracts/hedera-schedule-service/HederaScheduleService.sol";
import {IHederaTokenService} from "@hashgraph/smart-contracts/contracts/system-contracts/hedera-token-service/IHederaTokenService.sol";

contract ScheduledTokenCreator is HederaScheduleService {
    error FailToSchedule();

    function scheduleTokenCreate(
        IHederaTokenService.HederaToken memory token,
        int64 initialSupply,
        int32 decimals,
        address payer
    ) external returns (address scheduleAddr) {
        bytes memory callData = abi.encodeCall(
            IHederaTokenService.createFungibleToken,
            (token, initialSupply, decimals)
        );
        int64 rc;
        (rc, scheduleAddr) = scheduleNative(
            address(0x167), callData, payer
        );
        if (rc != HederaResponseCodes.SUCCESS) revert FailToSchedule();
    }
}
```

### Schedule Arbitrary Contract Call (HIP-1215)

```solidity
import {HederaScheduleService} from "@hashgraph/smart-contracts/contracts/system-contracts/hedera-schedule-service/HederaScheduleService.sol";

contract Scheduler is HederaScheduleService {
    error FailToSchedule();
    event ScheduleCreated(address);

    function scheduleFutureCall(
        address target,
        uint256 expirySecond,
        uint256 gasLimit,
        bytes memory callData
    ) external returns (address scheduleAddr) {
        if (!hasScheduleCapacity(expirySecond, gasLimit)) revert FailToSchedule();

        int64 rc;
        (rc, scheduleAddr) = scheduleCall(
            target,
            expirySecond > 0 ? expirySecond : block.timestamp + 5,
            gasLimit,
            0,
            callData
        );
        if (rc != HederaResponseCodes.SUCCESS) {
            revert FailToSchedule();
        }
        emit ScheduleCreated(scheduleAddr);
    }
}
```

### Contract Signs Schedule (HIP-755)

```solidity
import {HederaScheduleService} from "@hashgraph/smart-contracts/contracts/system-contracts/hedera-schedule-service/HederaScheduleService.sol";

contract ScheduleSigner is HederaScheduleService {
    error FailToAuthorize();
    error FailToSign();

    function signAsContract(address scheduleAddr) external {
        int64 rc = authorizeSchedule(scheduleAddr);
        if (rc != HederaResponseCodes.SUCCESS) revert FailToAuthorize();
    }

    function signWithSignatureMap(address scheduleAddr, bytes memory sigMap) external {
        int64 rc = signSchedule(scheduleAddr, sigMap);
        if (rc != HederaResponseCodes.SUCCESS) revert FailToSign();
    }
}
```

### Delete Schedule

```solidity
import {HederaScheduleService} from "@hashgraph/smart-contracts/contracts/system-contracts/hedera-schedule-service/HederaScheduleService.sol";
import {IHRC1215ScheduleFacade} from "@hashgraph/smart-contracts/contracts/system-contracts/hedera-schedule-service/IHRC1215ScheduleFacade.sol";

contract ScheduleManager is HederaScheduleService {
    error FailToDeleteSchedule();

    // Option 1: Internal helper (inheriting HederaScheduleService)
    function deleteScheduleExample(address scheduleAddr) external {
        int64 rc = deleteSchedule(scheduleAddr);
        if (rc != HederaResponseCodes.SUCCESS) {
            revert FailToDeleteSchedule();
        }
    }

    // Option 2: Redirect — call deleteSchedule() on the schedule's address
    // (works for contracts and EOAs)
    function deleteScheduleProxy(address scheduleAddr) external {
        int64 rc = IHRC1215ScheduleFacade(scheduleAddr).deleteSchedule();
        if (rc != HederaResponseCodes.SUCCESS) {
            revert FailToDeleteSchedule();
        }
    }
}
```

## Costs

- Schedule transaction fees match HAPI ScheduleCreate, with a **20% markup** for system contract usage.
- Includes gas, storage, and consensus fees. Expired transactions incur no extra fees beyond initial scheduling/signature costs.

## References

- **API Reference**: [references/api.md](references/api.md) — Full function signatures, selectors, and usage notes
- **HIP-755**: [Schedule Service System Contract](https://hips.hedera.com/hip/hip-755)
- **HIP-756**: [Contract Scheduled Token Create](https://hips.hedera.com/hip/hip-756)
- **HIP-1215**: [Generalized Scheduled Contract Calls](https://hips.hedera.com/hip/hip-1215)
- **Source**: [hedera-smart-contracts/hedera-schedule-service](https://github.com/hashgraph/hedera-smart-contracts/tree/main/contracts/system-contracts/hedera-schedule-service)

© hedera-dev · Apache-2.0 · hedera-dev/hedera-skills

Similar skills

All skills for Backend and APIs →

From the same set24

Hedera Agent Kit v4 Migration Walks a project from [email protected] to v4: swaps packages, rewrites imports and ports custom tools to BaseTool. CX Codex +1 484installs Hedera Hook Creation Guides the creation of non-blocking observability hooks for Hedera Agent Kit tools. Useful when writing audit trails, counting tool invocations, or enriching session context. CX Codex +1 479installs hts-system-contract Guides Solidity smart contract development for Hedera Token Service using the 0x167 precompile. Helps create native tokens, set up access keys, and handle compliance controls. CX Codex +1 463installs agent-kit-plugin This skill guides the creation of Hedera Agent Kit plugins and tools. Use it when adding token, account, consensus, smart contract, or custom Hedera functionality. CX Codex +1 463installs create-harness-spec Turns a Hedera feature idea into a runnable hedera-harness recipe: PRD, spec file and validators. Useful when you need a spec you can actually run. CX Codex +1 465installs hiero-cli Equips coding agents to interact with the Hedera network via hcli. Useful for minting tokens, deploying contracts, sending HBAR, and handling x402 paywalls. CX Codex +1 460installs harness-spec-anatomy Defines what a hedera-harness recipe is made of: the files, the v3 defaults, the run stages and the blind evaluate-checklist rule. For anyone authoring or auditing recipes. CX Codex +1 464installs review-harness-spec Audits .harness/spec.yaml recipes for wiring defects and evaluate checklist coverage before running tests. CX Codex +1 459installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor