description |
---|
How the BlockScout project is organized |
BlockScout is an Elixir umbrella project. Each directory under apps/
is a separate Mix project and OTP application, but the projects can use each other as a dependency in their mix.exs
.
Each OTP application has a restricted domain.
{% hint style="info" %} Table is horizontally scrollable. {% endhint %}
Directory | OTP Application | Namespace | Purpose |
---|---|---|---|
apps/ethereum_jsonrpc |
:ethereum_jsonrpc |
EthereumJSONRPC |
Ethereum JSONRPC client. It is allowed to know Explorer 's param format, but it cannot directly depend on :explorer |
apps/explorer |
:explorer |
Explorer |
Storage for the indexed chain. Can read and write to the backing storage. MUST be able to boot in a read-only mode when run independently from :indexer , so cannot depend on :indexer as that would start :indexer indexing. |
apps/block_scout_web |
:block_scout_web |
BlockScoutWeb |
Phoenix interface to :explorer . The minimum interface to allow web access should go in :block_scout_web . Any business rules or interface not tied directly to Phoenix or Plug should go in :explorer . MUST be able to boot in a read-only mode when run independently from :indexer , so cannot depend on :indexer as that would start :indexer indexing. |
apps/indexer |
:indexer |
Indexer |
Uses :ethereum_jsonrpc to index chain and batch import data into :explorer . Any process, Task , or GenServer that automatically reads from the chain and writes to :explorer should be in :indexer . This restricts automatic writes to :indexer and read-only mode can be achieved by not running :indexer . |