vega-frontend-monorepo/apps/trading/README.md
m.ray 77ca101781
chore(trading): merge main back in develop (#5597)
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
Co-authored-by: Edd <edd@vega.xyz>
2024-01-10 10:31:15 +00:00

1.9 KiB

Trading

Development

First copy the configuration of the application you are starting:

cp .env.[environment] .env.local

Starting the app:

yarn nx serve trading

Configuration

Example configurations are provided here:

For convenience, you can boot the app injecting one of the configurations above by running:

yarn env-cmd -f .\apps\trading\.env.{env} yarn nx run trading:serve # e.g. stagnet1

There are a few different configuration options offered for this app:

The network configuration for the app

Flag Purpose
NX_VEGA_ENV The name of the currently connected vega environment
NX_VEGA_CONFIG_URL The network configuration for the app
NX_VEGA_URL The GraphQL query endpoint of a Vega data node
NX_ETHEREUM_PROVIDER_URL The Ethereum Provider URL for getting data from the Ethereum network, for example Infura or a local node
NX_ETHERSCAN_URL The Etherscan URL to link Ethereum transactions to

Testing

To run the minimal set of unit tests, run the following:

yarn nx test trading

To run the UI automation tests with a mocked API, run:

yarn nx run trading-e2e:e2e

To run tests with market sim please read the readme.