Event

contract Event is EventData
Title:Event contract - Provide basic functionality required by different event types
Author:Stefan George - <stefan@gnosis.pm>
function buyAllOutcomes(uint collateralTokenCount)
public

Buys equal number of tokens of all outcomes, exchanging collateral tokens and sets of outcome tokens 1:1

Parameters:
  • collateralTokenCount – Number of collateral tokens
function sellAllOutcomes(uint outcomeTokenCount)
public

Sells equal number of tokens of all outcomes, exchanging collateral tokens and sets of outcome tokens 1:1

Parameters:
  • outcomeTokenCount – Number of outcome tokens
function setOutcome()
public

Sets winning event outcome

function getOutcomeCount()
public
view
returns (uint8)

Returns outcome count

Return:Outcome count
function getOutcomeTokens()
public
view
returns (OutcomeToken[] memory)

Returns outcome tokens array

Return:Outcome tokens
function getOutcomeTokenDistribution(address owner)
public
view
returns (uint[] memory outcomeTokenDistribution)

Returns the amount of outcome tokens held by owner

Return:Outcome token distribution
function getEventHash()
public
view
returns (bytes32)

Calculates and returns event hash

Return:Event hash
function redeemWinnings()
public
returns (uint)

Exchanges sender’s winning outcome tokens for collateral tokens

Return:Sender’s winnings