README
¶
eosq
EOSIO block explorer
Quick start
This guide assumes you have yarn and go installed on your system.
-
In the first terminal, build the dfuse single binary:
go install ../cmd/dfuseeosthen run the binary with:
dfuseeos start -
In the second terminal, install dependencies for the
eosqReact app:yarn installthen run the React app in development mode:
yarn start -
In your browser, connect to your instance via http://localhost:3000.
Build as single binary within dfuse for EOSIO
-
First, you will need to grab https://github.com/GeertJohan/go.rice with
go get github.com/GeertJohan/go.rice/rice -
Then create the React build with:
yarn build -
Next, run either:
go generateOR
goreleaser (from root /)
Development on existing network
Our deployed APIs for eosq is currently restricted to special API keys, so currently, you need to obtain a special API key and those are currently restricted to dfuse employes, so does the instruction given here.
You can easily connect to EOS Mainnet by simply exporting some environment variables and
launching yarn start straight. Here the minimum one you need to launch eosq for
EOS Mainnet:
export REACT_APP_EOSQ_CURRENT_NETWORK="eos-mainnet"
export REACT_APP_DFUSE_API_KEY="<API Key>"
export REACT_APP_DFUSE_API_NETWORK="mainnet.eos.dfuse.io"
Launching yarn start with those exported will correctly launch eosq and make it
point to EOS Mainnet.
Here a full list and what they control:
REACT_APP_DFUSE_AUTH_URL- The dfuse API Authentication URl to pass to@dfuse/client.REACT_APP_DFUSE_API_KEY- The dfuse API key to pass to@dfuse/client.REACT_APP_DFUSE_API_NETWORK- The dfuse API network to pass to@dfuse/client.REACT_APP_EOSQ_CURRENT_NETWORK- The actual current network to select in the list of available networks.REACT_APP_EOSQ_DISPLAY_PRICE- Wether to display the price info or not.REACT_APP_EOSQ_AVAILABLE_NETWORKS- A valid JSON string representing the valid config of available networks to display in the main menu.
Note Those are valid for development purposes only, they are not picked on production usage and they are injected in the
HTML index.html page directly on production.
File structure
srcJS codeappGo code which wraps the React build into agomodule to be run bydfuseeos
JS File structure
src/atoms: UI-only components, those components are not application specific and would eventually move to somestyleguidelibrary.src/clients: API-layer objectssrc/components: Application specific componentssrc/components/action-pills: action pill related components, this folder contains also all the templates. Note that the translations are encapsulated inside the templates.src/components/app-container: Main layout, this folder would need to move tosrc/layoutsto add clarity.
src/helpers: Misc helper functionssrc/i18n: Translation folder for the application except for the Pill Templates.src/models: Object definitions, some objects are still in other folders, they should be moved here.src/pages: Page components + their component dependencies for complex pages.src/routes: Route definitionssrc/services: Misc classes/objects. Some of it needs to be refactored/movedsrc/stores:Mobxor plain stores. Mainly classes that store thingssrc/streams: Websocket listener registrationsrc/theme: Theme initialisation
React APP
Main dependencies:
- Material-ui
- antd
- Emotion
- Fortawesome Free
- @dfuse/client
- i18next
- nvd3/d3
- mobx
- react-scripts
- Typescript