tx · 4JuAEq9idtYYXPpSW6uyhZhvFXJMk7iLYc9AGRsgVaQ7 3Mr97MBt1TwRZHBK8R1EFDz8S8mxui5U4zB: -0.01400000 Waves 2021.06.04 05:05 [1555003] smart account 3Mr97MBt1TwRZHBK8R1EFDz8S8mxui5U4zB > SELF 0.00000000 Waves
{ "type": 13, "id": "4JuAEq9idtYYXPpSW6uyhZhvFXJMk7iLYc9AGRsgVaQ7", "fee": 1400000, "feeAssetId": null, "timestamp": 1622772396837, "version": 2, "chainId": 84, "sender": "3Mr97MBt1TwRZHBK8R1EFDz8S8mxui5U4zB", "senderPublicKey": "CQ7vntBAYh2QZcKcqiiyEnQWWXsr98ysDptD23Wgxmvb", "proofs": [ "3XBwHC8xqaqi2mCWXcjNwXhohn857iNzubY3gpSTZRtXroQmuF7Qhky8v5QoMBwb7VEXwaTMoh1CihrWFbcLPDi9" ], "script": "base64:AAIEAAAAAAAAAAQIAhIAAAAABAAAAAAIa2l0dGVuSWQCAAAALEd1b2JjSHZXOVdxb3Rua0dVajdKa3BjYlh0Z1ZmQjM3VEE0SmtnU2o5UWJiAQAAAA9nZXRSYW5kb21OdW1iZXIAAAAEAAAACHZhcmlhbnRzAAAABHR4SWQAAAAUaGF0Y2hpbmdGaW5pc2hIZWlnaHQAAAAGb2Zmc2V0BAAAAA9yYW5kb21TZWVkQmxvY2sJAQAAAAV2YWx1ZQAAAAEJAAPtAAAAAQkAAGUAAAACBQAAABRoYXRjaGluZ0ZpbmlzaEhlaWdodAAAAAAAAAAAAQQAAAAKcmFuZG9tSGFzaAkAAfcAAAABCQAAywAAAAIFAAAABHR4SWQJAQAAAAV2YWx1ZQAAAAEIBQAAAA9yYW5kb21TZWVkQmxvY2sAAAADdnJmCQAAagAAAAIJAASyAAAAAgUAAAAKcmFuZG9tSGFzaAkAAGgAAAACBQAAAAZvZmZzZXQAAAAAAAAAAAgFAAAACHZhcmlhbnRzAQAAAApnZW5lcmF0aW9uAAAAAQAAAANudW0DAwkAAGYAAAAC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AAAACGdlbmVDb2RlAAAAAQUAAAAKdHlwZVJhbmRvbQkABEwAAAACBQAAAAhpc3N1ZU5mdAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIAAAAAAAAAAAEFAAAACmlzc3VlTmZ0SWQJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAAlgAAAABCQEAAAAFdmFsdWUAAAABBQAAAAppc3N1ZU5mdElkBQAAAAhnZW5ldHlwZQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAANaXNzdWVRdWFudGl0eQUAAAALbmV3UXVhbnRpdHkFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5pprkoA==", "height": 1555003, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GwWNB1rwifJaMufyxCAbEwwHRoALT87F91BVDVKj5GCT Next: AmoRKUo7aFbWtwaKs85ytz6kJ27svWnZDFdAUSdXojFS Full:
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let a = | |
4 | + | let a = "GuobcHvW9WqotnkGUj7JkpcbXtgVfB37TA4JkgSj9Qbb" | |
5 | 5 | ||
6 | - | func b (c) = if ((c > 54)) | |
7 | - | then 54 | |
8 | - | else if ((0 > c)) | |
9 | - | then 0 | |
10 | - | else c | |
11 | - | ||
12 | - | ||
13 | - | @Callable(d) | |
14 | - | func resultHandicap (e,f,g,h) = { | |
15 | - | let i = max([e, f, g]) | |
16 | - | let j = (i - 2) | |
17 | - | let k = b(j) | |
18 | - | $Tuple2([IntegerEntry((h + "_handicapIndex"), k), Reissue(a, k, false), ScriptTransfer(d.caller, k, a)], k) | |
6 | + | func b (c,d,e,f) = { | |
7 | + | let g = value(blockInfoByHeight((e - 1))) | |
8 | + | let h = sha256((d + value(g.vrf))) | |
9 | + | (toInt(h, (f * 8)) % c) | |
19 | 10 | } | |
20 | 11 | ||
21 | 12 | ||
22 | - | @Verifier(l) | |
23 | - | func m () = sigVerify(l.bodyBytes, l.proofs[0], l.senderPublicKey) | |
13 | + | func i (j) = if (if ((j > 0)) | |
14 | + | then true | |
15 | + | else (300 >= j)) | |
16 | + | then "G1" | |
17 | + | else if (if ((j > 300)) | |
18 | + | then true | |
19 | + | else (1000 >= j)) | |
20 | + | then "G2" | |
21 | + | else "G3" | |
22 | + | ||
23 | + | ||
24 | + | func k (j) = if ((j == 100)) | |
25 | + | then "II-II-II-II" | |
26 | + | else if (if ((j >= 1)) | |
27 | + | then (3 >= j) | |
28 | + | else false) | |
29 | + | then "BB-BB-BB-BB" | |
30 | + | else if (if ((j > 3)) | |
31 | + | then (8 >= j) | |
32 | + | else false) | |
33 | + | then "CC-CC-CC-CC" | |
34 | + | else if (if ((j > 8)) | |
35 | + | then (15 >= j) | |
36 | + | else false) | |
37 | + | then "DD-DD-DD-DD" | |
38 | + | else if (if ((j > 15)) | |
39 | + | then (24 >= j) | |
40 | + | else false) | |
41 | + | then "EE-EE-EE-EE" | |
42 | + | else if (if ((j > 24)) | |
43 | + | then (35 >= j) | |
44 | + | else false) | |
45 | + | then "FF-FF-FF-FF" | |
46 | + | else if (if ((j > 35)) | |
47 | + | then (48 >= j) | |
48 | + | else false) | |
49 | + | then "GG-GG-GG-GG" | |
50 | + | else if (if ((j > 48)) | |
51 | + | then (51 >= j) | |
52 | + | else false) | |
53 | + | then "AA-AA-AA-AA" | |
54 | + | else "HH-HH-HH-HH" | |
55 | + | ||
56 | + | ||
57 | + | @Callable(l) | |
58 | + | func giveBirthKitten () = { | |
59 | + | let m = l.payments[0] | |
60 | + | let n = toBase58String(value(m.assetId)) | |
61 | + | if ((n != a)) | |
62 | + | then throw("Please send Kitten token.") | |
63 | + | else { | |
64 | + | let o = m.amount | |
65 | + | if ((o > 300)) | |
66 | + | then throw("Amount of Kitten tokens sent is 3 tokens.") | |
67 | + | else if ((300 > o)) | |
68 | + | then throw("Amount of Kitten tokens sent is 3 tokens.") | |
69 | + | else { | |
70 | + | let p = { | |
71 | + | let q = getInteger(this, "issueQuantity") | |
72 | + | if ($isInstanceOf(q, "Int")) | |
73 | + | then { | |
74 | + | let r = q | |
75 | + | r | |
76 | + | } | |
77 | + | else 0 | |
78 | + | } | |
79 | + | let s = (p + 1) | |
80 | + | let t = i(s) | |
81 | + | let u = Issue("Kitten(=^・^=)", ("generation:" + t), 1, 0, false) | |
82 | + | let v = calculateAssetId(u) | |
83 | + | let w = lastBlock.height | |
84 | + | let x = b(100, v, w, 0) | |
85 | + | let y = k(x) | |
86 | + | [u, ScriptTransfer(l.caller, 1, v), StringEntry(toBase58String(value(v)), y), IntegerEntry("issueQuantity", s)] | |
87 | + | } | |
88 | + | } | |
89 | + | } | |
90 | + | ||
91 | + | ||
92 | + | @Verifier(z) | |
93 | + | func A () = sigVerify(z.bodyBytes, z.proofs[0], z.senderPublicKey) | |
24 | 94 |
github/deemru/w8io/026f985 38.94 ms ◑