diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..4219dae9f --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +dist/* +node_modules/* +tmp/* +.dockerignore +Dockerfile diff --git a/.github/workflows/process-tranches.yml b/.github/workflows/process-tranches.yml index 82face594..56e1d71eb 100644 --- a/.github/workflows/process-tranches.yml +++ b/.github/workflows/process-tranches.yml @@ -2,7 +2,7 @@ name: Generate tranches on: schedule: - - cron: '0 8 * * *' + - cron: '0 */6 * * *' jobs: master: diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..986948304 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,29 @@ +# Build container +FROM node:16.14.0-alpine as build +WORKDIR /app +# Argument to allow building of different apps +ARG APP +ENV PATH /app/node_modules/.bin:$PATH +COPY package.json ./ +COPY yarn.lock ./ +COPY . ./ +RUN yarn +RUN yarn nx build $APP + +# Production environment +FROM nginx:stable-alpine +ARG APP +COPY --from=build /app/dist/apps/$APP /usr/share/nginx/html +COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf + +EXPOSE 80 + +WORKDIR /usr/share/nginx/html +COPY ./env.sh . +COPY ./apps/$APP/.env .env + +# Add bash +RUN apk add --no-cache bash + +RUN chmod +x ./env.sh +CMD ["/bin/bash", "-c", "/usr/share/nginx/html/env.sh && nginx -g \"daemon off;\""] diff --git a/README.md b/README.md index 4f8dadac9..9892cd2f8 100644 --- a/README.md +++ b/README.md @@ -47,11 +47,11 @@ For shared Cypress logic, commands and steps. ### [Web3](./libs/web3) -A ulitity library for connecting to the Ethereum network and interacting with Vega Web3 contracts. +A utility library for connecting to the Ethereum network and interacting with Vega Web3 contracts. ### [React Helpers](./libs/react-helpers) -Generic react helpers that can be used across multilpe applications, along with other utilties. +Generic react helpers that can be used across multilpe applications, along with other utilities. # 💻 Develop @@ -103,24 +103,42 @@ In CI linting, formatting and also run. These checks can be seen in the [CI work Visit the [Nx Documentation](https://nx.dev/getting-started/intro) to learn more. -# Vegacapsule +# Docker & Vegacapsule -## Explorer +## Docker -Follow the following steps to start using a local network with the Vega Explorer: +The [Dockerfile](./Dockerfile) for running the frontends is pretty basic, merely building the application with the APP arg that is passed in and serving the application from [nginx](./nginx/nginx.conf). The only complexity that exists is that there is a script which allows the passing of run time environment variables to the containers. See configuration below for how to do this. -1. Prepare vegacapsule. Follow the [Vegacapsule instructions](https://github.com/vegaprotocol/vegacapsule#quick-start) -2. Build the explorer frontend application -3. Start the explorer frontend application with the `.env.vegacapsule` env file -4. Go to [http://localhost:3000](http://localhost:3000) in your browser - -If you simply want to run Explorer locally, without using a local network: +You can build any of the containers locally with the following command: ```bash -cd apps/explorer && cp .env.testnet .env.local -yarn nx run explorer:serve +docker build . --build-arg APP=[YOUR APP] --tag=[TAG] ``` +In order to run a container: + +```bash +docker run -p 3000:80 [TAG] +``` + +## Config + +As environment variables are build time and not run time in frontend applications. We have built a system which allows for passing run time environment variables, this generates a JSON file that will override the default environment variables that the container was built with (which is always testnet, using the default .env files). + +In order to override specific environment variables you can pass these to the container like this: + +```bash +docker run -e NX_VEGA_URL=https://n04.d.vega.xyz/query -p 3000:80 [TAG] +``` + +Which will now point the app to use a devnet data node. To see a list of all possible config properties see the readme.md for each app in the app directory. + +## Vega capsule + +Coming soon! You will be able to run the containers within Vega Capsule. + +You can run against a local instance of Vega Capsule today by using the .env.capsule present in the apps. + # 📑 License [MIT](./LICENSE) diff --git a/apps/explorer-e2e/.env b/apps/explorer-e2e/.env index 9050772c1..3cd032624 100644 --- a/apps/explorer-e2e/.env +++ b/apps/explorer-e2e/.env @@ -1,11 +1,11 @@ -NX_CHAIN_EXPLORER_URL = "https://explorer.vega.trading/.netlify/functions/chain-explorer-api" -NX_TENDERMINT_URL = 'http://localhost:26617' -NX_TENDERMINT_WEBSOCKET_URL = 'wss://localhost:26617/websocket' -NX_VEGA_URL = "http://localhost:3028/query" -NX_VEGA_ENV = 'LOCAL' -NX_VEGA_REST = 'http://localhost:3029' +NX_CHAIN_EXPLORER_URL=https://explorer.vega.trading/.netlify/functions/chain-explorer-api +NX_TENDERMINT_URL=http://localhost:26617 +NX_TENDERMINT_WEBSOCKET_URL=wss://localhost:26617/websocket +NX_VEGA_URL=http://localhost:3028/query +NX_VEGA_ENV=LOCAL +NX_VEGA_REST=http://localhost:3029 -CYPRESS_VEGA_TENDERMINT_URL='http://localhost:26617' +CYPRESS_VEGA_TENDERMINT_URL=http://localhost:26617 NX_EXPLORER_ASSETS=1 NX_EXPLORER_GENESIS=1 diff --git a/apps/explorer-e2e/.env.devnet b/apps/explorer-e2e/.env.devnet index 778996587..8f70eae3b 100644 --- a/apps/explorer-e2e/.env.devnet +++ b/apps/explorer-e2e/.env.devnet @@ -1,16 +1,16 @@ # App configuration variables -NX_CHAIN_EXPLORER_URL = "https://explorer.vega.trading/.netlify/functions/chain-explorer-api" -NX_TENDERMINT_URL = "https://n04.d.vega.xyz/tm" -NX_TENDERMINT_WEBSOCKET_URL = "wss://n04.d.vega.xyz/tm/websocket" -NX_VEGA_URL = "https://n04.d.vega.xyz/query" -NX_VEGA_ENV = 'DEVNET' -NX_VEGA_REST = 'https://n04.d.vega.xyz/datanode/rest' +NX_CHAIN_EXPLORER_URL=https://explorer.vega.trading/.netlify/functions/chain-explorer-api +NX_TENDERMINT_URL=https://n04.d.vega.xyz/tm +NX_TENDERMINT_WEBSOCKET_URL=wss://n04.d.vega.xyz/tm/websocket +NX_VEGA_URL=https://n04.d.vega.xyz/query +NX_VEGA_ENV=DEVNET +NX_VEGA_REST=https://n04.d.vega.xyz/datanode/rest # App flags -NX_EXPLORER_ASSETS = 1 -NX_EXPLORER_GENESIS = 1 -NX_EXPLORER_GOVERNANCE = 1 -NX_EXPLORER_MARKETS = 1 -NX_EXPLORER_NETWORK_PARAMETERS = 1 -NX_EXPLORER_PARTIES = 1 -NX_EXPLORER_VALIDATORS = 1 +NX_EXPLORER_ASSETS=1 +NX_EXPLORER_GENESIS=1 +NX_EXPLORER_GOVERNANCE=1 +NX_EXPLORER_MARKETS=1 +NX_EXPLORER_NETWORK_PARAMETERS=1 +NX_EXPLORER_PARTIES=1 +NX_EXPLORER_VALIDATORS=1 diff --git a/apps/explorer-e2e/.env.mainnet b/apps/explorer-e2e/.env.mainnet index 2fa42c6b4..3c8d402c8 100644 --- a/apps/explorer-e2e/.env.mainnet +++ b/apps/explorer-e2e/.env.mainnet @@ -1,15 +1,15 @@ # App configuration variables -NX_CHAIN_EXPLORER_URL = "https://explorer.vega.trading/.netlify/functions/chain-explorer-api" -NX_TENDERMINT_URL = "https://mainnet-observer-proxy01.ops.vega.xyz/" -NX_TENDERMINT_WEBSOCKET_URL = "wss://mainnet-observer-proxy01.ops.vega.xyz/websocket" -NX_VEGA_URL = "https://api.token.vega.xyz/query" -NX_VEGA_ENV = 'MAINNET' -NX_VEGA_REST = 'https://api.token.vega.xyz/' +NX_CHAIN_EXPLORER_URL=https://explorer.vega.trading/.netlify/functions/chain-explorer-api +NX_TENDERMINT_URL=https://mainnet-observer-proxy01.ops.vega.xyz/ +NX_TENDERMINT_WEBSOCKET_URL=wss://mainnet-observer-proxy01.ops.vega.xyz/websocket +NX_VEGA_URL=https://api.token.vega.xyz/query +NX_VEGA_ENV=MAINNET +NX_VEGA_REST=https://api.token.vega.xyz/ # App flags -NX_EXPLORER_ASSETS = 1 -NX_EXPLORER_GENESIS = 1 -NX_EXPLORER_GOVERNANCE = 1 -NX_EXPLORER_NETWORK_PARAMETERS = 1 -NX_EXPLORER_PARTIES = 1 -NX_EXPLORER_VALIDATORS = 1 +NX_EXPLORER_ASSETS=1 +NX_EXPLORER_GENESIS=1 +NX_EXPLORER_GOVERNANCE=1 +NX_EXPLORER_NETWORK_PARAMETERS=1 +NX_EXPLORER_PARTIES=1 +NX_EXPLORER_VALIDATORS=1 diff --git a/apps/explorer-e2e/.env.stagnet1 b/apps/explorer-e2e/.env.stagnet1 index ef19fec6d..25d7f4c53 100644 --- a/apps/explorer-e2e/.env.stagnet1 +++ b/apps/explorer-e2e/.env.stagnet1 @@ -1,16 +1,16 @@ # App configuration variables -NX_CHAIN_EXPLORER_URL = "https://explorer.vega.trading/.netlify/functions/chain-explorer-api" -NX_TENDERMINT_URL = "https://n03.s.vega.xyz/tm" -NX_TENDERMINT_WEBSOCKET_URL = "wss://n03.s.vega.xyz/tm/websocket" -NX_VEGA_URL = "https://n03.s.vega.xyz/query" -NX_VEGA_ENV = 'STAGNET' -NX_VEGA_REST = 'https://n03.s.vega.xyz/datanode/rest' +NX_CHAIN_EXPLORER_URL=https://explorer.vega.trading/.netlify/functions/chain-explorer-api +NX_TENDERMINT_URL=https://n03.s.vega.xyz/tm +NX_TENDERMINT_WEBSOCKET_URL=wss://n03.s.vega.xyz/tm/websocket +NX_VEGA_URL=https://n03.s.vega.xyz/query +NX_VEGA_ENV=STAGNET +NX_VEGA_REST=https://n03.s.vega.xyz/datanode/rest # App flags -NX_EXPLORER_ASSETS = 1 -NX_EXPLORER_GENESIS = 1 -NX_EXPLORER_GOVERNANCE = 1 -NX_EXPLORER_MARKETS = 1 -NX_EXPLORER_NETWORK_PARAMETERS = 1 -NX_EXPLORER_PARTIES = 1 -NX_EXPLORER_VALIDATORS = 1 +NX_EXPLORER_ASSETS=1 +NX_EXPLORER_GENESIS=1 +NX_EXPLORER_GOVERNANCE=1 +NX_EXPLORER_MARKETS=1 +NX_EXPLORER_NETWORK_PARAMETERS=1 +NX_EXPLORER_PARTIES=1 +NX_EXPLORER_VALIDATORS=1 diff --git a/apps/explorer-e2e/.env.stagnet2 b/apps/explorer-e2e/.env.stagnet2 index 45652336b..ba4aaec74 100644 --- a/apps/explorer-e2e/.env.stagnet2 +++ b/apps/explorer-e2e/.env.stagnet2 @@ -1,16 +1,16 @@ # App configuration variables -NX_CHAIN_EXPLORER_URL = "https://explorer.vega.trading/.netlify/functions/chain-explorer-api" -NX_TENDERMINT_URL = "https://n03.stagnet2.vega.xyz/tm" -NX_TENDERMINT_WEBSOCKET_URL = "wss://n03.stagnet2.vega.xyz/tm/websocket" -NX_VEGA_URL = "https://n03.stagnet2.vega.xyz/query" -NX_VEGA_ENV = 'STAGNET2' -NX_VEGA_REST = 'https://n01.stagnet2.vega.xyz/datanode/rest' +NX_CHAIN_EXPLORER_URL=https://explorer.vega.trading/.netlify/functions/chain-explorer-api +NX_TENDERMINT_URL=https://n03.stagnet2.vega.xyz/tm +NX_TENDERMINT_WEBSOCKET_URL=wss://n03.stagnet2.vega.xyz/tm/websocket +NX_VEGA_URL=https://n03.stagnet2.vega.xyz/query +NX_VEGA_ENV=STAGNET2 +NX_VEGA_REST=https://n01.stagnet2.vega.xyz/datanode/rest # App flags -NX_EXPLORER_ASSETS = 1 -NX_EXPLORER_GENESIS = 1 -NX_EXPLORER_GOVERNANCE = 1 -NX_EXPLORER_MARKETS = 1 -NX_EXPLORER_NETWORK_PARAMETERS = 1 -NX_EXPLORER_PARTIES = 1 -NX_EXPLORER_VALIDATORS = 1 +NX_EXPLORER_ASSETS=1 +NX_EXPLORER_GENESIS=1 +NX_EXPLORER_GOVERNANCE=1 +NX_EXPLORER_MARKETS=1 +NX_EXPLORER_NETWORK_PARAMETERS=1 +NX_EXPLORER_PARTIES=1 +NX_EXPLORER_VALIDATORS=1 diff --git a/apps/explorer-e2e/.env.testnet b/apps/explorer-e2e/.env.testnet index 9bc8cc3d4..121ec4323 100644 --- a/apps/explorer-e2e/.env.testnet +++ b/apps/explorer-e2e/.env.testnet @@ -1,16 +1,16 @@ # App configuration variables -NX_CHAIN_EXPLORER_URL = "https://explorer.vega.trading/.netlify/functions/chain-explorer-api" -NX_TENDERMINT_URL = "https://lb.testnet.vega.xyz/tm" -NX_TENDERMINT_WEBSOCKET_URL = "wss://lb.testnet.vega.xyz/tm/websocket" -NX_VEGA_URL = "https://lb.testnet.vega.xyz/query" -NX_VEGA_ENV = 'TESTNET' -NX_VEGA_REST = 'https://lb.testnet.vega.xyz/datanode/rest' +NX_CHAIN_EXPLORER_URL=https://explorer.vega.trading/.netlify/functions/chain-explorer-api +NX_TENDERMINT_URL=https://lb.testnet.vega.xyz/tm +NX_TENDERMINT_WEBSOCKET_URL=wss://lb.testnet.vega.xyz/tm/websocket +NX_VEGA_URL=https://lb.testnet.vega.xyz/query +NX_VEGA_ENV=TESTNET +NX_VEGA_REST=https://lb.testnet.vega.xyz/datanode/rest # App flags -NX_EXPLORER_ASSETS = 1 -NX_EXPLORER_GENESIS = 1 -NX_EXPLORER_GOVERNANCE = 1 -NX_EXPLORER_MARKETS = 1 -NX_EXPLORER_NETWORK_PARAMETERS = 1 -NX_EXPLORER_PARTIES = 1 -NX_EXPLORER_VALIDATORS = 1 +NX_EXPLORER_ASSETS=1 +NX_EXPLORER_GENESIS=1 +NX_EXPLORER_GOVERNANCE=1 +NX_EXPLORER_MARKETS=1 +NX_EXPLORER_NETWORK_PARAMETERS=1 +NX_EXPLORER_PARTIES=1 +NX_EXPLORER_VALIDATORS=1 diff --git a/apps/explorer/.env b/apps/explorer/.env index 0c83efe3e..f71bdbc25 100644 --- a/apps/explorer/.env +++ b/apps/explorer/.env @@ -1,36 +1,24 @@ -# React Environment Variables -# https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables#expanding-environment-variables-in-env +NX_CHAIN_EXPLORER_URL=https://explorer.vega.trading/.netlify/functions/chain-explorer-api +NX_TENDERMINT_URL=http://localhost:26617 +NX_TENDERMINT_WEBSOCKET_URL=wss://localhost:26617/websocket +NX_VEGA_URL=http://localhost:3028/query +NX_VEGA_ENV=LOCAL +NX_VEGA_REST=http://localhost:3029 -# Netlify Environment Variables -# https://www.netlify.com/docs/continuous-deployment/#environment-variables -NX_VERSION=$npm_package_version -NX_REPOSITORY_URL=$REPOSITORY_URL -NX_BRANCH=$BRANCH -NX_PULL_REQUEST=$PULL_REQUEST -NX_HEAD=$HEAD -NX_COMMIT_REF=$COMMIT_REF -NX_CONTEXT=$CONTEXT -NX_REVIEW_ID=$REVIEW_ID -NX_INCOMING_HOOK_TITLE=$INCOMING_HOOK_TITLE -NX_INCOMING_HOOK_URL=$INCOMING_HOOK_URL -NX_INCOMING_HOOK_BODY=$INCOMING_HOOK_BODY -NX_URL=$URL -NX_DEPLOY_URL=$DEPLOY_URL -NX_DEPLOY_PRIME_URL=$DEPLOY_PRIME_URL - -NX_CHAIN_EXPLORER_URL = 'https://explorer.vega.trading/.netlify/functions/chain-explorer-api' -NX_TENDERMINT_URL = 'https://lb.testnet.vega.xyz/tm' -NX_TENDERMINT_WEBSOCKET_URL = 'wss://lb.testnet.vega.xyz/tm/websocket' -NX_VEGA_URL = 'https://lb.testnet.vega.xyz/query' -NX_VEGA_ENV = 'TESTNET' -NX_VEGA_REST = 'https://lb.testnet.vega.xyz/datanode/rest' -NX_VEGA_NETWORKS = '{"TESTNET":"https://explorer.fairground.wtf","MAINNET":"https://explorer.vega.xyz"}' -CYPRESS_VEGA_TENDERMINT_URL='https://lb.testnet.vega.xyz/tm' +NX_CHAIN_EXPLORER_URL=https://explorer.vega.trading/.netlify/functions/chain-explorer-api +NX_TENDERMINT_URL=https://lb.testnet.vega.xyz/tm +NX_TENDERMINT_WEBSOCKET_URL=wss://lb.testnet.vega.xyz/tm/websocket +NX_VEGA_URL=https://lb.testnet.vega.xyz/query +NX_VEGA_ENV=TESTNET +NX_VEGA_REST=https://lb.testnet.vega.xyz/datanode/rest +NX_VEGA_NETWORKS='{"TESTNET":"https://explorer.fairground.wtf","MAINNET":"https://explorer.vega.xyz"}' +CYPRESS_VEGA_TENDERMINT_URL=https://lb.testnet.vega.xyz/tm # App flags -NX_EXPLORER_ASSETS = 1 -NX_EXPLORER_GENESIS = 1 -NX_EXPLORER_GOVERNANCE = 1 -NX_EXPLORER_NETWORK_PARAMETERS = 1 -NX_EXPLORER_PARTIES = 1 -NX_EXPLORER_VALIDATORS = 1 +NX_EXPLORER_ASSETS=1 +NX_EXPLORER_GENESIS=1 +NX_EXPLORER_GOVERNANCE=1 +NX_EXPLORER_NETWORK_PARAMETERS=1 +NX_EXPLORER_PARTIES=1 +NX_EXPLORER_VALIDATORS=1 +NX_EXPLORER_MARKETS=1 diff --git a/apps/explorer/.env.capsule b/apps/explorer/.env.capsule index 4589e0022..ed2cf672b 100644 --- a/apps/explorer/.env.capsule +++ b/apps/explorer/.env.capsule @@ -1,17 +1,17 @@ # App configuration variables -NX_CHAIN_EXPLORER_URL = "https://explorer.vega.trading/.netlify/functions/chain-explorer-api" -NX_TENDERMINT_URL = "http://localhost:26617" -NX_TENDERMINT_WEBSOCKET_URL = "wss://localhost:26617/websocket" -NX_VEGA_URL = "http://localhost:3028/query" -NX_VEGA_NETWORKS = '{"TESTNET":"https://explorer.fairground.wtf","MAINNET":"https://explorer.vega.xyz"}' -NX_VEGA_ENV = 'LOCAL' -NX_VEGA_REST = 'http://localhost:3029' +NX_CHAIN_EXPLORER_URL=https://explorer.vega.trading/.netlify/functions/chain-explorer-api +NX_TENDERMINT_URL=http://localhost:26617 +NX_TENDERMINT_WEBSOCKET_URL=wss://localhost:26617/websocket +NX_VEGA_URL=http://localhost:3028/query +NX_VEGA_NETWORKS='{"TESTNET":"https://explorer.fairground.wtf","MAINNET":"https://explorer.vega.xyz"}' +NX_VEGA_ENV=LOCAL +NX_VEGA_REST=http://localhost:3029 # App flags -NX_EXPLORER_ASSETS = 1 -NX_EXPLORER_GENESIS = 1 -NX_EXPLORER_GOVERNANCE = 1 -NX_EXPLORER_MARKETS = 1 -NX_EXPLORER_NETWORK_PARAMETERS = 1 -NX_EXPLORER_PARTIES = 1 -NX_EXPLORER_VALIDATORS = 1 +NX_EXPLORER_ASSETS=1 +NX_EXPLORER_GENESIS=1 +NX_EXPLORER_GOVERNANCE=1 +NX_EXPLORER_MARKETS=1 +NX_EXPLORER_NETWORK_PARAMETERS=1 +NX_EXPLORER_PARTIES=1 +NX_EXPLORER_VALIDATORS=1 diff --git a/apps/explorer/.env.devnet b/apps/explorer/.env.devnet index 047a94ad3..598dd92e4 100644 --- a/apps/explorer/.env.devnet +++ b/apps/explorer/.env.devnet @@ -1,8 +1,8 @@ # App configuration variables -NX_CHAIN_EXPLORER_URL = "https://explorer.vega.trading/.netlify/functions/chain-explorer-api" -NX_TENDERMINT_URL = "https://n04.d.vega.xyz/tm" -NX_TENDERMINT_WEBSOCKET_URL = "wss://n04.d.vega.xyz/tm/websocket" -NX_VEGA_URL = "https://n04.d.vega.xyz/query" -NX_VEGA_NETWORKS = '{"TESTNET":"https://explorer.fairground.wtf","MAINNET":"https://explorer.vega.xyz"}' -NX_VEGA_ENV = 'DEVNET' -NX_VEGA_REST = 'https://n04.d.vega.xyz/datanode/rest' +NX_CHAIN_EXPLORER_URL=https://explorer.vega.trading/.netlify/functions/chain-explorer-api +NX_TENDERMINT_URL=https://n04.d.vega.xyz/tm +NX_TENDERMINT_WEBSOCKET_URL=wss://n04.d.vega.xyz/tm/websocket +NX_VEGA_URL=https://n04.d.vega.xyz/query +NX_VEGA_NETWORKS='{"TESTNET":"https://explorer.fairground.wtf","MAINNET":"https://explorer.vega.xyz"}' +NX_VEGA_ENV=DEVNET +NX_VEGA_REST=https://n04.d.vega.xyz/datanode/rest diff --git a/apps/explorer/.env.mainnet b/apps/explorer/.env.mainnet index d982efa5c..8215f8db1 100644 --- a/apps/explorer/.env.mainnet +++ b/apps/explorer/.env.mainnet @@ -1,8 +1,8 @@ # App configuration variables -NX_CHAIN_EXPLORER_URL = "https://explorer.vega.trading/.netlify/functions/chain-explorer-api" -NX_TENDERMINT_URL = "https://mainnet-observer-proxy01.ops.vega.xyz/" -NX_TENDERMINT_WEBSOCKET_URL = "wss://mainnet-observer-proxy01.ops.vega.xyz/websocket" -NX_VEGA_URL = "https://api.token.vega.xyz/query" -NX_VEGA_NETWORKS = '{"TESTNET":"https://explorer.fairground.wtf","MAINNET":"https://explorer.vega.xyz"}' -NX_VEGA_ENV = 'MAINNET' -NX_VEGA_REST = 'https://api.token.vega.xyz/' +NX_CHAIN_EXPLORER_URL=https://explorer.vega.trading/.netlify/functions/chain-explorer-api +NX_TENDERMINT_URL=https://mainnet-observer-proxy01.ops.vega.xyz/ +NX_TENDERMINT_WEBSOCKET_URL=wss://mainnet-observer-proxy01.ops.vega.xyz/websocket +NX_VEGA_URL=https://api.token.vega.xyz/query +NX_VEGA_NETWORKS='{"TESTNET":"https://explorer.fairground.wtf","MAINNET":"https://explorer.vega.xyz"}' +NX_VEGA_ENV=MAINNET +NX_VEGA_REST=https://api.token.vega.xyz/ diff --git a/apps/explorer/.env.stagnet1 b/apps/explorer/.env.stagnet1 index 4e6859861..e8073baa7 100644 --- a/apps/explorer/.env.stagnet1 +++ b/apps/explorer/.env.stagnet1 @@ -1,8 +1,8 @@ # App configuration variables -NX_CHAIN_EXPLORER_URL = "https://explorer.vega.trading/.netlify/functions/chain-explorer-api" -NX_TENDERMINT_URL = "https://n03.s.vega.xyz/tm" -NX_TENDERMINT_WEBSOCKET_URL = "wss://n03.s.vega.xyz/tm/websocket" -NX_VEGA_URL = "https://n03.s.vega.xyz/query" -NX_VEGA_NETWORKS = '{"TESTNET":"https://explorer.fairground.wtf","MAINNET":"https://explorer.vega.xyz"}' -NX_VEGA_ENV = 'STAGNET' -NX_VEGA_REST = 'https://n03.s.vega.xyz/datanode/rest' +NX_CHAIN_EXPLORER_URL=https://explorer.vega.trading/.netlify/functions/chain-explorer-api +NX_TENDERMINT_URL=https://n03.s.vega.xyz/tm +NX_TENDERMINT_WEBSOCKET_URL=wss://n03.s.vega.xyz/tm/websocket +NX_VEGA_URL=https://n03.s.vega.xyz/query +NX_VEGA_NETWORKS='{"TESTNET":"https://explorer.fairground.wtf","MAINNET":"https://explorer.vega.xyz"}' +NX_VEGA_ENV=STAGNET +NX_VEGA_REST=https://n03.s.vega.xyz/datanode/rest diff --git a/apps/explorer/.env.stagnet2 b/apps/explorer/.env.stagnet2 index 9b1e479c0..991030406 100644 --- a/apps/explorer/.env.stagnet2 +++ b/apps/explorer/.env.stagnet2 @@ -1,8 +1,8 @@ # App configuration variables -NX_CHAIN_EXPLORER_URL = "https://explorer.vega.trading/.netlify/functions/chain-explorer-api" -NX_TENDERMINT_URL = "https://n03.stagnet2.vega.xyz/tm" -NX_TENDERMINT_WEBSOCKET_URL = "wss://n03.stagnet2.vega.xyz/tm/websocket" -NX_VEGA_URL = "https://n03.stagnet2.vega.xyz/query" -NX_VEGA_NETWORKS = '{"TESTNET":"https://explorer.fairground.wtf","MAINNET":"https://explorer.vega.xyz"}' -NX_VEGA_ENV = 'STAGNET2' -NX_VEGA_REST = 'https://n01.stagnet2.vega.xyz/datanode/rest' +NX_CHAIN_EXPLORER_URL=https://explorer.vega.trading/.netlify/functions/chain-explorer-api +NX_TENDERMINT_URL=https://n03.stagnet2.vega.xyz/tm +NX_TENDERMINT_WEBSOCKET_URL=wss://n03.stagnet2.vega.xyz/tm/websocket +NX_VEGA_URL=https://n03.stagnet2.vega.xyz/query +NX_VEGA_NETWORKS='{"TESTNET":"https://explorer.fairground.wtf","MAINNET":"https://explorer.vega.xyz"}' +NX_VEGA_ENV=STAGNET2 +NX_VEGA_REST=https://n01.stagnet2.vega.xyz/datanode/rest diff --git a/apps/explorer/.env.testnet b/apps/explorer/.env.testnet index aabe2f8bc..a6aca9546 100644 --- a/apps/explorer/.env.testnet +++ b/apps/explorer/.env.testnet @@ -1,8 +1,8 @@ # App configuration variables -NX_CHAIN_EXPLORER_URL = "https://explorer.vega.trading/.netlify/functions/chain-explorer-api" -NX_TENDERMINT_URL = "https://lb.testnet.vega.xyz/tm" -NX_TENDERMINT_WEBSOCKET_URL = "wss://lb.testnet.vega.xyz/tm/websocket" -NX_VEGA_URL = "https://lb.testnet.vega.xyz/query" -NX_VEGA_NETWORKS = '{"TESTNET":"https://explorer.fairground.wtf","MAINNET":"https://explorer.vega.xyz"}' -NX_VEGA_ENV = 'TESTNET' -NX_VEGA_REST = 'https://lb.testnet.vega.xyz/datanode/rest' +NX_CHAIN_EXPLORER_URL=https://explorer.vega.trading/.netlify/functions/chain-explorer-api +NX_TENDERMINT_URL=https://lb.testnet.vega.xyz/tm +NX_TENDERMINT_WEBSOCKET_URL=wss://lb.testnet.vega.xyz/tm/websocket +NX_VEGA_URL=https://lb.testnet.vega.xyz/query +NX_VEGA_NETWORKS='{"TESTNET":"https://explorer.fairground.wtf","MAINNET":"https://explorer.vega.xyz"}' +NX_VEGA_ENV=TESTNET +NX_VEGA_REST=https://lb.testnet.vega.xyz/datanode/rest diff --git a/apps/explorer/.env.vegacapsule b/apps/explorer/.env.vegacapsule new file mode 100644 index 000000000..b15ae01ae --- /dev/null +++ b/apps/explorer/.env.vegacapsule @@ -0,0 +1,7 @@ +# App configuration variables +NX_CHAIN_EXPLORER_URL=https://explorer.vega.trading/.netlify/functions/chain-explorer-api +NX_TENDERMINT_URL=http://localhost:26607/ +NX_TENDERMINT_WEBSOCKET_URL=wss://localhost:26607/websocket +NX_VEGA_URL=http://localhost:3003/query +NX_VEGA_ENV=CUSTOM +NX_VEGA_REST=http://localhost:3029/rest diff --git a/apps/explorer/index.d.ts b/apps/explorer/index.d.ts new file mode 100644 index 000000000..cf0dffa18 --- /dev/null +++ b/apps/explorer/index.d.ts @@ -0,0 +1,5 @@ +/// + +interface Window { + _env_?: Record; +} diff --git a/apps/explorer/src/app/config/env.ts b/apps/explorer/src/app/config/env.ts new file mode 100644 index 000000000..4a4e5bd4b --- /dev/null +++ b/apps/explorer/src/app/config/env.ts @@ -0,0 +1,33 @@ +const windowOrDefault = (key: string) => { + if (window._env_ && window._env_[key]) { + return window._env_[key] as string; + } + return (process.env[key] as string) || ''; +}; + +const truthy = ['1', 'true']; + +export const ENV = { + // Data sources + // Environment + dsn: windowOrDefault('NX_EXPLORER_SENTRY_DSN'), + envName: windowOrDefault('NX_VEGA_ENV'), + dataSources: { + chainExplorerUrl: windowOrDefault('NX_CHAIN_EXPLORER_URL'), + tendermintUrl: windowOrDefault('NX_TENDERMINT_URL'), + tendermintWebsocketUrl: windowOrDefault('NX_TENDERMINT_WEBSOCKET_URL'), + dataNodeUrl: windowOrDefault('NX_VEGA_URL'), + restEndpoint: windowOrDefault('NX_VEGA_REST'), + }, + flags: { + assets: truthy.includes(windowOrDefault('NX_EXPLORER_ASSETS')), + genesis: truthy.includes(windowOrDefault('NX_EXPLORER_GENESIS')), + governance: truthy.includes(windowOrDefault('NX_EXPLORER_GOVERNANCE')), + markets: truthy.includes(windowOrDefault('NX_EXPLORER_MARKETS')), + networkParameters: truthy.includes( + windowOrDefault('NX_EXPLORER_NETWORK_PARAMETERS') + ), + parties: truthy.includes(windowOrDefault('NX_EXPLORER_PARTIES')), + validators: truthy.includes(windowOrDefault('NX_EXPLORER_VALIDATORS')), + }, +}; diff --git a/apps/explorer/src/app/config/flags.ts b/apps/explorer/src/app/config/flags.ts new file mode 100644 index 000000000..a301f6feb --- /dev/null +++ b/apps/explorer/src/app/config/flags.ts @@ -0,0 +1,5 @@ +import { ENV } from './env'; + +export default { + ...ENV.flags, +}; diff --git a/apps/explorer/src/app/config/index.tsx b/apps/explorer/src/app/config/index.tsx index 0e1833f63..4ec9e5e11 100644 --- a/apps/explorer/src/app/config/index.tsx +++ b/apps/explorer/src/app/config/index.tsx @@ -1,8 +1,5 @@ +import { ENV } from './env'; + export const DATA_SOURCES = { - chainExplorerUrl: process.env['NX_CHAIN_EXPLORER_URL'] as string, - tendermintUrl: process.env['NX_TENDERMINT_URL'] as string, - tendermintWebsocketUrl: process.env['NX_TENDERMINT_WEBSOCKET_URL'] as string, - dataNodeUrl: process.env['NX_VEGA_URL'] as string, - envName: process.env['NX_VEGA_ENV'] as string, - restEndpoint: process.env['NX_VEGA_REST'] as string, + ...ENV.dataSources, }; diff --git a/apps/explorer/src/app/lib/flags.ts b/apps/explorer/src/app/lib/flags.ts deleted file mode 100644 index 1be941d27..000000000 --- a/apps/explorer/src/app/lib/flags.ts +++ /dev/null @@ -1,13 +0,0 @@ -const truthy = ['1', 'true']; - -export default { - assets: truthy.includes(process.env['NX_EXPLORER_ASSETS'] || ''), - genesis: truthy.includes(process.env['NX_EXPLORER_GENESIS'] || ''), - governance: truthy.includes(process.env['NX_EXPLORER_GOVERNANCE'] || ''), - markets: truthy.includes(process.env['NX_EXPLORER_MARKETS'] || ''), - networkParameters: truthy.includes( - process.env['NX_EXPLORER_NETWORK_PARAMETERS'] || '' - ), - parties: truthy.includes(process.env['NX_EXPLORER_PARTIES'] || ''), - validators: truthy.includes(process.env['NX_EXPLORER_VALIDATORS'] || ''), -}; diff --git a/apps/explorer/src/app/routes/home/index.tsx b/apps/explorer/src/app/routes/home/index.tsx index aba729439..609531cc4 100644 --- a/apps/explorer/src/app/routes/home/index.tsx +++ b/apps/explorer/src/app/routes/home/index.tsx @@ -1,7 +1,8 @@ import { DATA_SOURCES } from '../../config'; import { StatsManager } from '@vegaprotocol/network-stats'; +import { ENV } from '../../config/env'; -const envName = DATA_SOURCES.envName; +const envName = ENV.envName; const restEndpoint = DATA_SOURCES.restEndpoint; const statsEndpoint = `${restEndpoint}/statistics`; const nodesEndpoint = `${restEndpoint}/nodes-data`; diff --git a/apps/explorer/src/app/routes/network-parameters/network-parameters.test.tsx b/apps/explorer/src/app/routes/network-parameters/network-parameters.spec.tsx similarity index 91% rename from apps/explorer/src/app/routes/network-parameters/network-parameters.test.tsx rename to apps/explorer/src/app/routes/network-parameters/network-parameters.spec.tsx index db966e9dc..7d9f3445e 100644 --- a/apps/explorer/src/app/routes/network-parameters/network-parameters.test.tsx +++ b/apps/explorer/src/app/routes/network-parameters/network-parameters.spec.tsx @@ -24,10 +24,10 @@ describe('NetworkParametersTable', () => { ); const rows = screen.getAllByTestId('key-value-table-row'); expect(rows[0].children[0]).toHaveTextContent( - 'market.fee.factors.infrastructureFee' + 'Market Fee Factors Infrastructure Fee' ); expect(rows[1].children[0]).toHaveTextContent( - 'market.liquidityProvision.minLpStakeQuantumMultiple' + 'Market Liquidity Provision Min Lp Stake Quantum Multiple' ); expect(rows[0].children[1]).toHaveTextContent('0.0005'); expect(rows[1].children[1]).toHaveTextContent('1'); @@ -54,10 +54,10 @@ describe('NetworkParametersTable', () => { ); const rows = screen.getAllByTestId('key-value-table-row'); expect(rows[0].children[0]).toHaveTextContent( - 'market.fee.factors.infrastructureFee' + 'Market Fee Factors Infrastructure Fee' ); expect(rows[1].children[0]).toHaveTextContent( - 'market.liquidityProvision.minLpStakeQuantumMultiple' + 'Market Liquidity Provision Min Lp Stake Quantum Multiple' ); expect(rows[0].children[1]).toHaveTextContent('0.0005'); expect(rows[1].children[1]).toHaveTextContent('1'); diff --git a/apps/explorer/src/app/routes/network-parameters/network-parameters.tsx b/apps/explorer/src/app/routes/network-parameters/network-parameters.tsx index 2956ed263..47c859ebb 100644 --- a/apps/explorer/src/app/routes/network-parameters/network-parameters.tsx +++ b/apps/explorer/src/app/routes/network-parameters/network-parameters.tsx @@ -16,6 +16,7 @@ import type { NetworkParametersQuery_networkParameters, } from './__generated__/NetworkParametersQuery'; import orderBy from 'lodash/orderBy'; +import startCase from 'lodash/startCase'; const BIG_NUMBER_PARAMS = [ 'spam.protection.delegation.min.tokens', @@ -42,7 +43,7 @@ export const renderRow = ({ const isSyntaxRow = isJsonObject(value); return ( - {key} + {startCase(key)} {isSyntaxRow ? ( ) : isNaN(Number(value)) ? ( diff --git a/apps/explorer/src/app/routes/router-config.tsx b/apps/explorer/src/app/routes/router-config.tsx index 01393b0c9..a4f2a0560 100644 --- a/apps/explorer/src/app/routes/router-config.tsx +++ b/apps/explorer/src/app/routes/router-config.tsx @@ -14,7 +14,7 @@ import { Blocks } from './blocks/home'; import { Tx } from './txs/id'; import { Txs as TxHome } from './txs/home'; import { PendingTxs } from './pending'; -import flags from '../lib/flags'; +import flags from '../config/flags'; import { t } from '@vegaprotocol/react-helpers'; import { Routes } from './route-names'; import { NetworkParameters } from './network-parameters'; diff --git a/apps/explorer/src/assets/env-config.js b/apps/explorer/src/assets/env-config.js new file mode 100644 index 000000000..b8be63bb5 --- /dev/null +++ b/apps/explorer/src/assets/env-config.js @@ -0,0 +1 @@ +window._env_ = {}; diff --git a/apps/explorer/src/index.html b/apps/explorer/src/index.html index bbfb27638..ae9f3b7b9 100644 --- a/apps/explorer/src/index.html +++ b/apps/explorer/src/index.html @@ -18,6 +18,7 @@ href="https://static.vega.xyz/favicon.ico" /> + diff --git a/apps/explorer/src/main.tsx b/apps/explorer/src/main.tsx index f1ec3f8b0..1644a14da 100644 --- a/apps/explorer/src/main.tsx +++ b/apps/explorer/src/main.tsx @@ -6,8 +6,9 @@ import { BrowserRouter } from 'react-router-dom'; import './styles.css'; import App from './app/app'; +import { ENV } from './app/config/env'; -const dsn = process.env['NX_EXPLORER_SENTRY_DSN']; +const { dsn } = ENV; /* istanbul ignore next */ if (dsn) { @@ -15,7 +16,7 @@ if (dsn) { dsn, integrations: [new BrowserTracing()], tracesSampleRate: 1, - environment: process.env['NX_VEGA_ENV'], + environment: ENV.envName, }); } diff --git a/apps/simple-trading-app-e2e/.env b/apps/simple-trading-app-e2e/.env index 2d810d8ea..16bb3ce7c 100644 --- a/apps/simple-trading-app-e2e/.env +++ b/apps/simple-trading-app-e2e/.env @@ -21,6 +21,6 @@ NX_URL=$URL NX_DEPLOY_URL=$DEPLOY_URL NX_DEPLOY_PRIME_URL=$DEPLOY_PRIME_URL -NX_VEGA_URL = "https://lb.testnet.vega.xyz/query" -NX_VEGA_ENV = 'TESTNET' -NX_VEGA_REST = 'https://lb.testnet.vega.xyz/datanode/rest' +NX_VEGA_URL=https://lb.testnet.vega.xyz/query +NX_VEGA_ENV=TESTNET +NX_VEGA_REST=https://lb.testnet.vega.xyz/datanode/rest diff --git a/apps/simple-trading-app-e2e/src/integration/market-list.test.ts b/apps/simple-trading-app-e2e/src/integration/market-list.test.ts new file mode 100644 index 000000000..0c965291c --- /dev/null +++ b/apps/simple-trading-app-e2e/src/integration/market-list.test.ts @@ -0,0 +1,79 @@ +describe('market list', () => { + describe('simple url', () => { + beforeEach(() => { + cy.visit('/markets'); + }); + + it('selects menus', () => { + cy.get('.MuiDrawer-root [aria-current]').should('have.text', 'Markets'); + cy.getByTestId('state-trigger').should('have.text', 'Active'); + cy.get('[aria-label="Future"]').click(); + cy.get('[data-testid="market-assets-menu"] a.active').should( + 'have.text', + 'All' + ); + }); + + it('navigation should make possibly shortest url', () => { + cy.location('pathname').should('equal', '/markets'); + + cy.getByTestId('state-trigger').click(); + cy.get('[role=menuitemcheckbox]').contains('All').click(); + cy.location('pathname').should('equal', '/markets/all'); + + cy.get('[aria-label="Future"]').click(); + cy.location('pathname').should('eq', '/markets/all/Future'); + let asset = ''; + cy.getByTestId('market-assets-menu') + .children() + .then((children) => { + if (children.length > 1) { + asset = children[1].innerText; + if (asset) { + cy.wrap(children[1]).click(); + cy.location('pathname').should( + 'match', + new RegExp(`/markets/all/Future/${asset}`, 'i') + ); + cy.get('a').contains('All Markets').click(); + cy.location('pathname').should('eq', '/markets/all'); + } + } + }); + + cy.getByTestId('state-trigger').click(); + cy.get('[role=menuitemcheckbox]').contains('Active').click(); + cy.location('pathname').should('equal', '/markets'); + }); + }); + + describe('url params should select filters', () => { + it('suspended status', () => { + cy.visit('/markets/Suspended'); + cy.getByTestId('state-trigger').should('have.text', 'Suspended'); + }); + + it('last asset (if exists)', () => { + cy.intercept('POST', '/query').as('Filters'); + cy.visit('/markets'); + cy.wait('@Filters').then((filters) => { + if (filters?.response?.body.data.markets.length) { + const asset = + filters.response.body.data.markets[0].tradableInstrument.instrument + .product.settlementAsset.symbol; + cy.visit(`/markets/Suspended/Future/${asset}`); + cy.getByTestId('market-assets-menu') + .find('a.active') + .should('have.text', asset); + } + }); + }); + + it('Future product', () => { + cy.visit('/markets/Suspended/Future'); + cy.getByTestId('market-products-menu') + .find('a.active') + .should('have.text', 'Future'); + }); + }); +}); diff --git a/apps/simple-trading-app-e2e/src/support/index.ts b/apps/simple-trading-app-e2e/src/support/index.ts index 3d469a6b6..bf5cfc74e 100644 --- a/apps/simple-trading-app-e2e/src/support/index.ts +++ b/apps/simple-trading-app-e2e/src/support/index.ts @@ -13,5 +13,6 @@ // https://on.cypress.io/configuration // *********************************************************** +import '@vegaprotocol/cypress'; // Import commands.js using ES2015 syntax: import './commands'; diff --git a/apps/simple-trading-app/.env.capsule b/apps/simple-trading-app/.env.capsule index f3412a07c..57789b63f 100644 --- a/apps/simple-trading-app/.env.capsule +++ b/apps/simple-trading-app/.env.capsule @@ -1,4 +1,4 @@ # App configuration variables -NX_VEGA_URL = "http://localhost:3028/query" -NX_VEGA_ENV = 'LOCAL' -NX_VEGA_REST = 'http://localhost:3029' +NX_VEGA_URL=http://localhost:3028/query +NX_VEGA_ENV=LOCAL +NX_VEGA_REST=http://localhost:3029 diff --git a/apps/simple-trading-app/.env.devnet b/apps/simple-trading-app/.env.devnet index ead76f976..e708febd6 100644 --- a/apps/simple-trading-app/.env.devnet +++ b/apps/simple-trading-app/.env.devnet @@ -1,4 +1,4 @@ # App configuration variables -NX_VEGA_URL = "https://n04.d.vega.xyz/query" -NX_VEGA_ENV = 'DEVNET' -NX_VEGA_REST = 'https://n04.d.vega.xyz/datanode/rest' +NX_VEGA_URL=https://n04.d.vega.xyz/query +NX_VEGA_ENV=DEVNET +NX_VEGA_REST=https://n04.d.vega.xyz/datanode/rest diff --git a/apps/simple-trading-app/.env.mainnet b/apps/simple-trading-app/.env.mainnet index 0308b0ed1..59a12c1d3 100644 --- a/apps/simple-trading-app/.env.mainnet +++ b/apps/simple-trading-app/.env.mainnet @@ -1,4 +1,4 @@ # App configuration variables -NX_VEGA_URL = "https://api.token.vega.xyz/query" -NX_VEGA_ENV = 'MAINNET' -NX_VEGA_REST = 'https://api.token.vega.xyz/' +NX_VEGA_URL=https://api.token.vega.xyz/query +NX_VEGA_ENV=MAINNET +NX_VEGA_REST=https://api.token.vega.xyz/ diff --git a/apps/simple-trading-app/.env.stagnet1 b/apps/simple-trading-app/.env.stagnet1 index e1b300dca..75573c36a 100644 --- a/apps/simple-trading-app/.env.stagnet1 +++ b/apps/simple-trading-app/.env.stagnet1 @@ -1,4 +1,4 @@ # App configuration variables -NX_VEGA_URL = "https://n03.s.vega.xyz/query" -NX_VEGA_ENV = 'STAGNET' -NX_VEGA_REST = 'https://n03.s.vega.xyz/datanode/rest' +NX_VEGA_URL=https://n03.s.vega.xyz/query +NX_VEGA_ENV=STAGNET +NX_VEGA_REST=https://n03.s.vega.xyz/datanode/rest diff --git a/apps/simple-trading-app/.env.stagnet2 b/apps/simple-trading-app/.env.stagnet2 index 514d87608..e3ea4b625 100644 --- a/apps/simple-trading-app/.env.stagnet2 +++ b/apps/simple-trading-app/.env.stagnet2 @@ -1,4 +1,4 @@ # App configuration variables -NX_VEGA_URL = "https://n03.stagnet2.vega.xyz/query" -NX_VEGA_ENV = 'STAGNET2' -NX_VEGA_REST = 'https://n01.stagnet2.vega.xyz/datanode/rest' +NX_VEGA_URL=https://n03.stagnet2.vega.xyz/query +NX_VEGA_ENV=STAGNET2 +NX_VEGA_REST=https://n01.stagnet2.vega.xyz/datanode/rest diff --git a/apps/simple-trading-app/.env.testnet b/apps/simple-trading-app/.env.testnet index 818f209ad..f0fd1afc0 100644 --- a/apps/simple-trading-app/.env.testnet +++ b/apps/simple-trading-app/.env.testnet @@ -1,4 +1,4 @@ # App configuration variables -NX_VEGA_URL = "https://lb.testnet.vega.xyz/query" -NX_VEGA_ENV = 'TESTNET' -NX_VEGA_REST = 'https://lb.testnet.vega.xyz/datanode/rest' +NX_VEGA_URL=https://lb.testnet.vega.xyz/query +NX_VEGA_ENV=TESTNET +NX_VEGA_REST=https://lb.testnet.vega.xyz/datanode/rest diff --git a/apps/simple-trading-app/src/app/components/drawer/drawer.tsx b/apps/simple-trading-app/src/app/components/drawer/drawer.tsx index fcf2d9e5d..552098b4b 100644 --- a/apps/simple-trading-app/src/app/components/drawer/drawer.tsx +++ b/apps/simple-trading-app/src/app/components/drawer/drawer.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { theme } from '@vegaprotocol/tailwindcss-config'; +import { themelite as theme } from '@vegaprotocol/tailwindcss-config'; import type { ReactElement } from 'react'; import { useEffect } from 'react'; import Drawer from '@mui/material/Drawer'; diff --git a/apps/simple-trading-app/src/app/components/simple-market-list/__generated__/MarketFilters.ts b/apps/simple-trading-app/src/app/components/simple-market-list/__generated__/MarketFilters.ts new file mode 100644 index 000000000..02d961036 --- /dev/null +++ b/apps/simple-trading-app/src/app/components/simple-market-list/__generated__/MarketFilters.ts @@ -0,0 +1,55 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL query operation: MarketFilters +// ==================================================== + +export interface MarketFilters_markets_tradableInstrument_instrument_product_settlementAsset { + __typename: "Asset"; + /** + * The symbol of the asset (e.g: GBP) + */ + symbol: string; +} + +export interface MarketFilters_markets_tradableInstrument_instrument_product { + __typename: "Future"; + /** + * The name of the asset (string) + */ + settlementAsset: MarketFilters_markets_tradableInstrument_instrument_product_settlementAsset; +} + +export interface MarketFilters_markets_tradableInstrument_instrument { + __typename: "Instrument"; + /** + * A reference to or instance of a fully specified product, including all required product parameters for that product (Product union) + */ + product: MarketFilters_markets_tradableInstrument_instrument_product; +} + +export interface MarketFilters_markets_tradableInstrument { + __typename: "TradableInstrument"; + /** + * An instance of or reference to a fully specified instrument. + */ + instrument: MarketFilters_markets_tradableInstrument_instrument; +} + +export interface MarketFilters_markets { + __typename: "Market"; + /** + * An instance of or reference to a tradable instrument. + */ + tradableInstrument: MarketFilters_markets_tradableInstrument; +} + +export interface MarketFilters { + /** + * One or more instruments that are trading on the VEGA network + */ + markets: MarketFilters_markets[] | null; +} diff --git a/apps/simple-trading-app/src/app/components/simple-market-list/constants.ts b/apps/simple-trading-app/src/app/components/simple-market-list/constants.ts index dd24e47fb..6ad352067 100644 --- a/apps/simple-trading-app/src/app/components/simple-market-list/constants.ts +++ b/apps/simple-trading-app/src/app/components/simple-market-list/constants.ts @@ -1,5 +1,6 @@ import { Intent } from '@vegaprotocol/ui-toolkit'; import { MarketState } from '@vegaprotocol/types'; +import { t } from '@vegaprotocol/react-helpers'; export const MARKET_STATUS: Record = { [MarketState.Active]: Intent.Success, @@ -13,3 +14,16 @@ export const MARKET_STATUS: Record = { [MarketState.TradingTerminated]: Intent.Danger, '': Intent.Primary, }; + +export const STATES_FILTER = [ + { value: 'all', text: t('All') }, + { value: 'Active', text: t('Active') }, + { value: 'Cancelled', text: t('Cancelled') }, + { value: 'Closed', text: t('Closed') }, + { value: 'Pending', text: t('Pending') }, + { value: 'Proposed', text: t('Proposed') }, + { value: 'Rejected', text: t('Rejected') }, + { value: 'Settled', text: t('Settled') }, + { value: 'Suspended', text: t('Suspended') }, + { value: 'TradingTerminated', text: t('TradingTerminated') }, +]; diff --git a/apps/simple-trading-app/src/app/components/simple-market-list/data-provider.ts b/apps/simple-trading-app/src/app/components/simple-market-list/data-provider.ts index 1560020c9..8d24b976f 100644 --- a/apps/simple-trading-app/src/app/components/simple-market-list/data-provider.ts +++ b/apps/simple-trading-app/src/app/components/simple-market-list/data-provider.ts @@ -33,6 +33,7 @@ export const MARKETS_QUERY = gql` tags } product { + __typename ... on Future { settlementAsset { symbol @@ -66,6 +67,25 @@ export const CANDLE_SUB = gql` } `; +export const FILTERS_QUERY = gql` + query MarketFilters { + markets { + tradableInstrument { + instrument { + product { + __typename + ... on Future { + settlementAsset { + symbol + } + } + } + } + } + } + } +`; + const update = ( draft: SimpleMarkets_markets[], delta: SimpleMarketDataSub_marketData diff --git a/apps/simple-trading-app/src/app/components/simple-market-list/mocks/market-filters.json b/apps/simple-trading-app/src/app/components/simple-market-list/mocks/market-filters.json new file mode 100644 index 000000000..cc8c821bb --- /dev/null +++ b/apps/simple-trading-app/src/app/components/simple-market-list/mocks/market-filters.json @@ -0,0 +1,225 @@ +{ + "markets": [ + { + "tradableInstrument": { + "instrument": { + "product": { + "__typename": "Future", + "settlementAsset": { + "symbol": "XYZalpha", + "__typename": "Asset" + }, + "__typename": "Future" + }, + "__typename": "Instrument" + }, + "__typename": "TradableInstrument" + }, + "__typename": "Market" + }, + { + "tradableInstrument": { + "instrument": { + "product": { + "__typename": "Future", + "settlementAsset": { + "symbol": "tUSDC", + "__typename": "Asset" + }, + "__typename": "Future" + }, + "__typename": "Instrument" + }, + "__typename": "TradableInstrument" + }, + "__typename": "Market" + }, + { + "tradableInstrument": { + "instrument": { + "product": { + "__typename": "Future", + "settlementAsset": { + "symbol": "tDAI", + "__typename": "Asset" + }, + "__typename": "Future" + }, + "__typename": "Instrument" + }, + "__typename": "TradableInstrument" + }, + "__typename": "Market" + }, + { + "tradableInstrument": { + "instrument": { + "product": { + "__typename": "Future", + "settlementAsset": { + "symbol": "tBTC", + "__typename": "Asset" + }, + "__typename": "Future" + }, + "__typename": "Instrument" + }, + "__typename": "TradableInstrument" + }, + "__typename": "Market" + }, + { + "tradableInstrument": { + "instrument": { + "product": { + "__typename": "Future", + "settlementAsset": { + "symbol": "tEURO", + "__typename": "Asset" + }, + "__typename": "Future" + }, + "__typename": "Instrument" + }, + "__typename": "TradableInstrument" + }, + "__typename": "Market" + }, + { + "tradableInstrument": { + "instrument": { + "product": { + "__typename": "Future", + "settlementAsset": { + "symbol": "tDAI", + "__typename": "Asset" + }, + "__typename": "Future" + }, + "__typename": "Instrument" + }, + "__typename": "TradableInstrument" + }, + "__typename": "Market" + }, + { + "tradableInstrument": { + "instrument": { + "product": { + "__typename": "Future", + "settlementAsset": { + "symbol": "tEURO", + "__typename": "Asset" + }, + "__typename": "Future" + }, + "__typename": "Instrument" + }, + "__typename": "TradableInstrument" + }, + "__typename": "Market" + }, + { + "tradableInstrument": { + "instrument": { + "product": { + "__typename": "Future", + "settlementAsset": { + "symbol": "tDAI", + "__typename": "Asset" + }, + "__typename": "Future" + }, + "__typename": "Instrument" + }, + "__typename": "TradableInstrument" + }, + "__typename": "Market" + }, + { + "tradableInstrument": { + "instrument": { + "product": { + "__typename": "Future", + "settlementAsset": { + "symbol": "tBTC", + "__typename": "Asset" + }, + "__typename": "Future" + }, + "__typename": "Future" + }, + "__typename": "TradableInstrument" + }, + "__typename": "Market" + }, + { + "tradableInstrument": { + "instrument": { + "product": { + "__typename": "Future", + "settlementAsset": { + "symbol": "tUSDC", + "__typename": "Asset" + }, + "__typename": "Future" + }, + "__typename": "Instrument" + }, + "__typename": "TradableInstrument" + }, + "__typename": "Market" + }, + { + "tradableInstrument": { + "instrument": { + "product": { + "__typename": "Future", + "settlementAsset": { + "symbol": "tDAI", + "__typename": "Asset" + }, + "__typename": "Future" + }, + "__typename": "Instrument" + }, + "__typename": "TradableInstrument" + }, + "__typename": "Market" + }, + { + "tradableInstrument": { + "instrument": { + "product": { + "__typename": "Future", + "settlementAsset": { + "symbol": "tDAI", + "__typename": "Asset" + }, + "__typename": "Future" + }, + "__typename": "Instrument" + }, + "__typename": "TradableInstrument" + }, + "__typename": "Market" + }, + { + "tradableInstrument": { + "instrument": { + "product": { + "__typename": "Future", + "settlementAsset": { + "symbol": "tDAI", + "__typename": "Asset" + }, + "__typename": "Future" + }, + "__typename": "Instrument" + }, + "__typename": "TradableInstrument" + }, + "__typename": "Market" + } + ] +} diff --git a/apps/simple-trading-app/src/app/components/simple-market-list/simple-market-list.spec.tsx b/apps/simple-trading-app/src/app/components/simple-market-list/simple-market-list.spec.tsx index be70d03bf..3268c1f96 100644 --- a/apps/simple-trading-app/src/app/components/simple-market-list/simple-market-list.spec.tsx +++ b/apps/simple-trading-app/src/app/components/simple-market-list/simple-market-list.spec.tsx @@ -1,18 +1,24 @@ import React from 'react'; -import { render, screen } from '@testing-library/react'; +import { act } from 'react-dom/test-utils'; +import { render, screen, waitFor } from '@testing-library/react'; import { MockedProvider } from '@apollo/client/testing'; import type { MockedResponse } from '@apollo/client/testing'; +import { BrowserRouter } from 'react-router-dom'; import { MarketState } from '@vegaprotocol/types'; import SimpleMarketList from './simple-market-list'; -import { MARKETS_QUERY } from './data-provider'; -import type { SimpleMarkets_markets } from './__generated__/SimpleMarkets'; -import type { SimpleMarkets } from './__generated__/SimpleMarkets'; +import { FILTERS_QUERY, MARKETS_QUERY } from './data-provider'; +import type { + SimpleMarkets_markets, + SimpleMarkets, +} from './__generated__/SimpleMarkets'; +import type { MarketFilters } from './__generated__/MarketFilters'; const mockedNavigate = jest.fn(); jest.mock('react-router-dom', () => ({ ...jest.requireActual('react-router-dom'), useNavigate: () => mockedNavigate, + useParams: () => ({}), })); jest.mock('date-fns', () => ({ @@ -20,6 +26,15 @@ jest.mock('date-fns', () => ({ })); describe('SimpleMarketList', () => { + const filterMock: MockedResponse = { + request: { + query: FILTERS_QUERY, + }, + result: { + data: { markets: [] }, + }, + }; + afterEach(() => { jest.clearAllMocks(); }); @@ -36,16 +51,18 @@ describe('SimpleMarketList', () => { data: { markets: [] }, }, }; - - render( - - - - ); - - await new Promise((resolve) => setTimeout(resolve, 0)); - - expect(screen.getByText('No data to display')).toBeInTheDocument(); + await act(async () => { + render( + + + , + { wrapper: BrowserRouter } + ); + await new Promise((resolve) => setTimeout(resolve, 0)); + }); + await waitFor(() => { + expect(screen.getByText('No data to display')).toBeInTheDocument(); + }); }); it('should be properly rendered with some data', async () => { @@ -74,7 +91,7 @@ describe('SimpleMarketList', () => { id: '2', data: { market: { - state: MarketState.Proposed, + state: MarketState.Active, }, }, tradableInstrument: { @@ -103,15 +120,18 @@ describe('SimpleMarketList', () => { data: { markets: data }, }, }; - render( - - - - ); - - await new Promise((resolve) => setTimeout(resolve, 0)); - - expect(screen.getByRole('list')).toBeInTheDocument(); - expect(screen.getAllByRole('listitem')).toHaveLength(2); + await act(async () => { + render( + + + , + { wrapper: BrowserRouter } + ); + await new Promise((resolve) => setTimeout(resolve, 0)); + }); + await waitFor(() => { + expect(screen.getByTestId('simple-market-list')).toBeInTheDocument(); + }); + expect(screen.getByTestId('simple-market-list').children).toHaveLength(2); }); }); diff --git a/apps/simple-trading-app/src/app/components/simple-market-list/simple-market-list.tsx b/apps/simple-trading-app/src/app/components/simple-market-list/simple-market-list.tsx index 7ff7006c2..831470e8d 100644 --- a/apps/simple-trading-app/src/app/components/simple-market-list/simple-market-list.tsx +++ b/apps/simple-trading-app/src/app/components/simple-market-list/simple-market-list.tsx @@ -1,5 +1,5 @@ import React, { useCallback, useEffect, useMemo, useRef } from 'react'; -import { useNavigate } from 'react-router-dom'; +import { useNavigate, useParams } from 'react-router-dom'; import { subDays } from 'date-fns'; import { useDataProvider } from '@vegaprotocol/react-helpers'; import { t } from '@vegaprotocol/react-helpers'; @@ -10,9 +10,19 @@ import SimpleMarketPercentChange from './simple-market-percent-change'; import SimpleMarketExpires from './simple-market-expires'; import DataProvider from './data-provider'; import { MARKET_STATUS } from './constants'; +import SimpleMarketToolbar from './simple-market-toolbar'; +import useMarketsFilterData from '../../hooks/use-markets-filter-data'; + +export type RouterParams = Partial<{ + product: string; + asset: string; + state: string; +}>; const SimpleMarketList = () => { const navigate = useNavigate(); + const params = useParams(); + const statusesRef = useRef>({}); const variables = useMemo( () => ({ @@ -21,12 +31,7 @@ const SimpleMarketList = () => { [] ); const update = useCallback( - (delta) => { - if (statusesRef.current[delta.market.id] !== delta.market.state) { - return false; - } - return true; - }, + (delta) => statusesRef.current[delta.market.id] === delta.market.state, [statusesRef] ); @@ -35,13 +40,15 @@ const SimpleMarketList = () => { update, variables ); + const localData = useMarketsFilterData(data || [], params); + useEffect(() => { const statuses: Record = {}; data?.forEach((market) => { statuses[market.id] = market.data?.market.state || ''; }); statusesRef.current = statuses; - }, [data]); + }, [data, statusesRef]); const onClick = useCallback( (marketId) => { @@ -51,55 +58,61 @@ const SimpleMarketList = () => { ); return ( - - {data && data.length > 0 ? ( - - {data?.map((market) => ( - - - - {market.name} - - {`${t('settled in')} ${ - market.tradableInstrument.instrument.product.settlementAsset - .symbol - }`} - - - - + + + {localData && localData.length > 0 ? ( + + {localData?.map((market) => ( + + + + {market.name} + + {`${t('settled in')} ${ + market.tradableInstrument.instrument.product + .settlementAsset.symbol + }`} - - - {market.data?.market.state} - + + + + + + + {market.data?.market.state} + + - - - onClick(market.id)} - variant="inline" - prependIconName="chevron-right" - /> - - - ))} - - ) : ( - {t('No data to display')} - )} - + + onClick(market.id)} + variant="inline" + prependIconName="chevron-right" + /> + + + ))} + + ) : ( + {t('No data to display')} + )} + + > ); }; diff --git a/apps/simple-trading-app/src/app/components/simple-market-list/simple-market-percent-change.spec.tsx b/apps/simple-trading-app/src/app/components/simple-market-list/simple-market-percent-change.spec.tsx index 64db3a61a..0e6d4e733 100644 --- a/apps/simple-trading-app/src/app/components/simple-market-list/simple-market-percent-change.spec.tsx +++ b/apps/simple-trading-app/src/app/components/simple-market-list/simple-market-percent-change.spec.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { render, screen } from '@testing-library/react'; -import { theme } from '@vegaprotocol/tailwindcss-config'; +import { themelite as theme } from '@vegaprotocol/tailwindcss-config'; import { MockedProvider } from '@apollo/react-testing'; import SimpleMarketPercentChange from './simple-market-percent-change'; import type { SimpleMarkets_markets_candles } from './__generated__/SimpleMarkets'; diff --git a/apps/simple-trading-app/src/app/components/simple-market-list/simple-market-percent-change.tsx b/apps/simple-trading-app/src/app/components/simple-market-list/simple-market-percent-change.tsx index ac8efb5f5..e4c094736 100644 --- a/apps/simple-trading-app/src/app/components/simple-market-list/simple-market-percent-change.tsx +++ b/apps/simple-trading-app/src/app/components/simple-market-list/simple-market-percent-change.tsx @@ -1,7 +1,7 @@ import React, { useState } from 'react'; import { InView } from 'react-intersection-observer'; import { useSubscription } from '@apollo/client'; -import { theme } from '@vegaprotocol/tailwindcss-config'; +import { themelite as theme } from '@vegaprotocol/tailwindcss-config'; import type { SimpleMarkets_markets_candles } from './__generated__/SimpleMarkets'; import type { CandleLive, diff --git a/apps/simple-trading-app/src/app/components/simple-market-list/simple-market-toolbar.spec.tsx b/apps/simple-trading-app/src/app/components/simple-market-list/simple-market-toolbar.spec.tsx new file mode 100644 index 000000000..bfd803bdb --- /dev/null +++ b/apps/simple-trading-app/src/app/components/simple-market-list/simple-market-toolbar.spec.tsx @@ -0,0 +1,122 @@ +import React from 'react'; +import { useLocation, useRoutes, BrowserRouter } from 'react-router-dom'; +import { render, screen, fireEvent, waitFor } from '@testing-library/react'; +import { MockedProvider } from '@apollo/react-testing'; +import SimpleMarketToolbar from './simple-market-toolbar'; +import type { MockedResponse } from '@apollo/client/testing'; +import type { MarketFilters } from './__generated__/MarketFilters'; +import { FILTERS_QUERY } from './data-provider'; +import filterData from './mocks/market-filters.json'; + +describe('SimpleMarketToolbar', () => { + const filterMock: MockedResponse = { + request: { + query: FILTERS_QUERY, + }, + result: { + data: filterData as unknown as MarketFilters, + }, + }; + + const WrappedCompForTest = () => { + const routes = useRoutes([ + { + path: '/', + element: , + }, + { + path: 'markets', + children: [ + { + path: `:state`, + element: , + children: [ + { + path: `:product`, + element: , + children: [ + { path: `:asset`, element: }, + ], + }, + ], + }, + ], + element: , + }, + ]); + const location = useLocation(); + return ( + <> + {routes} + {location.pathname} + > + ); + }; + + afterEach(() => { + jest.resetAllMocks(); + }); + + it('should be properly rendered', async () => { + render( + + + , + { wrapper: BrowserRouter } + ); + await waitFor(() => { + expect(screen.getByText('Future')).toBeInTheDocument(); + }); + fireEvent.click(screen.getByText('Future')); + await waitFor(() => { + expect(screen.getByTestId('market-products-menu').children).toHaveLength( + 3 + ); + expect(screen.getByTestId('market-assets-menu').children).toHaveLength(6); + }); + fireEvent.click(screen.getByTestId('state-trigger')); + waitFor(() => { + expect(screen.getByRole('menu')).toBeInTheDocument(); + expect(screen.getByRole('menu').children).toHaveLength(10); + }); + }); + + it('navigation should work well', async () => { + render( + + + , + { wrapper: BrowserRouter } + ); + + await waitFor(() => { + expect(screen.getByText('Future')).toBeInTheDocument(); + }); + fireEvent.click(screen.getByText('Future')); + await waitFor(() => { + expect(screen.getByTestId('location-display')).toHaveTextContent( + '/markets/Active/Future' + ); + }); + + fireEvent.click( + screen + .getByTestId('market-assets-menu') + .children[5].querySelector('a') as HTMLAnchorElement + ); + await waitFor(() => { + expect(screen.getByTestId('location-display')).toHaveTextContent( + '/markets/Active/Future/tEURO' + ); + }); + + fireEvent.click(screen.getByTestId('state-trigger')); + waitFor(() => { + expect(screen.getByRole('menu')).toBeInTheDocument(); + fireEvent.click(screen.getByText('Pending')); + expect(screen.getByTestId('location-display')).toHaveTextContent( + '/markets/Pending/Future/tEURO' + ); + }); + }); +}); diff --git a/apps/simple-trading-app/src/app/components/simple-market-list/simple-market-toolbar.tsx b/apps/simple-trading-app/src/app/components/simple-market-list/simple-market-toolbar.tsx new file mode 100644 index 000000000..c250871aa --- /dev/null +++ b/apps/simple-trading-app/src/app/components/simple-market-list/simple-market-toolbar.tsx @@ -0,0 +1,205 @@ +import React, { useCallback, useEffect, useRef, useState } from 'react'; +import classNames from 'classnames'; +import { useNavigate, useParams, Link } from 'react-router-dom'; +import { + DropdownMenu, + DropdownMenuTrigger, +} from '@radix-ui/react-dropdown-menu'; +import { IconNames } from '@blueprintjs/icons'; +import { t } from '@vegaprotocol/react-helpers'; +import { themelite as theme } from '@vegaprotocol/tailwindcss-config'; +import { + DropdownMenuCheckboxItem, + DropdownMenuContent, + DropdownMenuItemIndicator, + Icon, +} from '@vegaprotocol/ui-toolkit'; +import useMarketFiltersData from '../../hooks/use-markets-filter'; +import { STATES_FILTER } from './constants'; + +const SimpleMarketToolbar = () => { + const navigate = useNavigate(); + const params = useParams(); + const { products, assetsPerProduct } = useMarketFiltersData(); + const [isOpen, setOpen] = useState(false); + const [activeNumber, setActiveNumber] = useState( + products?.length ? products.indexOf(params.product || '') + 1 : -1 + ); + + const [sliderStyles, setSliderStyles] = useState>({}); + const slideContRef = useRef(null); + + useEffect(() => { + if (products.length) { + setActiveNumber(products.indexOf(params.product || '') + 1); + } else { + setActiveNumber(-1); + } + }, [params, products, setActiveNumber]); + + useEffect(() => { + const contStyles = ( + slideContRef.current as HTMLUListElement + ).getBoundingClientRect(); + const selectedStyles = (slideContRef.current as HTMLUListElement).children[ + activeNumber + ]?.getBoundingClientRect(); + const styles: Record = selectedStyles + ? { + backgroundColor: activeNumber ? '' : theme.colors.pink, + width: `${selectedStyles.width}px`, + left: `${selectedStyles.left - contStyles.left}px`, + } + : {}; + setSliderStyles(styles); + }, [activeNumber, slideContRef]); + + const onStateChange = useCallback( + (activeState: string) => { + const asset = + params.asset && params.asset !== 'all' ? `/${params.asset}` : ''; + const product = params.product ? `/${params.product}` : ''; + const state = + activeState !== 'Active' || product ? `/${activeState}` : ''; + navigate(`/markets${state}${product}${asset}`); + }, + [params, navigate] + ); + + return ( + + + + + {t('All Markets')} + + + {products.map((product, i) => ( + + + {product} + + + ))} + + + + + setOpen(open)}> + + + {STATES_FILTER.find( + (state) => + state.value === params.state || + (!params.state && state.value === 'Active') + )?.text || params.state} + + + + + {STATES_FILTER.map(({ value, text }) => ( + onStateChange(value)} + > + + + + {text} + + ))} + + + + + | + + {activeNumber > 0 && ( + + + + {t('All')} + + + {assetsPerProduct[products[activeNumber - 1]]?.map((asset) => ( + + + {asset} + + + ))} + + )} + + + ); +}; + +export default SimpleMarketToolbar; diff --git a/apps/simple-trading-app/src/app/hooks/use-markets-filter-data.ts b/apps/simple-trading-app/src/app/hooks/use-markets-filter-data.ts new file mode 100644 index 000000000..8abf9e3e2 --- /dev/null +++ b/apps/simple-trading-app/src/app/hooks/use-markets-filter-data.ts @@ -0,0 +1,32 @@ +import type { SimpleMarkets_markets } from '../components/simple-market-list/__generated__/SimpleMarkets'; +import type { RouterParams } from '../components/simple-market-list/simple-market-list'; + +const useMarketsFilterData = ( + data: SimpleMarkets_markets[] = [], + params: RouterParams +) => { + return data.filter((item) => { + if ( + params.product && + params.product !== item.tradableInstrument.instrument.product.__typename + ) { + return false; + } + if ( + params.asset && + params.asset !== 'all' && + params.asset !== + item.tradableInstrument.instrument.product.settlementAsset.symbol + ) { + return false; + } + const state = + params.state === 'all' ? '' : params.state ? params.state : 'Active'; + if (state && state !== item.data?.market.state) { + return false; + } + return true; + }); +}; + +export default useMarketsFilterData; diff --git a/apps/simple-trading-app/src/app/hooks/use-markets-filter.ts b/apps/simple-trading-app/src/app/hooks/use-markets-filter.ts new file mode 100644 index 000000000..7b636e1bb --- /dev/null +++ b/apps/simple-trading-app/src/app/hooks/use-markets-filter.ts @@ -0,0 +1,41 @@ +import { useEffect, useState } from 'react'; +import { useQuery } from '@apollo/client'; +import { FILTERS_QUERY } from '../components/simple-market-list/data-provider'; +import type { MarketFilters } from '../components/simple-market-list/__generated__/MarketFilters'; + +const useMarketFilters = () => { + const [products, setProducts] = useState([]); + const [assetsPerProduct, setAssetsPerProduct] = useState< + Record + >({}); + const { data } = useQuery(FILTERS_QUERY, { + pollInterval: 5000, + }); + useEffect(() => { + const localProducts = new Set(); + const localAssetPerProduct: Record> = {}; + data?.markets?.forEach((item) => { + const product = item.tradableInstrument.instrument.product.__typename; + const asset = + item.tradableInstrument.instrument.product.settlementAsset.symbol; + if (!(product in localAssetPerProduct)) { + localAssetPerProduct[product] = new Set(); + } + localAssetPerProduct[product].add(asset); + localProducts.add(product); + }); + setProducts([...localProducts]); + setAssetsPerProduct( + Object.entries(localAssetPerProduct).reduce( + (agg: Record, entry) => { + agg[entry[0]] = [...entry[1]]; + return agg; + }, + {} + ) + ); + }, [data]); + return { products, assetsPerProduct }; +}; + +export default useMarketFilters; diff --git a/apps/simple-trading-app/src/app/routes/router-config.tsx b/apps/simple-trading-app/src/app/routes/router-config.tsx index 29c7b8b20..3458cea79 100644 --- a/apps/simple-trading-app/src/app/routes/router-config.tsx +++ b/apps/simple-trading-app/src/app/routes/router-config.tsx @@ -20,6 +20,19 @@ export const routerConfig = [ }, { path: ROUTES.MARKETS, + children: [ + { + path: `:state`, + element: , + children: [ + { + path: `:product`, + element: , + children: [{ path: `:asset`, element: }], + }, + ], + }, + ], name: 'Markets', text: t('Markets'), element: , diff --git a/apps/simple-trading-app/tailwind.config.js b/apps/simple-trading-app/tailwind.config.js index 51ca67ff2..d2fb3eb3d 100644 --- a/apps/simple-trading-app/tailwind.config.js +++ b/apps/simple-trading-app/tailwind.config.js @@ -1,6 +1,6 @@ const { join } = require('path'); const { createGlobPatternsForDependencies } = require('@nrwl/next/tailwind'); -const theme = require('../../libs/tailwindcss-config/src/theme'); +const theme = require('../../libs/tailwindcss-config/src/theme-lite'); const vegaCustomClasses = require('../../libs/tailwindcss-config/src/vega-custom-classes'); module.exports = { diff --git a/apps/static/src/assets/mainnet-tranches.json b/apps/static/src/assets/mainnet-tranches.json index 9b0f8da82..a05255e75 100644 --- a/apps/static/src/assets/mainnet-tranches.json +++ b/apps/static/src/assets/mainnet-tranches.json @@ -38,7 +38,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "129999.45", "total_removed": "0", - "locked_amount": "128021.232835487635464975", + "locked_amount": "126143.693637837075430965", "deposits": [ { "amount": "129999.45", @@ -488,7 +488,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "97499.58", "total_removed": "0", - "locked_amount": "68799.105317250070665786", + "locked_amount": "66957.41426504243111508", "deposits": [ { "amount": "97499.58", @@ -521,7 +521,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "135173.4239508", "total_removed": "0", - "locked_amount": "94036.49929865655770361639432", + "locked_amount": "91519.225584984544134931503", "deposits": [ { "amount": "135173.4239508", @@ -554,7 +554,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "32499.86", "total_removed": "0", - "locked_amount": "28942.595509967648281348", + "locked_amount": "28167.82788860720687974", "deposits": [ { "amount": "32499.86", @@ -587,7 +587,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "10833.29", "total_removed": "0", - "locked_amount": "9420.533986195534071168", + "locked_amount": "9168.354643609749799926", "deposits": [ { "amount": "10833.29", @@ -675,7 +675,7 @@ "tranche_end": "2022-11-01T00:00:00.000Z", "total_added": "22500", "total_removed": "0", - "locked_amount": "17200.396286231886", + "locked_amount": "16232.58038949275475", "deposits": [ { "amount": "15000", @@ -761,7 +761,7 @@ "tranche_end": "2023-06-02T00:00:00.000Z", "total_added": "1939928.38", "total_removed": "0", - "locked_amount": "1879663.141708985403485286", + "locked_amount": "1837598.142190606213172846", "deposits": [ { "amount": "1852091.69", @@ -1776,8 +1776,8 @@ "tranche_start": "2021-09-05T00:00:00.000Z", "tranche_end": "2022-09-30T00:00:00.000Z", "total_added": "60916.66666633337", - "total_removed": "17896.108295511846757997", - "locked_amount": "16972.4796018381286955927508687498", + "total_removed": "18323.723696937179372649", + "locked_amount": "15736.2487435827866542928933059592", "deposits": [ { "amount": "2833.333333", @@ -1881,6 +1881,11 @@ "user": "0x1887D97F9C875108Aa6bE109B282f87A666472f2", "tx": "0x6002d50af16df494528c32126c3cb569f105ee8118a3f48a34e8883037132198" }, + { + "amount": "427.615401425332614652", + "user": "0x832cfD8fD4a1791b5eF5BD18a677beb7731Aa18E", + "tx": "0x2cd46472d5308eb23aaa81d7e78ece0ad3ac5638d7111bec046a39c0bedaaaa2" + }, { "amount": "490.9767850775", "user": "0x9fd50776F133751E8Ae6abE1Be124638Bb917E05", @@ -2270,6 +2275,12 @@ } ], "withdrawals": [ + { + "amount": "427.615401425332614652", + "user": "0x832cfD8fD4a1791b5eF5BD18a677beb7731Aa18E", + "tranche_id": 13, + "tx": "0x2cd46472d5308eb23aaa81d7e78ece0ad3ac5638d7111bec046a39c0bedaaaa2" + }, { "amount": "310.227154065499478609", "user": "0x832cfD8fD4a1791b5eF5BD18a677beb7731Aa18E", @@ -2302,8 +2313,8 @@ } ], "total_tokens": "1983.33333333333", - "withdrawn_tokens": "1009.551217245664969941", - "remaining_tokens": "973.782116087665030059" + "withdrawn_tokens": "1437.166618670997584593", + "remaining_tokens": "546.166714662332415407" }, { "address": "0x883aD562D0a83569dA00DdF88C96C348519c0030", @@ -3217,8 +3228,8 @@ "tranche_id": 10, "tranche_start": "2021-07-15T23:37:11.000Z", "tranche_end": "2021-07-15T23:37:11.000Z", - "total_added": "3545768.150000000000000001", - "total_removed": "3537578.640000000000000001", + "total_added": "3623768.150000000000000001", + "total_removed": "3615578.640000000000000001", "locked_amount": "0", "deposits": [ { @@ -3231,6 +3242,16 @@ "user": "0xb2d6DEC77558Cf8EdB7c428d23E70Eab0688544f", "tx": "0x7f568014bcb0bd1991c2da53ce6d8b15da0c23bde42481b8f7eed31ab957a909" }, + { + "amount": "38000", + "user": "0xb2d6DEC77558Cf8EdB7c428d23E70Eab0688544f", + "tx": "0xacec39ce033bf9c4c7a97c78444bc8abe80e911e401e2e18abc6a15b9f8efe25" + }, + { + "amount": "40000", + "user": "0xb2d6DEC77558Cf8EdB7c428d23E70Eab0688544f", + "tx": "0xf15c94a9ae3f3f42d4ba75ad333943425270b735917a61d927887d49ecc9b4e6" + }, { "amount": "50000", "user": "0xb2d6DEC77558Cf8EdB7c428d23E70Eab0688544f", @@ -3638,6 +3659,16 @@ "user": "0xb2d6DEC77558Cf8EdB7c428d23E70Eab0688544f", "tx": "0x50c9a9ac22a23c68b00de15fedf1d5f1ada9434c4494f4dbe291b57154d76609" }, + { + "amount": "38000", + "user": "0xb2d6DEC77558Cf8EdB7c428d23E70Eab0688544f", + "tx": "0x1fcac1b1fbcafd3ca876509b7ef4028d5e414e732fdc891aa167f1fb94ef2354" + }, + { + "amount": "40000", + "user": "0xb2d6DEC77558Cf8EdB7c428d23E70Eab0688544f", + "tx": "0xdbfa73c88788ff754fcacbfe82aa909edea9601b7ff51601387849a3dbf1b357" + }, { "amount": "90000", "user": "0xb2d6DEC77558Cf8EdB7c428d23E70Eab0688544f", @@ -3990,6 +4021,18 @@ "tranche_id": 10, "tx": "0x7f568014bcb0bd1991c2da53ce6d8b15da0c23bde42481b8f7eed31ab957a909" }, + { + "amount": "38000", + "user": "0xb2d6DEC77558Cf8EdB7c428d23E70Eab0688544f", + "tranche_id": 10, + "tx": "0xacec39ce033bf9c4c7a97c78444bc8abe80e911e401e2e18abc6a15b9f8efe25" + }, + { + "amount": "40000", + "user": "0xb2d6DEC77558Cf8EdB7c428d23E70Eab0688544f", + "tranche_id": 10, + "tx": "0xf15c94a9ae3f3f42d4ba75ad333943425270b735917a61d927887d49ecc9b4e6" + }, { "amount": "50000", "user": "0xb2d6DEC77558Cf8EdB7c428d23E70Eab0688544f", @@ -4052,6 +4095,18 @@ "tranche_id": 10, "tx": "0x50c9a9ac22a23c68b00de15fedf1d5f1ada9434c4494f4dbe291b57154d76609" }, + { + "amount": "38000", + "user": "0xb2d6DEC77558Cf8EdB7c428d23E70Eab0688544f", + "tranche_id": 10, + "tx": "0x1fcac1b1fbcafd3ca876509b7ef4028d5e414e732fdc891aa167f1fb94ef2354" + }, + { + "amount": "40000", + "user": "0xb2d6DEC77558Cf8EdB7c428d23E70Eab0688544f", + "tranche_id": 10, + "tx": "0xdbfa73c88788ff754fcacbfe82aa909edea9601b7ff51601387849a3dbf1b357" + }, { "amount": "90000", "user": "0xb2d6DEC77558Cf8EdB7c428d23E70Eab0688544f", @@ -4095,8 +4150,8 @@ "tx": "0xac16a4ce688d40a482a59914d68c3a676592f8804ee8f0781b66a4ba5ccfbdfc" } ], - "total_tokens": "399451", - "withdrawn_tokens": "399451", + "total_tokens": "477451", + "withdrawn_tokens": "477451", "remaining_tokens": "0" }, { @@ -5094,9 +5149,9 @@ "tranche_id": 11, "tranche_start": "2021-09-03T00:00:00.000Z", "tranche_end": "2022-09-03T00:00:00.000Z", - "total_added": "16708.000000000000000003", - "total_removed": "4111.28273531398", - "locked_amount": "3738.0605589802120624006711863584474884", + "total_added": "19080.000000000000000003", + "total_removed": "5052.45813105178", + "locked_amount": "3855.01913242009197840060613508371385094", "deposits": [ { "amount": "30", @@ -5168,6 +5223,316 @@ "user": "0x3a380f7CFdEeb723228cA57d2795EA215094000d", "tx": "0xc4981c736caa5a186bb800cc61ce2d3372b66779a3f22a14e7b1871c959fccca" }, + { + "amount": "10", + "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", + "tx": "0x2181c9e667a9ced6e635bf55d6baf99c618a074c8396dfa9babc188d117bd52e" + }, + { + "amount": "50", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", + "tx": "0xc9811d234d7953e58750f81979eaa9f1e7b6394d9deb6fc720f9a91eace41921" + }, + { + "amount": "30", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", + "tx": "0x34eed5fbb4b6ed0e97e6a6375a2f3affa1626fdd6b0125e28e5d1c4c1cc8927f" + }, + { + "amount": "25", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", + "tx": "0xad6ea4caf927dcc9f0fe051966ed8ab693a323486d940dcb1934130b89b47763" + }, + { + "amount": "30", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", + "tx": "0x019360f772a0a1a4897104573019e185900397f110b614bce55f8ed163cf4c76" + }, + { + "amount": "10", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", + "tx": "0xba6b4007a8d1a3104dc31ecd2da6ae2035deb9399567809e010bb046f7d6e18b" + }, + { + "amount": "125", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", + "tx": "0x4a8ec7fa552b25428c3b1715da0f2a704414ec4f7b6d57220cacee2c140aa674" + }, + { + "amount": "60", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", + "tx": "0xbd84b771beca6a6ecc9c45b2062f280e4ed84f59260e0cecdee9e03056dc5ff4" + }, + { + "amount": "30", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", + "tx": "0x0e11bf5b5a2fe0be0af9e2359bd90f7aab6118ac8f069af9d995b9d637d0a363" + }, + { + "amount": "15", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", + "tx": "0x5481ffd2e3ccb5d711546e0110b518792e28e33aaeac05670f01c2a454783f9b" + }, + { + "amount": "25", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", + "tx": "0xc3e685a0b86ebc7359b762b4ae78e5fa083cc1be5ebfb8cc7f0c64d79a1adae2" + }, + { + "amount": "10", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", + "tx": "0x3d47cb596bf407d6b1102c8b72da2384f9ab408fc62f5cbc9ba7367bae59e93e" + }, + { + "amount": "50", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", + "tx": "0x88370b3b7e41f853f88fac2076eb5326e75c512faac64688f02d95818257dc35" + }, + { + "amount": "100", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", + "tx": "0xafb050a044f13a7de0b5c523361e630284ff405496397b5428e8682c0ee1cff4" + }, + { + "amount": "10", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", + "tx": "0x5a22ae68ae70def89d0df82d2a61f613aa3311970e6aa1877e777812d251ae00" + }, + { + "amount": "80", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x144fdab513f0d02d30580916f13428037645284c8375264bcfde25f1f43da727" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x12f066a3257c5db7486442a56d4aa03d90872a0df86a27edcc4cd79f1c77d304" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0xea888c94889a86035a8579b80780f19ce7d1ba9167220ab7959cbb67db0f442b" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0xc10d700802fd8565d14b9196bfec6c715fd47792f31c5574e1a73385737e1ab6" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x6a4809778f0afd2433a7ac68e2f93a77d1a59ce8bb83ed33b4963c1f83f2fbe1" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x4ada6e4b4c9102c51035e344a451d4090b33988c73c1b2d0279d29b64c5f6a8f" + }, + { + "amount": "25", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x03055b139a0b259f15a5de400a174d8a5b13edce472913f5a4c4d9e4f75bf094" + }, + { + "amount": "50", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x9d99a7d24c47b53e55c916199a6d1a16d44b5b0263f048ef7caba303ea9a175b" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x21fb56c9c05a368d493ea2f457e2161b3ae97fe8e5b0f2ba023bb2b5e2ef4f6b" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x6b1403ce474b43c23ce294a5284ffd20443127d0c078ca3dfaad28e589e7d22a" + }, + { + "amount": "60", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x01a4e44b672d4f9e5776220c39623b2f4550ac2d49ccb63c6eb0568b412d748d" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0xbf2c58ed1686284344c6fc807ae1ba193bc777ef385e8b94ba90355d02135e04" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x39a61c11f107630a77b5b05a15facd2a1036376614d16fbbd8037af6fba3ed1e" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0xb83fa14f097dbed390c720728a4fe4a1582c5d84593fd3c3f0deee41c2531d3a" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x3c409e5951f2dcb98c9ca87d79f6efd63338ccabcbd2316b0936673e8146934c" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x5c7178f6e6cd9e617f4a3ea77afe81f44e4be8e1f1668e19cae0731cf653dfd0" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x220198dfd99d93f2e99a428b22978e4cb245fd60f39ee5025de82394a2efc8b7" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0xee76592fee40cabc6c3dcfef1ee3bc4cdbee84b33da22d3e5f0f898ff1700cec" + }, + { + "amount": "60", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x107000169be1190733ddc2c688b3525177774e73d6283fdc82fa69a8b47db14e" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0xe6c6200c701274897c84cec2c8903645d09906fd482a5ed34234938c44605d30" + }, + { + "amount": "60", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0xe03d16bb9ffa3915fee17f3a035996f8e861a6d23fdc0d09cf580be1931bd6f1" + }, + { + "amount": "60", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0xaf78becedad1aa9c115a1a03264d619328b107ed56a28a098c106956e133a12b" + }, + { + "amount": "60", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x806dd5dca438e20814b112dd0fdab9d471653d154885a7b6c2600714f7372009" + }, + { + "amount": "100", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x8bc8a476f85a0a5b6031f1cfe130a8eef277e6ba7925ca349898881af90ab758" + }, + { + "amount": "60", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x2f41cf1f9ba0fd2fe32a04332c2f09754fa6a2f972214d8bdccc2e46078452dd" + }, + { + "amount": "60", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x97dcdb22db0931d19019a05c811e6ae693de93618a065d824c221c91d8f5a0c9" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x247c98e6e60949d8b40b25c6b9d48f5671a1a2d9e99d388a7148a8e36ab92094" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x6863c530428e1eeb1e56ff2c9eca100e92fc22c30bcfed9e31a9d96091dfe9ca" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x18504853121d07043d9426b3e40d2eda82b720e3ce62486a14aff5663162ac8d" + }, + { + "amount": "60", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x60ebbb3f6159878255808ca6649811a1c2a71aa52655c0b9b6cbf34b6c1498e3" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0xc30c4ca9d6d63d0aa504b84f960511fdbb2fc167c5a99d2d41597475a12f9c30" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x0d4211f02bc48faffed2ca2df7aed6c3a4ce7245982d19321221d9b814f1cf2c" + }, + { + "amount": "60", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x53e21110f14d657115d7338278c2fba288179956109996fbbab745603d91f6f3" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x2074445fba00ad2c436aec6dd4116ed46db62ff39367f7dbd6036d4e77387a95" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0xae2dec6e0bdb3429beaf88ad24c5be8e99c9abd640a53d3cf350eed5dfefba4f" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x05e15975b81a1195ed61b7d2697be6ed52e847d433a4044ac0b4cc66bb267565" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x4ec20b301c142f24d3b3e4efb70158bbe4635794b8fefacec644b6a138f2ccf1" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0xa7f84b8f5f5e10d93ef7194fa3bb9ee91fe2a6bead0a015f8be06241bc9f1fc8" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x1ed674d029c7ede7dbfd81e19048bf127d1abc9412151bfa080a5e4dbbb42670" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x54c17b920191882eb9951e848795da741857d5a7a67e7d789d8176e199867789" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x87e40d68c0083e6bf8d45e752a2acc758c6c9836aa8e8ce258455fec458ceca8" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x4125387e1a0eb4687356f64c9a50066f98c5b944821f88619c1a681b5a35e504" + }, + { + "amount": "60", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0xf09582f3b1951620a457a9a47c0f5cad26b3cf69123214b03d1eb04ae5016f7e" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0xa5151091db6f77b842ae1196ce843bb554fa420f106399d7c114a752d5e7a7c9" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tx": "0x5dee8411a2430323c4ef4d0a484d7edd11780e0d42aae05688e8fa7021201226" + }, + { + "amount": "5", + "user": "0xEb01fF124D71b6C7E6613fd6E0A86c28C733F008", + "tx": "0x1dbbc8c55e6b64081b2336251d1ab30886e0446a885ee7b2fa981897e94a0f6c" + }, + { + "amount": "2", + "user": "0xC5681832099869B7e612bfA8575f1c0ddD25633C", + "tx": "0xf0469364efcc96d5dcefbba7dbdea83a60d27b230fd04c259820e54de6430b46" + }, { "amount": "10", "user": "0x10ea6ae9343A79c48eB5D7e58260a6523D7cb443", @@ -7835,6 +8200,16 @@ "user": "0x3f626D48C2a6104976A03009cFDB4A48F32fd282", "tx": "0xd7ad0cb1b12f2e91b49356296b0c7ccb710d9506838e2c78810b19f8bc1500f0" }, + { + "amount": "6.934043634", + "user": "0xc5467213593778E528f0eB8117cc7AFBC5b7491b", + "tx": "0x54e270a7f0e61ae2d40d911228fe307514aad3b68e024c750b1d888f6e83b962" + }, + { + "amount": "934.2413521038", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", + "tx": "0x61fc3b2fb119429dcd986a206842e588d805cd43554e82eb525b258a12da01ab" + }, { "amount": "7.42538686", "user": "0xc5467213593778E528f0eB8117cc7AFBC5b7491b", @@ -8358,230 +8733,477 @@ "remaining_tokens": "56.4619403225" }, { - "address": "0x10ea6ae9343A79c48eB5D7e58260a6523D7cb443", + "address": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", "deposits": [ { "amount": "10", - "user": "0x10ea6ae9343A79c48eB5D7e58260a6523D7cb443", + "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", "tranche_id": 11, - "tx": "0xd4985ff2951edd44d17a1c008bc6b98c46acb29d147a01e0ee740d53ca29824d" + "tx": "0x2181c9e667a9ced6e635bf55d6baf99c618a074c8396dfa9babc188d117bd52e" + }, + { + "amount": "25", + "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", + "tranche_id": 11, + "tx": "0x33adca302b3a2de09970750557f5e8f334c8687aad15a6edeb73c6f87e825666" + }, + { + "amount": "5", + "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", + "tranche_id": 11, + "tx": "0x0175bbc619a914aa3fd3a251b94f274e4ea35fb61b3db0b6f692dcc94ecab33d" + }, + { + "amount": "10", + "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", + "tranche_id": 11, + "tx": "0x385a9cdbafcf70b921cdf6d719ec2656e84a3809da3bb92e581599793db196b1" + }, + { + "amount": "12", + "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", + "tranche_id": 11, + "tx": "0xa61e5231fed98c0cd79e7d4b6a5436b4d1e2276c85e73b86ac161b2b07271e2b" } ], "withdrawals": [], - "total_tokens": "10", + "total_tokens": "62", "withdrawn_tokens": "0", - "remaining_tokens": "10" + "remaining_tokens": "62" }, { - "address": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "address": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", "deposits": [ + { + "amount": "50", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", + "tranche_id": 11, + "tx": "0xc9811d234d7953e58750f81979eaa9f1e7b6394d9deb6fc720f9a91eace41921" + }, + { + "amount": "30", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", + "tranche_id": 11, + "tx": "0x34eed5fbb4b6ed0e97e6a6375a2f3affa1626fdd6b0125e28e5d1c4c1cc8927f" + }, + { + "amount": "25", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", + "tranche_id": 11, + "tx": "0xad6ea4caf927dcc9f0fe051966ed8ab693a323486d940dcb1934130b89b47763" + }, + { + "amount": "30", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", + "tranche_id": 11, + "tx": "0x019360f772a0a1a4897104573019e185900397f110b614bce55f8ed163cf4c76" + }, + { + "amount": "10", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", + "tranche_id": 11, + "tx": "0xba6b4007a8d1a3104dc31ecd2da6ae2035deb9399567809e010bb046f7d6e18b" + }, { "amount": "125", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", "tranche_id": 11, - "tx": "0xdd93223e890df91055ebdf7bd9f8760d2afd42ce275eabfbc17c58949de6115e" + "tx": "0x4a8ec7fa552b25428c3b1715da0f2a704414ec4f7b6d57220cacee2c140aa674" }, { - "amount": "10", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "amount": "60", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", "tranche_id": 11, - "tx": "0x14e6280813f4f582237b906334332896626001aef9fa4de85d701132d4f40f81" + "tx": "0xbd84b771beca6a6ecc9c45b2062f280e4ed84f59260e0cecdee9e03056dc5ff4" }, { - "amount": "10", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "amount": "30", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", "tranche_id": 11, - "tx": "0xf7a32dd3ed4394eced69324e6596fc4b24692587a432560cb18ed16e2dd57846" - }, - { - "amount": "10", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", - "tranche_id": 11, - "tx": "0x176940f2e8719cfcb6d92f91cb8d16e72e39922a091fa79096b7050055e0a585" - }, - { - "amount": "10", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", - "tranche_id": 11, - "tx": "0x75e2626dae73c4a4eb530d1122bb0df4e62eb6b3d4c78f9e7204f4b78835ab67" - }, - { - "amount": "10", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", - "tranche_id": 11, - "tx": "0x8ea0ca6758000c4420cdc8186c72bdd49ff03a28faf2cf3c8db1da6ce39a5c6b" - }, - { - "amount": "10", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", - "tranche_id": 11, - "tx": "0x8dca5183ea740a79bbd0e8a42e3a0dd73d27dccf44888b1a4e4d5f9f7da8a17c" + "tx": "0x0e11bf5b5a2fe0be0af9e2359bd90f7aab6118ac8f069af9d995b9d637d0a363" }, { "amount": "15", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", "tranche_id": 11, - "tx": "0xab6fd792343bcbe4245691514b2d69c39bec3d06ca3c3e865db30f16713f0674" - }, - { - "amount": "10", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", - "tranche_id": 11, - "tx": "0xa9c4b21a74c13611c7d1b13f28c6c5cf56b1239560ea12258d0dcedbea60a3b7" - }, - { - "amount": "20", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", - "tranche_id": 11, - "tx": "0xd44e0cf8bf7e137ece00943e14ea5e943a4cb62c442181dec46fd4392248ffba" - }, - { - "amount": "20", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", - "tranche_id": 11, - "tx": "0x42564922ae248d185506714b323b925d3b4a606f3b1da0ebdd1cd8fd9ad5cd9f" + "tx": "0x5481ffd2e3ccb5d711546e0110b518792e28e33aaeac05670f01c2a454783f9b" }, { "amount": "25", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", "tranche_id": 11, - "tx": "0x2a04704dc42ffc7450f4d52a0ae679ff1cdcdc7e39d5c558706dcdb43b3d0b7a" + "tx": "0xc3e685a0b86ebc7359b762b4ae78e5fa083cc1be5ebfb8cc7f0c64d79a1adae2" }, { "amount": "10", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", "tranche_id": 11, - "tx": "0x2ee11a240560e779bd3329add58fae21543bb92efa0b32fcbff9d70cdaad90ff" + "tx": "0x3d47cb596bf407d6b1102c8b72da2384f9ab408fc62f5cbc9ba7367bae59e93e" + }, + { + "amount": "50", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", + "tranche_id": 11, + "tx": "0x88370b3b7e41f853f88fac2076eb5326e75c512faac64688f02d95818257dc35" + }, + { + "amount": "100", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", + "tranche_id": 11, + "tx": "0xafb050a044f13a7de0b5c523361e630284ff405496397b5428e8682c0ee1cff4" }, { "amount": "10", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", "tranche_id": 11, - "tx": "0xa445ed2945a22f23b687326eb98c681b974919602a16d935fc444eba2879e016" + "tx": "0x5a22ae68ae70def89d0df82d2a61f613aa3311970e6aa1877e777812d251ae00" }, { "amount": "10", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", "tranche_id": 11, - "tx": "0x462b488229f58022aff04043a9de1a35d208ab01a5a011b2de196d7256069bea" + "tx": "0xb5ce5dbf53dc455d902f8be045d73604ac520aad1819209281568c36f2a67fb8" + }, + { + "amount": "35", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", + "tranche_id": 11, + "tx": "0x29c7f3a1d2cb3d38c1a71ff16ae5a49ec04396efcf3b5a5af5a7b7644e2790b9" + }, + { + "amount": "300", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", + "tranche_id": 11, + "tx": "0x34f9438d653258c7f2a13d5b9895de67e071db8f4e6f4f871b41700537b78296" + }, + { + "amount": "80", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", + "tranche_id": 11, + "tx": "0x4841c1749a749f260071c6083a57fd4ac81a1f89c6ae5fdb3923c7dc2ccea784" + }, + { + "amount": "10", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", + "tranche_id": 11, + "tx": "0xb3effa4c0d44cc0618748d64a49772033316fd416b4543fef7e64a4995123234" + }, + { + "amount": "80", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", + "tranche_id": 11, + "tx": "0x7ae3f7b39317bbe75034811f513f27a895cdacc645d6ea528c1230bb7713ddef" + }, + { + "amount": "30", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", + "tranche_id": 11, + "tx": "0x9af4905761376f50e57da3a5c5fc976d09cf171d3e160dcf16f833971d5c4ef4" }, { "amount": "25", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", "tranche_id": 11, - "tx": "0xc0fe44e4a9282083004094917408f70512d9ab4f9c9a2b82cbb1734d96fb5cb2" + "tx": "0x7a19b511ce85a24a6a67526c4037abe394bd58552ef66efdcc5c1473d7ca2db5" }, { - "amount": "20", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "amount": "30", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", "tranche_id": 11, - "tx": "0xcd6b914287213b5b755a47fbe810866dfad4da41662f788083a3db2e2bd99521" - }, - { - "amount": "20", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", - "tranche_id": 11, - "tx": "0xe870f4d598178db89778b38b63a5c6999f93909156e2362885afafedfd3712a3" - }, - { - "amount": "15", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", - "tranche_id": 11, - "tx": "0x20668d3d5013cf8adb2f3ae5a5181375e3761087f61eee07fedc24ca52e81d4f" + "tx": "0xf4c9400f35f2c0791980f2a40e944225cdeb90cb61336e145f9fc49136134591" }, { "amount": "10", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", "tranche_id": 11, - "tx": "0x77e168dd4aa19951a37db0335cc42277d9a721edcac58d5971ad33e6f28bf8d4" - }, - { - "amount": "15", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", - "tranche_id": 11, - "tx": "0xaa15d9f4499b758e55c796289ce043b7139a5727bac42db546a348df89160f7e" - }, - { - "amount": "10", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", - "tranche_id": 11, - "tx": "0x5cf4693ea94e12bd241c27839a3700b9d7cb066db413d49e3c0d06c614845a97" - }, - { - "amount": "10", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", - "tranche_id": 11, - "tx": "0x9d655eaa5380d697057c5929b4a27f9e40f6ce3a9bc8e214497d09be22f87eb2" - }, - { - "amount": "10", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", - "tranche_id": 11, - "tx": "0xd556b0e1093dab75399db31dae6784cca9f75bcd99fc56609609e8246b5dcf2e" - }, - { - "amount": "10", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", - "tranche_id": 11, - "tx": "0x36948acdf11166d0d9bc76ae28caeff547641c478dc7b5e44da006c047ec98fc" - }, - { - "amount": "25", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", - "tranche_id": 11, - "tx": "0xc1f24872940992a959de4840bfc17875bacefc9c483a7c5903a5d45fad60be53" - }, - { - "amount": "20", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", - "tranche_id": 11, - "tx": "0x277db93ba1f581b823a8fa9cd9253acf885cc2f2199f4733f6a4a4866b6af118" - }, - { - "amount": "10", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", - "tranche_id": 11, - "tx": "0x709e0af1390009678489be8c53aa0a4500d85412dc01d265e5a4845c9eb1d0d5" - }, - { - "amount": "10", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", - "tranche_id": 11, - "tx": "0x43a842404cd30d2eb924b69bf80d69274fd3f4c985b6d36fb3f04a43c6097e31" - }, - { - "amount": "10", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", - "tranche_id": 11, - "tx": "0x1f9a41c0e60bfbec39cee5368ae3bed48ed18e2289500381ddabc7d81e7e7ea7" - }, - { - "amount": "10", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", - "tranche_id": 11, - "tx": "0xc705e2388898c6d4f130996344488940929c3867bd4c4bae550c6234dda720c5" - }, - { - "amount": "10", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", - "tranche_id": 11, - "tx": "0xa26b2b503d99be5ce617296d66451a1f3759c234fb456daea66d1c3e9aae4324" - }, - { - "amount": "20", - "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", - "tranche_id": 11, - "tx": "0x047de1655a50e839e4e271c9efab3a3b341cb865b5872832920d49d2cbf619b3" + "tx": "0x32dc4ad84f622b72d89d01b2411c999ded247ed19821418691957d9f90da180a" } ], - "withdrawals": [], - "total_tokens": "565", - "withdrawn_tokens": "0", - "remaining_tokens": "565" + "withdrawals": [ + { + "amount": "934.2413521038", + "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", + "tranche_id": 11, + "tx": "0x61fc3b2fb119429dcd986a206842e588d805cd43554e82eb525b258a12da01ab" + } + ], + "total_tokens": "1180", + "withdrawn_tokens": "934.2413521038", + "remaining_tokens": "245.7586478962" }, { "address": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", "deposits": [ + { + "amount": "80", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x144fdab513f0d02d30580916f13428037645284c8375264bcfde25f1f43da727" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x12f066a3257c5db7486442a56d4aa03d90872a0df86a27edcc4cd79f1c77d304" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0xea888c94889a86035a8579b80780f19ce7d1ba9167220ab7959cbb67db0f442b" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0xc10d700802fd8565d14b9196bfec6c715fd47792f31c5574e1a73385737e1ab6" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x6a4809778f0afd2433a7ac68e2f93a77d1a59ce8bb83ed33b4963c1f83f2fbe1" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x4ada6e4b4c9102c51035e344a451d4090b33988c73c1b2d0279d29b64c5f6a8f" + }, + { + "amount": "25", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x03055b139a0b259f15a5de400a174d8a5b13edce472913f5a4c4d9e4f75bf094" + }, + { + "amount": "50", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x9d99a7d24c47b53e55c916199a6d1a16d44b5b0263f048ef7caba303ea9a175b" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x21fb56c9c05a368d493ea2f457e2161b3ae97fe8e5b0f2ba023bb2b5e2ef4f6b" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x6b1403ce474b43c23ce294a5284ffd20443127d0c078ca3dfaad28e589e7d22a" + }, + { + "amount": "60", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x01a4e44b672d4f9e5776220c39623b2f4550ac2d49ccb63c6eb0568b412d748d" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0xbf2c58ed1686284344c6fc807ae1ba193bc777ef385e8b94ba90355d02135e04" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x39a61c11f107630a77b5b05a15facd2a1036376614d16fbbd8037af6fba3ed1e" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0xb83fa14f097dbed390c720728a4fe4a1582c5d84593fd3c3f0deee41c2531d3a" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x3c409e5951f2dcb98c9ca87d79f6efd63338ccabcbd2316b0936673e8146934c" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x5c7178f6e6cd9e617f4a3ea77afe81f44e4be8e1f1668e19cae0731cf653dfd0" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x220198dfd99d93f2e99a428b22978e4cb245fd60f39ee5025de82394a2efc8b7" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0xee76592fee40cabc6c3dcfef1ee3bc4cdbee84b33da22d3e5f0f898ff1700cec" + }, + { + "amount": "60", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x107000169be1190733ddc2c688b3525177774e73d6283fdc82fa69a8b47db14e" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0xe6c6200c701274897c84cec2c8903645d09906fd482a5ed34234938c44605d30" + }, + { + "amount": "60", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0xe03d16bb9ffa3915fee17f3a035996f8e861a6d23fdc0d09cf580be1931bd6f1" + }, + { + "amount": "60", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0xaf78becedad1aa9c115a1a03264d619328b107ed56a28a098c106956e133a12b" + }, + { + "amount": "60", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x806dd5dca438e20814b112dd0fdab9d471653d154885a7b6c2600714f7372009" + }, + { + "amount": "100", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x8bc8a476f85a0a5b6031f1cfe130a8eef277e6ba7925ca349898881af90ab758" + }, + { + "amount": "60", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x2f41cf1f9ba0fd2fe32a04332c2f09754fa6a2f972214d8bdccc2e46078452dd" + }, + { + "amount": "60", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x97dcdb22db0931d19019a05c811e6ae693de93618a065d824c221c91d8f5a0c9" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x247c98e6e60949d8b40b25c6b9d48f5671a1a2d9e99d388a7148a8e36ab92094" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x6863c530428e1eeb1e56ff2c9eca100e92fc22c30bcfed9e31a9d96091dfe9ca" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x18504853121d07043d9426b3e40d2eda82b720e3ce62486a14aff5663162ac8d" + }, + { + "amount": "60", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x60ebbb3f6159878255808ca6649811a1c2a71aa52655c0b9b6cbf34b6c1498e3" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0xc30c4ca9d6d63d0aa504b84f960511fdbb2fc167c5a99d2d41597475a12f9c30" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x0d4211f02bc48faffed2ca2df7aed6c3a4ce7245982d19321221d9b814f1cf2c" + }, + { + "amount": "60", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x53e21110f14d657115d7338278c2fba288179956109996fbbab745603d91f6f3" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x2074445fba00ad2c436aec6dd4116ed46db62ff39367f7dbd6036d4e77387a95" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0xae2dec6e0bdb3429beaf88ad24c5be8e99c9abd640a53d3cf350eed5dfefba4f" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x05e15975b81a1195ed61b7d2697be6ed52e847d433a4044ac0b4cc66bb267565" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x4ec20b301c142f24d3b3e4efb70158bbe4635794b8fefacec644b6a138f2ccf1" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0xa7f84b8f5f5e10d93ef7194fa3bb9ee91fe2a6bead0a015f8be06241bc9f1fc8" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x1ed674d029c7ede7dbfd81e19048bf127d1abc9412151bfa080a5e4dbbb42670" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x54c17b920191882eb9951e848795da741857d5a7a67e7d789d8176e199867789" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x87e40d68c0083e6bf8d45e752a2acc758c6c9836aa8e8ce258455fec458ceca8" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x4125387e1a0eb4687356f64c9a50066f98c5b944821f88619c1a681b5a35e504" + }, + { + "amount": "60", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0xf09582f3b1951620a457a9a47c0f5cad26b3cf69123214b03d1eb04ae5016f7e" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0xa5151091db6f77b842ae1196ce843bb554fa420f106399d7c114a752d5e7a7c9" + }, + { + "amount": "30", + "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", + "tranche_id": 11, + "tx": "0x5dee8411a2430323c4ef4d0a484d7edd11780e0d42aae05688e8fa7021201226" + }, { "amount": "125", "user": "0xBF8C00ee066421c2c6daE50835c2a7AD939db752", @@ -9250,78 +9872,261 @@ } ], "withdrawals": [], - "total_tokens": "3755", + "total_tokens": "5540", "withdrawn_tokens": "0", - "remaining_tokens": "3755" + "remaining_tokens": "5540" }, { - "address": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", + "address": "0xEb01fF124D71b6C7E6613fd6E0A86c28C733F008", "deposits": [ { - "amount": "10", - "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", + "amount": "5", + "user": "0xEb01fF124D71b6C7E6613fd6E0A86c28C733F008", "tranche_id": 11, - "tx": "0xb5ce5dbf53dc455d902f8be045d73604ac520aad1819209281568c36f2a67fb8" - }, - { - "amount": "35", - "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", - "tranche_id": 11, - "tx": "0x29c7f3a1d2cb3d38c1a71ff16ae5a49ec04396efcf3b5a5af5a7b7644e2790b9" - }, - { - "amount": "300", - "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", - "tranche_id": 11, - "tx": "0x34f9438d653258c7f2a13d5b9895de67e071db8f4e6f4f871b41700537b78296" - }, - { - "amount": "80", - "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", - "tranche_id": 11, - "tx": "0x4841c1749a749f260071c6083a57fd4ac81a1f89c6ae5fdb3923c7dc2ccea784" - }, - { - "amount": "10", - "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", - "tranche_id": 11, - "tx": "0xb3effa4c0d44cc0618748d64a49772033316fd416b4543fef7e64a4995123234" - }, - { - "amount": "80", - "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", - "tranche_id": 11, - "tx": "0x7ae3f7b39317bbe75034811f513f27a895cdacc645d6ea528c1230bb7713ddef" - }, - { - "amount": "30", - "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", - "tranche_id": 11, - "tx": "0x9af4905761376f50e57da3a5c5fc976d09cf171d3e160dcf16f833971d5c4ef4" - }, - { - "amount": "25", - "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", - "tranche_id": 11, - "tx": "0x7a19b511ce85a24a6a67526c4037abe394bd58552ef66efdcc5c1473d7ca2db5" - }, - { - "amount": "30", - "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", - "tranche_id": 11, - "tx": "0xf4c9400f35f2c0791980f2a40e944225cdeb90cb61336e145f9fc49136134591" - }, - { - "amount": "10", - "user": "0x4cf8879dC68ebe9F003E6231CB8B704FAbEA8d9c", - "tranche_id": 11, - "tx": "0x32dc4ad84f622b72d89d01b2411c999ded247ed19821418691957d9f90da180a" + "tx": "0x1dbbc8c55e6b64081b2336251d1ab30886e0446a885ee7b2fa981897e94a0f6c" } ], "withdrawals": [], - "total_tokens": "610", + "total_tokens": "5", "withdrawn_tokens": "0", - "remaining_tokens": "610" + "remaining_tokens": "5" + }, + { + "address": "0xC5681832099869B7e612bfA8575f1c0ddD25633C", + "deposits": [ + { + "amount": "2", + "user": "0xC5681832099869B7e612bfA8575f1c0ddD25633C", + "tranche_id": 11, + "tx": "0xf0469364efcc96d5dcefbba7dbdea83a60d27b230fd04c259820e54de6430b46" + } + ], + "withdrawals": [], + "total_tokens": "2", + "withdrawn_tokens": "0", + "remaining_tokens": "2" + }, + { + "address": "0x10ea6ae9343A79c48eB5D7e58260a6523D7cb443", + "deposits": [ + { + "amount": "10", + "user": "0x10ea6ae9343A79c48eB5D7e58260a6523D7cb443", + "tranche_id": 11, + "tx": "0xd4985ff2951edd44d17a1c008bc6b98c46acb29d147a01e0ee740d53ca29824d" + } + ], + "withdrawals": [], + "total_tokens": "10", + "withdrawn_tokens": "0", + "remaining_tokens": "10" + }, + { + "address": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "deposits": [ + { + "amount": "125", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0xdd93223e890df91055ebdf7bd9f8760d2afd42ce275eabfbc17c58949de6115e" + }, + { + "amount": "10", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0x14e6280813f4f582237b906334332896626001aef9fa4de85d701132d4f40f81" + }, + { + "amount": "10", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0xf7a32dd3ed4394eced69324e6596fc4b24692587a432560cb18ed16e2dd57846" + }, + { + "amount": "10", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0x176940f2e8719cfcb6d92f91cb8d16e72e39922a091fa79096b7050055e0a585" + }, + { + "amount": "10", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0x75e2626dae73c4a4eb530d1122bb0df4e62eb6b3d4c78f9e7204f4b78835ab67" + }, + { + "amount": "10", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0x8ea0ca6758000c4420cdc8186c72bdd49ff03a28faf2cf3c8db1da6ce39a5c6b" + }, + { + "amount": "10", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0x8dca5183ea740a79bbd0e8a42e3a0dd73d27dccf44888b1a4e4d5f9f7da8a17c" + }, + { + "amount": "15", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0xab6fd792343bcbe4245691514b2d69c39bec3d06ca3c3e865db30f16713f0674" + }, + { + "amount": "10", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0xa9c4b21a74c13611c7d1b13f28c6c5cf56b1239560ea12258d0dcedbea60a3b7" + }, + { + "amount": "20", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0xd44e0cf8bf7e137ece00943e14ea5e943a4cb62c442181dec46fd4392248ffba" + }, + { + "amount": "20", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0x42564922ae248d185506714b323b925d3b4a606f3b1da0ebdd1cd8fd9ad5cd9f" + }, + { + "amount": "25", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0x2a04704dc42ffc7450f4d52a0ae679ff1cdcdc7e39d5c558706dcdb43b3d0b7a" + }, + { + "amount": "10", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0x2ee11a240560e779bd3329add58fae21543bb92efa0b32fcbff9d70cdaad90ff" + }, + { + "amount": "10", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0xa445ed2945a22f23b687326eb98c681b974919602a16d935fc444eba2879e016" + }, + { + "amount": "10", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0x462b488229f58022aff04043a9de1a35d208ab01a5a011b2de196d7256069bea" + }, + { + "amount": "25", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0xc0fe44e4a9282083004094917408f70512d9ab4f9c9a2b82cbb1734d96fb5cb2" + }, + { + "amount": "20", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0xcd6b914287213b5b755a47fbe810866dfad4da41662f788083a3db2e2bd99521" + }, + { + "amount": "20", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0xe870f4d598178db89778b38b63a5c6999f93909156e2362885afafedfd3712a3" + }, + { + "amount": "15", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0x20668d3d5013cf8adb2f3ae5a5181375e3761087f61eee07fedc24ca52e81d4f" + }, + { + "amount": "10", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0x77e168dd4aa19951a37db0335cc42277d9a721edcac58d5971ad33e6f28bf8d4" + }, + { + "amount": "15", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0xaa15d9f4499b758e55c796289ce043b7139a5727bac42db546a348df89160f7e" + }, + { + "amount": "10", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0x5cf4693ea94e12bd241c27839a3700b9d7cb066db413d49e3c0d06c614845a97" + }, + { + "amount": "10", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0x9d655eaa5380d697057c5929b4a27f9e40f6ce3a9bc8e214497d09be22f87eb2" + }, + { + "amount": "10", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0xd556b0e1093dab75399db31dae6784cca9f75bcd99fc56609609e8246b5dcf2e" + }, + { + "amount": "10", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0x36948acdf11166d0d9bc76ae28caeff547641c478dc7b5e44da006c047ec98fc" + }, + { + "amount": "25", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0xc1f24872940992a959de4840bfc17875bacefc9c483a7c5903a5d45fad60be53" + }, + { + "amount": "20", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0x277db93ba1f581b823a8fa9cd9253acf885cc2f2199f4733f6a4a4866b6af118" + }, + { + "amount": "10", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0x709e0af1390009678489be8c53aa0a4500d85412dc01d265e5a4845c9eb1d0d5" + }, + { + "amount": "10", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0x43a842404cd30d2eb924b69bf80d69274fd3f4c985b6d36fb3f04a43c6097e31" + }, + { + "amount": "10", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0x1f9a41c0e60bfbec39cee5368ae3bed48ed18e2289500381ddabc7d81e7e7ea7" + }, + { + "amount": "10", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0xc705e2388898c6d4f130996344488940929c3867bd4c4bae550c6234dda720c5" + }, + { + "amount": "10", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0xa26b2b503d99be5ce617296d66451a1f3759c234fb456daea66d1c3e9aae4324" + }, + { + "amount": "20", + "user": "0xF488F160Df1975F9D032568f0f60c485f46E744f", + "tranche_id": 11, + "tx": "0x047de1655a50e839e4e271c9efab3a3b341cb865b5872832920d49d2cbf619b3" + } + ], + "withdrawals": [], + "total_tokens": "565", + "withdrawn_tokens": "0", + "remaining_tokens": "565" }, { "address": "0xc6A53Dbb3423555C990Fc842A28CF58edC35DC73", @@ -10654,39 +11459,6 @@ "withdrawn_tokens": "0", "remaining_tokens": "14" }, - { - "address": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", - "deposits": [ - { - "amount": "25", - "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", - "tranche_id": 11, - "tx": "0x33adca302b3a2de09970750557f5e8f334c8687aad15a6edeb73c6f87e825666" - }, - { - "amount": "5", - "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", - "tranche_id": 11, - "tx": "0x0175bbc619a914aa3fd3a251b94f274e4ea35fb61b3db0b6f692dcc94ecab33d" - }, - { - "amount": "10", - "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", - "tranche_id": 11, - "tx": "0x385a9cdbafcf70b921cdf6d719ec2656e84a3809da3bb92e581599793db196b1" - }, - { - "amount": "12", - "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", - "tranche_id": 11, - "tx": "0xa61e5231fed98c0cd79e7d4b6a5436b4d1e2276c85e73b86ac161b2b07271e2b" - } - ], - "withdrawals": [], - "total_tokens": "52", - "withdrawn_tokens": "0", - "remaining_tokens": "52" - }, { "address": "0x2EF021a31E666Bd0D3Fb39771B7A70C55d3B3749", "deposits": [ @@ -13121,6 +13893,12 @@ "tranche_id": 11, "tx": "0xce562db43fe92ccd76b20c462f4f680336542c064020dfb646512994c4f229d9" }, + { + "amount": "6.934043634", + "user": "0xc5467213593778E528f0eB8117cc7AFBC5b7491b", + "tranche_id": 11, + "tx": "0x54e270a7f0e61ae2d40d911228fe307514aad3b68e024c750b1d888f6e83b962" + }, { "amount": "7.42538686", "user": "0xc5467213593778E528f0eB8117cc7AFBC5b7491b", @@ -13165,8 +13943,8 @@ } ], "total_tokens": "200", - "withdrawn_tokens": "150.93786149", - "remaining_tokens": "49.06213851" + "withdrawn_tokens": "157.871905124", + "remaining_tokens": "42.128094876" }, { "address": "0x1775cc97E5c05Fde8b571ef75CA52d0A9ff19025", @@ -13191,7 +13969,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "3732368.4671", "total_removed": "74162.9780761646031", - "locked_amount": "2912889.04981089405546711373", + "locked_amount": "2848249.88555518391350126666", "deposits": [ { "amount": "1998.95815", @@ -13903,8 +14681,8 @@ "tranche_start": "2022-06-05T00:00:00.000Z", "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "15788853.065470999700000001", - "total_removed": "2446.31552516990115", - "locked_amount": "15548591.8682663462484073363217811693876723", + "total_removed": "5344.1456869113936", + "locked_amount": "15320559.0022388444739507838954571001919437", "deposits": [ { "amount": "16249.93", @@ -14403,6 +15181,36 @@ "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", "tx": "0x60d4969894932ea5611b8a9d98e9f4a857907be51879c6cfa469b42f4f289921" }, + { + "amount": "792.85131542031795", + "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", + "tx": "0xb574abb365ba78624a37ceab7361886c7b76974576bcdc6f159be5e3ca43e4f5" + }, + { + "amount": "249.424244395795125", + "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", + "tx": "0xbfbd3ac491bbdda89de7ab2bea2c2b045bc419b1c62a9f1f9a5064aff3cb8dc7" + }, + { + "amount": "213.095006394357975", + "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", + "tx": "0xdef896bbac2a234d23cacad915dd65ff5709ddd0190a42c4b0c4a70641efcdd5" + }, + { + "amount": "337.926566557345125", + "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", + "tx": "0x8f8c9351f37fe220019362cf1b749845f108733281b300f268da302b300f6f23" + }, + { + "amount": "705.172691192196375", + "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", + "tx": "0xdb8475d94ee473c40d4badd656a56496587a4afbef1ad7dcdd7f75de25eec1cd" + }, + { + "amount": "599.3603377814799", + "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", + "tx": "0x42428fc448690e236a517d10ecc478b21a8519a8305c56a04c76ddbafe5764f8" + }, { "amount": "0", "user": "0x4527F5A129f3Ab7c88c5863F8AB9a708928Fe702", @@ -14459,11 +15267,47 @@ "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", "tranche_id": 2, "tx": "0x60d4969894932ea5611b8a9d98e9f4a857907be51879c6cfa469b42f4f289921" + }, + { + "amount": "792.85131542031795", + "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", + "tranche_id": 2, + "tx": "0xb574abb365ba78624a37ceab7361886c7b76974576bcdc6f159be5e3ca43e4f5" + }, + { + "amount": "249.424244395795125", + "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", + "tranche_id": 2, + "tx": "0xbfbd3ac491bbdda89de7ab2bea2c2b045bc419b1c62a9f1f9a5064aff3cb8dc7" + }, + { + "amount": "213.095006394357975", + "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", + "tranche_id": 2, + "tx": "0xdef896bbac2a234d23cacad915dd65ff5709ddd0190a42c4b0c4a70641efcdd5" + }, + { + "amount": "337.926566557345125", + "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", + "tranche_id": 2, + "tx": "0x8f8c9351f37fe220019362cf1b749845f108733281b300f268da302b300f6f23" + }, + { + "amount": "705.172691192196375", + "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", + "tranche_id": 2, + "tx": "0xdb8475d94ee473c40d4badd656a56496587a4afbef1ad7dcdd7f75de25eec1cd" + }, + { + "amount": "599.3603377814799", + "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", + "tranche_id": 2, + "tx": "0x42428fc448690e236a517d10ecc478b21a8519a8305c56a04c76ddbafe5764f8" } ], "total_tokens": "194999.1675", - "withdrawn_tokens": "2446.31552516990115", - "remaining_tokens": "192552.85197483009885" + "withdrawn_tokens": "5344.1456869113936", + "remaining_tokens": "189655.0218130886064" }, { "address": "0x89051CAb67Bc7F8CC44F7e270c6EDaf1EC57676c", @@ -15867,8 +16711,8 @@ "tranche_start": "2021-11-05T00:00:00.000Z", "tranche_end": "2023-05-05T00:00:00.000Z", "total_added": "14597706.0446472999", - "total_removed": "2062546.433079096801723272", - "locked_amount": "8706783.24098689091258893352563194", + "total_removed": "2067913.758606456406425022", + "locked_amount": "8495181.42411704905218150751009554", "deposits": [ { "amount": "129284.449", @@ -16127,6 +16971,56 @@ "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", "tx": "0x4f9b8f6445ceef34a9ee572d5879fe38ba2c84548f843e9d8b511e0c3017479a" }, + { + "amount": "762.14315747753009125", + "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", + "tx": "0x7070edafffddcb6f5f20403b69d6992ea32cea3be805b04c4cdf01085758130e" + }, + { + "amount": "390.279111258468861", + "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", + "tx": "0x4b28a1d4ce8339e5bd33a7b1df0a1472f20678d777b165c164426a4821be7908" + }, + { + "amount": "211.09953052864770575", + "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", + "tx": "0xb54d1288f1f23e121f7eee3a5925d3993897f4029e2cab38e8da643ca54b04c8" + }, + { + "amount": "404.05805750245924625", + "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", + "tx": "0x1ef2eeef8f726e7df96b46b1bc4d91c267ac41de6c36f3a14625ab06ad1b060b" + }, + { + "amount": "619.93073756880993025", + "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", + "tx": "0xba1a9147add6061d481a7a7262629637414958f1c7e596f8dabbb6a7c4688c05" + }, + { + "amount": "682.0121208642298245", + "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", + "tx": "0xbaaf69fbc4cb62b8325ab2b584c87433e6b41c7a3ceae53223afce13980c106b" + }, + { + "amount": "610.03425719822139125", + "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", + "tx": "0x7b41f591074014d6205f02b3485c026e994272c0e7883bf14ca99308adcbd524" + }, + { + "amount": "323.05917388628812175", + "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", + "tx": "0xb65482884cb2f2fb8129fe8a3b4c4be89fc28046d89beba1887bded0b71b994d" + }, + { + "amount": "802.7872398542216805", + "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", + "tx": "0xc86b2534512afda6e2aeb5ddc4998a877fadec3e647314b788c6e267715c60f6" + }, + { + "amount": "561.92214122072784925", + "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", + "tx": "0x7e74f16afb7243b43811fd6b65a111647c9d1fdcf51ab1b1c13e57383ab894e6" + }, { "amount": "1384.357697656285885", "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", @@ -17657,6 +18551,66 @@ "tranche_id": 3, "tx": "0x4f9b8f6445ceef34a9ee572d5879fe38ba2c84548f843e9d8b511e0c3017479a" }, + { + "amount": "762.14315747753009125", + "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", + "tranche_id": 3, + "tx": "0x7070edafffddcb6f5f20403b69d6992ea32cea3be805b04c4cdf01085758130e" + }, + { + "amount": "390.279111258468861", + "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", + "tranche_id": 3, + "tx": "0x4b28a1d4ce8339e5bd33a7b1df0a1472f20678d777b165c164426a4821be7908" + }, + { + "amount": "211.09953052864770575", + "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", + "tranche_id": 3, + "tx": "0xb54d1288f1f23e121f7eee3a5925d3993897f4029e2cab38e8da643ca54b04c8" + }, + { + "amount": "404.05805750245924625", + "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", + "tranche_id": 3, + "tx": "0x1ef2eeef8f726e7df96b46b1bc4d91c267ac41de6c36f3a14625ab06ad1b060b" + }, + { + "amount": "619.93073756880993025", + "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", + "tranche_id": 3, + "tx": "0xba1a9147add6061d481a7a7262629637414958f1c7e596f8dabbb6a7c4688c05" + }, + { + "amount": "682.0121208642298245", + "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", + "tranche_id": 3, + "tx": "0xbaaf69fbc4cb62b8325ab2b584c87433e6b41c7a3ceae53223afce13980c106b" + }, + { + "amount": "610.03425719822139125", + "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", + "tranche_id": 3, + "tx": "0x7b41f591074014d6205f02b3485c026e994272c0e7883bf14ca99308adcbd524" + }, + { + "amount": "323.05917388628812175", + "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", + "tranche_id": 3, + "tx": "0xb65482884cb2f2fb8129fe8a3b4c4be89fc28046d89beba1887bded0b71b994d" + }, + { + "amount": "802.7872398542216805", + "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", + "tranche_id": 3, + "tx": "0xc86b2534512afda6e2aeb5ddc4998a877fadec3e647314b788c6e267715c60f6" + }, + { + "amount": "561.92214122072784925", + "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", + "tranche_id": 3, + "tx": "0x7e74f16afb7243b43811fd6b65a111647c9d1fdcf51ab1b1c13e57383ab894e6" + }, { "amount": "1384.357697656285885", "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", @@ -18781,8 +19735,8 @@ } ], "total_tokens": "359123.469575", - "withdrawn_tokens": "144513.518019880266764", - "remaining_tokens": "214609.951555119733236" + "withdrawn_tokens": "149880.84354723987146575", + "remaining_tokens": "209242.62602776012853425" }, { "address": "0xBdd412797c1B78535Afc5F71503b91fAbD0160fB", @@ -19772,8 +20726,8 @@ "tranche_start": "2021-10-05T00:00:00.000Z", "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "5778205.3912159303", - "total_removed": "1354392.149662275357179742", - "locked_amount": "3123199.31316036463337626492844228", + "total_removed": "1386457.324778695108317227", + "locked_amount": "3039594.15555795680959140026270059", "deposits": [ { "amount": "552496.6455", @@ -19922,6 +20876,26 @@ "user": "0xafa64cCa337eFEE0AD827F6C2684e69275226e90", "tx": "0xcaaf2eae83061031d9ffb54f095e12ea6bf1438a5d83c8ef48bd7b73aa67c0c1" }, + { + "amount": "4384.194511361846541", + "user": "0xafa64cCa337eFEE0AD827F6C2684e69275226e90", + "tx": "0xd104849ed62896f57ae39e15e6ea53a8c03a2fa1845783ae1f658f503f4125ca" + }, + { + "amount": "17683.07845319664597116", + "user": "0xC24da173A250e9Ca5c54870639EbE5f88be5102d", + "tx": "0x5512af380da51c0d69e7a804671edfe7eeff24557a880fcd28778084b0fc5a64" + }, + { + "amount": "3536.43115201266299695", + "user": "0x6ae83EAB68b7112BaD5AfD72d6B24546AbFF137D", + "tx": "0x840d263391eff9d07ab21568499738eb4110ddbce0134b74c1eb84e80dab0c3c" + }, + { + "amount": "6461.470999848595628375", + "user": "0x1b4B2372462b391006FAc69f09066Ae8504D75eC", + "tx": "0x07ad8d7fe6c28b50ce01ae691b1499d0dc62460a083e8b2556e7765d741f6460" + }, { "amount": "32683.576612762644585", "user": "0x91715128a71c9C734CDC20E5EdEEeA02E72e428E", @@ -20477,6 +21451,12 @@ } ], "withdrawals": [ + { + "amount": "3536.43115201266299695", + "user": "0x6ae83EAB68b7112BaD5AfD72d6B24546AbFF137D", + "tranche_id": 4, + "tx": "0x840d263391eff9d07ab21568499738eb4110ddbce0134b74c1eb84e80dab0c3c" + }, { "amount": "7394.9490651720719963", "user": "0x6ae83EAB68b7112BaD5AfD72d6B24546AbFF137D", @@ -20503,8 +21483,8 @@ } ], "total_tokens": "92082.572555", - "withdrawn_tokens": "39177.06754763348825205", - "remaining_tokens": "52905.50500736651174795" + "withdrawn_tokens": "42713.498699646151249", + "remaining_tokens": "49369.073855353848751" }, { "address": "0x1dC9B91DE003fd503F25cB5d114cf0fc68F7aFe6", @@ -20532,6 +21512,12 @@ } ], "withdrawals": [ + { + "amount": "17683.07845319664597116", + "user": "0xC24da173A250e9Ca5c54870639EbE5f88be5102d", + "tranche_id": 4, + "tx": "0x5512af380da51c0d69e7a804671edfe7eeff24557a880fcd28778084b0fc5a64" + }, { "amount": "36974.338297399301449362", "user": "0xC24da173A250e9Ca5c54870639EbE5f88be5102d", @@ -20564,8 +21550,8 @@ } ], "total_tokens": "460415.072915097", - "withdrawn_tokens": "195884.514752911531131742", - "remaining_tokens": "264530.558162185468868258" + "withdrawn_tokens": "213567.593206108177102902", + "remaining_tokens": "246847.479708988822897098" }, { "address": "0xd66e4853c0880df150e7329974715BFC8d2da47D", @@ -20719,6 +21705,12 @@ "tranche_id": 4, "tx": "0xcaaf2eae83061031d9ffb54f095e12ea6bf1438a5d83c8ef48bd7b73aa67c0c1" }, + { + "amount": "4384.194511361846541", + "user": "0xafa64cCa337eFEE0AD827F6C2684e69275226e90", + "tranche_id": 4, + "tx": "0xd104849ed62896f57ae39e15e6ea53a8c03a2fa1845783ae1f658f503f4125ca" + }, { "amount": "19314.782639120135472", "user": "0xafa64cCa337eFEE0AD827F6C2684e69275226e90", @@ -20769,8 +21761,8 @@ } ], "total_tokens": "331498.5873", - "withdrawn_tokens": "148830.82785689994018", - "remaining_tokens": "182667.75944310005982" + "withdrawn_tokens": "153215.022368261786721", + "remaining_tokens": "178283.564931738213279" }, { "address": "0x16da609341ed67750A8BCC5AAa2005471006Cd77", @@ -20797,10 +21789,17 @@ "tx": "0x3e33dc7f127951509240d5e96056af80de79ef0b23867b5bc98880ac557c0821" } ], - "withdrawals": [], + "withdrawals": [ + { + "amount": "6461.470999848595628375", + "user": "0x1b4B2372462b391006FAc69f09066Ae8504D75eC", + "tranche_id": 4, + "tx": "0x07ad8d7fe6c28b50ce01ae691b1499d0dc62460a083e8b2556e7765d741f6460" + } + ], "total_tokens": "13812.4411375", - "withdrawn_tokens": "0", - "remaining_tokens": "13812.4411375" + "withdrawn_tokens": "6461.470999848595628375", + "remaining_tokens": "7350.970137651404371625" }, { "address": "0x39fEc2e2beaB6a63c1E763D0dc4120AF60BEe39F", @@ -20840,7 +21839,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "472355.6199999996", "total_removed": "0", - "locked_amount": "461563.92072621153998945052663624", + "locked_amount": "451321.47565667900568555782445456", "deposits": [ { "amount": "3000", @@ -46493,7 +47492,7 @@ "tranche_start": "2021-12-05T00:00:00.000Z", "tranche_end": "2022-06-05T00:00:00.000Z", "total_added": "171288.42", - "total_removed": "25913.4485680598377", + "total_removed": "28935.5825162206377", "locked_amount": "0", "deposits": [ { @@ -50718,6 +51717,11 @@ } ], "withdrawals": [ + { + "amount": "60.4448387275", + "user": "0xEe3183EcE9ee7d73Fb7bA7F4eB262A2dE68C42B0", + "tx": "0x878349f3aa30227a241557b941a641d825182494242e571f571674b2e2007099" + }, { "amount": "183.6335597275", "user": "0x690Fc36d52eD3f198F0eBDea1557333a1766f786", @@ -50943,6 +51947,91 @@ "user": "0x949ECa8174BBa367901e9a195B77B2eA7d862c43", "tx": "0x25013a6975754e211e4d2b8406c6a12b95b6bb7538f7c94e31d889562b2c2d93" }, + { + "amount": "76.905890695", + "user": "0x0581Fd678b0B662b9A995d95E5B722c8778d0107", + "tx": "0x00d60fa9c3c7260b89fab82b9c54f8ef53e22219958f0805ca160e4c0ad16d71" + }, + { + "amount": "228.4913480625", + "user": "0xA8C925EF7C8a4d11CF59651328D5160D6b341407", + "tx": "0xd6c7acd8d65804e6a8c303b310d8a4ebe8bf3265860fedaf901d9b5439b9cda4" + }, + { + "amount": "250", + "user": "0xD21f558e750BFF62216Da5EFbbaeB82B4C04fd9B", + "tx": "0xeeec2f6921b4d09ff08c7b86cfca5b7fbcd22c5d6c50eb5cdf31aa8031067fc1" + }, + { + "amount": "100", + "user": "0x866742A1f91F5Fdbd473741b23aCc42248694B51", + "tx": "0x2b8ea057a53d5afeaf9d69074996d1cc0c2f2306e062346b35f679999c94bde7" + }, + { + "amount": "250", + "user": "0xC1fd374ca9DE2437004799136D748dB235c5ECED", + "tx": "0xd9b5da161964a42e8237492d1628301341a9a387fae8546918ebccbca7b18ccc" + }, + { + "amount": "50", + "user": "0x86f85A81377b436Df989Dc365255A573552A1A44", + "tx": "0x598ba1a7c494c9514fcab2cc70d6459151ed371f16fa5293503026bbcfba00de" + }, + { + "amount": "250", + "user": "0xe2AddF8A1358e46f9F72e8d94B9878CB35ACF337", + "tx": "0x42ed9a40bcb8bf8e56758ebadeeed0f5892680544e26b154623d45487e4b445c" + }, + { + "amount": "250", + "user": "0x390bd123181387D8427dF74476627411146A0862", + "tx": "0x722e324241d24441b4a6b6236ee136111f61ed66cef0d1b22d0ba3b81106c6ed" + }, + { + "amount": "8.0818706758", + "user": "0x11F2a573fDA43e0724d4938B3FaB7d38443e4707", + "tx": "0x5164b1868fd03cff7d1f486575469e1a807bfb0dd3acdf5695e86ce2d5e39a65" + }, + { + "amount": "248.21", + "user": "0x4C964BE4293b9487887360Acc9CBb1d3F25c3D85", + "tx": "0xf64656912ea363c3612ebcf7302e2ecb401d6e394675fd7a2848cd835250c0c9" + }, + { + "amount": "100", + "user": "0x2CfCB91fe60C12ab8E1622f05dfaF20c1d280f01", + "tx": "0x473c7086ff4a3fdacdda3d012b46d2df47e5a6d2372f7e0f558c5d8fe7535b3d" + }, + { + "amount": "50", + "user": "0x1C62CB03D42cD046ad6176F24236879627ee43CE", + "tx": "0x714d41651a61a1b24e2009569aa8a9aaff1fbd8f1bd73099225965b7b4c6b40f" + }, + { + "amount": "250", + "user": "0x990EF137CfDB090f09dcD65F02AfE3DE42E7FA23", + "tx": "0x09ad036c4cfe5a07035e9a74261d7deceb0393e711f394db636a78af7c4443b1" + }, + { + "amount": "250", + "user": "0x4e8bA6747F20009163e51Ff1b5D3edd3Ef7c6C90", + "tx": "0xf7cd3c9a706b1f1a753b58118c126f2c30736b18be9a22f917b794f3c116d8cd" + }, + { + "amount": "250", + "user": "0x60e094dbC93B33FDe1391256DF270745B76E2Aa5", + "tx": "0xda3d1bbecfec218c8f0391c63c03b2bb63e954633b6476dfbecfc589d9ef9f2f" + }, + { + "amount": "100", + "user": "0xdad0180275eF57A5eD3e78cFdaA9B744Cd118e80", + "tx": "0xf195c4a377f717d74cb03525d64286249cf1c8fcfb0557ffd9f739888d59cb87" + }, + { + "amount": "250", + "user": "0x14C696E214728893745dFF3542BeB1C911f98b90", + "tx": "0x7a1778fa1b8e34ac028d847e59f8f671ce26fc83a4eec2fa6a7363fa866adf04" + }, { "amount": "65.56208982", "user": "0x36d345DCEB35816AD557355fA51E7C99FEE7d18E", @@ -55408,10 +56497,17 @@ "tx": "0x5f6fbdcd43bd83bf0d7a4beb3a2c7d4aa493ef5e4c0c6eeb6a4eb6a0ae4df05e" } ], - "withdrawals": [], + "withdrawals": [ + { + "amount": "50", + "user": "0x86f85A81377b436Df989Dc365255A573552A1A44", + "tranche_id": 6, + "tx": "0x598ba1a7c494c9514fcab2cc70d6459151ed371f16fa5293503026bbcfba00de" + } + ], "total_tokens": "50", - "withdrawn_tokens": "0", - "remaining_tokens": "50" + "withdrawn_tokens": "50", + "remaining_tokens": "0" }, { "address": "0x59BBe7674880466af6E9325Cc40356a4Fc9C590b", @@ -56067,10 +57163,17 @@ "tx": "0x75de6ca47e0da361181d14aceb5d08e572754861465caa67a12b528886d55307" } ], - "withdrawals": [], + "withdrawals": [ + { + "amount": "100", + "user": "0x866742A1f91F5Fdbd473741b23aCc42248694B51", + "tranche_id": 6, + "tx": "0x2b8ea057a53d5afeaf9d69074996d1cc0c2f2306e062346b35f679999c94bde7" + } + ], "total_tokens": "100", - "withdrawn_tokens": "0", - "remaining_tokens": "100" + "withdrawn_tokens": "100", + "remaining_tokens": "0" }, { "address": "0xf2b1c9501FF9e57E864455D46ee11bD81b08216D", @@ -56353,10 +57456,17 @@ "tx": "0x75de6ca47e0da361181d14aceb5d08e572754861465caa67a12b528886d55307" } ], - "withdrawals": [], + "withdrawals": [ + { + "amount": "250", + "user": "0x4e8bA6747F20009163e51Ff1b5D3edd3Ef7c6C90", + "tranche_id": 6, + "tx": "0xf7cd3c9a706b1f1a753b58118c126f2c30736b18be9a22f917b794f3c116d8cd" + } + ], "total_tokens": "250", - "withdrawn_tokens": "0", - "remaining_tokens": "250" + "withdrawn_tokens": "250", + "remaining_tokens": "0" }, { "address": "0xf8Ec254406f878dA2BEd160730d238524Af3D5F6", @@ -56533,10 +57643,17 @@ "tx": "0x75de6ca47e0da361181d14aceb5d08e572754861465caa67a12b528886d55307" } ], - "withdrawals": [], + "withdrawals": [ + { + "amount": "100", + "user": "0x2CfCB91fe60C12ab8E1622f05dfaF20c1d280f01", + "tranche_id": 6, + "tx": "0x473c7086ff4a3fdacdda3d012b46d2df47e5a6d2372f7e0f558c5d8fe7535b3d" + } + ], "total_tokens": "100", - "withdrawn_tokens": "0", - "remaining_tokens": "100" + "withdrawn_tokens": "100", + "remaining_tokens": "0" }, { "address": "0x7cE6eB9eCcbe0E2d35Cd4515d58b813d943BF2Ec", @@ -56833,10 +57950,17 @@ "tx": "0xc7dd4c2b995cc486fcd8b7892cd79f8fb393ada004dc68cf66ec82d99b35763c" } ], - "withdrawals": [], + "withdrawals": [ + { + "amount": "250", + "user": "0x990EF137CfDB090f09dcD65F02AfE3DE42E7FA23", + "tranche_id": 6, + "tx": "0x09ad036c4cfe5a07035e9a74261d7deceb0393e711f394db636a78af7c4443b1" + } + ], "total_tokens": "250", - "withdrawn_tokens": "0", - "remaining_tokens": "250" + "withdrawn_tokens": "250", + "remaining_tokens": "0" }, { "address": "0x4e00caf92EBFbaF879f25bC5b6263ac562F06B06", @@ -57332,10 +58456,17 @@ "tx": "0x057f65938b1360b6d2c4ebf5e789c67897cf60cb6a13f947004def03891afbd8" } ], - "withdrawals": [], + "withdrawals": [ + { + "amount": "250", + "user": "0x60e094dbC93B33FDe1391256DF270745B76E2Aa5", + "tranche_id": 6, + "tx": "0xda3d1bbecfec218c8f0391c63c03b2bb63e954633b6476dfbecfc589d9ef9f2f" + } + ], "total_tokens": "250", - "withdrawn_tokens": "0", - "remaining_tokens": "250" + "withdrawn_tokens": "250", + "remaining_tokens": "0" }, { "address": "0xbdaa56463cb068710Fc09A3481AdE4FbbAD0C46C", @@ -58382,6 +59513,12 @@ } ], "withdrawals": [ + { + "amount": "60.4448387275", + "user": "0xEe3183EcE9ee7d73Fb7bA7F4eB262A2dE68C42B0", + "tranche_id": 6, + "tx": "0x878349f3aa30227a241557b941a641d825182494242e571f571674b2e2007099" + }, { "amount": "189.5551612725", "user": "0xEe3183EcE9ee7d73Fb7bA7F4eB262A2dE68C42B0", @@ -58390,8 +59527,8 @@ } ], "total_tokens": "250", - "withdrawn_tokens": "189.5551612725", - "remaining_tokens": "60.4448387275" + "withdrawn_tokens": "250", + "remaining_tokens": "0" }, { "address": "0xA75da7A90e9681Cffe37743214c0992A476ea542", @@ -58494,6 +59631,12 @@ } ], "withdrawals": [ + { + "amount": "8.0818706758", + "user": "0x11F2a573fDA43e0724d4938B3FaB7d38443e4707", + "tranche_id": 6, + "tx": "0x5164b1868fd03cff7d1f486575469e1a807bfb0dd3acdf5695e86ce2d5e39a65" + }, { "amount": "6.255406746", "user": "0x11F2a573fDA43e0724d4938B3FaB7d38443e4707", @@ -58508,8 +59651,8 @@ } ], "total_tokens": "20", - "withdrawn_tokens": "11.9181293242", - "remaining_tokens": "8.0818706758" + "withdrawn_tokens": "20", + "remaining_tokens": "0" }, { "address": "0x4065bB76cB36B58BD87c6b1c2C24225EbE22f467", @@ -58749,6 +59892,12 @@ } ], "withdrawals": [ + { + "amount": "76.905890695", + "user": "0x0581Fd678b0B662b9A995d95E5B722c8778d0107", + "tranche_id": 6, + "tx": "0x00d60fa9c3c7260b89fab82b9c54f8ef53e22219958f0805ca160e4c0ad16d71" + }, { "amount": "37.297342415", "user": "0x0581Fd678b0B662b9A995d95E5B722c8778d0107", @@ -58781,8 +59930,8 @@ } ], "total_tokens": "250", - "withdrawn_tokens": "173.094109305", - "remaining_tokens": "76.905890695" + "withdrawn_tokens": "250", + "remaining_tokens": "0" }, { "address": "0xEE525a275D1f54C22CCCf1a3314F13C712D7F3a8", @@ -59389,10 +60538,17 @@ "tx": "0x06dfa508f6d82e3ebfc0ff5f3deeab5e36f69c3258e2264b29d3bad4d075c808" } ], - "withdrawals": [], + "withdrawals": [ + { + "amount": "50", + "user": "0x1C62CB03D42cD046ad6176F24236879627ee43CE", + "tranche_id": 6, + "tx": "0x714d41651a61a1b24e2009569aa8a9aaff1fbd8f1bd73099225965b7b4c6b40f" + } + ], "total_tokens": "50", - "withdrawn_tokens": "0", - "remaining_tokens": "50" + "withdrawn_tokens": "50", + "remaining_tokens": "0" }, { "address": "0x30bF85E1d0bC7FDEDcbEeFf39225D8037cb0cb7c", @@ -60655,6 +61811,12 @@ } ], "withdrawals": [ + { + "amount": "228.4913480625", + "user": "0xA8C925EF7C8a4d11CF59651328D5160D6b341407", + "tranche_id": 6, + "tx": "0xd6c7acd8d65804e6a8c303b310d8a4ebe8bf3265860fedaf901d9b5439b9cda4" + }, { "amount": "236.108010915", "user": "0xA8C925EF7C8a4d11CF59651328D5160D6b341407", @@ -60669,8 +61831,8 @@ } ], "total_tokens": "750", - "withdrawn_tokens": "521.5086519375", - "remaining_tokens": "228.4913480625" + "withdrawn_tokens": "750", + "remaining_tokens": "0" }, { "address": "0x83177bFa73a83bE76Ee971515529185BC31c3b0E", @@ -61150,10 +62312,17 @@ "tx": "0x9f916cf09e8a3c4ade0ffce5190db464d0a2b1dadba78e1ee7ba5d6e751d6148" } ], - "withdrawals": [], + "withdrawals": [ + { + "amount": "250", + "user": "0xD21f558e750BFF62216Da5EFbbaeB82B4C04fd9B", + "tranche_id": 6, + "tx": "0xeeec2f6921b4d09ff08c7b86cfca5b7fbcd22c5d6c50eb5cdf31aa8031067fc1" + } + ], "total_tokens": "250", - "withdrawn_tokens": "0", - "remaining_tokens": "250" + "withdrawn_tokens": "250", + "remaining_tokens": "0" }, { "address": "0x4BD760921fD6A946a4C0C49cbd5DEc411e81bdA9", @@ -61440,10 +62609,17 @@ "tx": "0xb1425d9b0d5f10c5b06236d6f9d61ebddd21c4027e0f41deb5ec227a1753c715" } ], - "withdrawals": [], + "withdrawals": [ + { + "amount": "250", + "user": "0x14C696E214728893745dFF3542BeB1C911f98b90", + "tranche_id": 6, + "tx": "0x7a1778fa1b8e34ac028d847e59f8f671ce26fc83a4eec2fa6a7363fa866adf04" + } + ], "total_tokens": "250", - "withdrawn_tokens": "0", - "remaining_tokens": "250" + "withdrawn_tokens": "250", + "remaining_tokens": "0" }, { "address": "0xcF3c43cFF5C96FE9B65FE35dD2e7BF49DB66F1fE", @@ -62435,10 +63611,17 @@ "tx": "0xd23813c30e93f3867eaa257b7aef7052a050b1ee1c1a90102a3f40c5d989fe82" } ], - "withdrawals": [], + "withdrawals": [ + { + "amount": "100", + "user": "0xdad0180275eF57A5eD3e78cFdaA9B744Cd118e80", + "tranche_id": 6, + "tx": "0xf195c4a377f717d74cb03525d64286249cf1c8fcfb0557ffd9f739888d59cb87" + } + ], "total_tokens": "100", - "withdrawn_tokens": "0", - "remaining_tokens": "100" + "withdrawn_tokens": "100", + "remaining_tokens": "0" }, { "address": "0xe5811c7751343Cf035DbaB631D61ff653D1CbCc3", @@ -63456,10 +64639,17 @@ "tx": "0x3a0390dffa4280c286016566b29c62e4cec36c6504f7ac3d1de80d22b2903008" } ], - "withdrawals": [], + "withdrawals": [ + { + "amount": "248.21", + "user": "0x4C964BE4293b9487887360Acc9CBb1d3F25c3D85", + "tranche_id": 6, + "tx": "0xf64656912ea363c3612ebcf7302e2ecb401d6e394675fd7a2848cd835250c0c9" + } + ], "total_tokens": "248.21", - "withdrawn_tokens": "0", - "remaining_tokens": "248.21" + "withdrawn_tokens": "248.21", + "remaining_tokens": "0" }, { "address": "0xA2C79021609aCc5532AB48D468563fDE62895955", @@ -63546,10 +64736,17 @@ "tx": "0x3a0390dffa4280c286016566b29c62e4cec36c6504f7ac3d1de80d22b2903008" } ], - "withdrawals": [], + "withdrawals": [ + { + "amount": "250", + "user": "0x390bd123181387D8427dF74476627411146A0862", + "tranche_id": 6, + "tx": "0x722e324241d24441b4a6b6236ee136111f61ed66cef0d1b22d0ba3b81106c6ed" + } + ], "total_tokens": "250", - "withdrawn_tokens": "0", - "remaining_tokens": "250" + "withdrawn_tokens": "250", + "remaining_tokens": "0" }, { "address": "0xe2AddF8A1358e46f9F72e8d94B9878CB35ACF337", @@ -63561,10 +64758,17 @@ "tx": "0x3a0390dffa4280c286016566b29c62e4cec36c6504f7ac3d1de80d22b2903008" } ], - "withdrawals": [], + "withdrawals": [ + { + "amount": "250", + "user": "0xe2AddF8A1358e46f9F72e8d94B9878CB35ACF337", + "tranche_id": 6, + "tx": "0x42ed9a40bcb8bf8e56758ebadeeed0f5892680544e26b154623d45487e4b445c" + } + ], "total_tokens": "250", - "withdrawn_tokens": "0", - "remaining_tokens": "250" + "withdrawn_tokens": "250", + "remaining_tokens": "0" }, { "address": "0x7E9bA4D3654ae2a8C4B15AAdee8f144Ba7eD68c4", @@ -65250,10 +66454,17 @@ "tx": "0xe32a466fc780a0fb3fd84a804f622931ebfaf3f428bff0dc6d141270410e75f8" } ], - "withdrawals": [], + "withdrawals": [ + { + "amount": "250", + "user": "0xC1fd374ca9DE2437004799136D748dB235c5ECED", + "tranche_id": 6, + "tx": "0xd9b5da161964a42e8237492d1628301341a9a387fae8546918ebccbca7b18ccc" + } + ], "total_tokens": "250", - "withdrawn_tokens": "0", - "remaining_tokens": "250" + "withdrawn_tokens": "250", + "remaining_tokens": "0" } ] }, @@ -99011,7 +100222,7 @@ "tranche_start": "2021-10-05T00:00:00.000Z", "tranche_end": "2021-10-05T00:00:00.000Z", "total_added": "1019683.304332223", - "total_removed": "777071.688459723", + "total_removed": "779509.178072223", "locked_amount": "0", "deposits": [ { @@ -99161,6 +100372,11 @@ } ], "withdrawals": [ + { + "amount": "2437.4896125", + "user": "0x1b4B2372462b391006FAc69f09066Ae8504D75eC", + "tx": "0x307896593ca0b5915558562e827a9605cb0fa2316ea7fb77d0adf4dafff3f7bb" + }, { "amount": "38999.8338", "user": "0xdbC5d439F373EB646345e1c67D1d46231ACE7dD3", @@ -99695,10 +100911,17 @@ "tx": "0xbd8f6e949d05e2ed71776dba1ae2ace79567b398b78f42ae1c89e6b85cd3c5e4" } ], - "withdrawals": [], + "withdrawals": [ + { + "amount": "2437.4896125", + "user": "0x1b4B2372462b391006FAc69f09066Ae8504D75eC", + "tranche_id": 9, + "tx": "0x307896593ca0b5915558562e827a9605cb0fa2316ea7fb77d0adf4dafff3f7bb" + } + ], "total_tokens": "2437.4896125", - "withdrawn_tokens": "0", - "remaining_tokens": "2437.4896125" + "withdrawn_tokens": "2437.4896125", + "remaining_tokens": "0" }, { "address": "0x39fEc2e2beaB6a63c1E763D0dc4120AF60BEe39F", diff --git a/apps/static/src/assets/stagnet1-tranches.json b/apps/static/src/assets/stagnet1-tranches.json index f7ce975bf..58aca83ce 100644 --- a/apps/static/src/assets/stagnet1-tranches.json +++ b/apps/static/src/assets/stagnet1-tranches.json @@ -38,7 +38,7 @@ "tranche_end": "2022-11-26T13:48:10.000Z", "total_added": "100", "total_removed": "0", - "locked_amount": "45.544174911212587", + "locked_amount": "43.3757895738204", "deposits": [ { "amount": "100", @@ -240,18 +240,62 @@ "tranche_id": 3, "tranche_start": "2021-10-12T00:53:20.000Z", "tranche_end": "2022-10-12T00:53:20.000Z", - "total_added": "100", - "total_removed": "0", - "locked_amount": "33.06798896499239", + "total_added": "1100", + "total_removed": "673.04388635", + "locked_amount": "339.895639903602233", "deposits": [ + { + "amount": "1000", + "user": "0x970Bf6C66E55f90a7D455354954Af5CaBA11318C", + "tx": "0xfee1971d3403ecfbee9b88a14aee2654a5a397d9fb5e4a1787b0a8d4a60dd42c" + }, { "amount": "100", "user": "0xFc00fa2A8B7f0D85a39e101B985a74e83f5c8980", "tx": "0xf3a97d073a229b78b0dfacb6b24d6eb2fc89d79dc003bff114c1d205705f880b" } ], - "withdrawals": [], + "withdrawals": [ + { + "amount": "673.00240994", + "user": "0x970Bf6C66E55f90a7D455354954Af5CaBA11318C", + "tx": "0xdaf6124a50ae4cfed3e72d42e5bb43dcc707538d3db1355f215aac162c3f35a4" + }, + { + "amount": "0.04147641", + "user": "0x970Bf6C66E55f90a7D455354954Af5CaBA11318C", + "tx": "0x8c9b4e7bb2ef3f06f47c614ac42f466de3b6994c36a5061e7d384607bdbdfb01" + } + ], "users": [ + { + "address": "0x970Bf6C66E55f90a7D455354954Af5CaBA11318C", + "deposits": [ + { + "amount": "1000", + "user": "0x970Bf6C66E55f90a7D455354954Af5CaBA11318C", + "tranche_id": 3, + "tx": "0xfee1971d3403ecfbee9b88a14aee2654a5a397d9fb5e4a1787b0a8d4a60dd42c" + } + ], + "withdrawals": [ + { + "amount": "673.00240994", + "user": "0x970Bf6C66E55f90a7D455354954Af5CaBA11318C", + "tranche_id": 3, + "tx": "0xdaf6124a50ae4cfed3e72d42e5bb43dcc707538d3db1355f215aac162c3f35a4" + }, + { + "amount": "0.04147641", + "user": "0x970Bf6C66E55f90a7D455354954Af5CaBA11318C", + "tranche_id": 3, + "tx": "0x8c9b4e7bb2ef3f06f47c614ac42f466de3b6994c36a5061e7d384607bdbdfb01" + } + ], + "total_tokens": "1000", + "withdrawn_tokens": "673.04388635", + "remaining_tokens": "326.95611365" + }, { "address": "0xFc00fa2A8B7f0D85a39e101B985a74e83f5c8980", "deposits": [ diff --git a/apps/static/src/assets/testnet-tranches.json b/apps/static/src/assets/testnet-tranches.json index d1f01905f..65c4f8cdf 100644 --- a/apps/static/src/assets/testnet-tranches.json +++ b/apps/static/src/assets/testnet-tranches.json @@ -68,8 +68,8 @@ "tranche_start": "2021-10-12T00:53:20.000Z", "tranche_end": "2022-10-12T00:53:20.000Z", "total_added": "1010.000000000000000001", - "total_removed": "668.3761174488", - "locked_amount": "333.9866885464231390003306798896499239", + "total_removed": "668.4622323651", + "locked_amount": "312.08602866565198040030899606798579404", "deposits": [ { "amount": "1000", @@ -107,6 +107,11 @@ "amount": "0.0000190259", "user": "0x970Bf6C66E55f90a7D455354954Af5CaBA11318C", "tx": "0xcbc22a50267244f1cbb61c1018270f7e9d0052815141c7c1158393036e93be5b" + }, + { + "amount": "0.0861149163", + "user": "0x970Bf6C66E55f90a7D455354954Af5CaBA11318C", + "tx": "0xaef5a50d71958240471b88830f19e3ebd0095bbf52e815cfc4aec41fc77e1b40" } ], "users": [ @@ -166,11 +171,17 @@ "user": "0x970Bf6C66E55f90a7D455354954Af5CaBA11318C", "tranche_id": 2, "tx": "0xcbc22a50267244f1cbb61c1018270f7e9d0052815141c7c1158393036e93be5b" + }, + { + "amount": "0.0861149163", + "user": "0x970Bf6C66E55f90a7D455354954Af5CaBA11318C", + "tranche_id": 2, + "tx": "0xaef5a50d71958240471b88830f19e3ebd0095bbf52e815cfc4aec41fc77e1b40" } ], "total_tokens": "10.000000000000000001", - "withdrawn_tokens": "6.6176192288", - "remaining_tokens": "3.382380771200000001" + "withdrawn_tokens": "6.7037341451", + "remaining_tokens": "3.296265854900000001" } ] }, diff --git a/apps/stats-e2e/.env b/apps/stats-e2e/.env index 2ffc8e07a..f104f9091 100644 --- a/apps/stats-e2e/.env +++ b/apps/stats-e2e/.env @@ -1,4 +1,4 @@ # App configuration variables -NX_VEGA_ENV = 'TESTNET' -CYPRESS_VEGA_ENV = 'TESTNET' -NX_VEGA_REST = 'https://lb.testnet.vega.xyz/datanode/rest' +NX_VEGA_ENV=TESTNET +CYPRESS_VEGA_ENV=TESTNET +NX_VEGA_REST=https://lb.testnet.vega.xyz/datanode/rest diff --git a/apps/stats-e2e/.env.devnet b/apps/stats-e2e/.env.devnet index d07477535..451ec50d2 100644 --- a/apps/stats-e2e/.env.devnet +++ b/apps/stats-e2e/.env.devnet @@ -1,4 +1,4 @@ # App configuration variables -NX_VEGA_ENV = 'DEVNET' -CYPRESS_VEGA_ENV = 'DEVNET' -NX_VEGA_REST = 'https://n04.d.vega.xyz/datanode/rest' +NX_VEGA_ENV=DEVNET +CYPRESS_VEGA_ENV=DEVNET +NX_VEGA_REST=https://n04.d.vega.xyz/datanode/rest diff --git a/apps/stats-e2e/.env.mainnet b/apps/stats-e2e/.env.mainnet index 6269ea3e4..eb32266e0 100644 --- a/apps/stats-e2e/.env.mainnet +++ b/apps/stats-e2e/.env.mainnet @@ -1,4 +1,4 @@ # App configuration variables -NX_VEGA_ENV = 'MAINNET' -CYPRESS_VEGA_ENV = 'MAINNET' -NX_VEGA_REST = 'https://api.token.vega.xyz/' +NX_VEGA_ENV=MAINNET +CYPRESS_VEGA_ENV=MAINNET +NX_VEGA_REST=https://api.token.vega.xyz/ diff --git a/apps/stats-e2e/.env.stagnet1 b/apps/stats-e2e/.env.stagnet1 index f382a1675..c7799e52c 100644 --- a/apps/stats-e2e/.env.stagnet1 +++ b/apps/stats-e2e/.env.stagnet1 @@ -1,4 +1,4 @@ # App configuration variables -NX_VEGA_ENV = 'STAGNET 1' -CYPRESS_VEGA_ENV = 'STAGNET 1' -NX_VEGA_REST = 'https://n03.s.vega.xyz/datanode/rest' +NX_VEGA_ENV=STAGNET 1 +CYPRESS_VEGA_ENV=STAGNET 1 +NX_VEGA_REST=https://n03.s.vega.xyz/datanode/rest diff --git a/apps/stats-e2e/.env.stagnet2 b/apps/stats-e2e/.env.stagnet2 index 96d28ba03..37df99309 100644 --- a/apps/stats-e2e/.env.stagnet2 +++ b/apps/stats-e2e/.env.stagnet2 @@ -1,4 +1,4 @@ # App configuration variables -NX_VEGA_ENV = 'STAGNET 2' -CYPRESS_VEGA_ENV = 'STAGNET 2' -NX_VEGA_REST = 'https://n01.stagnet2.vega.xyz/datanode/rest' +NX_VEGA_ENV=STAGNET 2 +CYPRESS_VEGA_ENV=STAGNET 2 +NX_VEGA_REST=https://n01.stagnet2.vega.xyz/datanode/rest diff --git a/apps/stats-e2e/.env.testnet b/apps/stats-e2e/.env.testnet index 2ffc8e07a..f104f9091 100644 --- a/apps/stats-e2e/.env.testnet +++ b/apps/stats-e2e/.env.testnet @@ -1,4 +1,4 @@ # App configuration variables -NX_VEGA_ENV = 'TESTNET' -CYPRESS_VEGA_ENV = 'TESTNET' -NX_VEGA_REST = 'https://lb.testnet.vega.xyz/datanode/rest' +NX_VEGA_ENV=TESTNET +CYPRESS_VEGA_ENV=TESTNET +NX_VEGA_REST=https://lb.testnet.vega.xyz/datanode/rest diff --git a/apps/stats/.env b/apps/stats/.env index 55d4d65ea..7f77c5f27 100644 --- a/apps/stats/.env +++ b/apps/stats/.env @@ -1,3 +1,3 @@ # App configuration variables -NX_VEGA_ENV = 'MAINNET' -NX_VEGA_REST = 'https://api.token.vega.xyz/' +NX_VEGA_ENV=MAINNET +NX_VEGA_REST=https://api.token.vega.xyz/ diff --git a/apps/stats/.env.devnet b/apps/stats/.env.devnet index b4b50b8a9..73841c33a 100644 --- a/apps/stats/.env.devnet +++ b/apps/stats/.env.devnet @@ -1,3 +1,3 @@ # App configuration variables -NX_VEGA_ENV = 'DEVNET' -NX_VEGA_REST = 'https://n04.d.vega.xyz/datanode/rest' +NX_VEGA_ENV=DEVNET +NX_VEGA_REST=https://n04.d.vega.xyz/datanode/rest diff --git a/apps/stats/.env.mainnet b/apps/stats/.env.mainnet index 4d6e909bf..4c06a7948 100644 --- a/apps/stats/.env.mainnet +++ b/apps/stats/.env.mainnet @@ -1,3 +1,3 @@ # App configuration variables. No overrides for default urls -NX_VEGA_ENV = 'MAINNET' -NX_VEGA_REST = 'https://api.token.vega.xyz/' +NX_VEGA_ENV=MAINNET +NX_VEGA_REST=https://api.token.vega.xyz/ diff --git a/apps/stats/.env.stagnet1 b/apps/stats/.env.stagnet1 index 9caf9a482..22086bd03 100644 --- a/apps/stats/.env.stagnet1 +++ b/apps/stats/.env.stagnet1 @@ -1,3 +1,3 @@ # App configuration variables -NX_VEGA_ENV = 'STAGNET1' -NX_VEGA_REST = 'https://n03.s.vega.xyz/datanode/rest' +NX_VEGA_ENV=STAGNET1; +NX_VEGA_REST=https://n03.s.vega.xyz/datanode/rest; diff --git a/apps/stats/.env.stagnet2 b/apps/stats/.env.stagnet2 index dd46b7320..22a6dcf71 100644 --- a/apps/stats/.env.stagnet2 +++ b/apps/stats/.env.stagnet2 @@ -1,3 +1,3 @@ # App configuration variables -NX_VEGA_ENV = 'STAGNET2' -NX_VEGA_REST = 'https://n03.stagnet2.vega.xyz/datanode/rest' +NX_VEGA_REST=https://n01.stagnet2.vega.xyz/datanode/rest; +NX_VEGA_ENV=STAGNET2; diff --git a/apps/stats/.env.testnet b/apps/stats/.env.testnet index 6c20d35dd..dca7b5de5 100644 --- a/apps/stats/.env.testnet +++ b/apps/stats/.env.testnet @@ -1,3 +1,3 @@ # App configuration variables -NX_VEGA_ENV = 'TESTNET' -NX_VEGA_REST = 'https://lb.testnet.vega.xyz/datanode/rest' +NX_VEGA_ENV=TESTNET +NX_VEGA_REST=https://lb.testnet.vega.xyz/datanode/rest diff --git a/apps/token-e2e/.env b/apps/token-e2e/.env index 998ab3e21..dd881f4d0 100644 --- a/apps/token-e2e/.env +++ b/apps/token-e2e/.env @@ -19,12 +19,12 @@ REACT_APP_DEPLOY_URL=$DEPLOY_URL REACT_APP_DEPLOY_PRIME_URL=$DEPLOY_PRIME_URL # App configuration variables -NX_VEGA_ENV = "TESTNET" -NX_VEGA_URL = "https://lb.testnet.vega.xyz/query" -NX_ETHEREUM_CHAIN_ID = 3 -NX_ETHEREUM_PROVIDER_URL = "https://ropsten.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8" -NX_ETHERSCAN_URL = "https://ropsten.etherscan.io" -NX_FAIRGROUND = false +NX_VEGA_ENV=TESTNET +NX_VEGA_URL=https://lb.testnet.vega.xyz/query +NX_ETHEREUM_CHAIN_ID=3 +NX_ETHEREUM_PROVIDER_URL=https://ropsten.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8 +NX_ETHERSCAN_URL=https://ropsten.etherscan.io +NX_FAIRGROUND=false #Test configuration variables -CYPRESS_FAIRGROUND = false +CYPRESS_FAIRGROUND=false diff --git a/apps/token-e2e/.env.devnet b/apps/token-e2e/.env.devnet index 43dfa5712..1d2f6b979 100644 --- a/apps/token-e2e/.env.devnet +++ b/apps/token-e2e/.env.devnet @@ -1,6 +1,6 @@ # App configuration variables -NX_VEGA_ENV = "DEVNET" -NX_VEGA_URL = "https://n04.d.vega.xyz/query" -NX_ETHEREUM_CHAIN_ID = 3 -NX_ETHEREUM_PROVIDER_URL = "https://ropsten.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8" -NX_ETHERSCAN_URL = "https://ropsten.etherscan.io" \ No newline at end of file +NX_VEGA_ENV=DEVNET +NX_VEGA_URL=https://n04.d.vega.xyz/query +NX_ETHEREUM_CHAIN_ID=3 +NX_ETHEREUM_PROVIDER_URL=https://ropsten.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8 +NX_ETHERSCAN_URL=https://ropsten.etherscan.io diff --git a/apps/token-e2e/.env.mainnet b/apps/token-e2e/.env.mainnet index 037533823..92c3a7893 100644 --- a/apps/token-e2e/.env.mainnet +++ b/apps/token-e2e/.env.mainnet @@ -1,6 +1,6 @@ # App configuration variables -NX_VEGA_ENV = "MAINNET" -NX_VEGA_URL = "https://api.token.vega.xyz/query" -NX_ETHEREUM_CHAIN_ID = 1 -NX_ETHEREUM_PROVIDER_URL = "https://mainnet.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8" -NX_ETHERSCAN_URL = "https://etherscan.io" \ No newline at end of file +NX_VEGA_ENV=MAINNET +NX_VEGA_URL=https://api.token.vega.xyz/query +NX_ETHEREUM_CHAIN_ID=1 +NX_ETHEREUM_PROVIDER_URL=https://mainnet.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8 +NX_ETHERSCAN_URL=https://etherscan.io diff --git a/apps/token-e2e/.env.stagnet1 b/apps/token-e2e/.env.stagnet1 index 17d96f986..6a0b047bc 100644 --- a/apps/token-e2e/.env.stagnet1 +++ b/apps/token-e2e/.env.stagnet1 @@ -1,6 +1,6 @@ # App configuration variables -NX_VEGA_ENV = "STAGNET" -NX_VEGA_URL = "https://n03.s.vega.xyz/query" -NX_ETHEREUM_CHAIN_ID = 3 -NX_ETHEREUM_PROVIDER_URL = "https://ropsten.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8" -NX_ETHERSCAN_URL = "https://ropsten.etherscan.io" \ No newline at end of file +NX_VEGA_ENV=STAGNET +NX_VEGA_URL=https://n03.s.vega.xyz/query +NX_ETHEREUM_CHAIN_ID=3 +NX_ETHEREUM_PROVIDER_URL=https://ropsten.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8 +NX_ETHERSCAN_URL=https://ropsten.etherscan.io diff --git a/apps/token-e2e/.env.stagnet2 b/apps/token-e2e/.env.stagnet2 index b7bcbb54a..06904d1ed 100644 --- a/apps/token-e2e/.env.stagnet2 +++ b/apps/token-e2e/.env.stagnet2 @@ -1,6 +1,6 @@ # App configuration variables -NX_VEGA_ENV = "STAGNET2" -NX_VEGA_URL = "https://n03.stagnet2.vega.xyz/query" -NX_ETHEREUM_CHAIN_ID = 3 -NX_ETHEREUM_PROVIDER_URL = "https://ropsten.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8" -NX_ETHERSCAN_URL = "https://ropsten.etherscan.io" \ No newline at end of file +NX_VEGA_ENV=STAGNET2 +NX_VEGA_URL=https://n03.stagnet2.vega.xyz/query +NX_ETHEREUM_CHAIN_ID=3 +NX_ETHEREUM_PROVIDER_URL=https://ropsten.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8 +NX_ETHERSCAN_URL=https://ropsten.etherscan.io diff --git a/apps/token-e2e/.env.testnet b/apps/token-e2e/.env.testnet index 668cc42a7..65316dde5 100644 --- a/apps/token-e2e/.env.testnet +++ b/apps/token-e2e/.env.testnet @@ -1,6 +1,6 @@ # App configuration variables -NX_VEGA_ENV = "TESTNET" -NX_VEGA_URL = "https://lb.testnet.vega.xyz/query" -NX_ETHEREUM_CHAIN_ID = 3 -NX_ETHEREUM_PROVIDER_URL = "https://ropsten.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8" -NX_ETHERSCAN_URL = "https://ropsten.etherscan.io" \ No newline at end of file +NX_VEGA_ENV=TESTNET +NX_VEGA_URL=https://lb.testnet.vega.xyz/query +NX_ETHEREUM_CHAIN_ID=3 +NX_ETHEREUM_PROVIDER_URL=https://ropsten.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8 +NX_ETHERSCAN_URL=https://ropsten.etherscan.io diff --git a/apps/token/.env b/apps/token/.env index f93bd20e5..ee3673919 100644 --- a/apps/token/.env +++ b/apps/token/.env @@ -19,14 +19,14 @@ REACT_APP_DEPLOY_URL=$DEPLOY_URL REACT_APP_DEPLOY_PRIME_URL=$DEPLOY_PRIME_URL # App configuration variables -NX_VEGA_ENV = "TESTNET" -NX_VEGA_URL = "https://lb.testnet.vega.xyz/query" -NX_ETHEREUM_CHAIN_ID = 3 -NX_ETHEREUM_PROVIDER_URL = "https://ropsten.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8" -NX_ETHERSCAN_URL = "https://ropsten.etherscan.io" -NX_FAIRGROUND = false -NX_IS_NEW_BRIDGE_CONTRACT = true +NX_VEGA_ENV=TESTNET +NX_VEGA_URL=https://lb.testnet.vega.xyz/query +NX_ETHEREUM_CHAIN_ID=3 +NX_ETHEREUM_PROVIDER_URL=https://ropsten.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8 +NX_ETHERSCAN_URL=https://ropsten.etherscan.io +NX_FAIRGROUND=false +NX_IS_NEW_BRIDGE_CONTRACT=true NX_VEGA_NETWORKS='{"DEVNET":"https://dev.token.vega.xyz","STAGNET":"https://dev.token.vega.xyz","STAGNET2":"staging2.token.vega.xyz","TESTNET":"token.fairground.wtf","MAINNET":"token.vega.xyz"}' #Test configuration variables -CYPRESS_FAIRGROUND = false +CYPRESS_FAIRGROUND=false diff --git a/apps/token/.env.devnet b/apps/token/.env.devnet index c236b7ccd..23f0ec1f2 100644 --- a/apps/token/.env.devnet +++ b/apps/token/.env.devnet @@ -1,7 +1,7 @@ # App configuration variables -NX_VEGA_ENV = "DEVNET" -NX_VEGA_URL = "https://n04.d.vega.xyz/query" +NX_VEGA_ENV=DEVNET +NX_VEGA_URL=https://n04.d.vega.xyz/query NX_VEGA_NETWORKS='{"DEVNET":"https://dev.token.vega.xyz","STAGNET":"https://dev.token.vega.xyz","STAGNET2":"staging2.token.vega.xyz","TESTNET":"token.fairground.wtf","MAINNET":"token.vega.xyz"}' -NX_ETHEREUM_CHAIN_ID = 3 -NX_ETHEREUM_PROVIDER_URL = "https://ropsten.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8" -NX_ETHERSCAN_URL = "https://ropsten.etherscan.io" +NX_ETHEREUM_CHAIN_ID=3 +NX_ETHEREUM_PROVIDER_URL=https://ropsten.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8 +NX_ETHERSCAN_URL=https://ropsten.etherscan.io diff --git a/apps/token/.env.mainnet b/apps/token/.env.mainnet index bf5ba3311..910217e5c 100644 --- a/apps/token/.env.mainnet +++ b/apps/token/.env.mainnet @@ -1,7 +1,7 @@ # App configuration variables -NX_VEGA_ENV = "MAINNET" -NX_VEGA_URL = "https://api.token.vega.xyz/query" +NX_VEGA_ENV=MAINNET +NX_VEGA_URL=https://api.token.vega.xyz/query NX_VEGA_NETWORKS='{"DEVNET":"https://dev.token.vega.xyz","STAGNET":"https://dev.token.vega.xyz","STAGNET2":"staging2.token.vega.xyz","TESTNET":"token.fairground.wtf","MAINNET":"token.vega.xyz"}' -NX_ETHEREUM_CHAIN_ID = 1 -NX_ETHEREUM_PROVIDER_URL = "https://mainnet.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8" -NX_ETHERSCAN_URL = "https://etherscan.io" +NX_ETHEREUM_CHAIN_ID=1 +NX_ETHEREUM_PROVIDER_URL=https://mainnet.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8 +NX_ETHERSCAN_URL=https://etherscan.io diff --git a/apps/token/.env.stagnet1 b/apps/token/.env.stagnet1 index e27160cc9..06c33fb72 100644 --- a/apps/token/.env.stagnet1 +++ b/apps/token/.env.stagnet1 @@ -1,7 +1,7 @@ # App configuration variables -NX_VEGA_ENV = "STAGNET" -NX_VEGA_URL = "https://n03.s.vega.xyz/query" +NX_VEGA_ENV=STAGNET +NX_VEGA_URL=https://n03.s.vega.xyz/query NX_VEGA_NETWORKS='{"DEVNET":"https://dev.token.vega.xyz","STAGNET":"https://dev.token.vega.xyz","STAGNET2":"staging2.token.vega.xyz","TESTNET":"token.fairground.wtf","MAINNET":"token.vega.xyz"}' -NX_ETHEREUM_CHAIN_ID = 3 -NX_ETHEREUM_PROVIDER_URL = "https://ropsten.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8" -NX_ETHERSCAN_URL = "https://ropsten.etherscan.io" +NX_ETHEREUM_CHAIN_ID=3 +NX_ETHEREUM_PROVIDER_URL=https://ropsten.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8 +NX_ETHERSCAN_URL=https://ropsten.etherscan.io diff --git a/apps/token/.env.stagnet2 b/apps/token/.env.stagnet2 index 64d0833f7..c245d632b 100644 --- a/apps/token/.env.stagnet2 +++ b/apps/token/.env.stagnet2 @@ -1,7 +1,7 @@ # App configuration variables -NX_VEGA_ENV = "STAGNET2" -NX_VEGA_URL = "https://n03.stagnet2.vega.xyz/query" +NX_VEGA_ENV=STAGNET2 +NX_VEGA_URL=https://n03.stagnet2.vega.xyz/query NX_VEGA_NETWORKS='{"DEVNET":"https://dev.token.vega.xyz","STAGNET":"https://dev.token.vega.xyz","STAGNET2":"staging2.token.vega.xyz","TESTNET":"token.fairground.wtf","MAINNET":"token.vega.xyz"}' -NX_ETHEREUM_CHAIN_ID = 3 -NX_ETHEREUM_PROVIDER_URL = "https://ropsten.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8" -NX_ETHERSCAN_URL = "https://ropsten.etherscan.io" +NX_ETHEREUM_CHAIN_ID=3 +NX_ETHEREUM_PROVIDER_URL=https://ropsten.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8 +NX_ETHERSCAN_URL=https://ropsten.etherscan.io diff --git a/apps/token/.env.testnet b/apps/token/.env.testnet index 47d22c4ca..b4abf6a60 100644 --- a/apps/token/.env.testnet +++ b/apps/token/.env.testnet @@ -1,7 +1,7 @@ # App configuration variables -NX_VEGA_ENV = "TESTNET" -NX_VEGA_URL = "https://lb.testnet.vega.xyz/query" +NX_VEGA_ENV=TESTNET +NX_VEGA_URL=https://lb.testnet.vega.xyz/query NX_VEGA_NETWORKS='{"DEVNET":"https://dev.token.vega.xyz","STAGNET":"https://dev.token.vega.xyz","STAGNET2":"staging2.token.vega.xyz","TESTNET":"token.fairground.wtf","MAINNET":"token.vega.xyz"}' -NX_ETHEREUM_CHAIN_ID = 3 -NX_ETHEREUM_PROVIDER_URL = "https://ropsten.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8" -NX_ETHERSCAN_URL = "https://ropsten.etherscan.io" +NX_ETHEREUM_CHAIN_ID=3 +NX_ETHEREUM_PROVIDER_URL=https://ropsten.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8 +NX_ETHERSCAN_URL=https://ropsten.etherscan.io diff --git a/apps/token/index.d.ts b/apps/token/index.d.ts new file mode 100644 index 000000000..cf0dffa18 --- /dev/null +++ b/apps/token/index.d.ts @@ -0,0 +1,5 @@ +/// + +interface Window { + _env_?: Record; +} diff --git a/apps/token/src/app.tsx b/apps/token/src/app.tsx index 3a546c9e7..7baef0696 100644 --- a/apps/token/src/app.tsx +++ b/apps/token/src/app.tsx @@ -1,6 +1,6 @@ import './i18n'; -import React from 'react'; -import { ApolloProvider } from '@apollo/client'; + +import React, { useMemo } from 'react'; import { BrowserRouter as Router } from 'react-router-dom'; import { AppLoader } from './app-loader'; import { AppBanner } from './components/app-banner'; @@ -15,47 +15,64 @@ import { AppStateProvider } from './contexts/app-state/app-state-provider'; import { ContractsProvider } from './contexts/contracts/contracts-provider'; import { AppRouter } from './routes'; import { Web3Provider } from '@vegaprotocol/web3'; -import { Connectors } from './lib/web3-connectors'; import { VegaWalletDialogs } from './components/vega-wallet-dialogs'; import { VegaWalletProvider } from '@vegaprotocol/wallet'; -import { EnvironmentProvider } from '@vegaprotocol/network-switcher'; -import { client } from './lib/apollo-client'; +import { createConnectors } from './lib/web3-connectors'; +import { ApolloProvider } from '@apollo/client'; +import { createClient } from './lib/apollo-client'; +import { + EnvironmentProvider, + useEnvironment, +} from '@vegaprotocol/network-switcher'; -function App() { +const AppContainer = () => { const sideBar = React.useMemo(() => [, ], []); + const { ETHEREUM_PROVIDER_URL, ETHEREUM_CHAIN_ID, VEGA_URL } = + useEnvironment(); + const Connectors = useMemo( + () => createConnectors(ETHEREUM_PROVIDER_URL, ETHEREUM_CHAIN_ID), + [ETHEREUM_CHAIN_ID, ETHEREUM_PROVIDER_URL] + ); + const client = useMemo(() => createClient(VEGA_URL), [VEGA_URL]); return ( - - - - - - - - - <> - - - - - - - - - - > - - - - - - - - + + + + + + + + <> + + + + + + + + + + > + + + + + + + ); +}; + +function App() { + return ( + + + + ); } export default App; diff --git a/apps/token/src/assets/env-config.js b/apps/token/src/assets/env-config.js new file mode 100644 index 000000000..b8be63bb5 --- /dev/null +++ b/apps/token/src/assets/env-config.js @@ -0,0 +1 @@ +window._env_ = {}; diff --git a/apps/token/src/components/app-footer/app-footer.tsx b/apps/token/src/components/app-footer/app-footer.tsx index 3618b77c6..ecdbacf5c 100644 --- a/apps/token/src/components/app-footer/app-footer.tsx +++ b/apps/token/src/components/app-footer/app-footer.tsx @@ -2,13 +2,12 @@ import { Link } from '@vegaprotocol/ui-toolkit'; import { Trans } from 'react-i18next'; import { Links } from '../../config'; +import { ENV } from '../../config/env'; export const AppFooter = () => { return (