mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 02:49:55 +00:00
Implements persistent caching of ERC20 contract address to spot token ID mappings in the database to minimize API requests and improve performance. Changes: - Add SpotMetadata database table for persistent storage - Implement load_spot_metadata_cache() to initialize cache on startup - Add init_spot_metadata() for init-state command to pre-populate cache - Extract store_spot_metadata() helper to DRY serialization logic - Enable on-demand API fetches with automatic database persistence - Integrate cache loading in main node startup flow The cache falls back to on-demand API fetches if database is empty, with automatic persistence of fetched data for future use.