tx · 6xctEujtSLfCNQALaaFT3bXnPmTUaqCzagwrCzX73QAf 3N51W4fn1aAAdypU26EGUwNZPr3zikN3vwh: -0.01000000 Waves 2021.07.15 20:30 [1615019] smart account 3N51W4fn1aAAdypU26EGUwNZPr3zikN3vwh > SELF 0.00000000 Waves
{ "type": 13, "id": "6xctEujtSLfCNQALaaFT3bXnPmTUaqCzagwrCzX73QAf", "fee": 1000000, "feeAssetId": null, "timestamp": 1626370263255, "version": 2, "chainId": 84, "sender": "3N51W4fn1aAAdypU26EGUwNZPr3zikN3vwh", "senderPublicKey": "D7edN6TZzQ6PbyWHGFdGMPJkkRNjR1Y32g7MmU7AXR73", "proofs": [ "5XSEYqWPXYzpZeNzKu4CJxAA8pYS3RsvaGM86zM38oXZv6UxPDnCuNdxTE1gTwuQp8JK4AjoJZMSmDPsjfYFL4LM" ], "script": "base64:AAIFAAAAAAAAAAYIAhIAEgAAAAAEAAAAAAlCTE9DS1NURVAAAAAAAAAAAAoAAAAACUlOR09UQ09TVAAAAAAAAAAACgAAAAADUkVTAQAAACD3MI5LvZDW9hdsE5mwaJiKnQDcPy9bxLj3SQ9cNYQcswEAAAAKcmFuZG9taXplcgAAAAEAAAADaW52BAAAAAhsYXN0UGxheQQAAAAHJG1hdGNoMAkABBwAAAACBQAAAAR0aGlzAgAAAAhsYXN0UGxheQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAKQnl0ZVZlY3RvcgQAAAABcwUAAAAHJG1hdGNoMAUAAAABcwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAEVW5pdAEAAAAOR29sZE1pbmVyczIwMjEJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IEAAAABHJhbmQJAADLAAAAAgkAAMsAAAACCQAAywAAAAIJAADLAAAAAgkAAMsAAAACBQAAAAhsYXN0UGxheQgFAAAAA2ludgAAAA10cmFuc2FjdGlvbklkCAUAAAADaW52AAAAD2NhbGxlclB1YmxpY0tleQgFAAAACWxhc3RCbG9jawAAABN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kdPVAkAAaQAAAABBQAAAAluZXdJbmdvdHMJAAEsAAAAAgIAAAAFSU5HT1QJAAGkAAAAAQUAAAAJbmV3SW5nb3RzAAAAAAAAAAABAAAAAAAAAAAABwkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIAAAAAAAAAAAEFAAAAA25mdAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAMaW5nb3RzX2NvdW50BQAAAAluZXdJbmdvdHMJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACAgAAAAZpbmdvdF8JAAGkAAAAAQUAAAAJbmV3SW5nb3RzCQACWAAAAAEFAAAAA25mdAUAAAADbmlsAAAAAOWf0gQ=", "height": 1615019, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FwZQ6ea5UhPUtCnr3doyWupnW42F2tgFR4UATXKjPm3d Next: GSNYATbMQHiuL8haQzBnZ6rdzSDovVvmCJ44RNq5XfuW Diff:
Old | New | Differences | |
---|---|---|---|
40 | 40 | let o = d(j) | |
41 | 41 | let p = (toInt(o) % 1000) | |
42 | 42 | if ((l > lastBlock.height)) | |
43 | - | then throw((("Still wait block " + toString( | |
43 | + | then throw((("Still wait block " + toString(n)) + " for mining")) | |
44 | 44 | else [IntegerEntry(("wait_" + k), n), ScriptTransfer(j.caller, p, c)] | |
45 | 45 | } | |
46 | 46 | ||
79 | 79 | else { | |
80 | 80 | let u = Issue(("INGOT" + toString(s)), ("INGOT" + toString(s)), 1, 0, false) | |
81 | 81 | let v = calculateAssetId(u) | |
82 | - | [Issue(("INGOT" + toString(s)), ("INGOT" + toString(s)), 1, 0, false | |
82 | + | [Burn(c, 10), Issue(("INGOT" + toString(s)), ("INGOT" + toString(s)), 1, 0, false), ScriptTransfer(j.caller, 1, v), IntegerEntry("ingots_count", s), StringEntry(("ingot_" + toString(s)), toBase58String(v))] | |
83 | 83 | } | |
84 | 84 | } | |
85 | 85 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 10 | |
5 | 5 | ||
6 | 6 | let b = 10 | |
7 | 7 | ||
8 | 8 | let c = base58'HdveNhSzDRiEib9RfQ5EAxmpFVica4EqvBFd2S4pdbD4' | |
9 | 9 | ||
10 | 10 | func d (e) = { | |
11 | 11 | let f = { | |
12 | 12 | let g = getBinary(this, "lastPlay") | |
13 | 13 | if ($isInstanceOf(g, "ByteVector")) | |
14 | 14 | then { | |
15 | 15 | let h = g | |
16 | 16 | h | |
17 | 17 | } | |
18 | 18 | else if ($isInstanceOf(g, "Unit")) | |
19 | 19 | then base58'TGCTLFoHxJ8U7rcUofN' | |
20 | 20 | else throw("Match error") | |
21 | 21 | } | |
22 | 22 | let i = (((((f + e.transactionId) + e.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height)) | |
23 | 23 | sha256(i) | |
24 | 24 | } | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | @Callable(j) | |
28 | 28 | func goToMine () = { | |
29 | 29 | let k = toBase58String(j.caller.bytes) | |
30 | 30 | let l = { | |
31 | 31 | let g = getInteger(this, ("wait_" + k)) | |
32 | 32 | if ($isInstanceOf(g, "Int")) | |
33 | 33 | then { | |
34 | 34 | let m = g | |
35 | 35 | m | |
36 | 36 | } | |
37 | 37 | else 0 | |
38 | 38 | } | |
39 | 39 | let n = (lastBlock.height + a) | |
40 | 40 | let o = d(j) | |
41 | 41 | let p = (toInt(o) % 1000) | |
42 | 42 | if ((l > lastBlock.height)) | |
43 | - | then throw((("Still wait block " + toString( | |
43 | + | then throw((("Still wait block " + toString(n)) + " for mining")) | |
44 | 44 | else [IntegerEntry(("wait_" + k), n), ScriptTransfer(j.caller, p, c)] | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | ||
49 | 49 | @Callable(j) | |
50 | 50 | func craftIngot () = { | |
51 | 51 | let k = toBase58String(j.caller.bytes) | |
52 | 52 | let q = { | |
53 | 53 | let g = getInteger(this, ("craft_" + k)) | |
54 | 54 | if ($isInstanceOf(g, "Int")) | |
55 | 55 | then { | |
56 | 56 | let m = g | |
57 | 57 | m | |
58 | 58 | } | |
59 | 59 | else 0 | |
60 | 60 | } | |
61 | 61 | let r = { | |
62 | 62 | let g = getInteger(this, "ingots_count") | |
63 | 63 | if ($isInstanceOf(g, "Int")) | |
64 | 64 | then { | |
65 | 65 | let m = g | |
66 | 66 | m | |
67 | 67 | } | |
68 | 68 | else 0 | |
69 | 69 | } | |
70 | 70 | let s = (r + 1) | |
71 | 71 | if ((size(j.payments) == 0)) | |
72 | 72 | then throw("Payment not attached") | |
73 | 73 | else { | |
74 | 74 | let t = j.payments[0] | |
75 | 75 | if ((t.assetId != c)) | |
76 | 76 | then throw("PAY IN RES TOKEN ONLY") | |
77 | 77 | else if ((t.amount != b)) | |
78 | 78 | then throw((("PAY " + toString(b)) + " RES TOKEN ONLY")) | |
79 | 79 | else { | |
80 | 80 | let u = Issue(("INGOT" + toString(s)), ("INGOT" + toString(s)), 1, 0, false) | |
81 | 81 | let v = calculateAssetId(u) | |
82 | - | [Issue(("INGOT" + toString(s)), ("INGOT" + toString(s)), 1, 0, false | |
82 | + | [Burn(c, 10), Issue(("INGOT" + toString(s)), ("INGOT" + toString(s)), 1, 0, false), ScriptTransfer(j.caller, 1, v), IntegerEntry("ingots_count", s), StringEntry(("ingot_" + toString(s)), toBase58String(v))] | |
83 | 83 | } | |
84 | 84 | } | |
85 | 85 | } | |
86 | 86 | ||
87 | 87 |
github/deemru/w8io/026f985 27.52 ms ◑