Skip to content

tzConnectBerlin/prediction-market-ui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

96e1814 · Oct 25, 2021
Oct 1, 2021
Sep 16, 2021
Aug 24, 2021
Oct 5, 2021
Jul 30, 2021
Oct 22, 2021
Jul 28, 2021
Oct 25, 2021
Oct 21, 2021
Oct 20, 2021
Aug 19, 2021
Oct 1, 2021
Dec 2, 2020
Aug 19, 2021
Dec 2, 2020
Oct 21, 2021
Dec 2, 2020
Oct 11, 2021
Jun 1, 2021
Oct 11, 2021

Repository files navigation

Prediction Market Frontend

UI interface for the prediction market contract

Pre-requisite

This project depends on following projects:

Available Scripts

In the project directory, you can run:

  • yarn start to start the project in dev mode
  • yarn test to run the tests in watch mode
  • yarn test-ci to run all tests and generate a code coverage report
  • yarn build to build the app
  • yarn commit to start the commit wizard
  • yarn storybook to start the storybook
  • yarn lint to run the linter on entire project
  • yarn format to run prettier
  • yarn analyze to build and create a the source/dependency graph

Environment variables

.env.example file is the example .env file and can be used to initialize base .env file required by the project.

The app uses below environment variables:

  • REACT_APP_APP_NAME: App name to be disabled and used to initialize wallet provider. (default: Prediction Market)
  • REACT_APP_MARKET_CONTRACT: Market contract address.
  • REACT_APP_FA12_CONTRACT: FA1.2 contract address.
  • REACT_APP_FA12_SYMBOL: FA1.2 token symbol
  • REACT_APP_IPFS_POST_API: API used for IPFS Pinning
  • REACT_APP_IPFS_GET_API: IPFS Gateway URL used to fetch IPFS data.
  • REACT_APP_NETWORK_TYPE: Tezos network to use. (default: GRANADANET)
  • REACT_APP_RPC_URL: Tezos node rpc url (default: https://granadanet.smartpy.io)
  • REACT_APP_RPC_PORT: Tezos node rpc port (default: 443)
  • REACT_APP_GRAPHQL_API: Indexer service Postgraphile URL.
  • REACT_APP_SENTRY_DSN: Sentry DSN if you want to enable logging via sentry
  • REACT_APP_ENABLE_MARKET_CREATION: Enable/Disable Market creation
  • REACT_APP_WERT_PARTNER_ID: Wert client id to enable "Buy Tezos" option.
  • REACT_APP_MARKET_CREATOR: Address that is allowed to create Market

Assumptions

  • Currently, we are not fetching contract metadata for FA1.2 contract and the project assumes that the decimals used by the FA1.2 contract is 6

License

MIT License

Copyright (c) 2020 TZ Connect GmbH

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.