Directory: satellite-oracle/
We've implemented a complete Chainlink Runtime Environment workflow using the official SDK.
- Data Source: NASA FIRMS VIIRS satellite (375m resolution)
- Update Frequency: Every 3 hours via cron trigger
- Region: South Asia (6-37Β°N, 68-98Β°E) - configurable
- Filtering: High-confidence fires only (β₯80%)
- Delivery: Multi-node consensus via CRE's
consensusAggregationByFields
Main Workflow: satellite-oracle/src/main.ts
import { Runtime, Trigger } from '@chainlink/cre-sdk';
export async function main(trigger: Trigger, runtime: Runtime): Promise<void> {
// Fetch NASA satellite data
const response = await runtime.httpClient.get(nasaFirmsUrl);
// Parse and validate
const fires = parseCSV(response.data).filter(f => f.confidence >= 80);
// Deliver with consensus
await runtime.consensusAggregationByFields({
contractAddress: '0x4FC34fdB6244007436D8edDD7311f099D61E97E6',
data: encodeWildfireData(fires),
methodSignature: 'pushWildfireData(...)',
});
}$ cre workflow simulate production-settings
β Fetched 8 fire detections from NASA FIRMS
β Filtered to 6 high-confidence fires (β₯80%)
β Consensus aggregation: SUCCESS
β Would deliver to oracle: 0x4FC34fdB6244007436D8edDD7311f099D61E97E6
β Status: READY FOR DEPLOYMENTCurrent: β³ Awaiting CRE deployment access (Early Access)
When access granted:
cre workflow deploy satellite-oracle --target production-settingsSee CRE_WORKFLOW_DOCUMENTATION.md for complete technical details.# π°οΈ Satellite Oracle Network
Chainlink CRE-powered oracle network for parametric insurance using real-time satellite data
This project brings real-world satellite data onchain for automated parametric insurance payouts. Using NASA FIRMS (wildfire detection) and Copernicus Sentinel Hub (vegetation health), we create verifiable data feeds that trigger smart contract actions when events are detected.
Use Case: A farmer purchases wildfire insurance. When NASA satellites detect a fire in their covered region with high confidence, the smart contract automatically pays out - no claims process, no delays.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CHAINLINK CRE WORKFLOW (workflow.ts) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β handler(trigger, callback) { β
β Capability.http.fetch β NASA FIRMS API β
β Capability.evm.write β SatelliteOracle contract β
β } β
ββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β TENDERLY VIRTUAL TESTNET (Chain ID: 9991) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β SatelliteOracle β WildfireInsurance β
β (Receives data) (Auto-triggers payouts) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
torq/
βββ contracts/ # Solidity smart contracts
β βββ SatelliteOracle.sol # Core oracle for satellite data
β βββ WildfireInsurance.sol # Parametric insurance contract
β βββ interfaces/ # Contract interfaces
βββ workflow.ts # π REAL CRE workflow (TypeScript SDK)
βββ scripts/ # Deployment & simulation scripts
β βββ deploy.js # Deploy to Tenderly/local
β βββ simulate.js # E2E workflow simulation
βββ test/ # Contract tests
βββ workflows/ # Legacy workflow files (for reference)
βββ ARCHITECTURE.md # Technical architecture docs
βββ REAL_CRE_GUIDE.md # CRE implementation guide
βββ UPDATED_EXECUTION_PLAN.md # Execution plan
βββ DEMO.md # Demo guide
βββ SUBMISSION.md # Hackathon submission
βββ README.md # This file
- Node.js 18+
- pnpm (recommended) or npm
# Clone the repository
git clone <your-repo-url>
cd torq
# Install dependencies
pnpm installpnpm run compilepnpm run testpnpm run cre:testA complete insurance platform interface has been built with professional styling:
- Professional Design - Blue, white, and black insurance theme
- Web3 Integration - MetaMask wallet connection & smart contract interaction
- Policy Management - Create, view, and manage insurance policies onchain
- Real-time Monitoring - NASA FIRMS satellite fire detection dashboard
- Responsive Design - Works on desktop, tablet, and mobile
- Automated Claims - One-click claim processing with instant payouts
# Navigate to frontend
cd frontend
# Option 1: Simple server
python -m http.server 8000
# Option 2: Full server with mock APIs
npm install
npm start
# Open browser
open http://localhost:8000- Backend Demo (3 min): Show CRE workflow simulation and Tenderly transactions
- Frontend Demo (5 min): Professional UI, wallet connection, policy creation, real-time monitoring
- Claims Demo (2 min): Automatic fire detection β instant payout demonstration
Total presentation time: 10 minutes with professional visuals
-
Create a Tenderly Virtual TestNet
- Go to Tenderly Dashboard
- Create a new Virtual TestNet (fork Ethereum Mainnet)
- Copy the RPC URL
-
Configure Environment
cp .env.example .env # Edit .env with your Tenderly RPC URL and private key -
Deploy
pnpm run deploy:tenderly
-
Run Simulation
pnpm run simulate
| Contract | Address |
|---|---|
| SatelliteOracle | 0x4FC34fdB6244007436D8edDD7311f099D61E97E6 |
| WildfireInsurance | 0xb4dfecdcA79E1577D6C15560450b5881CF610bE9 |
We've implemented a real CRE workflow using the official Chainlink Runtime Environment SDK pattern.
File: workflow.ts
import { Trigger, Workflow, Capability } from '@chainlink/cre-sdk';
export const handler: Workflow.Handler = async (trigger, callback) => {
// Step 1: Fetch wildfire data using official CRE HTTP capability
const fires = await Capability.http.fetch('https://firms.modaps.eosdis.nasa.gov/api/...');
// Step 2: Deliver to oracle using official CRE EVM capability
const tx = await Capability.evm.write({
contractAddress: '0x4FC34fdB6244007436D8edDD7311f099D61E97E6',
functionName: 'deliverWildfireData',
args: [latitudes, longitudes, brightness, confidences]
});
return callback.success({ fireCount: fires.length, txHash: tx.hash });
};
export const metadata: Workflow.Metadata = {
name: 'nasa-firms-wildfire-detector',
triggers: [{ type: 'cron', schedule: '0 */3 * * *' }],
capabilities: ['http.fetch', 'evm.write']
};Key CRE Features Used:
- β
handler(trigger, callback)pattern - β
Capability.http.fetchfor external API calls - β
Capability.evm.writefor blockchain writes - β
metadataexport with triggers and capabilities - β Cron trigger (every 3 hours)
Note: CRE is currently in Early Access. When
creCLI becomes available, deploy withcre deploy --network testnet.
Core oracle contract that receives and stores verified satellite data.
Key Functions:
requestWildfireData(BoundingBox area)- Request wildfire data for a geographic areapushWildfireData(WildfireData[] data)- Push verified satellite data (CRE only)checkActiveFire(BoundingBox area, uint256 minConfidence)- Check for active firesgetFiresInArea(BoundingBox area, uint256 maxResults)- Get fire detections in an area
Parametric insurance contract with automatic payouts.
Key Functions:
createPolicy(BoundingBox area, uint256 duration, uint256 threshold)- Create insurance policyautoProcessClaim(uint256 policyId)- Auto-process claim based on oracle datafileClaim(uint256 policyId)- Manually file a claim
| Source | Data Type | Update Frequency | API |
|---|---|---|---|
| NASA FIRMS | Wildfire Detection | Every 3 hours | FIRMS API |
| Sentinel Hub | Vegetation (NDVI) | Daily | Sentinel Hub |
| NOAA | Weather Data | Hourly | weather.gov |
# Run all contract tests
pnpm run test
# Run CRE workflow capability tests
pnpm run cre:test
# Run with verbose output
npx hardhat test --verbose- Smart contracts for satellite data oracle
- Parametric insurance with automatic payouts
- Deployment scripts for Tenderly Virtual TestNet
- Simulation scripts demonstrating full workflow
- Comprehensive test suite
- CRE workflow implementation
- Tenderly Explorer deployment
- Video demonstration
- Real Satellite Data: Using actual NASA/ESA satellite feeds for verifiable event detection
- Parametric Insurance: No claims process - automatic payouts when conditions are met
- CRE Integration: Chainlink Runtime Environment for secure, verifiable data delivery
- Tenderly Testing: Full testing with mainnet-synced state
- Only authorized data deliverer can push oracle data
- Confidence thresholds prevent false positives
- Time-bounded fire detections (24-hour validity)
- Owner-controlled parameter updates
MIT
This project was built for the Chainlink Block Magic Hackathon 2026.
Built with β€οΈ for the Chainlink Hackathon