The transaction indexer comes as a docker cluster which runs locally.
Docker should be installed and running.
Clone the Mailchain repository to your .mailchain/mailchain
folder:
git clone https://github.com/mailchain/mailchain.git ~/.mailchain/mailchaincd ~/.mailchain/mailchain
The indexer is preconfigured for 3 networks:
Network | Command |
Edgeware Mainnet |
|
Edgeware Testnet (beresheet) |
|
Edgeware Local (development) |
|
Select the network and run the appropriate make command (e.g. make edgeware-mainnet
). This will download or update the required docker containers.
NOTE: If working in local mode, you can access the preconfigured development accounts here if you need to transfer a balance to accounts you configured in Setting Up > Add Account.
If successful, the output will be similar to the following:
Creating network "mailchain_default" with the default driverPulling database (postgres:)...latest: Pulling from library/postgresbf5952930446: Downloading [===============> ] 8.399MB/27.09MB...Creating mailchain_database_1 ... doneCreating mailchain_receiver_1 ... doneCreating mailchain_indexer-migration_1 ... doneCreating mailchain_indexer-substrate-mainnet_1 ... done...indexer-substrate_1 | 2020/09/27 19:19:51 Connecting to ws://mainnet1.edgewa.re:9944...receiver_1 | [negroni] listening on :8080indexer-substrate_1 | block number: 3191664indexer-substrate_1 | block hash: 0x81c694ba6973213905a8beaa8f8b69db395fb060606411d19c4f3b575c5f9b4cindexer-substrate_1 | next block number: 3191665indexer-substrate_1 | block number: 3191665
To gracefully stop the indexer, press Ctrl+C
.