-
Notifications
You must be signed in to change notification settings - Fork 14
Configuration
Inside the /config/environments folder you can find all different environments that can be built with the gnosis-management interface. You can easily add your own here, which will be merged with the base configurations (/config/config.json, /config/interface.config.json).
Don't make changes to config/config.json or config/interface.config.json, instead create your own environments and pass GNOSIS_ENV as an env variable to set the environment that should be used.
Inside the config.json you set configuration variables for the application, like the gnosis connection and which market creators you allow on your platform:
Defines which connection should be used to communicate with GnosisDB. You only need Read Access to use the Database with the the management interface, as it's only purpose is to synchronize previous blocks of interactions with prediction markets, with the interface.
{
...
"gnosisdb": {
"protocol": "https",
"host": "localhost",
"port": 443
}
...
}
Defines the Ethereum Node that should be used for all providers (Metamask, uPort, etc). This basically defines the network you want to use.
{
...
"ethereum": {
"protocol": "https",
"host": "rinkeby.infura.io",
"port": 443
}
...
}
Whitelist defines which accounts you want to allow as market creators. We currently limit the interface by only allowing markets from specified addresses.
{
...
"whitelist": {
"0x123": "John Foo"
}
...
}
To configure different features and to enable the tournament mode, you need to configure the interface config based upon /config/config.interface.json
Defines the logos used in the interface.
{
...
"logo": {
"regular": "assets/img/defaultSizeLogo.png",
"small": "assets/img/smallSizeLogo.png",
"favicon": "assets/img/favicon.png",
}
...
}
Defines tournament settings and enables/disables the tournament mode.
{
...
"tournament": {
"enabled": true,
"name": "My Tournament Name",
"registration": {
"enabled": true,
"contractAddress": "0x79da1c9ef6bf6bc64e66f8abffddc1a093e50f13"
}
}
}
-
tournament.registration.contractAddressrefers to the registration contract that should be used, when the user uses a provider (Metamask, Hardware Wallets) without user verification. This Contract will pair users from your tournaments network with their mainnet addresses, providing a layer of verification.
Defines the ERC20 token that should be used for the platform. Please note that gas payments are still in ETH (unwrapped) and will be required by your users to interact with the platform
{
...
"collateralToken": {
"address": "0x123",
"icon": "assets/img/myTokenImage.png"
}
...
}
Defines the provider settings and allows setting custom options for each of the providers. Providers are wallets, ledgers and certain browsers. Basically 3rd Party Software that allows interaction with the ethereum network.
{
...
"providers": {
"default": "METAMASK",
"options": {
"UPORT": {
"appName": "Your Tournamet Name",
"clientId": "yourClientId",
"network": "rinkeby",
"privateKey": "yourPrivateKey",
"useNotifications": false
}
}
}
...
}
-
providers.defaultspecifies the default provider your interface should expect. This provider will be used to tell users which wallet to get in order to interact with the platform and will always be prefered if multiple providers are available. -
providers.options.UPORT.appNameis the name that will show up in the uPort App when interacting with your platform. -
providers.options.UPORT.useNotificationsenables uPorts Push Notification System, it will send a push notification to the users Phone instead of requiring the user to scan a QRCode. Please see https://uport.me for me information regarding uPort.
The scoreboard shows users in a competition style layout on who has the best predictions. This needs to be setup with GnosisDB.
{
...
"scoreboard": {
"enabled": true
}
...
}
You can use our default gameguide from Olympia as a starter, or link your own website here, to introduce your users to how your platform works.
{
...
"gameGuide": {
"enabled": true,
"type": "default",
"url": "https://example.org"
}
...
}
-
gameGuide.typeallowslinkto link to an external website specified asgameGuide.urlanddefaultto enable the Olympia Tournament Gameguide, written by us.
Allows you to customize the terms of use. These can obviously not be disabled.
{
...
"termsOfUse": {
"url": "https://linkToExternalSite"
}
...
}
Change the Footer Element on the website.
{
...
"footer": {
"enabled": true,
"content": {
"type": "text",
"source": "Powered by Gnosis",
"markdown": true
}
}
...
}
-
footer.content.typeallows:-
textto write your own footer content inline -
fileto use the file insrc/components/Footer/footerText.txtto customize the text
-
Enables the reward system to show the user which reward he can get based on his correct predictions.
{
...
"rewards": {
"enabled": true,
"rewardToken": {
"symbol": "RWD",
"contractAddress": "0x123",
"networkId": 3
},
"claimReward": {
"claimStart": "2018-04-01T12:00:00",
"claimUntil": "2018-05-01T12:00:00",
"contractAddress": "0x123",
"networkId": 3
},
"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 }
]
},
...
}
-
reward.rewardTokendefines the ERC20 token that will be used as a reward. You can chose on which network this token will be received using thenetworkoption.3is Rinkeby. -
reward.claimRewarddefines at which time the reward claiming (basically when the tournament ends) will start and how long users have to claim their rewards, until it vanishes. The contract that must be specified here must be implemented according to RewardClaimHandler.sol and the times/dates must be hardcoded in your own contract! -
reward.levelsspecify the reward levels you allow on your platform. In this example a total of 30 RWD will be given to the users. You can specify ranged by usingminRankandmaxRankas inclusive ranges in which the user is eligible for this rewards.value.
Badges are symbols shown in the Header Section of the site and add gamification. The badges are obtained by making predictions on the markets. Example here is used in Olympia
{
...
"badges": {
"enabled": true,
"ranks": [
{
"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
}
]
}
...
}
-
ranks[...].icondefines the image used to display this badge. -
ranks[...].rankdefines the rank that is associated with this badge.