36 – Blockchain Game and First NFT Trading on Dex

jl777:

tokenorders 404cc1a843cb43bcd32d3bc27278b7011baca09812243daf8161eeabbfc08462
[
{
“funcid”: “s”,
“txid”: “3073cf253122480d26ff5cb299f66eb51ce085dd16a00c2f25369a141c726400”,
“vout”: 0,
“amount”: “1”,
“askamount”: “1”,
“origaddress”: “RXF1foT1iPKCNWpW6Jzrw1hu3FFXRVY9tS”,
“tokenid”: “404cc1a843cb43bcd32d3bc27278b7011baca09812243daf8161eeabbfc08462”,
“totalrequired”: “1.00000000”,
“price”: “1.00000000”
}
]

Can someone buy my character? And then try to use it with register

SHossain:
I’ll try to buy now

jl777
@SHossain you need to do a tokenfillask tokenid asktxid fillunits
not a tokenbid

SHossain:
Yes corrected my mistake. I did a fillask. Your order is now fullfilled

jl777:
It filled. What does cclib players 17 show for you?

SHossain:

./komodo-cli -ac_name=ROGUE cclib players 17
{
“name”: “rogue”,
“method”: “players”,
“playerdata”: [
],
“numplayerdata”: 0
}

Probably next block needed

jl777:
Yes, but it disappeared from my list!

Jorian:
It’s in the void now

jl777:
The worlds first Rogue player data onchain DEX swap

jorian;
Player transfer in progress

SHossain:

e.242 f.c game.ce1b8e486034a071232d3eb79014560815406e1e9d3db79664bf50e7aaeb0221 regslot.856919494 psize.97
e.242 f.c game.ce1b8e486034a071232d3eb79014560815406e1e9d3db79664bf50e7aaeb0221 regslot.923897286 psize.51
e.242 f.c game.ce1b8e486034a071232d3eb79014560815406e1e9d3db79664bf50e7aaeb0221 regslot.856919494 psize.57

stdout

jl777:
Please record the txids, maybe even tweet it so someone else won’t claim to be first 2 years from now

ca333:
Tweeting and going to store the TX IDs in the BTC and KMD chains

jl777:
@SHossain if it doesn’t appear in your players list, get the latest, it has a possible fix for it

SHossain:
@ca333 this was the first tokenfillask order:

./komodo-cli -ac_name=ROGUE tokenfillask 404cc1a843cb43bcd32d3bc27278b7011baca09812243daf8161eeabbfc08462 3073cf253122480d26ff5cb299f66eb51ce085dd16a00c2f25369a141c726400 1

Resulting TXID for the swap:

816807d908d1e4b6ff4496a1f0d0797d6f063db9f28f4f2817a3dd8558e8c124

cclib players 17
{
“name”: “rogue”,
“method”: “players”,
“playerdata”: [
{
“playertxid”: “404cc1a843cb43bcd32d3bc27278b7011baca09812243daf8161eeabbfc08462”,
“data”: “…”,
“pack”: [
“Some food”,
“+1 ring mail [protection 4]”,
“A +1,+1 mace”,
“A +1,+0 short bow”,
“39 +0,+0 arrows”,
“A scroll of remove curse”,
“A scroll of identify potion”,
“A scroll of sleep”,
“2 scrolls of identify scroll”,
“A scroll of enchant armor”,
“A potion of hallucination(silver)”,
“A potion of magic detection(violet)”
],
“packsize”: 12,
“hitpoints”: 23,
“strength”: 16,
“level”: 3,
“experience”: 32,
“dungeonlevel”: 3
}
],
“numplayerdata”: 1
}

jl777:
And above had the player data but the big test is if @SHossain can use that playerdata in his next game

SHossain:
Updating my node

jl777:
Yes definitely you need the latest one from 20 min ago. 70% chance says even if you can see it, it won’t work with register

CHMEX:
@SHossain recompiled

SHossain:
Thanks @CHMEX

jl777:
After players rpc call, you will see some lines:

e.242 f.c game.407957995317cda37d0d995668bcb0a35da474f368d51bceae4937dc33940321 regslot.1057191335 psize.188
e.242 f.c game.407957995317cda37d0d995668bcb0a35da474f368d51bceae4937dc33940321 regslot.856913319 psize.53

SHossain:
I still see same output:

./komodo-cli -ac_name=ROGUE cclib players 17
{
“name”: “rogue”,
“method”: “players”,
“playerdata”: [
],
“numplayerdata”: 0
}

stdout displays:

e.242 f.c game.ce1b8e486034a071232d3eb79014560815406e1e9d3db79664bf50e7aaeb0221 regslot.856919494 psize.97
e.242 f.c game.ce1b8e486034a071232d3eb79014560815406e1e9d3db79664bf50e7aaeb0221 regslot.923897286 psize.51
e.242 f.c game.ce1b8e486034a071232d3eb79014560815406e1e9d3db79664bf50e7aaeb0221 regslot.856919494 psize.57

jl777:
@SHossain what about using token commands? ‘tokenbalance’

SHossain:

