summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shop.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/shop.lua b/shop.lua
index ae6acc8..bfa819c 100644
--- a/shop.lua
+++ b/shop.lua
@@ -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