Skip to content

Smart Contracts

All AsiliChain contracts deploy to Mantle Network (chainId 5000). Every contract is UUPS-upgradeable via OpenZeppelin’s proxy pattern, gated by a 3-of-5 multisig DEFAULT_ADMIN_ROLE.

Deployment order is strict — each contract’s initializer requires addresses from previously deployed contracts.

StepContractStatusTypeDepends on
1FarmerRegistry.sol✅ ImplementedUUPS ProxyNothing — deploy first
2CreditScore.sol⏳ SpeccedUUPS ProxyNothing — deploy second
3BatchToken.sol⏳ SpeccedERC-1155 + UUPSFarmerRegistry
4TraceLog.sol⏳ SpeccedUUPS ProxyBatchToken
5PurchaseOrder.sol⏳ SpeccedUUPS ProxyBatchToken + TraceLog
6ProtocolFee.sol⏳ SpeccedUUPS ProxyNothing — deploy independently
7LendingVault.sol⏳ SpeccedERC-4626 + UUPSAll of the above
ContractStatusCore jobKey callers
FarmerRegistry✅ ImplementedStores verified farmer identities, MAAIF IDs, GPS references, cooperative membershipsAPI (registration), BatchToken (mint-time check)
CreditScore⏳ SpeccedTracks repayment history. Permanent, public, portable.LendingVault (repayment/default), API (delivery)
BatchToken⏳ SpeccedERC-1155 semi-fungible coffee batch token. Primary collateral.API (mint), LendingVault (lock/unlock/burn)
TraceLog⏳ SpeccedRecords 8-stage custody journey per batchAPI (stage updates), LendingVault (EXPORTED trigger)
PurchaseOrder⏳ SpeccedRecords buyer commitment. Upgrades collateral tier.Buyer portal (create), Cooperative (confirm)
ProtocolFee⏳ SpeccedCollects 4% margin per settlement. 3-of-5 multisig withdrawals.LendingVault (collect on SETTLED)
LendingVault⏳ SpeccedERC-4626 vault. MFI deposits, loan origination, auto-repayment.API (originate), TraceLog (EXPORTED event)