explorer
explorer copied to clipboard
Open Source XRP Ledger Explorer
XRPL Explorer
This repo contains the source code for the block explorer of the XRP Ledger hosted at livenet.xrpl.org.
This project uses Vite. You can find information about how to use it here.
Basic requirements
Install Node and NPM
The project requires [email protected]. Follow installation instructions on nodejs.org.
(Recommended) Install using nvm.
Make sure to use npm version 8+ by running npm install -g npm@latest
after you install Node.
Google BigQuery Setup
This setup is required for the Tokens page of the explorer to function:
- Select or create a Cloud Platform project.
- Enable the Google BigQuery API.
- Set up authentication with a service account
Once you have completed these steps and generated the JSON key file, you must populate the following environment variables in the .env file with their corresponding values from the JSON key file:
GOOGLE_APP_PROJECT_ID=your-project-id
GOOGLE_APP_PRIVATE_KEY=-----BEGIN PRIVATE KEY-----\n...
GOOGLE_APP_CLIENT_EMAIL=your-client-email
Copy example env
cp .env.example .env
Install, compile, and run
-
npm install
then -
npm start
for development mode, or -
npm run build
thennpm run prod-server
for production mode
Installing on Apple Silicon
Since canvas
does not provide pre-built binaries for Apple chips during npm install
it will try to compile it manually. To get this to succeed you need to install several dependencies by following the instructions here.
Running on Parallel Networks
Testnet mode
- Replace
VITE_RIPPLED_HOST=s2.ripple.com
withVITE_RIPPLED_HOST=s.altnet.rippletest.net
in the.env
file - Add
VITE_ENVIRONMENT=testnet
to.env
to enable TESTNET banner
Devnet mode
- Replace
VITE_RIPPLED_HOST=s2.ripple.com
withVITE_RIPPLED_HOST=s.devnet.rippletest.net
in the.env
file - Add
VITE_ENVIRONMENT=devnet
to.env
to enable TESTNET banner
Testing
Run unit tests
- Run tests in watch mode
npm test
- Run test to produce coverage
npm run test:coverage
- To open coverage HTML report in app root do
open coverage/index.html
Debugging Unit Tests in Chrome
- Place
debugger;
in your unit test - Do
npm run test:debug
- Open
about:inspect
in Chrome - Click on
inspect
link - Chrome Developer Tools will be open, click
play
button - Now test will start running and will stop on your
debugger;
- You know the rest ;)
Targeted view sizes
- phone-only: 0px - 375px
- tablet-portrait-up: 375px - 600px
- tablet-landscape-up: 600px - 900px
- desktop-up: 900px - 1200px
- big-desktop-up: 1200px and up
Targeted languages
- US English (default)
- Spanish
- French
- Japanese
- Korean
When updating translation entires or adding new languages consult the guide Translating.
Additional Documentation
- How to define transactions
- Routing
React Documentation
- Latest news in react blog
- React documentation
- How to think in react and break down components