Skip to content

Configuration

Andre edited this page Apr 13, 2018 · 10 revisions

Configuring the Interface

Sample Configuration

  "developmentWhitelist": {
    "0x0000000000000000000000000000000000000001": "Test Account 1",
    "0x0000000000000000000000000000000000000002": "Test Account 2",
    "0x0000000000000000000000000000000000000003": "Test Account 3",
  },
  "stagingWhitelist": {
    "0x0000000000000000000000000000000000000001": "Test Account 1",
  },
  "productionWhitelist": {
    "0x0000000000000000000000000000000000000123": "John Doe",
  },
  "gnosisdb": {
    "protocol": "https",
    "hostDev": "local.gnosisdbInstance",
    "hostProd": "gnosisdb-prod.gnosis.pm",
    "port": 443
  },
  "ethereum": {
    "protocol": "https",
    "hostDev": "local.ganacheInstance",
    "hostProd": "rinkeby.infura.io",
    "port": 443
  },
  "fetchMarketTimeInterval": 15000,
  "ravenPublicDSN": null,
  "interface": {
    "tournament": true,
    "tournamentName": "My Tournament",
    "tokenContract": "0x0000000000000000000000000000000000000000",
    "tokenIcon": "/assets/img/icons/icon_metamask.svg",
    "registrationContract": "0x0000000000000000000000000000000000000000",
    "logoPath": "/assets/img/placeholder.svg",
    "smallLogoPath": "/assets/img/placeholder_small.svg",
    "showScoreboard": true,
    "gameGuide": {
      "display": true,
      "type": "link",
      "url": "https://gnosis.pm"
    },
    "termsOfUse": {
      "url":"https://gnosis.pm"
    },
    "footer": {
      "display": true,
      "content": {
        "type": "file",
        "source": "Powered by Gnosis",
        "markdown": true
      }
    },
    "faviconPath": "assets/img/gnosis_logo_icon.svg",
    "provider": "METAMASK",
    "uportOptions": {
      "appName": "Tournament test",
      "clientId": "youruPortClientId",
      "network": "rinkeby",
      "privateKey": "youruPortPrivateKey",
      "useNotifications": false
    },
    "rewards": {
      "enabled": true,
      "rewardToken": {
        "symbol": "GNO",
        "contractAddress": "0xcb0f084504c4d47e47b41d610792c8401ef79e18",
        "network": "rinkeby"
      },
      "levels": [
        { "value": 5, "minRank": 1, "maxRank": 1 },
        { "value": 4, "minRank": 2, "maxRank": 2 },
        { "value": 3, "minRank": 3, "maxRank": 3 },
        { "value": 2, "minRank": 4, "maxRank": 4 },
        { "value": 1, "minRank": 5, "maxRank": 5 },
        { "value": 0.9, "minRank": 6, "maxRank": 7 },
        { "value": 0.8, "minRank": 8, "maxRank": 9 },
        { "value": 0.7, "minRank": 10, "maxRank": 11 },
        { "value": 0.6, "minRank": 12, "maxRank": 13 },
        { "value": 0.5, "minRank": 14, "maxRank": 15 },
        { "value": 0.4, "minRank": 16, "maxRank": 17 },
        { "value": 0.3, "minRank": 18, "maxRank": 19 },
        { "value": 0.2, "minRank": 19, "maxRank": 34 },
        { "value": 0.1, "minRank": 34, "maxRank": 100 }
      ]
    },
    "badges": {
      "enabled": true,
      "levels": [
        {
          "icon": "components/Dashboard/Metrics/assets/badges/junior-predictor.svg",
          "rank": "Junior Predictor",
          "minPredictions": 0,
          "maxPredictions": 4
        },
        {
          "icon": "components/Dashboard/Metrics/assets/badges/crystal-gazer.svg",
          "rank": "Crystal Gazer",
          "minPredictions": 5,
          "maxPredictions": 9
        },
        {
          "icon": "components/Dashboard/Metrics/assets/badges/fortune-teller.svg",
          "rank": "Fortune Teller",
          "minPredictions": 10,
          "maxPredictions": 14
        },
        {
          "icon": "components/Dashboard/Metrics/assets/badges/clairvoyant.svg",
          "rank": "Clairvoyant",
          "minPredictions": 15,
          "maxPredictions": 19
        },
        {
          "icon": "components/Dashboard/Metrics/assets/badges/psychic.svg",
          "rank": "Psychic",
          "minPredictions": 20
        }
      ]
    }
  }
}

Whitelisting

By default, markets, events and all other Gnosis Contracts won't be used in the platform, except if the creator is on the current environments whitelist. We currently support 3 environments, development - used for internal dev servers, staging - used as pre-production testing interface, production - used to production deployments. The interface supports different whitelists for each environment.

developmentWhitelist: {
  "0xWalletAddress": "Wallet Owner"
}

The name associated with the wallet address will be used for moderators to display names instead of addresses of other moderators.

The used Whitelist depends on environment variables, see Environment-Variables page.

GnosisDB

To utilize a different instance of GnosisDB instead of our public one, set host<Env> variables, namely hostDev, hostProd (there is no key for staging - it will use hostProd)

  "gnosisdb": {
    "protocol": "https",
    "hostDev": "local.gnosisdbInstance",
    "hostProd": "gnosisdb-prod.gnosis.pm",
    "port": 443
  },

Ethereum Blockchain Connection

For development purposes a local ganache instance is helpful when working directly with contracts or to quickly tests the creation of markets and market interaction. By default the interface will use a connection to an official ethereum network via infura, change this by altering hostDev and hostProd depending on your environment.

  "ethereum": {
    "protocol": "https",
    "hostDev": "local.ganacheInstance",
    "hostProd": "mainnet.infura.io",
    "port": 443
  },

Trading Interface Mode

  "interface": {
    "tournament": false,

Puts the interface in the generic trading interface mode. This mode is intended for usage without play-money tokens, no scoreboard, no game guide.

See here for special configurations special to the trading interface: Trading-Interface-Mode

Tournament Mode

  "interface": {
    "tournament": true,

Puts the interface into tournament mode, which adds a scoreboard (if configured), the game-guides (if configured) and allows the interface to be run like the Gnosis Olympia Tournament.

See here for special configurations special to the tournament interface: Tournament-Mode

Clone this wiki locally