tx · FKmQH5HajZT8GtbBeQoKnmJcj4LtXs7tZp2b9izT8df6 3N1H2FmF7pnHCD5cpufDjL5ZP31vJKdd99n: -0.00400000 Waves 2022.09.02 16:55 [2211593] smart account 3N1H2FmF7pnHCD5cpufDjL5ZP31vJKdd99n > SELF 0.00000000 Waves
{ "type": 13, "id": "FKmQH5HajZT8GtbBeQoKnmJcj4LtXs7tZp2b9izT8df6", "fee": 400000, "feeAssetId": null, "timestamp": 1662126925225, "version": 2, "chainId": 84, "sender": "3N1H2FmF7pnHCD5cpufDjL5ZP31vJKdd99n", "senderPublicKey": "B5cKstuYv9omxFFgsVdkJDpEgdh31sdp5S9kvVsUp3Kc", "proofs": [ "3ENDGtapu7fmR2MeRHJZMQ8EnGxLXMmuzMAzMJw4uhJqYcoGQS4ZC5FK5YfTcJTaE3a7TspNhVucGj7txWHEjZib" ], "script": "base64:BgIdCAISAwoBCBIECgIIARIDCgEIEgQKAggBEgMKAQEQARR0cnlHZXRTdHJpbmdFeHRlcm5hbAIHYWRkcmVzcwNrZXkEByRtYXRjaDAJAJ0IAgUHYWRkcmVzcwUDa2V5AwkAAQIFByRtYXRjaDACBlN0cmluZwQBYQUHJG1hdGNoMAUBYQIAAQx0cnlHZXRTdHJpbmcBA2tleQkBFHRyeUdldFN0cmluZ0V4dGVybmFsAgUEdGhpcwUDa2V5AQ10cnlHZXRJbnRlZ2VyAQNrZXkEByRtYXRjaDAJAJoIAgUEdGhpcwUDa2V5AwkAAQIFByRtYXRjaDACA0ludAQBYgUHJG1hdGNoMAUBYgAAAQlnZXRPcmFjbGUACQEHQWRkcmVzcwEJANkEAQkBDHRyeUdldFN0cmluZwECFHN0YXRpY19vcmFjbGVBZGRyZXNzARFnZXRSZWJpcnRoQWRkcmVzcwAJAQdBZGRyZXNzAQkA2QQBCQEUdHJ5R2V0U3RyaW5nRXh0ZXJuYWwCCQEJZ2V0T3JhY2xlAAIVc3RhdGljX3JlYmlydGhBZGRyZXNzARNnZXRJbmN1YmF0b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dG90YWxTcGVuZAkAZAIJAQ10cnlHZXRJbnRlZ2VyAQUIa2V5U3BlbmQFCmFtb3VudFBhaWQJAJQKAgkAzAgCCQEMSW50ZWdlckVudHJ5AgUIa2V5U3BlbmQFCnRvdGFsU3BlbmQJAMwIAgkBDEludGVnZXJFbnRyeQIFBmtleU9sZAUQYXZhaWxhYmxlQ291cG9ucwkAzAgCCQEMSW50ZWdlckVudHJ5AgUJa2V5QWN0aXZlBRRhdmFpbGFibGVDb3Vwb25zTGVmdAUDbmlsBQphbW91bnRQYWlkAErpA08=", "height": 2211593, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | func a (b,c) = { | |
5 | + | let d = getString(b, c) | |
6 | + | if ($isInstanceOf(d, "String")) | |
7 | + | then { | |
8 | + | let e = d | |
9 | + | e | |
10 | + | } | |
11 | + | else "" | |
12 | + | } | |
13 | + | ||
14 | + | ||
15 | + | func f (c) = a(this, c) | |
16 | + | ||
17 | + | ||
18 | + | func g (c) = { | |
19 | + | let d = getInteger(this, c) | |
20 | + | if ($isInstanceOf(d, "Int")) | |
21 | + | then { | |
22 | + | let h = d | |
23 | + | h | |
24 | + | } | |
25 | + | else 0 | |
26 | + | } | |
27 | + | ||
28 | + | ||
29 | + | func i () = Address(fromBase58String(f("static_oracleAddress"))) | |
30 | + | ||
31 | + | ||
32 | + | func j () = Address(fromBase58String(a(i(), "static_rebirthAddress"))) | |
33 | + | ||
34 | + | ||
35 | + | func k () = Address(fromBase58String(a(i(), "static_incubatorAddress"))) | |
36 | + | ||
37 | + | ||
38 | + | func l () = Address(fromBase58String(a(i(), "static_farmingAddress"))) | |
39 | + | ||
40 | + | ||
41 | + | func m () = Address(fromBase58String(a(i(), "static_gameDappAddress"))) | |
42 | + | ||
43 | + | ||
44 | + | func n () = Address(fromBase58String(a(i(), "static_burnAddress"))) | |
45 | + | ||
46 | + | ||
47 | + | func o () = Address(fromBase58String(a(i(), "static_cfMasterAddress"))) | |
48 | + | ||
49 | + | ||
50 | + | let p = fromBase58String(valueOrErrorMessage(getString(i(), "static_warsPKey"), "static_warsPKey not defined")) | |
51 | + | ||
52 | + | let q = [j(), k(), l(), m()] | |
53 | + | ||
54 | + | func r (s) = (s + "_spend") | |
55 | + | ||
56 | + | ||
57 | + | func t (s) = (s + "_active") | |
58 | + | ||
59 | + | ||
60 | + | func u (s) = (t(s) + "_old") | |
61 | + | ||
62 | + | ||
63 | + | func v (s,w) = { | |
64 | + | let x = u(s) | |
65 | + | let c = t(s) | |
66 | + | let y = g(c) | |
67 | + | let z = (y + w) | |
68 | + | [IntegerEntry(x, y), IntegerEntry(c, z)] | |
69 | + | } | |
70 | + | ||
71 | + | ||
72 | + | @Callable(A) | |
73 | + | func configureOracle (B) = if ((A.caller != this)) | |
74 | + | then throw("CCO: admin only") | |
75 | + | else [StringEntry("static_oracleAddress", B)] | |
76 | + | ||
77 | + | ||
78 | + | ||
79 | + | @Callable(A) | |
80 | + | func addCoupons (s,w) = if (if ((A.caller != this)) | |
81 | + | then (A.callerPublicKey != p) | |
82 | + | else false) | |
83 | + | then throw("CAC: admin only") | |
84 | + | else v(s, w) | |
85 | + | ||
86 | + | ||
87 | + | ||
88 | + | @Callable(A) | |
89 | + | func addCouponsBatch (C) = if (if ((A.caller != this)) | |
90 | + | then (A.callerPublicKey != p) | |
91 | + | else false) | |
92 | + | then throw("CAC: admin only") | |
93 | + | else { | |
94 | + | let D = split(C, ";") | |
95 | + | func E (F,G) = { | |
96 | + | let H = split(G, ":") | |
97 | + | let s = H[0] | |
98 | + | let w = parseIntValue(H[1]) | |
99 | + | let I = invoke(n(), "burnByInvoke", [w], nil) | |
100 | + | if ((I == I)) | |
101 | + | then (F ++ v(s, w)) | |
102 | + | else throw("Strict value is not equal to itself.") | |
103 | + | } | |
104 | + | ||
105 | + | let J = D | |
106 | + | let K = size(J) | |
107 | + | let L = nil | |
108 | + | func M (N,O) = if ((O >= K)) | |
109 | + | then N | |
110 | + | else E(N, J[O]) | |
111 | + | ||
112 | + | func P (N,O) = if ((O >= K)) | |
113 | + | then N | |
114 | + | else throw("List size exceeds 20") | |
115 | + | ||
116 | + | P(M(M(M(M(M(M(M(M(M(M(M(M(M(M(M(M(M(M(M(M(L, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
117 | + | } | |
118 | + | ||
119 | + | ||
120 | + | ||
121 | + | @Callable(A) | |
122 | + | func CFRefund (Q,w) = { | |
123 | + | let R = getStringValue(A.caller, "CF_ADDRESS") | |
124 | + | let c = (("f_" + R) + "_stake_address") | |
125 | + | let S = getStringValue(o(), c) | |
126 | + | if ((S != toString(A.caller))) | |
127 | + | then throw("CCR: This is something fishy going on!") | |
128 | + | else v(Q, w) | |
129 | + | } | |
130 | + | ||
131 | + | ||
132 | + | ||
133 | + | @Callable(A) | |
134 | + | func useCoupons (T) = { | |
135 | + | let U = A.caller | |
136 | + | if ((0 > T)) | |
137 | + | then throw("CUC: Only positive amount of money can be paid!") | |
138 | + | else if (!(containsElement(q, U))) | |
139 | + | then throw("CUC: Only certain smart contracts can use this coupon module!") | |
140 | + | else { | |
141 | + | let s = toString(A.originCaller) | |
142 | + | let V = t(s) | |
143 | + | let W = g(V) | |
144 | + | let X = if ((T > W)) | |
145 | + | then (T - W) | |
146 | + | else 0 | |
147 | + | let Y = (T - X) | |
148 | + | let Z = (W - Y) | |
149 | + | let aa = r(s) | |
150 | + | let x = u(s) | |
151 | + | let ab = (g(aa) + Y) | |
152 | + | $Tuple2([IntegerEntry(aa, ab), IntegerEntry(x, W), IntegerEntry(V, Z)], Y) | |
153 | + | } | |
154 | + | } | |
155 | + | ||
156 | + |
github/deemru/w8io/026f985 24.06 ms ◑