Skip to content

CityOfZion/neo-scan

Folders and files

NameName
Last commit message
Last commit date
Jan 28, 2020
Jan 18, 2018
May 24, 2019
Apr 30, 2018
Oct 26, 2018
Jun 12, 2019
Jul 12, 2018
Aug 29, 2018
Sep 21, 2017
Jul 4, 2019
Oct 2, 2017
Feb 1, 2019
Sep 27, 2019
Sep 27, 2019
Sep 27, 2019
Aug 26, 2018
Aug 22, 2018
Sep 19, 2018
Jul 4, 2019
Jul 4, 2019
Aug 14, 2018
Aug 4, 2018
Oct 19, 2018
Aug 24, 2018
Aug 12, 2018

Repository files navigation

Neoscan

Gitlab Coveralls

Elixir + Phoenix Blockchain explorer for NEO

Contents

How to Contribute

To run, first install Elixir and Phoenix at:

Development

Run Docker

You can skip this section if you do not wish to run docker.

Using docker you can start the project with:

  • docker-compose up -d
  • docker exec -it phoenixdev sh
  • cd /data

Run Tests

To run the tests:

  • Install dependencies with mix deps.get --only test
  • Create and migrate your database with MIX_ENV=test mix ecto.create && mix ecto.migrate
  • Run mix test

Raise Main Net Phoenix

To start the Application/Phoenix server:

  • Install dependencies with mix deps.get
  • Create and migrate your database with mix ecto.create && mix ecto.migrate
  • Install Node.js dependencies with cd apps, cd neoscan_web, then cd assets && npm install
  • Start Phoenix endpoint with mix phx.server

Raise Test Net Phoenix

To start the Application/Phoenix server:

  • Install dependencies with mix deps.get
  • Create and migrate your database with mix ecto.create && mix ecto.migrate
  • Install Node.js dependencies with cd apps, cd neoscan_web, then cd assets && npm install
  • Start Phoenix endpoint with NEO_SEEDS="https://seed1.neo.org:20331;http://seed2.neo.org:20332" mix phx.server

Now you can visit localhost:4000 from your browser.

Make sure the username and password for your PostgreSQL match the contents of "apps/neoscan/config/dev.exs"

PostgreSQL Fu

Dump your database with pg_dump, i.e.,

To tarball:

pg_dump -U postgres -h localhost -W -F t neoscan_dev > neoscan_dev_testnet.tar

To file:

pg_dump -U postgres -h localhost -W neoscan_dev > neoscan_dev_testnet

Restore:

pg_restore --dbname=neoscan_dev --verbose neoscan_dev_testnet.tar

Notes

  • Docker runs as root so if you go back and forth between source repository and docker style execution you will need to be mindful to chown any files that were created. These can easily be found when you see a permission denied error on some build step.

Learn more