Skip to content

Latest commit

 

History

History
105 lines (66 loc) · 5.13 KB

README.md

File metadata and controls

105 lines (66 loc) · 5.13 KB

TrueBlocks Explorer


IMPORTANT NOTE: THIS REPO IS NO LONGER MAINTAINED. THE FUNCTIONALITY FORMERLY PROVIDED BY THIS REPO HAS BEEN MOVED TO TRUEBLOCKS BROWSE. PLEASE USE THAT REPO INSTEAD.


GitHub repo size GitHub contributors GitHub stars GitHub forks Twitter Follow

Website TrueBlocks React

TrueBlocks lets you explore the Ethereum blockchain in a fully-local and therefore fully-private way. This repo provides an example of a frontend application for the TrueBlocks backend: TrueBlocks core.

Prerequisites

Prior to proceeding, you must install the TrueBlocks Core on your local machine.

Installing

Assuming you have the TrueBlocks core properly installed and can successfully run the following command:

chifra --version

Next, you need to either build or download the Unchained Index. See this document: https://trueblocks.io/docs/install/get-the-index/

Once you have the index, you can run the TrueBlocks local API server with:

chifra serve

Installing the TrueBlocks Account Explorer

In order to use the TrueBlocks Explorer (which is pre-alpha software at this point), do this from the top of your development folder:

git clone [email protected]:TrueBlocks/trueblocks-explorer.git
cd trueblocks-explorer
cp .env.example .env
yarn install
yarn start

The Explorer application should automatically open your browser to localhost:1234.

NPM Scripts

  • compile | compile:ui | compile:electron compile TypeScript into JavaScript, usually before packing new Electron bundle
  • develop | develop:ui | develop:electron run development server for UI and opens the app in Electron.
  • test | test:e2e run unit or E2E tests

Requirements

  • Note: In order for the TrueBlocks to work, you must have access to an Ethereum RPC endpoint that provides both an archive node and trace data. An excellent choice for this is Erigon. TrueBlocks defaults to an RPC endpoint at http://localhost:8545, but you may use any endpoint (Infura, Quiknodes, for example). Performance will be greatly reduced if you use a remote server. A good solution to this problem is dAppNode or Ava.do platforms which allow you to install and run both Erigon and (soon) the TrueBlocks docker version.

Getting Data from the API

The TrueBlocks Explorer uses the API provided by chifra serve to access data from the blockchain. Assuming everything is installed correctly and you've started the API server in a separate window, you should be able to access the API from a command line.

curl "http://localhost:8080/blocks?blocks=4001001&uniq"

will show every appearance of an address in block 4,001,001. This is the same data you'll get from the command line with chifra blocks --uniq. In general, the command line and the API endpoints provide the exact same options.

Change data formats.

By default, everything the API returns is JSON.

However, you can change this by adding the options &fmt=txt or &fmt=csv to your request. This is sometimes useful in a data science environment (such as 'R') where you want differently formatted data. All chifra commands support the fmt options.

More information

For information on all aspects of the TrueBlocks project, please see the website: https://trueblocks.io

Contributing

We love contributors. Please see information about our work flow before proceeding.

  1. Fork this repository into your own repo.
  2. Create a branch: git checkout -b <branch_name>.
  3. Make changes to your local branch and commit them to your forked repo: git commit -m '<commit_message>'
  4. Push back to the original branch: git push origin TrueBlocks/trueblocks-core
  5. Create the pull request.

Contact

If you have questions, comments, or complaints, please join the discussion on our discord server which is linked from our website.

List of Contributors

Thanks to the following people who have contributed to this project: