Code Monkey home page Code Monkey logo

neo-scan's Introduction

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:

  • commenter/Dé-commenter command (while true) dans docker-compose
  • 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
  • Recommenter command (while true) dans docker-compose

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

INDEX CREATION FOR NASH STAKING DASHBOARD

docker exec -it container_id bash neoscan_dev=# root@dcd042734e21:/# psql neoscan_dev postgres CREATE INDEX address_transaction_balances_nsd_1 ON address_transaction_balances (asset_hash, transaction_id DESC); CREATE INDEX address_transaction_balances_nsd_5 ON address_transaction_balances (asset_hash, address_hash, transaction_id); CREATE INDEX address_transaction_balances_nsd_6 ON address_transaction_balances (asset_hash);

neo-scan's People

Contributors

adrienmo avatar lucianoengel avatar fstepho avatar mbenatti avatar dvdschwrtz avatar yongjiema avatar uvmetal avatar kevaundray avatar telcy avatar cc1776 avatar block-shaman avatar jwcastillo avatar slipo avatar vladucu avatar jhepkema avatar woodehh avatar msied avatar containerman17 avatar localhuman avatar fabwa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.