Deployed Contracts
QTUM Testnet
- EventFactory:
d49b4e6133957c635ecbabfb67fd14fe74da52cd
Interface (ABI)
Copied!
Function Signatures
b7b6d822: createTopic(address,bytes32[10],bytes32[10],uint256,uint256,uint256,uint256)
0f2fbeec: topics(bytes32)
54fd4d50: version()
Event Hashes
event TopicCreated(uint16 indexed _version, address indexed _topicAddress, bytes32[10] _name, bytes32[11] _resultNames, uint8 _numOfResults)
5f86751734872d7179519ded4087b938c7f8b03dd3511225a5fc97a687701126
createTopic()
Creates a new TopicEvent.
- Launch QT Wallet
- Click on
Smart Contract
tab - Click on
SendTo
sub tab -
Set the Contract Address and Interface (ABI)
-
Set the
Function
tocreateTopic(d0613dce)
-
Set the hash address of the CentralizedOracle in
address _oracle
field -
Set the TopicEvent name broken down by 32 byte blocks converted to hex in the
bytes32[10] _name
fields. These blocks need to be right-padded to 32 bytes.# Field 1 # "Who will be the next president i" = # 57686f2077696c6c20626520746865206e65787420707265736964656e742069 in hex # Field 2 # "n the 2020 election?" = # 6e20746865203230323020656c656374696f6e3f000000000000000000000000 in hex # Fields 3-10 # empty strings = # 0000000000000000000000000000000000000000000000000000000000000000 in hex
-
Set the TopicEvent result names converted to hex in the
bytes32[10] _resultName
fields. Same as the name fields, these blocks need to be right-padded to 32 bytes.# Field 1 # "Trump" = # 5472756d70000000000000000000000000000000000000000000000000000000 in hex # Field 2 # "Hilary" = # 48696c6172790000000000000000000000000000000000000000000000000000 in hex # Field 3 # "The Rock" = # 54686520526f636b000000000000000000000000000000000000000000000000 in hex # Field 4 # "Kanye West" = # 4b616e7965205765737400000000000000000000000000000000000000000000 in hex
-
Set the bettingStartBlock in the
uint256 _bettingStartBlock
field. -
Set the bettingEndBlock in the
uint256 _bettingEndBlock
field. This needs to be > than thebettingStartBlock
. -
Set the resultSettingStartBlock in the
uint256 _resultSettingStartBlock
field. This needs to be >= than thebettingEndBlock
. -
Set the resultSettingEndBlock in the
uint256 _resultSettingEndBlock
field. This needs to be > than theresultSettingStartBlock
. -
Set the
Gas Limit
to4000000
(4 million). Just to be safe the transaction goes through, all unused gas will be returned to you in the next coinstake transaction. -
Set the
Sender Address
-
Click
Send To Contract
button -
Wait for transaction to get mined