Skip to content
On chain real time chat for KMD assetchains
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
README.md
conf.py
createroom.py
getconf.py
history.py
listrooms.py
receive.py
register.py
send.py
setusername.py

README.md

On chain trollbox for cc activated KMD assetchains based on oracles contract

Dependencies/Prerequisites :

Komodo asset chains with oracles contract already running with -pubkey= set at startup. It is recommend to use a freshly created address.

For the time being, komodod must be master branch of StakedChain/komodo or jl777 branch of jl777/komodo

The default komodo data directory is set to $home/.komodo. If this is not correct for your machine, change ac_dir in getconf.py.

python3 and requests installed

sudo apt-get install python3 python3-pip libssl-dev
pip3 install python-bitcoinlib
pip3 install requests

Tutorial

These examples will use CFEK, but this will work on any chain with oracles contract activated.

Clone this repo

git clone https://github.com/StakedChain/trollbox
cd trollbox

Set your display name

./setusername.py CFEK <username> <password>

List rooms or create a new one

./listrooms.py
Chain:CFEK
./createroom.py 
Chain:CFEK
Roomname:<ROOMNAME>

After creating a room, creator must register to it and send a message. The listrooms.py script will show the latest message from the creator pubkey for each room. This allows the room creator to update the description dynamically just by sending a message from creator pubkey. This means the creator pubkey should not be used for chat. It should only be used to update what is shown in listrooms output. Rooms will not appear in listrooms until creator has sent a message.

Register to a room, use the output of listrooms or createroom to find an oracletxid

./register CFEK <oracletxid>

Wait for oraclessubscribe txs to confirm, open send script

./send.py CFEK <oracletxid>

Open another shell and start receive script

./receive CFEK <oracletxid>
You can’t perform that action at this time.