diff options
-rw-r--r-- | shop.lua | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -3,6 +3,8 @@ key=assert(settings.get"krist.pkey","please set private key") -- d@ac.kst our_name = {"d","ac"} +PRICE = 5 + sres =textutils.unserializeJSON( http.post("https://krist.dev/ws/start","privatekey="..key).readAll()) assert(sres.ok,"not ok") @@ -35,7 +37,10 @@ function proctrans(tr) if tr.to ~= our_addr then return end if tr.type ~= "transfer" then return end if not (tr.sent_metaname == our_name[1] and tr.sent_name == our_name[2]) then return end - return parsemeta(tr.metadata) + local meta = parsemeta(tr.metadata) + + + end while true do @@ -49,6 +54,7 @@ while true do m.write(our_addr) end if msg.type == "event" and msg.event == "transaction" then + print(msgtxt) require"cc.pretty".pretty_print(proctrans(msg.transaction)) end end |