Skip to content

Prerequisites & Stack

ToolVersionInstall
Node.js≥ 20.x LTShttps://nodejs.org
pnpm≥ 9.xnpm i -g pnpm
Hardhat2.x (via package)Installed in workspace
Foundry (optional)Latestcurl -L https://foundry.paradigm.xyz | bash
GitAny recentSystem package manager

All of these must be obtained before Phase 1 mainnet deployment. None are optional.

ServicePurposeHow to get access
Mantle NetworkContract deployment + RPChttps://www.mantle.xyz — free, standard EVM
AlchemyRPC provider + webhookshttps://www.alchemy.com — free tier sufficient for dev
Hedera PortalHCS account + topic creationhttps://portal.hedera.com
Kotani PayFarmer payout APIContact: team@kotanipay.io — requires KYB
TransFiMFI deposit on-rampContact: partnerships@transfi.com — requires KYB
PinataIPFS pinninghttps://www.pinata.cloud — free tier for dev
Africa’s TalkingUSSD gatewayhttps://africastalking.com — Uganda sandbox available
MAAIF NTSGovernment farmer dataMinistry-level partnership — initiate immediately
Global Forest Watch APIDeforestation monitoringhttps://www.globalforestwatch.org/help/api
SupabaseOff-chain databasehttps://supabase.com — free tier sufficient for dev
EU TRACESEUDR DDS filingExporter must register with their UCDA licence
Layer Technology Notes
─────────────────────────────────────────────────────────────────
Smart contracts Solidity 0.8.20 OpenZeppelin Upgradeable
Target chain Mantle mainnet chainId 5000
Test chain Mantle Sepolia chainId 5003
ZK proof system OP Succinct / SP1 Type-1 zkEVM, 1-hr finality
Contract framework Hardhat + TypeChain Viem for client-side
Audit log Hedera HCS Append-only, IBM/Google governed
Farmer payouts Kotani Pay API USDC → MTN MoMo < 60 seconds
MFI on-ramp TransFi Bank wire → USDC → LendingVault
Price feeds Chainlink AggregatorV3 Coffee/USD + drought risk
RPC + Webhooks Alchemy Mantle mainnet
IPFS pinning Pinata DDS + GPS + weight slips
Off-chain DB Supabase (PostgreSQL) Phone numbers, session state
API framework Next.js 14 (App Router) REST API layer
Agent app Next.js PWA Offline-capable, mobile-first
USSD gateway Africa's Talking *384# session handler
Deforestation Global Forest Watch Satellite API
Government data MAAIF NTS API Primary farmer registration
Terminal window
# Clone the monorepo
git clone https://github.com/AsiliChain/asilichain.git
cd asilichain
# Install all dependencies
pnpm install
# Copy environment template
cp .env.example .env
# Fill in all required values (see Project Structure)
# Run contract tests (Mantle Sepolia fork)
cd packages/contracts
pnpm test
# Run API in development mode
cd packages/api
pnpm dev
# Run agent app in development mode
cd packages/agent-app
pnpm dev
// 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 }
}

All contract interactions on Mantle require MNT for gas. At $0.002 per ZK proof: