Prerequisites & Stack
Required Tools
Section titled “Required Tools”| Tool | Version | Install |
|---|---|---|
| Node.js | ≥ 20.x LTS | https://nodejs.org |
| pnpm | ≥ 9.x | npm i -g pnpm |
| Hardhat | 2.x (via package) | Installed in workspace |
| Foundry (optional) | Latest | curl -L https://foundry.paradigm.xyz | bash |
| Git | Any recent | System package manager |
Required Accounts & API Keys
Section titled “Required Accounts & API Keys”All of these must be obtained before Phase 1 mainnet deployment. None are optional.
| Service | Purpose | How to get access |
|---|---|---|
| Mantle Network | Contract deployment + RPC | https://www.mantle.xyz — free, standard EVM |
| Alchemy | RPC provider + webhooks | https://www.alchemy.com — free tier sufficient for dev |
| Hedera Portal | HCS account + topic creation | https://portal.hedera.com |
| Kotani Pay | Farmer payout API | Contact: team@kotanipay.io — requires KYB |
| TransFi | MFI deposit on-ramp | Contact: partnerships@transfi.com — requires KYB |
| Pinata | IPFS pinning | https://www.pinata.cloud — free tier for dev |
| Africa’s Talking | USSD gateway | https://africastalking.com — Uganda sandbox available |
| MAAIF NTS | Government farmer data | Ministry-level partnership — initiate immediately |
| Global Forest Watch API | Deforestation monitoring | https://www.globalforestwatch.org/help/api |
| Supabase | Off-chain database | https://supabase.com — free tier sufficient for dev |
| EU TRACES | EUDR DDS filing | Exporter must register with their UCDA licence |
Tech Stack Summary
Section titled “Tech Stack Summary”Layer Technology Notes─────────────────────────────────────────────────────────────────Smart contracts Solidity 0.8.20 OpenZeppelin UpgradeableTarget chain Mantle mainnet chainId 5000Test chain Mantle Sepolia chainId 5003ZK proof system OP Succinct / SP1 Type-1 zkEVM, 1-hr finalityContract framework Hardhat + TypeChain Viem for client-sideAudit log Hedera HCS Append-only, IBM/Google governedFarmer payouts Kotani Pay API USDC → MTN MoMo < 60 secondsMFI on-ramp TransFi Bank wire → USDC → LendingVaultPrice feeds Chainlink AggregatorV3 Coffee/USD + drought riskRPC + Webhooks Alchemy Mantle mainnetIPFS pinning Pinata DDS + GPS + weight slipsOff-chain DB Supabase (PostgreSQL) Phone numbers, session stateAPI framework Next.js 14 (App Router) REST API layerAgent app Next.js PWA Offline-capable, mobile-firstUSSD gateway Africa's Talking *384# session handlerDeforestation Global Forest Watch Satellite APIGovernment data MAAIF NTS API Primary farmer registrationLocal Development Setup
Section titled “Local Development Setup”# Clone the monorepogit clone https://github.com/AsiliChain/asilichain.gitcd asilichain
# Install all dependenciespnpm install
# Copy environment templatecp .env.example .env# Fill in all required values (see Project Structure)
# Run contract tests (Mantle Sepolia fork)cd packages/contractspnpm test
# Run API in development modecd packages/apipnpm dev
# Run agent app in development modecd packages/agent-apppnpm devMantle Network Configuration
Section titled “Mantle Network Configuration”// Mantle mainnet{ chainId: 5000, rpcUrl: 'https://rpc.mantle.xyz', explorerUrl: 'https://explorer.mantle.xyz', nativeCurrency: { name: 'MNT', symbol: 'MNT', decimals: 18 }}
// Mantle Sepolia testnet{ chainId: 5003, rpcUrl: 'https://rpc.sepolia.mantle.xyz', explorerUrl: 'https://explorer.sepolia.mantle.xyz', nativeCurrency: { name: 'MNT', symbol: 'MNT', decimals: 18 }}MNT for Gas
Section titled “MNT for Gas”All contract interactions on Mantle require MNT for gas. At $0.002 per ZK proof:
- Development: Mantle Sepolia faucet at https://faucet.sepolia.mantle.xyz
- Production: Cooperative deployer wallet needs ~$50 MNT/year for all contract interactions