Off-chain file storage system for blockchain data.
- Install dependencies:
git clone https://github.com/superdapp-com/ocfs.git
cd ocfs
bun install
To add support for a new blockchain network:
bun run add-rpc <chain_id> <rpc_url>
# Example:
bun run add-rpc 137 https://polygon-rpc.comAfter running the script, complete these steps:
- Add the chain to the
chainsarray insrc/scripts/globals.ts - Add the RPC URL to your
.envfile - Add the RPC URL to your GitHub repository secrets
Stage Updates
bun stage
Deploy Updates
bun deploy
The src/ directory is designed for contributors. It is organized to reflect the relationships between chains, protocols, and tokens, making it easy to navigate and update.
src/
├── chains/
│ ├── [chain_id]_[chain_name]/
│ │ ├── tokenList.json
│ │ ├── protocolList.json
│ │ ├── protocols
│ │ │ └── [protocol_name]/
│ │ │ └── [contract_address]/
│ │ └── tokens
│ │ └── [token_name]/
│ │ └── [token_address]/
│ └── [other chains]/
├── scripts/
└── shared/
├── images/
├── protocols/
└── tokens/
The dist/ directory is optimized for software consumption, with concise paths and organized for efficient reading.
dist/
└── [chain_id]/
├── tokenList.json
├── protocolList.json
├── abi/
│ └── [protocol_name]_[contract_address].json
├── erc20/
│ └── [token_address].json
└── [token_address].svg
Create a .env file with your RPC endpoints:
RPC_HTTP_1=<ethereum_rpc_url>
RPC_HTTP_137=<polygon_rpc_url>
RPC_HTTP_369=<pulsechain_rpc_url>
RPC_HTTP_8453=<base_rpc_url>
For deployment, you'll also need Cloudflare R2 credentials in your GitHub repository secrets.