./komodo-cli -ac_name=ROGUE tokenbalance 404cc1a843cb43bcd32d3bc27278b7011baca09812243daf8161eeabbfc08462
{
“result”: “success”,
“CCaddress”: “R9XFYbZ15tNZR36GtNUGLVRybeLcPxkCXx”,
“tokenid”: “404cc1a843cb43bcd32d3bc27278b7011baca09812243daf8161eeabbfc08462”,
“balance”: 1
}

1 ROGUE reduced from my total balance for this purchase

jl777:
Ok, so you have it

SHossain:
Yep… now we need playerdata to display it

ca333:
Well done – this is writing blockchain history. Once again.

SHossain:
@ca333 please get some tweets out. We will retweet.

ca333:
Already done @SHossain

I am reaching out to influencers to do a dedicated coverage of this. I think no one really understands what this technological innovation means for the blockchain (gaming) industry. We just did a proof of concept for blockchain gaming and avatar trading. It’s basically like if you would play World of Warcraft ON the blockchain and also if you would trade your avatar ON the blockchain! All through blockchain based technologies and KMD’s DEX!

jl777:
Actually a bit better. You play using native game engine (graphics) it is just able to be recalculated and validated by the blockchain
so the game events becomes the transaction whose end state is calculated. Trustless multiplayer competitions. Without this, people could just edit their character data and put whatever info they want into it.

ca333:
In this use-case it represents “just” an avatar. But we all know what else it could represent. Literally endless possibilities to utilize non-fungible tokens tech.

jl777:
With rogue-CC, only a set of user inputs that creates the identical data on all nodes is accepted.  SHossain what does cclib playerinfo 17 “[%22<txid>%22]” show for your txid that bought the character? For my original txid

SHossain:
Just a min. Updating to your latest commit

./komodo-cli -ac_name=ROGUE cclib playerinfo 17 \”[%22404cc1a843cb43bcd32d3bc27278b7011baca09812243daf8161eeabbfc08462%22]\”
{
“result”: “success”,
“name”: “rogue”,
“method”: “playerinfo”,
“player”: {
“playertxid”: “404cc1a843cb43bcd32d3bc27278b7011baca09812243daf8161eeabbfc08462”,
“data”: “LONG_HEX”,
“pack”: [
“Some food”,
“+1 ring mail [protection 4]”,
“A +1,+1 mace”,
“A +1,+0 short bow”,
“39 +0,+0 arrows”,
“A scroll of remove curse”,
“A scroll of identify potion”,
“A scroll of sleep”,
“2 scrolls of identify scroll”,
“A scroll of enchant armor”,
“A potion of hallucination(silver)”,
“A potion of magic detection(violet)”
],
“packsize”: 12,
“hitpoints”: 23,
“strength”: 16,
“level”: 3,
“experience”: 32,
“dungeonlevel”: 3
}
}

jl777:
What about for 816807d908d1e4b6ff4496a1f0d0797d6f063db9f28f4f2817a3dd8558e8c124 ?

SHossain:

./komodo-cli -ac_name=ROGUE cclib playerinfo 17 \”[%22816807d908d1e4b6ff4496a1f0d0797d6f063db9f28f4f2817a3dd8558e8c124%22]\”
{
“result”: “success”,
“name”: “rogue”,
“method”: “playerinfo”,
“status”: “error”,
“error”: “invalid playerdata”
}

jl777:
Ok, that is the problem. That is your txid that it should use, but it is a “pointer” to the real data. I think I need to set this up locally. Can you put up a different playerdata for sale?

SHossain:
Ok, let me play and save a profile

jl777:
There is a test version, maybe it is just one place that needs to be fixed. If this doesn’t work it will take a while to find and fix all half dozen plances

SHossain:
Updating

jl777:
@SHossain just do a tokenask for the original and I will buy it back from you

SHossain:
Ok

./komodo-cli -ac_name=ROGUE tokenask 1 404cc1a843cb43bcd32d3bc27278b7011baca09812243daf8161eeabbfc08462 1
0eb88c650730e5836e30294924327bb484df61797825cfcc1fdbd12aed0e83ea

Done. Blocks are bit slow coming now, I’m using 24 threads to mine

./komodo-cli -ac_name=ROGUE tokenorders 404cc1a843cb43bcd32d3bc27278b7011baca09812243daf8161eeabbfc08462
[
{
“funcid”: “s”,
“txid”: “0eb88c650730e5836e30294924327bb484df61797825cfcc1fdbd12aed0e83ea”,
“vout”: 0,
“amount”: “1”,
“askamount”: “1”,
“origaddress”: “REp5Zt6awH7jZD85tumaJ6Kbhy8D25SvLg”,
“tokenid”: “404cc1a843cb43bcd32d3bc27278b7011baca09812243daf8161eeabbfc08462”,
“totalrequired”: “1.00000000”,
“price”: “1.00000000”
}
]

jl777:
Perfect. I just bought it back, now it is 2 levels removed and I will get it all happy

SHossain:
And the order is now gone

jl777:

tokenbalance 404cc1a843cb43bcd32d3bc27278b7011baca09812243daf8161eeabbfc08462
{
“result”: “success”,
“CCaddress”: “RVTMyyXwQczCmeQYynPsDJeGgPFRVhwRJN”,
“tokenid”: “404cc1a843cb43bcd32d3bc27278b7011baca09812243daf8161eeabbfc08462”,
“balance”: 1
}

I got it back!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s