hedera-dev/hedera-skills

supra-push-oracle

Supra S-Value push oracle on Hedera.

소스 보기
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

Supra Push Oracle (Hedera)

Push S-Value pattern: Supra updates an on-chain feed; readers call getSvalue(pairId) and must reject empty, zero, or stale quotes.

text
Supra push oracle → getSvalue(pairId) → consumer

Consumers may wrap the feed behind a local interface; that is optional. Do not assume a project-specific adapter name.

Quick Reference

PieceRole
Push oracleImmutable ISupraSValueFeed address for the network
Pair IDNumeric Supra pair id (not an EVM aggregator address)
ReadgetSvalue(pairId) → price, decimals, time
TimeOften milliseconds on Hedera — convert when time > 1e10
Quote assetHedera feeds are often USDT, not USD
FreshnessCompare unix seconds to a max staleness

Hedera chain IDs: testnet 296, mainnet 295.

See references/hedera-feeds.md for where to source push-oracle addresses and pair IDs. See references/examples.md for read sketches.

Critical: Millisecond Timestamps

Supra time on Hedera is frequently milliseconds. Treat values > 10_000_000_000 as ms and convert before staleness checks:

solidity
uint256 updatedAt = pf.time > 10_000_000_000 ? pf.time / 1_000 : pf.time;
if (block.timestamp - updatedAt > maxStaleness) revert StalePrice(updatedAt, maxStaleness);

Comparing a millisecond timestamp to block.timestamp (seconds) will look “in the future” or skip staleness incorrectly.

Critical: USDT Pairs On Hedera

Current Hedera Supra feeds often quote USDT, not USD. Pair keys / symbols must match the actual quote (HBAR/USDT, BTC/USDT). Do not label a USDT feed as USD.

Completeness And Invalid Prices

Revert when:

ConditionWhy
pf.time == 0No successful update
pf.price == 0Invalid price
Stale after converting to secondsOlder than maxStaleness
Unknown pair IDDo not return zero

Normalize pf.price with pf.decimals to the consumer scale (often 18).

Checklist

When implementing or reviewing Supra reads on Hedera:

  • [ ] Push-oracle address and pair IDs taken from Supra Hedera docs (not Ethereum)
  • [ ] Timestamps converted to unix seconds when they look like milliseconds
  • [ ] Pair symbols match the real quote asset (often USDT)
  • [ ] Zero / missing updates revert
  • [ ] Staleness bound is enforced in seconds
  • [ ] Decimals normalized to the consumer scale

References

같은 저장소의 Skills

더 많은 Skills

모든 Skills
hedera-dev
커뮤니티

agent-kit-plugin

This skill should be used when the user asks to "create a hedera plugin", "build a hedera agent kit plugin", "extend hedera agent kit", "create custom hedera tools", "add hedera functionality", "write a hedera tool", "implement hedera tool", or needs guidance on Hedera Agent Kit plugin architecture, tool definitions, mutation tools, query tools, or parameter schemas using Zod.

설치 수
2
GitHub Stars
28
업데이트
9월 3일
hedera-dev
커뮤니티

axelar-gmp

Axelar General Message Passing (GMP) on Hedera. Use when sending or receiving cross-chain contract calls via Axelar Gateway (callContract, payNativeGasForContractCall), building AxelarExecutable receivers, wiring Hedera↔EVM destinations, or separating bridge transport from destination handlers (orchestrated / scheduled flows).

설치 수
2
GitHub Stars
28
업데이트
9월 3일
hedera-dev
커뮤니티

ccip

Chainlink CCIP Cross-Chain Tokens on Hedera. Use when bridging burn-and-mint CCT between Hedera and EVM, registering TokenAdminRegistry / pools, calling ccipSend with chain selectors, or wiring HTS-backed wrappers (HtsBurnMintERC20) vs vanilla BurnMintERC20. Not for Chainlink Data Feeds / price oracles.

설치 수
2
GitHub Stars
28
업데이트
9월 3일
hedera-dev
커뮤니티

chainlink-data-feeds

Chainlink Data Feeds on Hedera. Use when reading AggregatorV3 price feeds on Hedera (testnet 296 / mainnet 295), calling latestRoundData, checking round completeness and staleness, or normalizing feed decimals. Not for Chainlink CCIP (cross-chain tokens).

설치 수
2
GitHub Stars
28
업데이트
9월 3일