69b19e4b7b
* feat: add network-switcher lib * feat: add env variables for some deployed app urls * feat: add network processing to environment hoook * refactor: network handling * refactor: remove dialog from provider and add env setter * feat: add network switcher dialog to the trading app * refactor: add network redirect to dialog connect callback * fix: lint * feat: add network configuration files to static app * feat: update environments to use config file instead of static node url * refactor: split out network switcher utils * refactor: split up environment hook * fix: jsonify env variable for possible networks * fix: add formatter file * feat: add network loader component * feat: add network loader to the trading app * fix: assign correct global state to network swicther * feat: add status modal * feat: add network-switcher lib * feat: add env variables for some deployed app urls * feat: add network processing to environment hoook * refactor: network handling * refactor: remove dialog from provider and add env setter * feat: add network switcher dialog to the trading app * refactor: add network redirect to dialog connect callback * fix: lint * fix: jsonify env variable for possible networks * fix: add formatter file * fix: assign correct global state to network swicther * fix: failing tests from UI changes * feat: add environment validation * feat: add runtime validation for network configs * fix: readd node urls to envs to avoid breaking the apps for now * chore: rename network swicther lib to environmnet * fix: lint * feat: add tests for config hook * feat: add environment hook tests * fix: lint * fix: lint * feat: add environment hook tests * feat: add storage tests * fix: formet * feat: improve loading states * fix: format * fix: use router instead of window location * fix: rearrange network loader props and components * fix: remove FC type * fix: env validation * fix: untangle returns in network loader * fix: add teardown for env and localstorage * fix: add custom to env networks * fix: lint * fix: format * fix: lint * fix: remove env provider from simple trading app * fix: remove failing promise hacks * fix: some leftover format files * fix: remove network switcher from tsconf * fix: move Networks to libs/environment * fix: add defaults for ether env vars * feat: add tests for default ether env vars * fix: remove chain id env var from web3 container * fix: remove chain id from the environment * fix: format * fix: lint token * fix: lint env * fix: add comment to callout hack * fix: lint token again * fix: remove skip * fix: move addresses to token app * fix: improve schema validation errors and fix token app * fix: lint * fix: format * fix: format * fix: add network loaders to apps * fix: format * fix: remove logs * fix: cypress process errors * fix: change network loader hierarchy in token * fix: remove stray console.log * fix: revert test changes in simple trading app * fix: prefix env vars with NX Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com> * fix: improve schema validation errors and fix token app * fix: format * fix: disable lint rules for catch block any types * fix: format again * fix: remove redundant process.platform injections * fix: format Co-authored-by: Joe <joe@vega.xyz> Co-authored-by: Matthew Russell <mattrussell36@gmail.com> Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
4.0 KiB
4.0 KiB
The Vega token website
Control panel for your VEGA tokens
Features
- View vesting progress
- Redeem VEGA tokens
- Stake VEGA tokens
- Withdraw tokens
- Vote on proposals
Development
Starting the app:
yarn nx serve token
Configuration
Example configurations are provided here:
For convenience, you can boot the app injecting one of the configurations above by running:
yarn nx run token:serve --env={env} # e.g. stagnet1
There are a few different configuration options offered for this app:
Flag | Purpose |
---|---|
NX_APP_SENTRY_DSN |
The sentry endpoint to report to. Should be off in dev but set in live. |
NX_APP_CHAIN |
The ETH chain for the app to work on. Should be mainnet for live, but ropsten for preview deploys. |
NX_APP_VEGA_URL |
The GraphQL query endpoint of a Vega data node |
NX_APP_DEX_STAKING_DISABLED |
Disable the dex liquidity page an show a coming soon message |
NX_APP_FAIRGROUND |
Change styling to be themed as the fairground version of the website |
NX_APP_INFURA_ID |
Infura fallback for if the user does not have a web3 compatible browser |
NX_APP_HOSTED_WALLET_ENABLED |
If the hosted wallet is enabled or not. If so then allow users to login using the hosted wallet |
NX_APP_ENV |
Change network to connect to. When set to CUSTOM use CUSTOM_* vars for network parameters |
NX_CUSTOM_URLS |
When NX_APP_ENV=CUSTOM use these Data Node REST URLs, optional if CUSTOM_URLS_WITH_GRAPHQL is used. |
NX_CUSTOM_URLS_WITH_GRAPHQL |
When NX_APP_ENV=CUSTOM use these Data Node GraphQL URLs, optional if CUSTOM_URLS is used. |
NX_CUSTOM_TOKEN_ADDRESS |
When NX_APP_ENV=CUSTOM specify Vega token address. |
NX_CUSTOM_CLAIM_ADDRESS |
When NX_APP_ENV=CUSTOM specify Vega claim address. |
NX_CUSTOM_LOCKED_ADDRESS |
When NX_APP_ENV=CUSTOM specify Vega locked address. |
NX_CUSTOM_VESTING_ADDRESS |
When NX_APP_ENV=CUSTOM specify Vega vesting address. |
NX_CUSTOM_STAKING_BRIDGE |
When NX_APP_ENV=CUSTOM specify Vega staking bridge address. |
Example configs:
For example configurations, check out our netlify.toml.
Testing
To run the minimal set of unit tests, run the following:
yarn nx test token
To run the UI automation tests with a mocked API, run:
yarn nx run token-e2e:e2e
See also
- vega-locked-erc20 - proxy contract that shows your current balance of locked tokens
- VEGA Tokens: Vesting Details - blog describing the vesting process & key dates
- Introducing the VEGA token - blog about the VEGA token
- The VEGA Token Listing & LP Incentives - blog about the token and site
- vega.xyz - about Vega Protocol