Skip to content

Configuration

Andre edited this page Apr 6, 2018 · 10 revisions

Configuring the Interface

Sample Configuration

{
  "developmentWhitelist": {
    "0x0000000000000000000000000000000000000001": "John Doe",
  },
  "stagingWhitelist": {
    "0x0000000000000000000000000000000000000001": "John Doe",
  },
  "productionWhitelist": {
    "0x0000000000000000000000000000000000000001": "John Doe",
  },
  "gnosisdb": {
    "protocol": "https",
    "hostDev": "local.gnosisdbInstance",
    "hostProd": "gnosisdb-prod.gnosis.pm",
    "port": 443
  },
  "ethereum": {
    "protocol": "https",
    "hostDev": "local.ganacheInstance",
    "hostProd": "mainnet.infura.io",
    "port": 443
  },
  "fetchMarketTimeInterval": 15000,
  "interface": {
    "tournament": false,
    "token": "0xd19bce9f7693598a9fa1f94c548b20887a33f141",
    "logoPath": "/assets/img/placeholder.svg",
    "smallLogoPath": "/assets/img/placeholder.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": "uPort Client Id",
      "network": "rinkeby",
      "privateKey": "uPort Private Key",
      "useNotifications": false
    }
  }
}

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

Tournament Mode

Clone this wiki locally