Solidity Guardrail
AI agent that designs, audits, and deploys Chainlink-secured smart contracts from plain English.
What it is
It works as a multi-stage pipeline. A web app collects user intent, then a workflow engine (or Chainlink CRE path) interprets that intent, rejects speculative/memecoin-style requests, and produces a protocol design plan. Nuance: the Solidity text is generated by an OpenAI model, while Chainlink provides the live oracle context and on-chain service layer around generation (Data Feeds, Automation, Functions, with optional CCIP/VRF). The AI generator creates Solidity from the plan with security patterns like pausing, ownership controls, kill switches, and safe defaults. The code is compiled with auto-fix retries for common generation errors, then deployed through the project’s deployment flow so contracts can use real market data and automated risk actions on-chain.
The problem it solves is the gap between “idea” and “safe on-chain execution.” Today, deploying custom contracts is slow, error-prone, and requires deep smart contract expertise. Guardrail Factory reduces that complexity by combining AI generation with deterministic policy checks and Chainlink-backed runtime protections, so teams can ship faster without skipping security and compliance guardrails.
How it Works
Built with:
- apps/web (Next.js 14 + TypeScript): UI and API routes (/api/generate, /api/verify, etc.).
- workflow (TypeScript runner + Chainlink CRE workflows): orchestration engine for intent parsing, safety checks, generation, compile, and deploy steps.
- packages/spec (@guardrail/spec): shared validation/policy layer (including anti-meme/spec checks).
- contracts (Foundry/Solidity): on-chain protocol contracts and deployment scripts.
End-to-end flow: - User writes intent in plain English.
- Workflow validates and risk-screens intent.
- It pulls Chainlink context (e.g., price feed data) and builds a design plan.
- OpenAI generates Solidity from that plan.
- solc-js compiles it with auto-fix retries for common generation errors.
- Contract is deployed via the deployment pipeline, with Chainlink services integrated (Data Feeds, Automation, Functions, optional CCIP/VRF).
So: OpenAI handles code generation; Chainlink provides CRE orchestration + oracle/service integrations around it.
Links
Created by
- Muhammad Zulhilmi Bin Rahmat