Contract Synchronization
Contract Synchronization
Section titled “Contract Synchronization”The Chain Registry automatically synchronizes contract data from on-chain IntegraLedger registries to keep deployment information current.
Sync Process
Section titled “Sync Process”Automatic Synchronization
Section titled “Automatic Synchronization”The worker runs scheduled sync operations to:
- Query IntegraLedger contracts on active chains
- Update database with new contract deployments
- Verify contract metadata and ABIs
- Track deployment status and version changes
Manual Sync Operations
Section titled “Manual Sync Operations”Administrators can trigger manual synchronization:
POST /v1/admin/sync-contractsOptionally sync specific chains:
{ "chainId": 1}Sync Results
Section titled “Sync Results”Synchronization operations return detailed metrics:
- Contracts found on-chain
- New contracts created in database
- Contracts updated with new versions
- Sync errors and warnings
ABI Encoding/Decoding
Section titled “ABI Encoding/Decoding”The registry includes utilities for interacting with IntegraLedger contracts:
encodeGetAllContracts(): Query all registered contractsencodeGetActiveContracts(): Query only active deploymentsencodeGetContractInfo(name): Get specific contract detailsdecodeGetAllContractsResponse(data): Parse contract registry responses
Category Mapping
Section titled “Category Mapping”Contract names from on-chain registries are mapped to categories:
- Exact name matching for known contracts
- Prefix matching for versioned contracts
- Error handling for unmapped contract types