tx · FaMJ1CiQ4NChrg6EwGxVS1eaNs4DJsAB4gATKKfgF2SJ

3N3FtJGWEXex57HajuvYKKHU33PS4fwmQH6:  -0.01000000 Waves

2021.06.30 21:24 [1593474] smart account 3N3FtJGWEXex57HajuvYKKHU33PS4fwmQH6 > SELF 0.00000000 Waves

{ "type": 13, "id": "FaMJ1CiQ4NChrg6EwGxVS1eaNs4DJsAB4gATKKfgF2SJ", "fee": 1000000, "feeAssetId": null, "timestamp": 1625077523376, "version": 2, "chainId": 84, "sender": "3N3FtJGWEXex57HajuvYKKHU33PS4fwmQH6", "senderPublicKey": "4f5Wt4MDH3Qt6DMuZQid3zoj463xCUkNdUWjUcChuedh", "proofs": [ "bzhNFek2ptUmvvuuU5Ad1jQHtg6s3QWPjhYvCdFdrJDdEnKdA1eUTSFwczMENcsmasVQzvApWJ2hbxoHBKDFFq2" ], "script": "base64:AAIFAAAAAAAAABYIAhIDCgEIEgMKAQgSAwoBCBIDCgEIAAAAAwAAAAADSlBOAQAAACBFqLGvjcwUgk68Uea/woMfyoMncahjkWcixg2ZF+iMxQAAAAAER09MRAEAAAAgLR44CaQZZUypJtV0fmMzG/7TvBdMmwMi7yR7k3IM0LwAAAAACUJMT0NLU1RFUAAAAAAAAAAACgAAAAQAAAABaQEAAAAHYnV5VW5pdAAAAAEAAAAHYXNzZXRJRAQAAAAEY29zdAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzCQABLAAAAAICAAAABWNvc3RfBQAAAAdhc3NldElEAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAAA3BtdAkBAAAABXZhbHVlAAAAAQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQJAAACAAAAAQIAAAAVd29ya3Mgd2l0aCB3YXZlcyBvbmx5Awk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c3NldElEAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAABmNhbGxlcgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAduZXdXYWl0CQAAZAAAAAIIBQAAAAlsYXN0QmxvY2sAAAAGaGVpZ2h0BQAAAAlCTE9DS1NURVADCQEAAAACIT0AAAACBQAAAAZjYWxsZXIFAAAABW93bmVyCQAAAgAAAAECAAAAEllvdSBhcmUgbm90IG93bmVyIQMJAABmAAAAAgUAAAAEd2FpdAgFAAAACWxhc3RCbG9jawAAAAZoZWlnaHQJAAACAAAAAQkAASwAAAACCQABLAAAAAICAAAAEVN0aWxsIHdhaXQgYmxvY2sgCQABpAAAAAEIBQAAAAlsYXN0QmxvY2sAAAAGaGVpZ2h0AgAAABIgZm9yIG5ldyBhZHZlbnR1cmUJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyAAAAAAAAB6EgBQAAAANKUE4JAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgIAAAAFd2FpdF8FAAAAB2Fzc2V0SUQFAAAAB25ld1dhaXQFAAAAA25pbAAAAABFHrkm", "height": 1593474, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BmBn2N8FN3kBp5iCMvYuidkkwNoqVVAA1WywhH57VCL2 Next: ChU8GmggvyKtTNc3BYh8DGjNs555DQHAUnujr1YzHUUe Diff:
OldNewDifferences
4040 }
4141 else throw("Can't find asset")
4242 }
43- throw(l)
43+ let n = split(l, "-")
44+ let o = n[2]
45+ throw(o)
4446 }
4547
4648
4749
4850 @Callable(d)
4951 func goToForest (e) = {
50- let n = {
52+ let p = {
5153 let g = getString(this, ("owner_" + e))
5254 if ($isInstanceOf(g, "String"))
5355 then {
5658 }
5759 else ""
5860 }
59- let o = {
61+ let q = {
6062 let g = getInteger(this, ("wait_" + e))
6163 if ($isInstanceOf(g, "Int"))
6264 then {
6567 }
6668 else 0
6769 }
68- let p = toBase58String(d.caller.bytes)
69- let q = (lastBlock.height + (c * 3))
70- let r = ((lastBlock.height % 100) + 1)
71- if ((p != n))
70+ let r = toBase58String(d.caller.bytes)
71+ let s = (lastBlock.height + (c * 3))
72+ let t = ((lastBlock.height % 100) + 1)
73+ if ((r != p))
7274 then throw("You are not owner!")
73- else if ((o > lastBlock.height))
75+ else if ((q > lastBlock.height))
7476 then throw((("Still wait block " + toString(lastBlock.height)) + " for forest-walking"))
75- else [ScriptTransfer(d.caller, r, b), IntegerEntry(("wait_" + e), q)]
77+ else [ScriptTransfer(d.caller, t, b), IntegerEntry(("wait_" + e), s)]
7678 }
7779
7880
7981
8082 @Callable(d)
8183 func goToAdventure (e) = {
82- let n = {
84+ let p = {
8385 let g = getString(this, ("owner_" + e))
8486 if ($isInstanceOf(g, "String"))
8587 then {
8890 }
8991 else ""
9092 }
91- let o = {
93+ let q = {
9294 let g = getInteger(this, ("wait_" + e))
9395 if ($isInstanceOf(g, "Int"))
9496 then {
9799 }
98100 else 0
99101 }
100- let p = toBase58String(d.caller.bytes)
101- let q = (lastBlock.height + c)
102- if ((p != n))
102+ let r = toBase58String(d.caller.bytes)
103+ let s = (lastBlock.height + c)
104+ if ((r != p))
103105 then throw("You are not owner!")
104- else if ((o > lastBlock.height))
106+ else if ((q > lastBlock.height))
105107 then throw((("Still wait block " + toString(lastBlock.height)) + " for new adventure"))
106- else [ScriptTransfer(d.caller, 500000, a), IntegerEntry(("wait_" + e), q)]
108+ else [ScriptTransfer(d.caller, 500000, a), IntegerEntry(("wait_" + e), s)]
107109 }
108110
109111
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'5gvKrU3yetdPyMisTo8JiE737U9ZXLp4XkCy2aeE7BbA'
55
66 let b = base58'4385BhNBpLMpBM2Gdt8Z6edjdxYgV4Eb2eE5VvUmxrLK'
77
88 let c = 10
99
1010 @Callable(d)
1111 func buyUnit (e) = {
1212 let f = {
1313 let g = getInteger(this, ("cost_" + e))
1414 if ($isInstanceOf(g, "Int"))
1515 then {
1616 let h = g
1717 h
1818 }
1919 else 0
2020 }
2121 let i = value(d.payments[0])
2222 if (isDefined(i.assetId))
2323 then throw("works with waves only")
2424 else if ((i.amount != f))
2525 then throw("Wrong cost")
2626 else [ScriptTransfer(d.caller, 1, fromBase58String(e)), StringEntry(("owner_" + e), toBase58String(d.caller.bytes))]
2727 }
2828
2929
3030
3131 @Callable(d)
3232 func fightWith (j) = {
3333 let k = fromBase58String(j)
3434 let l = {
3535 let g = assetInfo(k)
3636 if ($isInstanceOf(g, "Asset"))
3737 then {
3838 let m = g
3939 m.name
4040 }
4141 else throw("Can't find asset")
4242 }
43- throw(l)
43+ let n = split(l, "-")
44+ let o = n[2]
45+ throw(o)
4446 }
4547
4648
4749
4850 @Callable(d)
4951 func goToForest (e) = {
50- let n = {
52+ let p = {
5153 let g = getString(this, ("owner_" + e))
5254 if ($isInstanceOf(g, "String"))
5355 then {
5456 let h = g
5557 h
5658 }
5759 else ""
5860 }
59- let o = {
61+ let q = {
6062 let g = getInteger(this, ("wait_" + e))
6163 if ($isInstanceOf(g, "Int"))
6264 then {
6365 let h = g
6466 h
6567 }
6668 else 0
6769 }
68- let p = toBase58String(d.caller.bytes)
69- let q = (lastBlock.height + (c * 3))
70- let r = ((lastBlock.height % 100) + 1)
71- if ((p != n))
70+ let r = toBase58String(d.caller.bytes)
71+ let s = (lastBlock.height + (c * 3))
72+ let t = ((lastBlock.height % 100) + 1)
73+ if ((r != p))
7274 then throw("You are not owner!")
73- else if ((o > lastBlock.height))
75+ else if ((q > lastBlock.height))
7476 then throw((("Still wait block " + toString(lastBlock.height)) + " for forest-walking"))
75- else [ScriptTransfer(d.caller, r, b), IntegerEntry(("wait_" + e), q)]
77+ else [ScriptTransfer(d.caller, t, b), IntegerEntry(("wait_" + e), s)]
7678 }
7779
7880
7981
8082 @Callable(d)
8183 func goToAdventure (e) = {
82- let n = {
84+ let p = {
8385 let g = getString(this, ("owner_" + e))
8486 if ($isInstanceOf(g, "String"))
8587 then {
8688 let h = g
8789 h
8890 }
8991 else ""
9092 }
91- let o = {
93+ let q = {
9294 let g = getInteger(this, ("wait_" + e))
9395 if ($isInstanceOf(g, "Int"))
9496 then {
9597 let h = g
9698 h
9799 }
98100 else 0
99101 }
100- let p = toBase58String(d.caller.bytes)
101- let q = (lastBlock.height + c)
102- if ((p != n))
102+ let r = toBase58String(d.caller.bytes)
103+ let s = (lastBlock.height + c)
104+ if ((r != p))
103105 then throw("You are not owner!")
104- else if ((o > lastBlock.height))
106+ else if ((q > lastBlock.height))
105107 then throw((("Still wait block " + toString(lastBlock.height)) + " for new adventure"))
106- else [ScriptTransfer(d.caller, 500000, a), IntegerEntry(("wait_" + e), q)]
108+ else [ScriptTransfer(d.caller, 500000, a), IntegerEntry(("wait_" + e), s)]
107109 }
108110
109111

github/deemru/w8io/169f3d6 
60.25 ms