vega-frontend-monorepo/apps/trading
Matthew Russell e463bbe238
feat(#495): get smart contracts addresses from network params
* feat: unhardcode contract addresses

* fix: linting and tests

* feat: switch contract usage in token app to use unhardcoded addresses

* chore: remove other usage of hard coded contract addresses

* feat: convert contracts to classes, update claim contract to fix circular dependency

* feat: add hard coded contract addresses to contracts page

* fix: misc tidy up

* chore: rename ethers big num conversion func

* fix: remove pending transactions modal

* chore: add single toBigNum function that can accept number string or EthersBignNumber

* chore: delete unused tranche helpers and decimals functions from smart contracts lib

* feat: add faucetable token class

* fix: reset tx state after early exit from approve tx

* feat: re add transaction modal using zustand store

* fix: loader colors for eth wallet

* fix: pass ethereum config to gurantee existence before tx execution

* chore: lint smart contracts lib

* chore: fix web3container to use children and not render prop

* chore: lint

* fix: use background to mock ethereum wallet to avoid mocking globally for every test

* chore: move web3 mock to common steps and call from withdrawals feature tests
2022-06-07 15:08:40 -07:00
..
components feat(#495): get smart contracts addresses from network params 2022-06-07 15:08:40 -07:00
lib chore(#315): Convert token to use wallet lib 2022-05-17 09:04:41 -04:00
pages feat(#495): get smart contracts addresses from network params 2022-06-07 15:08:40 -07:00
public Create a Mono-repo for DeFiUI + ui toolkit using nx 2022-02-11 15:02:11 +01:00
specs Feat/305 add console v2 first view screen (#424) 2022-05-23 13:21:54 +01:00
stores feat: add a global zustand store for managing dialogs (#494) 2022-06-01 15:21:36 +01:00
.env Feat/103 deposits (#143) 2022-04-06 10:34:51 -07:00
.env.devnet frontend-monorepo-436 Env var files 'devent' typo (#437) 2022-05-23 09:51:19 +01:00
.env.mainnet Feat/103 deposits (#143) 2022-04-06 10:34:51 -07:00
.env.stagnet1 Feat/103 deposits (#143) 2022-04-06 10:34:51 -07:00
.env.stagnet2 Feat/103 deposits (#143) 2022-04-06 10:34:51 -07:00
.env.testnet Feat/103 deposits (#143) 2022-04-06 10:34:51 -07:00
.eslintrc.json colocate querys with libs 2022-03-29 15:52:51 -07:00
client.graphql Feat/104 withdraws (#263) 2022-04-26 19:51:39 -07:00
index.d.ts Create a Mono-repo for DeFiUI + ui toolkit using nx 2022-02-11 15:02:11 +01:00
jest.config.js Feat/84 Order list (#89) 2022-03-23 12:08:10 -07:00
next-env.d.ts Create a Mono-repo for DeFiUI + ui toolkit using nx 2022-02-11 15:02:11 +01:00
next.config.js Task/33 add sentry to trading (#189) 2022-04-04 12:45:40 -07:00
postcss.config.js Extract tailwindcss config to libs 2022-02-23 16:29:07 -08:00
project.json Task/33 add sentry to trading (#189) 2022-04-04 12:45:40 -07:00
README.md Feat/427: Serve explicit environments (#433) 2022-05-23 10:56:11 +01:00
sentry.client.config.js Task/33 add sentry to trading (#189) 2022-04-04 12:45:40 -07:00
sentry.server.config.js Task/33 add sentry to trading (#189) 2022-04-04 12:45:40 -07:00
setup-tests.ts Feat/84 Order list (#89) 2022-03-23 12:08:10 -07:00
tailwind.config.js Added custom module for classes that aren't in Tailwind - allows us to use contextual alternates for Alpha Lyrae 2022-03-30 16:56:48 +01:00
tsconfig.json feat(#175): ui-toolkit links (#453) 2022-05-31 17:30:02 -07:00
tsconfig.spec.json Fixes for workflows (#291) 2022-04-22 17:51:18 -07:00

Trading

Development

First copy the configuration of the application you are starting:

cp .env.[environment] .env.local

Starting the app:

yarn nx serve explorer

Configuration

Example configurations are provided here:

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

Flag Purpose
NX_VEGA_ENV The name of the currently connected vega environment
NX_VEGA_URL The GraphQL query endpoint of a Vega data node
NX_ETHEREUM_CHAIN_ID The ID of the Ethereum chain the currently connected Vega Network uses. E.g. Ropsten (3) for testnet
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