redstone

Integrate RedStone oracle price feeds into EVM smart contracts using Pull, Push, and RedStone X models.

1|1|Updated May 21, 2026
One-click install
npx skills add https://github.com/naruto11eth/cryptoskills --skill redstone-naruto11eth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: redstone
Source: https://github.com/naruto11eth/cryptoskills/tree/main/skills/redstone
Command: npx skills add https://github.com/naruto11eth/cryptoskills --skill redstone-naruto11eth

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @redstone-finance/evm-connector, @redstone-finance/protocol, @redstone-finance/sdk, ethers, viem, and includes references (resource) components.

What problem does it solve? AI agents frequently produce incorrect RedStone integrations: they treat the Pull model like Chainlink push feeds, forget to wrap frontend transactions with signed calldata, use wrong decimal assumptions, or misconfigure signer thresholds, causing reverted transactions and broken oracle reads. ## Core Features & Use Cases - Pull Model Integration: Implement RedstoneConsumerNumericBase contracts that extract signed price data from transaction calldata, with frontend wrapping via WrapperBuilder from @redstone-finance/evm-connector. - Push Model & RedStone X: Read Chainlink-compatible AggregatorV3Interface push feeds with staleness validation, and build frontrunning-protected two-phase execution flows with keeper bots. - Custom Data Feeds: Whitelist authorized signers via getAuthorisedSignerIndex, override timestamp validation, and consume proprietary data services. - Use Case: Build a lending vault that prices collateral on-demand using RedStone Pull, with a Foundry test harness mocking oracle reads and a TypeScript frontend attaching signed price packages to every transaction. ## Quick Start Use the redstone skill to write a Solidity contract that reads the ETH/USD price via the RedStone Pull model and show me the frontend code to wrap the transaction.

Frequently Asked Questions about redstone

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I integrate RedStone Pull oracle into a Solidity contract?

Inherit RedstoneConsumerNumericBase from @redstone-finance/evm-connector and call getOracleNumericValueFromTxMsg with a bytes32 feed ID like bytes32("ETH"). On the frontend, wrap every price-reading transaction with WrapperBuilder.wrap(contract).usingDataService() to attach signed price data to the calldata.

What is the difference between RedStone Pull and Push models?

Pull delivers signed prices in transaction calldata on-demand with no on-chain storage cost, while Push stores prices on-chain via Chainlink-compatible AggregatorV3Interface feeds updated on a heartbeat. Use Pull for cheaper gas and freshness, Push for composability with existing Chainlink consumers.

Why does my RedStone transaction revert with CalldataMustHaveValidPayload?

The transaction was sent without RedStone price data attached to the calldata. Wrap the ethers.js contract instance with WrapperBuilder before calling any function that reads oracle values, and ensure dataPackagesIds includes every feed the contract reads.

How many decimals do RedStone price feeds use?

RedStone USD-denominated feeds return uint256 values with 8 decimals, matching Chainlink conventions, so ETH at $3,000 returns 300000000000. Cross-pair feeds like stETH/ETH use 18 decimals instead.

How do I test RedStone Pull contracts in Foundry?

Create a test harness contract that inherits your consumer and overrides getOracleNumericValueFromTxMsg to return a mock price. Unit tests cannot attach real signed calldata, so the harness pattern isolates your business logic from the oracle layer.

What signer threshold should I use for RedStone in production?

Set getUniqueSignersThreshold() to at least 3 for production deployments to achieve Byzantine fault tolerance. A threshold of 1 means a single compromised signer can supply malicious prices, and 0 accepts unsigned data entirely.