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 Contract
tab, then click onSendTo
sub tab - Set the
Contract Address
and Interface (ABI) -
Set the
Function
towithdrawWinnings(cc42e83a)
-
Set the
Sender Address
as the address withdrawing -
Click
Send To Contract
button - Wait for the transaction to be mined
numOfResults()
Returns the number of Event results.
- Launch QT Wallet
- Click on
Smart Contract
tab, then click onCall
sub tab - Set the
Contract Address
and Interface (ABI) - Set the
Function
tonumOfResults(ca381d2e)
- Click
Call Contract
button - Returns:
uint8
is 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 Contract
tab, then click onCall
sub tab - Set the
Contract Address
and Interface (ABI) - Set the
Function
tostatus(200d2ed2)
- Click
Call Contract
button - Returns:
uint8
is 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 Contract
tab, then click onCall
sub tab - Set the
Contract Address
and Interface (ABI) - Set the
Function
tooracles(5b69a7d8)
- Set the
uint256
of the index to get the the Oracle info - Click
Call Contract
button - Returns:
bool didSetResult
is the flag indicating if it is finishedaddress oracleAddress
is 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 Contract
tab, then click onCall
sub tab - Set the
Contract Address
and Interface (ABI) - Set the
Function
togetBetBalances(871169b9)
- Set the
Sender Address
of the address to get the balances of - Click
Call Contract
button - 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 Contract
tab, then click onCall
sub tab - Set the
Contract Address
and Interface (ABI) - Set the
Function
togetVoteBalances(95d3382a)
- Set the
Sender Address
of the address to get the balances of - Click
Call Contract
button - 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 Contract
tab, then click onCall
sub tab - Set the
Contract Address
and Interface (ABI) - Set the
Function
tototalQtumValue(8030b87e)
- Click
Call Contract
button - Returns:
uint256
is 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 Contract
tab, then click onCall
sub tab - Set the
Contract Address
and Interface (ABI) - Set the
Function
tototalBotValue(07e1df56)
- Click
Call Contract
button - Returns:
uint256
is 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 Contract
tab, then click onCall
sub tab - Set the
Contract Address
and Interface (ABI) - Set the
Function
tocalculateWinnings(11f2a04d)
- Set the
Sender Address
of the address to calculate - Click
Call Contract
button - Returns:
uint256
is the Botoshi you will receive when withdrawinguint256
is 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 Contract
tab, then click onCall
sub tab - Set the
Contract Address
and Interface (ABI) - Set the
Function
toresultIndex(0d4e8aed)
- Click
Call Contract
button - Returns:
uint8
is the result index
getFinalResult()
Returns the final result index and true/false indicating if the result is finalized.
- Launch QT Wallet
- Click on
Smart Contract
tab, then click onCall
sub tab - Set the
Contract Address
and Interface (ABI) - Set the
Function
togetFinalResult(3c6e5310)
- Click
Call Contract
button - Returns:
uint8
is the final result indexbool
is 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 Contract
tab, then click onCall
sub tab - Set the
Contract Address
and Interface (ABI) - Set the
Function
todidWithdraw(1707490f)
- Set the hex address of the address you want to check in the
address
field - Click
Call Contract
button - Returns:
bool
is the true/false indicating if that address has already withdrawn