⛓️Off-chain TokenController service specification

TokenController has 5 components, 3 of them directly interact with blockchain:

  • PurchaseIndexer fetches on all L2 resource chains ERC20.Transfer events directed to TradeContract so TokenController can receive new requests to mint NFT. This requests are stored in database as NFTMintRequest

  • NFTMintController sees when in database new NFTMintRequest appears. It starts mint process on Ethereum chain and passes to backend token_id and mint_tx_hash once mint is performed

  • PriceController fetches kind's supplies changes on Ethereum chain ScalleyValleyCollection contract and notifier about new supplies every L2 resource chain contract TradeContract. Then it updates prices for all NFT kinds in database.

API and Database are used to store and represent to frontend data created and processed by these 3 components above.

Last updated