tx · 9JyGvi2cajgrAiCdvb3QXZUuLy6BFWFozeTSyjm4oswr 3N1HdGqmcf4nVsUgmWiwB8p6p8ErWBmvQua: -0.01000000 Waves 2023.11.02 16:01 [2825745] smart account 3N1HdGqmcf4nVsUgmWiwB8p6p8ErWBmvQua > SELF 0.00000000 Waves
{ "type": 13, "id": "9JyGvi2cajgrAiCdvb3QXZUuLy6BFWFozeTSyjm4oswr", "fee": 1000000, "feeAssetId": null, "timestamp": 1698930093463, "version": 2, "chainId": 84, "sender": "3N1HdGqmcf4nVsUgmWiwB8p6p8ErWBmvQua", "senderPublicKey": "JAEVvs5E9kGyXWx3YQaivUpUP3vb3pgr2eS6UrYr1A8P", "proofs": [ "3iL8bg3oFZJxP14csyuY1Qti2NfAYcwWa5hLgaBYBjphZEzxD6AJpgwzK3RigubQVyKHXtTwA2pzSsmp1PueawGR" ], "script": "base64:BgIXCAISAwoBAhIICgYICAEBAQESBAoCCAgJAANTRVACAl9fAQZuZnRLZXkBBW5mdElkCQC5CQIJAMwIAgIDbmZ0CQDMCAIJANgEAQUFbmZ0SWQFA25pbAUDU0VQARVuZnRUeXBlRGVzY3JpcHRpb25LZXkBCW5mdFR5cGVJZAkAuQkCCQDMCAICCG5mdF90eXBlCQDMCAIFCW5mdFR5cGVJZAUDbmlsBQNTRVABBnNldE5mdAQFbmZ0SWQJbmZ0VHlwZUlkBmhlYWx0aAZkYW1hZ2UJAQtTdHJpbmdFbnRyeQIJAQZuZnRLZXkBBQVuZnRJZAkAuQkCCQDMCAIFCW5mdFR5cGVJZAkAzAgCCQCkAwEFBmhlYWx0aAkAzAgCCQCkAwEFBmRhbWFnZQUDbmlsBQNTRVABFWdldE5mdFR5cGVEZXNjcmlwdGlvbgEJbmZ0VHlwZUlkBAtzYXZlZFN0cmluZwkAtQkCBAckbWF0Y2gwCQCdCAIFBHRoaXMJARVuZnRUeXBlRGVzY3JpcHRpb25LZXkBBQluZnRUeXBlSWQDCQABAgUHJG1hdGNoMAIGU3RyaW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XB0aW9uAl8zCQBkAggFD3R5cGVEZXNjcmlwdGlvbgJfMwkAagIJALEJAQgFB2hlYWx0aFQCXzEJAGUCCAUPdHlwZURlc2NyaXB0aW9uAl8zCAUPdHlwZURlc2NyaXB0aW9uAl8yBAZkYW1hZ2UDCQAAAgkAZQIIBQ90eXBlRGVzY3JpcHRpb24CXzUIBQ90eXBlRGVzY3JpcHRpb24CXzQAAAgFD3R5cGVEZXNjcmlwdGlvbgJfNQkAZAIIBQ90eXBlRGVzY3JpcHRpb24CXzQJAGoCCQCxCQEIBQdkYW1hZ2VUAl8xCQBlAggFD3R5cGVEZXNjcmlwdGlvbgJfNQgFD3R5cGVEZXNjcmlwdGlvbgJfNAQLZGVzY3JpcHRpb24JAKwCAgkArAICCQCsAgIJAKwCAgIQeyJpbml0SGVhbHRoIjogIgkApAMBBQZoZWFsdGgCESIsICJpbml0RGFtYWdlIjogCQCkAwEFBmRhbWFnZQIBfQQFYXNzZXQJAMIIBQUJbmZ0VHlwZUlkBQtkZXNjcmlwdGlvbgABAAAHBAdhc3NldElkCQC4CAEFBWFzc2V0CQCUCgIJAMwIAgkBBnNldE5mdAQFB2Fzc2V0SWQFCW5mdFR5cGVJZAUGaGVhbHRoBQZkYW1hZ2UJAMwIAgUFYXNzZXQJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwkBBXZhbHVlAQkApggBBQJ0bwABBQdhc3NldElkBQNuaWwJANgEAQUHYXNzZXRJZAECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXlcYqGi", "height": 2825745, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: ERheEv3VCmgDW2FywKcbF7xZjJvKgSz39EBTrn6psFMK Next: H2m5cDoMv9HCDafSmPedST3RQ7U4e1WF9ZachcXzSZyo Diff:
Old | New | Differences | |
---|---|---|---|
86 | 86 | let L = i(e) | |
87 | 87 | let M = m(E, base58'') | |
88 | 88 | let N = m(E, M._2) | |
89 | - | let g = (L._3 + (toInt(M._1) % (L._3 - L._2))) | |
90 | - | let h = (L._4 + (toInt(N._1) % (L._5 - L._4))) | |
89 | + | let g = if (((L._3 - L._2) == 0)) | |
90 | + | then L._3 | |
91 | + | else (L._3 + (toInt(M._1) % (L._3 - L._2))) | |
92 | + | let h = if (((L._5 - L._4) == 0)) | |
93 | + | then L._5 | |
94 | + | else (L._4 + (toInt(N._1) % (L._5 - L._4))) | |
91 | 95 | let O = (((("{\"initHealth\": \"" + toString(g)) + "\", \"initDamage\": ") + toString(h)) + "}") | |
92 | 96 | let P = Issue(e, O, 1, 0, false) | |
93 | 97 | let Q = calculateAssetId(P) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | 6 | func b (c) = makeString(["nft", toBase58String(c)], a) | |
7 | 7 | ||
8 | 8 | ||
9 | 9 | func d (e) = makeString(["nft_type", e], a) | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | func f (c,e,g,h) = StringEntry(b(c), makeString([e, toString(g), toString(h)], a)) | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func i (e) = { | |
16 | 16 | let j = split({ | |
17 | 17 | let k = getString(this, d(e)) | |
18 | 18 | if ($isInstanceOf(k, "String")) | |
19 | 19 | then { | |
20 | 20 | let l = k | |
21 | 21 | l | |
22 | 22 | } | |
23 | 23 | else throw("nft type not found") | |
24 | 24 | }, a) | |
25 | 25 | $Tuple5(j[0], parseIntValue(j[1]), parseIntValue(j[2]), parseIntValue(j[3]), parseIntValue(j[4])) | |
26 | 26 | } | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | func m (n,o) = { | |
30 | 30 | let p = (((((o + n.transactionId) + n.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height)) | |
31 | 31 | $Tuple2(sha256(p), p) | |
32 | 32 | } | |
33 | 33 | ||
34 | 34 | ||
35 | 35 | func q (r) = { | |
36 | 36 | let k = getString(this, b(r)) | |
37 | 37 | if ($isInstanceOf(k, "String")) | |
38 | 38 | then { | |
39 | 39 | let l = k | |
40 | 40 | let s = split(l, a) | |
41 | 41 | $Tuple3(s[0], parseIntValue(s[1]), parseIntValue(s[2])) | |
42 | 42 | } | |
43 | 43 | else nil | |
44 | 44 | } | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | func t (u,v) = { | |
48 | 48 | let k = q(v) | |
49 | 49 | if ($isInstanceOf(k, "(String, Int, Int)")) | |
50 | 50 | then { | |
51 | 51 | let l = k | |
52 | 52 | l :: u | |
53 | 53 | } | |
54 | 54 | else u | |
55 | 55 | } | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func w (r) = $Tuple2(nil, { | |
59 | 59 | let x = r | |
60 | 60 | let y = size(x) | |
61 | 61 | let z = nil | |
62 | 62 | func A (B,C) = if ((C >= y)) | |
63 | 63 | then B | |
64 | 64 | else t(B, x[C]) | |
65 | 65 | ||
66 | 66 | func D (B,C) = if ((C >= y)) | |
67 | 67 | then B | |
68 | 68 | else throw("List size exceeds 5") | |
69 | 69 | ||
70 | 70 | D(A(A(A(A(A(z, 0), 1), 2), 3), 4), 5) | |
71 | 71 | }) | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | @Callable(E) | |
75 | 75 | func getNft (r) = $Tuple2(nil, q(r)) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | ||
79 | 79 | @Callable(E) | |
80 | 80 | func setNftTypeDescription (e,F,G,H,I,J) = [StringEntry(d(e), makeString([F, toString(G), toString(H), toString(I), toString(J)], a))] | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | ||
84 | 84 | @Callable(E) | |
85 | 85 | func mint (e,K) = { | |
86 | 86 | let L = i(e) | |
87 | 87 | let M = m(E, base58'') | |
88 | 88 | let N = m(E, M._2) | |
89 | - | let g = (L._3 + (toInt(M._1) % (L._3 - L._2))) | |
90 | - | let h = (L._4 + (toInt(N._1) % (L._5 - L._4))) | |
89 | + | let g = if (((L._3 - L._2) == 0)) | |
90 | + | then L._3 | |
91 | + | else (L._3 + (toInt(M._1) % (L._3 - L._2))) | |
92 | + | let h = if (((L._5 - L._4) == 0)) | |
93 | + | then L._5 | |
94 | + | else (L._4 + (toInt(N._1) % (L._5 - L._4))) | |
91 | 95 | let O = (((("{\"initHealth\": \"" + toString(g)) + "\", \"initDamage\": ") + toString(h)) + "}") | |
92 | 96 | let P = Issue(e, O, 1, 0, false) | |
93 | 97 | let Q = calculateAssetId(P) | |
94 | 98 | $Tuple2([f(Q, e, g, h), P, ScriptTransfer(value(addressFromString(K)), 1, Q)], toBase58String(Q)) | |
95 | 99 | } | |
96 | 100 | ||
97 | 101 | ||
98 | 102 | @Verifier(R) | |
99 | 103 | func S () = sigVerify(R.bodyBytes, R.proofs[0], R.senderPublicKey) | |
100 | 104 |
github/deemru/w8io/026f985 23.12 ms ◑