Code Monkey home page Code Monkey logo

tonscan's Introduction

TON Blockchain Explorer

An open source address, block and transaction explorer for TON Blockchain.

See it in action

Contributing

If you'd like to add your address to our address book, you cat do it here: catchain/address-book. Please note that addresses from address book is not used in search. If you'd like to add your address into the search, please leave a message here.

If you'd like to submit a pull request, please run npm run lint and check for the errors before pushing. We also highly recommend opening an issue before doing anything, because this repository is a mirror and is not always up to date with the actual code base.

Building

Before building the project you should fill the environment variables in .env (or .env.testnet) file. You may refer to .env.example file for available variables.

All variables are optional, but we recommend filling at least TONCENTER_API_KEY (docs) and TONAPI_KEY (details).

TYPESENSE_API_KEY is used for real-time search. You may either use your own typesense server (in that case you should also change the TYPESENSE_API_ENDPOINT variable), or use our guest key. To obtain guest key, please leave a message here.

Then run:

npm install && npm run prod

For testnet:

npm install && npm run prod_testnet

Developing

npm run serve

To change host and port of the local server, change the APP_DEV_SERVER_HOST and APP_DEV_SERVER_PORT environment variables either in .env file or in command line. For example:

APP_DEV_SERVER_HOST=0.0.0.0 APP_DEV_SERVER_PORT=8080 npm run serve

Using

The result of the build is static files in dist folder. To start using tonscan, you may:

  • Upload the dist folder to your web server (see example config below)
  • Upload build.zip to Cloudflare Pages
  • Use any static file hosting, e. g. Firebase

Example nginx config:

server {
    server_name tonscan.test;
    root /path/to/tonscan/dist;
    index index.html;

    location / {
        try_files $uri $uri/ @rewrites;
    }

    location @rewrites {
        rewrite ^(.+)$ /index.html last;
    }
}

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.