Skip to content

crosschain-alliance/delegate

Repository files navigation

DeleGate

Projects

  • contracts: Solidity smart contract for handling LLM queries and responses
  • relayer: TypeScript service for relaying queries to LLM providers

Prerequisites

  • Node.js v18+
  • npm v11+
  • Foundry

Installation

  1. Install Foundry (if not already installed):
curl -L https://foundry.paradigm.xyz | bash
foundryup
  1. Install project dependencies:
npm install

Development

Build

Build all projects:

npm run build

Test

Run all tests:

npm run test

Local Development

  1. Start local blockchain:
npm run dev:anvil
  1. In a separate terminal, deploy contracts:
npm run dev:deploy

Code Quality

Format code:

npm run format

Lint code:

npm run lint

Project Structure

.
├── 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

Environment Variables

Create a .env file in the root directory:

OPENAI_API_KEY=your_api_key_here

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published