hss-system-contract
БесплатноБез исполняемых скриптовНе проверенHedera Schedule Service (HSS) smart contract development. Use when creating or interacting with scheduled transactions from Solidity via the Schedule Service…
от hedera-dev★ 37 звёзд на GitHubОб этом скилле
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:
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 for full function list and Hedera response codes.
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:
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:
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:
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. WithscheduleCallWithPayer/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
expirySecondare 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).
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)
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(
Установить hss-system-contract в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл hss-system-contract?
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).
Как установить скилл hss-system-contract?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл hss-system-contract запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic