contracts
: Solidity smart contract for handling LLM queries and responsesrelayer
: TypeScript service for relaying queries to LLM providers
- Node.js v18+
- npm v11+
- Foundry
- Install Foundry (if not already installed):
curl -L https://foundry.paradigm.xyz | bash
foundryup
- Install project dependencies:
npm install
Build all projects:
npm run build
Run all tests:
npm run test
- Start local blockchain:
npm run dev:anvil
- In a separate terminal, deploy contracts:
npm run dev:deploy
Format code:
npm run format
Lint code:
npm run lint
.
├── llmAdapter/ # Solidity smart contracts
│ ├── src/ # Contract source files
│ ├── test/ # Contract tests
│ └── script/ # Deployment scripts
│
└── delegateRelayer/ # TypeScript relayer service
├── src/ # Service source files
└── script/ # Test scripts
Create a .env
file in the root directory:
OPENAI_API_KEY=your_api_key_here
MIT