Epirus Substrate UI is the user interface for Epirus squids.
To enable contract source code verification capabilities you will need a running instance of the Ink! Verifier Server.
To configure the UI just create a .env
file with the configuration variables.
Example
# =================================
# Substrate UI config.
# =================================
# Port of the development server
PORT=3300
# Epirus Squid Ink query service endpoint
REACT_APP_SQUID_ENDPOINT=http://localhost:4350/graphql
# Epirus Squid Archive query service endpoint
REACT_APP_SQUID_ARCHIVE_ENDPOINT=http://localhost:4445/graphql
# Source code verification
REACT_APP_SOURCE_CODE_ENABLED=false
REACT_APP_VERIFIER_ENDPOINT=http://127.0.0.1:3001
REACT_APP_VERIFIER_WS_ENDPOINT=ws://127.0.0.1:3001
# EOF
See .env.example for reference.
Head to Adding custom environment variables for further details.
After installing the project dependencies, only for the first time, using
npm i
you can start a development server
npm start
To run the unit tests, use the command
npm test
To generate a test coverage report, execute
npm run test:coverage
To apply the code linter and automatically fix issues
npm run lint:fix
To generate a source code map analysis
npm run analysis
Will generate an HTML report in .analysis/source-map.html
Quite useful to tackle down the cause of big sizes in production build artifacts.
docker build -t epirus-substrate-ui:develop .
The build process copies the .env.example
environment configuration as required by Runtime ENV CRA.
Note that NODE_ENV=development
does not resolve process.env
variables.
See Runtime ENV CRA project for details.
This project was bootstrapped using CRA for convinience. We are using CRACO to enable PostCSS nesting capabilities in TailwindCSS without ejecting.