Interface (ABI)
Copied!
Function Signatures
bb235d67: INVALID_RESULT_INDEX()
8aa14e43: QTUM_PERCENTAGE()
3381fc18: betFromOracle(address,uint8)
11f2a04d: calculateWinnings()
74513913: centralizedOracleSetResult(address,uint8,uint256)
4529fd93: decentralizedOracleFinalizeResult()
dee84d7e: decentralizedOracleSetResult(uint8,uint256)
1707490f: didWithdraw(address)
fe499d6e: eventName(uint256)
5979c6c5: eventResults(uint256)
871169b9: getBetBalances()
3c6e5310: getFinalResult()
a3cb679d: getTotalBets()
9a0e7d66: getTotalVotes()
95d3382a: getVoteBalances()
ca381d2e: numOfResults()
5b69a7d8: oracles(uint256)
8da5cb5b: owner()
0d4e8aed: resultIndex()
200d2ed2: status()
07e1df56: totalBotValue()
8030b87e: totalQtumValue()
f2fde38b: transferOwnership(address)
54fd4d50: version()
006a8a32: voteFromOracle(uint8,address,uint256)
cc42e83a: withdrawWinnings()
Event Hashes
event FinalResultSet(uint16 indexed _version, address indexed _eventAddress, uint8 _finalResultIndex)
14959b24f45a8f41b814b331ae09533db9d7e7962ca200e484f849a1fd1955aa
event WinningsWithdrawn(uint16 indexed _version, address indexed _winner, uint256 _qtumTokenWon, uint256 _botTokenWon)
2b37430897e8d659983fc8ae7ab83ad5b3be5a7db7ea0add5706731c2395f550
withdrawWinnings()
Winners of the event are allow to withdraw when finalizeResult() is called from the last DecentralizedOracle. This will withdraw both BOT and QTUM tokens to the Sender Address.
- Launch QT Wallet
 - Click on 
Smart Contracttab, then click onSendTosub tab - Set the 
Contract Addressand Interface (ABI) - 
Set the
FunctiontowithdrawWinnings(cc42e83a)
 - 
Set the
Sender Addressas the address withdrawing
 - 
Click
Send To Contractbutton - Wait for the transaction to be mined
 
numOfResults()
Returns the number of Event results.
- Launch QT Wallet
 - Click on 
Smart Contracttab, then click onCallsub tab - Set the 
Contract Addressand Interface (ABI) - Set the 
FunctiontonumOfResults(ca381d2e) - Click 
Call Contractbutton - Returns:
uint8is the number of Event results
 
status()
Returns the index of the current status of the Event.
0: Betting - first round of betting with QTUM
1: OracleVoting - subsequent rounds of voting with BOT
2: Collection - event is finished and winners can withdraw winnings
- Launch QT Wallet
 - Click on 
Smart Contracttab, then click onCallsub tab - Set the 
Contract Addressand Interface (ABI) - Set the 
Functiontostatus(200d2ed2) - Click 
Call Contractbutton - Returns: 
uint8is the index of the status
 
oracles()
Returns address of the Oracle and true/false indicating if the Oracle is finished.
- Launch QT Wallet
 - Click on 
Smart Contracttab, then click onCallsub tab - Set the 
Contract Addressand Interface (ABI) - Set the 
Functiontooracles(5b69a7d8) - Set the 
uint256of the index to get the the Oracle info - Click 
Call Contractbutton - Returns: 
bool didSetResultis the flag indicating if it is finishedaddress oracleAddressis the Oracle's address
 
getBetBalances()
Returns an array of QTUM bet balances placed by the sender. Shows 10 values and each index is the total bet amount for that result index.
- Launch QT Wallet
 - Click on 
Smart Contracttab, then click onCallsub tab - Set the 
Contract Addressand Interface (ABI) - Set the 
FunctiontogetBetBalances(871169b9) - Set the 
Sender Addressof the address to get the balances of - Click 
Call Contractbutton - Returns:
uint256[10]is the array of QTUM bet balances shown in Satoshi
 
getVoteBalances()
Returns an array of BOT vote balances placed by the sender. Shows 10 values and each index is the total vote amount for that result index.
- Launch QT Wallet
 - Click on 
Smart Contracttab, then click onCallsub tab - Set the 
Contract Addressand Interface (ABI) - Set the 
FunctiontogetVoteBalances(95d3382a) - Set the 
Sender Addressof the address to get the balances of - Click 
Call Contractbutton - Returns: 
uint256[10]is the array of BOT vote balances shown in Botoshi
 
totalQtumValue()
Returns the total QTUM value (in Satoshi) bet for all the results.
- Launch QT Wallet
 - Click on 
Smart Contracttab, then click onCallsub tab - Set the 
Contract Addressand Interface (ABI) - Set the 
FunctiontototalQtumValue(8030b87e) - Click 
Call Contractbutton - Returns:
uint256is the total Satoshi of the Event contract
 
totalBotValue()
Returns the total BOT value (in Botoshi) voted in all the Oracles.
- Launch QT Wallet
 - Click on 
Smart Contracttab, then click onCallsub tab - Set the 
Contract Addressand Interface (ABI) - Set the 
FunctiontototalBotValue(07e1df56) - Click 
Call Contractbutton - Returns: 
uint256is the total Botoshi of the Event contract
 
calculateWinnings()
Returns the total BOT and QTUM you will receive. If the status is not in the collection state, it will return 0.
- Launch QT Wallet
 - Click on 
Smart Contracttab, then click onCallsub tab - Set the 
Contract Addressand Interface (ABI) - Set the 
FunctiontocalculateWinnings(11f2a04d) - Set the 
Sender Addressof the address to calculate - Click 
Call Contractbutton - Returns: 
uint256is the Botoshi you will receive when withdrawinguint256is the Satoshi you will receive when withdrawing
 
resultIndex()
Returns the current result index. If it returns 255, then none of the Oracles have set the result.
- Launch QT Wallet
 - Click on 
Smart Contracttab, then click onCallsub tab - Set the 
Contract Addressand Interface (ABI) - Set the 
FunctiontoresultIndex(0d4e8aed) - Click 
Call Contractbutton - Returns:
uint8is the result index
 
getFinalResult()
Returns the final result index and true/false indicating if the result is finalized.
- Launch QT Wallet
 - Click on 
Smart Contracttab, then click onCallsub tab - Set the 
Contract Addressand Interface (ABI) - Set the 
FunctiontogetFinalResult(3c6e5310) - Click 
Call Contractbutton - Returns:
uint8is the final result indexboolis the flag indicating the final result is valid
 
didWithdraw()
Returns true or false if the address has withdrew their winnings from the Event.
- Launch QT Wallet
 - Click on 
Smart Contracttab, then click onCallsub tab - Set the 
Contract Addressand Interface (ABI) - Set the 
FunctiontodidWithdraw(1707490f) - Set the hex address of the address you want to check in the 
addressfield - Click 
Call Contractbutton - Returns: 
boolis the true/false indicating if that address has already withdrawn