TokenFactory, AssetRegistry, EscrowManager, etc.) handle contract interaction on your behalf. However, there are scenarios where you need raw ABI access: building a custom UI that reads contract state directly, integrating with a wallet library that expects ABI fragments, writing scripts that call contract functions not yet surfaced by the SDK, or constructing multicall batches. In all these cases, @ankarachain/sdk exports every contract ABI as a named constant so you don’t have to maintain a separate ABI JSON file.
as const — TypeScript can infer the exact function and event shapes.
ERC-20 Token ABIs
TOKEN_FACTORY_ABI
The main ERC-20 token factory. Exposes
deployFarmlandToken, deployCommodityReceiptToken, deployRealEstateToken, deployInvoiceToken, deployCarbonCreditToken, deployMiningRightsToken, registerTemplate, totalDeployed, getDeployerTokens, deploymentFee, implementations, and the TokenDeployed event.FARMLAND_TOKEN_ABI
FarmlandToken proxy surface: standard ERC-20 (
name, symbol, totalSupply, balanceOf, transfer, approve, allowance), plus mint, burn, pause/unpause, assetId, countryCode, status, getMetadata, valuationUSD, areaSqMeters, updateValuation, updateTitleDocument, setStatus, setIdentityVerifier, and the MetadataUpdated / AssetStatusChanged events.COMMODITY_TOKEN_ABI
CommodityReceiptToken surface: ERC-20 base plus
commodityType, quantityKg, valuationUSD, isExpired, markExpired, getMetadata, and MetadataUpdated.REAL_ESTATE_TOKEN_ABI
RealEstateToken surface: ERC-20 base plus
valuationUSD, rentalYieldBps, occupancyStatus, totalRentalDistributed, updateValuation, updateOccupancyStatus, declareRentalDistribution, and RentalDeclared.INVOICE_TOKEN_ABI
InvoiceToken surface: ERC-20 base plus
invoiceStatus, faceValueUSD, isOverdue, daysUntilDue, markFunded, markRepaid, markDefaulted, and InvoiceStatusChanged.CARBON_CREDIT_TOKEN_ABI
CarbonCreditToken surface: ERC-20 base plus
creditType, vintageYear, quantityCO2e, totalRetired, totalRetirements, retire, and CreditsRetired.MINING_RIGHTS_TOKEN_ABI
MiningRightsToken surface: ERC-20 base plus
mineralType, royaltyRateBps, areaHectares, isLicenseExpired, daysUntilExpiry, totalRoyaltiesDeclared, renewLicense, markLicenseExpired, declareRoyalty, and RoyaltyDeclared.ERC20_METADATA_ABI
Minimal read-only ABI for any ERC-20:
name(), symbol(), decimals(). Useful for reading details on arbitrary token contracts, since the template ABIs above do not expose decimals().WHITELIST_VERIFIER_ABI
The optional identity verification contract. Exposes isVerified, verifyIdentity, revokeIdentity, batchVerify, verifierName, and the IdentityVerified / IdentityRevoked events.
NFT ABIs
NFT_FACTORY_ABI
NFT factory. Exposes
deployFarmlandNFT, deployRealEstateNFT, deployMiningRightsNFT, deployCommodityVaultNFT, registerTemplate, totalDeployedNFTs, getDeployerNFTs, deploymentFee, implementations, and NFTDeployed.FARMLAND_NFT_ABI
ERC-721 FarmlandNFT: standard NFT surface plus
mint, burn, getMetadata, updateMetadata, updateTitleDocument, metadataVersion, assetId, countryCode, status, identityVerifier, linkedERC20, setStatus, setIdentityVerifier, linkToERC20, pause/unpause, and FarmlandNFTMinted / MetadataUpdated / ERC20Linked.REAL_ESTATE_NFT_ABI
ERC-721 RealEstateNFT: NFT surface plus
mint, burn, getMetadata, updateMetadata, updateValuation, metadataVersion, linkedERC20, linkToERC20, and ValuationUpdated.MINING_RIGHTS_NFT_ABI
ERC-721 MiningRightsNFT: NFT surface plus
mint, burn, getMetadata, updateMetadata, renewLicense, isLicenseExpired, and LicenseRenewed.COMMODITY_VAULT_NFT_ABI
ERC-721 CommodityVaultNFT: NFT surface plus
mint, burn, getMetadata, updateMetadata, metadataVersion, linkedERC20, linkToERC20, and CommodityVaultNFTMinted.Multi-Token ABIs
MULTI_TOKEN_FACTORY_ABI
ERC-1155 factory. Exposes
deployCommodityBatchToken, deployPoolVault, registerTemplate, totalDeployedMultiTokens, getDeployerMultiTokens, deploymentFee, and MultiTokenDeployed.COMMODITY_BATCH_TOKEN_ABI
ERC-1155 commodity batch contract. Exposes
registerBatch, mint, balanceOf, getBatchMetadata, getWarehouseMetadata, activeBatchCount, batchIds, isExpired, expireBatch, and BatchRegistered.POOL_VAULT_ABI
ERC-20 pool vault. Exposes
deposit, withdraw, accrueManagementFee, NAVPerToken, totalAUM, acceptedTokens, addAcceptedToken, removeAcceptedToken, setOracle, setManagementFeeBps, isAccepted, and Deposited / Withdrawn / FeeAccrued.MANUAL_ORACLE_ABI
Admin-controlled price oracle. Exposes
getPrice, isStale, setPrice, setStalenessThreshold, stalenessThreshold, and PriceSet.Escrow ABIs
ESCROW_FACTORY_ABI
Deploys MilestoneEscrow contracts. Exposes deployEscrow, setImplementation, setStablecoinAccepted, acceptedStablecoins, implementation, totalDeployedEscrows, getDeployerEscrows, deploymentFee, and EscrowDeployed.
MILESTONE_ESCROW_ABI
The per-deal escrow contract. Exposes the full milestone lifecycle:
Ramp Settlement ABIs
RAMP_SETTLEMENT_FACTORY_ABI
Factory for on-chain ramp settlement contracts. Exposes deployRampSettlement, setImplementation, implementation, totalDeployedRampSettlements, getDeployerRampSettlements, deploymentFee, and RampSettlementDeployed.
RAMP_SETTLEMENT_ABI
Per-deployment ramp settlement contract. Exposes treasury, initiateOffRamp, confirmOffRampSettlement, refundOffRamp, recordOnRampSettlement, getOffRamp, getOnRamp, setTreasury, pause/unpause, and all four settlement events.
Usage example
For most use cases, use the high-level SDK classes instead of raw ABIs.
AssetRegistry wraps getMetadata() and setStatus() with a clean TypeScript API. Direct ABI usage is recommended only for advanced integrations or when calling contract functions that are not yet surfaced by the SDK classes.