Installation
ankara init
Scaffold a new Ankara Chain project interactively.
- Prompts for network, project name, and private key
- Creates
ankara.config.jsonwith network settings - Creates
.envwith your private key (gitignored) - Prints next steps
ankara deploy-factory
Deploy the on-chain TokenFactory contract to your configured network.
ankara.config.jsonmust exist (runankara initfirst)PRIVATE_KEYmust be set in.env- Wallet must have enough native tokens to cover gas
- Deploys the
TokenFactorycontract - Registers all 6 asset template implementations
- Writes
factoryAddresstoankara.config.json
ankara deploy
Deploy a new RWA token from a template via interactive prompts.
Requirements:
factoryAddressmust be set inankara.config.json
farmland
farmland
Token name, symbol, asset ID, country code, GPS location, area (sq m), soil type, irrigation type, crop history, state/region, valuation USD
commodity
commodity
Token name, symbol, asset ID, country code, commodity type, quantity (kg), grade, warehouse ID, warehouse location, harvest season, valuation USD
real-estate
real-estate
Token name, symbol, asset ID, country code, property ID, property type, location address, total area (sq m), occupancy status, rental yield (bps), valuation USD
invoice
invoice
Token name, symbol, asset ID, country code, invoice number, debtor reference, face value USD, discount rate (bps), days until due, currency
carbon-credit
carbon-credit
Token name, symbol, asset ID, country code, credit type, verification body ref, vintage year, quantity CO2e (tonnes), project location, project type
mining-rights
mining-rights
Token name, symbol, asset ID, country code, license number, mineral type, concession area, area (hectares), license expiry (days from now), issuing authority, royalty rate (bps)
ankara.config.json under deployments.
ankara mint
Mint tokens to a recipient address.
- Token address (or pick from saved deployments)
- Recipient wallet address
- Amount to mint
ankara status
Check the status of a deployed token.
ankara.config.json and queries the chain for:
- Token name, symbol, total supply
- Asset status (DRAFT / ACTIVE / SUSPENDED / REDEEMED / EXPIRED)
- Metadata version
NFT Commands
ankara deploy-nft
Deploy an ERC-721 NFT asset record via interactive prompts.
nftFactoryAddressmust be set inankara.config.json
- Template picker:
farmland-nft,real-estate-nft,mining-rights-nft,commodity-vault-nft - Collection name, symbol, asset ID, country code
ankara.config.json under deployments.
ankara transfer
Transfer ERC-20 tokens or ERC-721 NFTs to a recipient. Auto-detects the token standard via ERC-165 (supportsInterface) — no --type flag needed.
- Contract address
- If ERC-721: recipient address, token ID
- If ERC-20: recipient address, amount (in token units)
Multi-Token / Pool Commands
These commands operate on the ERC-1155 layer (MultiTokenFactory, CommodityBatchToken, PoolVault, ManualOracle).
ankara deploy-batch
Deploy a CommodityBatchToken (ERC-1155 warehouse receipt contract) via interactive prompts.
multiTokenFactoryAddressmust be set inankara.config.json
- Warehouse name, country code, base IPFS URI, warehouse ID, warehouse location
ankara deploy-pool
Deploy a PoolVault (multi-asset ERC-20 fund) via interactive prompts.
multiTokenFactoryAddressmust be set inankara.config.json
- Pool name, symbol, asset ID, country code
- Oracle address (leave blank for none)
- Management fee in basis points (default
50= 0.5%/yr)
ankara register-batch
Register a new commodity batch on an already-deployed CommodityBatchToken contract.
- Contract address, batch ID, commodity type, quantity (kg), grade classification, harvest season, origin country, valuation USD, expiry (unix timestamp)
ankara batch-mint
Mint ERC-1155 commodity batch tokens to a recipient.
- Contract address, batch ID, recipient address, amount
ankara deposit
Approve and deposit an ERC-20 token into a PoolVault.
- Prompts for the vault address, token address, and amount
- Sends an
approve()transaction for the vault to spend the token - Calls
vault.deposit(token, amount)
ankara withdraw
Withdraw from a PoolVault by burning pool tokens.
- Vault address, amount of pool tokens to burn
ankara pool-status
Show NAV, AUM, accepted tokens, and fee info for a PoolVault.
Reports: name/symbol, total supply, NAV per token, total AUM, management fee (bps), oracle address, last fee accrual timestamp, and the list of accepted deposit tokens.
ankara oracle-set
Set a token’s USD price on a ManualOracle contract.
- Oracle address, token address, price in USD (e.g.
1.50)
Escrow Commands
Commands for theMilestoneEscrow / EscrowFactory contracts — tranche-based, dual-approval payments with an optional arbiter and a timelock fallback. See Escrow for the on-chain mechanics.
ankara deploy-escrow
Deploy a MilestoneEscrow for tranche-based diaspora payments via interactive prompts.
escrowFactoryAddressmust be set inankara.config.json
- Payer address (funds the escrow), payee address (receives released funds)
- Arbiter address (optional — leave blank for none)
- Stablecoin address (must be whitelisted on the
EscrowFactory) - Timelock in days (default
7) - Number of milestones, then an amount + description per milestone
ankara.config.json under deployments.
ankara escrow-fund
Approve and deposit the full agreed amount into a MilestoneEscrow. Payer only.
- Prompts for the escrow address
- Reads the escrow’s token and total amount
- Sends an
approve()transaction, then callsfund()
ankara escrow-deliver
Mark a milestone as delivered. Payee only.
- Escrow address, milestone ID (0-indexed)
ankara escrow-approve
Approve a delivered milestone, releasing funds to the payee. Payer only.
- Escrow address, milestone ID (0-indexed)
ankara escrow-dispute
Raise a dispute on a delivered milestone. Payer or payee.
- Escrow address, milestone ID (0-indexed)
ankara escrow-resolve
Resolve a disputed milestone. Arbiter only.
- Escrow address, milestone ID (0-indexed)
- Resolution: release funds to payee, or refund to payer
ankara escrow-claim-timelock
Force-release a delivered, non-disputed milestone once the timelock has elapsed. Callable by anyone.
- Escrow address, milestone ID (0-indexed)
ankara escrow-status
Show status, balances, and milestones for a MilestoneEscrow.
Reports: payer, payee, arbiter, token, total amount, funded/cancelled flags, remaining balance, and every milestone’s amount, status, and delivery timestamp.
Ramp Commands (on-ramp / off-ramp)
Commands for fiat↔token flows. The off-chain half always usesManualRampProvider (a reference implementation for dev/testing) — swap in a real provider adapter (Yellow Card, Flutterwave, Transak, etc.) in your own integration. The on-chain half (RampSettlement) is optional; see On-Ramp / Off-Ramp for the full design.
ankara deploy-ramp-settlement
Deploy a RampSettlement contract for fiat on/off-ramp flows via interactive prompts.
rampSettlementFactoryAddressmust be set inankara.config.json
- Treasury address (receives settled off-ramp deposits)
ankara.config.json under deployments.
ankara ramp-quote
Get a fiat↔token quote.
- Direction (on-ramp / off-ramp), fiat currency, token symbol, country code, amount (fiat or token units)
ankara onramp-initiate
Start an on-ramp session (fiat → tokens) with the ramp provider.
- Fiat amount, fiat currency, token symbol, recipient wallet address, country code
deploy/mint commands, then run ankara onramp-record.
ankara onramp-record
Record an on-chain attestation that an on-ramp mint happened. SETTLER_ROLE only.
RampSettlementaddress, reference string (fromonramp-initiate, or any consistent ID), recipient address, minted token address, amount
ankara offramp-initiate
Start an off-ramp session (tokens → fiat): deposits tokens into RampSettlement custody and starts a provider payout session.
- Starts a payout session with the ramp provider
- Sends an
approve()transaction for the settlement contract to spend the token - Calls
initiateOffRamp()on the settlement contract, depositing the tokens into custody
RampSettlementaddress, token address, amount, fiat currency, payout account number, bank code (leave blank for mobile money), country code
ankara offramp-confirm
Confirm an off-ramp fiat payout, releasing custodied tokens to the treasury. SETTLER_ROLE only.
RampSettlementaddress, reference string (fromofframp-initiate)
ankara offramp-refund
Refund a custodied off-ramp deposit to the original depositor if the fiat payout failed. MANAGER_ROLE only.
RampSettlementaddress, reference string (fromofframp-initiate)
ankara ramp-status
Show the on-chain off-ramp deposit / on-ramp record for a reference.
Reports the treasury address, plus (if present for the given reference) the off-ramp deposit’s depositor/token/amount/status and the on-ramp record’s recipient/token/amount/status.
Config File: ankara.config.json
Generated by ankara init and updated by deploy commands:
nftFactoryAddress, multiTokenFactoryAddress, escrowFactoryAddress, and rampSettlementFactoryAddress are only required for the commands in their respective sections above (NFT, multi-token/pool, escrow, and ramp commands) — ankara init only writes factoryAddress by default.