tx · 5LXxyoMZZd3K8XBeAVhYiRVG4dvuBASV7vqXTsjNeEms 3N3Aq1GcHD8bZMGyVgyvaTHrBM7EySFtJ1H: -0.00700000 Waves 2022.06.18 20:07 [2102090] smart account 3N3Aq1GcHD8bZMGyVgyvaTHrBM7EySFtJ1H > SELF 0.00000000 Waves
{ "type": 13, "id": "5LXxyoMZZd3K8XBeAVhYiRVG4dvuBASV7vqXTsjNeEms", "fee": 700000, "feeAssetId": null, "timestamp": 1655572086562, "version": 2, "chainId": 84, "sender": "3N3Aq1GcHD8bZMGyVgyvaTHrBM7EySFtJ1H", "senderPublicKey": "69Rez9g3wdeHPiCsmjaaaK1GBhFjL79pxMPX9Fpk8S5e", "proofs": [ "51xQhnSDfRiHpNzZBn5oK8nLZ78BVLgVsL2TiM9y3dLjEgDsVy9zScQKYbzeDB8c7JDkJ6nFJADSrnbm2X4M6j8Z" ], "script": "base64:AAIFAAAAAAAAAA8IAhIGCgQICAEBEgMKAQgAAAAUAAAAAANTRVACAAAAAl9fAAAAAAVNVUxUNgAAAAAAAA9CQAAAAAAFTVVMVDgAAAAAAAX14QAAAAAACkFOT1RFSURTVFICAAAABVdBVkVTAAAAAAdBTk9URUlECQACWQAAAAEFAAAACkFOT1RFSURTVFIBAAAADGdldEludE9yRmFpbAAAAAEAAAADa2V5CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5CQABLAAAAAIJAAEsAAAAAgIAAAAPTWFuZGF0b3J5IHRoaXMuBQAAAANrZXkCAAAADyBpcyBub3QgZGVmaW5lZAEAAAAMZ2V0U3RyT3JFbHNlAAAAAgAAAANrZXkAAAAKZGVmYXVsdFZhbAkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkFAAAACmRlZmF1bHRWYWwBAAAAD2dldFN0cmluZ09yRmFpbAAAAAEAAAADa2V5CQEAAAATdmFsdWVPckVycm9yTWVz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xCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAAEWJlbmlmaWNhcnlBZGRyZXNzBQAAAA1iZW5pZmljYXJ5QW10BQAAAAR1bml0CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAADGFub3RlQWRkcmVzcwUAAAAMcHJvdG9jb2xBbXQxBQAAAAR1bml0CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAAEW1hc3Rlck5vZGVBZGRyZXNzBQAAAAxwcm90b2NvbEFtdDIFAAAABHVuaXQJAARMAAAAAgkBAAAAElJld2FyZEhpc3RvcnlFbnRyeQAAAAcFAAAADG1pbmVyQWRkcmVzcwgFAAAAAWkAAAANdHJhbnNhY3Rpb25JZAUAAAAIbWluZWRBbXQFAAAADWJlbmlmaWNhcnlBbXQFAAAAC3Byb3RvY29sQW10BQAAAAxwcm90b2NvbEFtdDEFAAAADHByb3RvY29sQW10MgkABEwAAAACCQEAAAARUmV3YXJkVG90YWxzRW50cnkAAAAGBQAAAAxtaW5lckFkZHJlc3MFAAAACG1pbmVkQW10BQAAAA1iZW5pZmljYXJ5QW10BQAAAAtwcm90b2NvbEFtdAUAAAAMcHJvdG9jb2xBbXQxBQAAAAxwcm90b2NvbEFtdDIFAAAAA25pbAAAAAC24CsY", "height": 2102090, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EewFjiWNwdizpSKNbhNMtGwwVGBmABmcjCMsPTNfvcH9 Next: CrwXXfUoWCYXC7pWT61hJjAtCPERRzq3nahKWGdgaArt Diff:
Old | New | Differences | |
---|---|---|---|
34 | 34 | func o (n) = ("%s%s__totals__" + n) | |
35 | 35 | ||
36 | 36 | ||
37 | - | func p () = "%s%s__cfg__ | |
37 | + | func p () = "%s%s__cfg__anoteAddress" | |
38 | 38 | ||
39 | 39 | ||
40 | - | func q () = "%s%s__cfg__ | |
40 | + | func q () = "%s%s__cfg__mainAnoteNodeAddress" | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func r () = "%s%s__cfg__protocolPartX6" |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | 6 | let b = 1000000 | |
7 | 7 | ||
8 | 8 | let c = 100000000 | |
9 | 9 | ||
10 | 10 | let d = "WAVES" | |
11 | 11 | ||
12 | 12 | let e = fromBase58String(d) | |
13 | 13 | ||
14 | 14 | func f (g) = valueOrErrorMessage(getInteger(this, g), (("Mandatory this." + g) + " is not defined")) | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | func h (g,i) = valueOrElse(getString(this, g), i) | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func j (g) = valueOrErrorMessage(getString(this, g), (("Mandatory this." + g) + " is not defined")) | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func k (g) = valueOrErrorMessage(addressFromString(j(g)), (("Fail to convert this." + g) + " value into Address")) | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | func l (m) = { | |
27 | 27 | let n = valueOrErrorMessage(addressFromString(m), ("fail to convert into address " + m)) | |
28 | 28 | if ((0 > wavesBalance(n).available)) | |
29 | 29 | then throw() | |
30 | 30 | else m | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func o (n) = ("%s%s__totals__" + n) | |
35 | 35 | ||
36 | 36 | ||
37 | - | func p () = "%s%s__cfg__ | |
37 | + | func p () = "%s%s__cfg__anoteAddress" | |
38 | 38 | ||
39 | 39 | ||
40 | - | func q () = "%s%s__cfg__ | |
40 | + | func q () = "%s%s__cfg__mainAnoteNodeAddress" | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func r () = "%s%s__cfg__protocolPartX6" | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func s () = "%s%s__cfg__benificaryPartX6" | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func t (u,v) = makeString(["%s%s%s", "history", toString(u), toBase58String(v)], a) | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func w (x,y,z,A,B) = makeString(["%d%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(x), toString(y), toString(z), toString(A), toString(B)], a) | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func C (u,v,D,y,z,E,F) = StringEntry(t(u, v), w(D, y, z, E, F)) | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func G (D,y,z,A,B) = makeString(["%d%d%d%d%d", toString(D), toString(y), toString(z), toString(A), toString(B)], a) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func H (I,D,y,z,A,B) = { | |
62 | 62 | let J = o(toString(I)) | |
63 | 63 | let K = split(h(J, G(0, 0, 0, 0, 0)), a) | |
64 | 64 | let L = (parseIntValue(K[1]) + D) | |
65 | 65 | let M = (parseIntValue(K[2]) + y) | |
66 | 66 | let N = (parseIntValue(K[3]) + z) | |
67 | 67 | let O = (parseIntValue(K[4]) + A) | |
68 | 68 | let P = (parseIntValue(K[5]) + B) | |
69 | 69 | StringEntry(J, G(L, M, N, O, P)) | |
70 | 70 | } | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | @Callable(Q) | |
74 | 74 | func constructor (R,S,T,U) = if ((Q.caller != this)) | |
75 | 75 | then throw("permissions denied") | |
76 | 76 | else if ((0 > T)) | |
77 | 77 | then throw("protocolPartX6 less then zero") | |
78 | 78 | else if ((0 > U)) | |
79 | 79 | then throw("benificaryPartX6 less then zero") | |
80 | 80 | else if (((T + U) != b)) | |
81 | 81 | then throw("parts sum must be 1") | |
82 | 82 | else [StringEntry(p(), l(R)), StringEntry(q(), l(S)), IntegerEntry(r(), T), IntegerEntry(s(), U)] | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | ||
86 | 86 | @Callable(Q) | |
87 | 87 | func distributeMinerReward (V) = if ((size(Q.payments) != 1)) | |
88 | 88 | then throw("exact 1 payment must be attached") | |
89 | 89 | else if ((Q.caller != Q.originCaller)) | |
90 | 90 | then throw("dapp to dapp calls are not allowed") | |
91 | 91 | else { | |
92 | 92 | let W = Q.payments[0] | |
93 | 93 | let D = W.amount | |
94 | 94 | let X = valueOrElse(W.assetId, e) | |
95 | 95 | let Y = Q.fee | |
96 | 96 | let Z = valueOrElse(Q.feeAssetId, e) | |
97 | 97 | if ((X != e)) | |
98 | 98 | then throw("only Waves can be used in payment") | |
99 | 99 | else if ((Z != e)) | |
100 | 100 | then throw("only Waves can be used in fees") | |
101 | 101 | else if ((Y != ((5 * c) / 1000))) | |
102 | 102 | then throw("fee amount couldn't exceed 0.005") | |
103 | 103 | else { | |
104 | 104 | let aa = k(p()) | |
105 | 105 | let ab = k(q()) | |
106 | 106 | let ac = Q.caller | |
107 | 107 | let ad = addressFromStringValue(V) | |
108 | 108 | let ae = f(r()) | |
109 | 109 | let af = f(s()) | |
110 | 110 | let ag = (wavesBalance(ac).available - Y) | |
111 | 111 | if ((ag != 0)) | |
112 | 112 | then throw((("all " + toString(ag)) + " Wavelets from the Node balance must be attached into the payment")) | |
113 | 113 | else { | |
114 | 114 | let ah = fraction(D, af, b) | |
115 | 115 | let z = (D - ah) | |
116 | 116 | let E = (z / 2) | |
117 | 117 | let F = (z - E) | |
118 | 118 | [ScriptTransfer(ad, ah, unit), ScriptTransfer(aa, E, unit), ScriptTransfer(ab, F, unit), C(ac, Q.transactionId, D, ah, z, E, F), H(ac, D, ah, z, E, F)] | |
119 | 119 | } | |
120 | 120 | } | |
121 | 121 | } | |
122 | 122 | ||
123 | 123 |
github/deemru/w8io/026f985 52.09 ms ◑