tx · Dt8coWdSc5QNzHdEka83612oEkAAhV21ufHbWyF4S9pi

3N3r2srkFiS6xvSDY9xVPgF2Yjz8djnd3cN:  -0.01000000 Waves

2023.02.28 06:04 [2468985] smart account 3N3r2srkFiS6xvSDY9xVPgF2Yjz8djnd3cN > SELF 0.00000000 Waves

{ "type": 13, "id": "Dt8coWdSc5QNzHdEka83612oEkAAhV21ufHbWyF4S9pi", "fee": 1000000, "feeAssetId": null, "timestamp": 1677553485703, "version": 2, "chainId": 84, "sender": "3N3r2srkFiS6xvSDY9xVPgF2Yjz8djnd3cN", "senderPublicKey": "Ea9xszKCieHW2X9h4i9PEKXbMC4GDCkHwLoK3FY5T6nC", "proofs": [ "3nidNT4sxUXzsb9W93PoanyiFXaNEuobxXMo55J7xuCPzEYc3anvvMwZi7PdLAEt6Ca17p3AwavNAbzprrP1VkWE" ], "script": "base64:BgIsCAISBAoCCAgSBAoCBAgSBwoFCAgICAgSBwoFCAgICAgSBQoDCAgIEgMKAQgeAAdWRVJTSU9OAgExAQ5nZXRTdHJpbmdCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCdCAIFBHRoaXMFA2tleQIAAQ9nZXRCb29sZWFuQnlLZXkBA2tleQkBC3ZhbHVlT3JFbHNlAgkAmwgCBQR0aGlzBQNrZXkHAQ9nZXRJbnRlZ2VyQnlLZXkBA2tleQkBC3ZhbHVlT3JFbHNlAgkAmggCBQR0aGlzBQNrZXkAAAAFY2hyaXMJAQ5nZXRTdHJpbmdCeUtleQECDGNvbmZfYWRtaW5fMQAOZGFwcFJ1bm5pbmdLZXkCFGNvbmZfZGFwcF9pc19ydW5uaW5nABFtYWludGVuYW5jZU1TR0tleQIUY29uZl9tYWludGVuYW5jZV9tc2cAEndoaXRlbGlzdGVkb25seUtleQIVY29uZl93aGl0ZWxpc3RlZF9vbmx5AAtkYXBwUnVubmluZwkBC3ZhbHVlT3JFbHNlAgkAmwgCBQR0aGlzBQ5kYXBwUnVubmluZ0tleQYADm1haW50ZW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dCBhbGxvd2VkIHRvIGNoYW5nZSB1c2VyIHN0YXR1cwFpAQtkZWxldGVFbnRyeQEFZW50cnkEBmNhbGxlcgkApQgBCAUBaQZjYWxsZXIDCQAAAgUGY2FsbGVyBQVjaHJpcwkAzAgCCQELRGVsZXRlRW50cnkBBQVlbnRyeQUDbmlsCQACAQICbm8A+5oEtw==", "height": 2468985, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4H3AaSGtRRNRjWLJV3kqndyiy7NyFSdYHH39WvPCQits Next: none Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = "0.1"
4+let a = "1"
55
66 func b (c) = valueOrElse(getString(this, c), "")
77
168168
169169
170170 @Callable(Y)
171-func registerUser (D,E,F,ac) = if (!(j))
171+func registerUser (D,E,F,ac,ad) = if (!(j))
172172 then throw(k)
173173 else {
174174 let o = toString(Y.caller)
175- let ad = toBase58String(Y.transactionId)
176- let ae = lastBlock.timestamp
177- let af = V(Y)
178- let U = af._1
179- let X = af._2
175+ let ae = toBase58String(Y.transactionId)
176+ let af = lastBlock.timestamp
177+ let ag = V(Y)
178+ let U = ag._1
179+ let X = ag._2
180180 if (!(isDefined(U)))
181181 then throw("Something went wrong")
182182 else if (!(C(o, D, E, F, false)))
183183 then throw("Something went wrong")
184184 else {
185- let ag = P(toBase64String(toBytes(D)), toBase64String(toBytes(F)), toString(ae))
186-[IntegerEntry(u(o), ae), StringEntry(n(o), ((ad + "_") + toString(ae))), StringEntry(p(o), D), StringEntry(q(o), E), StringEntry(r(o), ac), StringEntry(s(o), F), StringEntry(t(o), m), StringEntry(((m + "_") + o), ag), ScriptTransfer(Address(fromBase58String(z)), U, X)]
185+ let ah = P(toBase64String(toBytes(D)), toBase64String(toBytes(F)), toString(af))
186+[IntegerEntry(u(o), af), StringEntry(n(o), ((ae + "_") + toString(af))), StringEntry(p(o), D), StringEntry(q(o), E), StringEntry(r(o), ac), StringEntry(s(o), F), StringEntry(t(o), m), StringEntry(((m + "_") + o), ah), ScriptTransfer(Address(fromBase58String(z)), U, X)]
187187 }
188188 }
189189
190190
191191
192192 @Callable(Y)
193-func updateUser (D,E,F,ac) = if (!(j))
193+func updateUser (D,E,F,ac,ad) = if (!(j))
194194 then throw(k)
195195 else {
196196 let o = toString(Y.caller)
199199 then throw("Something went wrong")
200200 else {
201201 let Q = e(u(o))
202- let ag = P(toBase64String(toBytes(D)), toBase64String(toBytes(F)), toString(Q))
203-[StringEntry(p(o), D), StringEntry(q(o), E), StringEntry(r(o), ac), StringEntry(s(o), F), StringEntry(((I + "_") + o), ag)]
202+ let ah = P(toBase64String(toBytes(D)), toBase64String(toBytes(F)), toString(Q))
203+[StringEntry(p(o), D), StringEntry(q(o), E), StringEntry(r(o), ac), StringEntry(s(o), F), StringEntry(((I + "_") + o), ah)]
204204 }
205205 }
206206
207207
208208
209209 @Callable(Y)
210-func changeUserStatus (K,I,ah) = {
210+func changeUserStatus (K,I,ai) = {
211211 let o = toString(Y.caller)
212212 let L = b(t(K))
213213 let N = J(I, K, L)
214214 let D = toBase64String(toBytes(b(p(K))))
215215 let F = toBase64String(toBytes(b(s(K))))
216216 let Q = e(u(K))
217- let ag = P(D, F, toString(Q))
217+ let ah = P(D, F, toString(Q))
218218 if (containsElement([f, toString(this)], o))
219- then [StringEntry(t(K), N), DeleteEntry(((L + "_") + K)), StringEntry(((N + "_") + K), ag), StringEntry(("user_note_" + K), ah)]
219+ then [StringEntry(t(K), N), DeleteEntry(((L + "_") + K)), StringEntry(((N + "_") + K), ah), StringEntry(("user_note_" + K), ai)]
220220 else throw("Not allowed to change user status")
221221 }
222222
223223
224224
225225 @Callable(S)
226-func deleteEntry (ai) = {
226+func deleteEntry (aj) = {
227227 let o = toString(S.caller)
228228 if ((o == f))
229- then [DeleteEntry(ai)]
229+ then [DeleteEntry(aj)]
230230 else throw("no")
231231 }
232232
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = "0.1"
4+let a = "1"
55
66 func b (c) = valueOrElse(getString(this, c), "")
77
88
99 func d (c) = valueOrElse(getBoolean(this, c), false)
1010
1111
1212 func e (c) = valueOrElse(getInteger(this, c), 0)
1313
1414
1515 let f = b("conf_admin_1")
1616
1717 let g = "conf_dapp_is_running"
1818
1919 let h = "conf_maintenance_msg"
2020
2121 let i = "conf_whitelisted_only"
2222
2323 let j = valueOrElse(getBoolean(this, g), true)
2424
2525 let k = valueOrElse(getString(this, h), "")
2626
2727 let l = "SUSPENDED"
2828
2929 let m = "REGISTERED"
3030
3131 func n (o) = ("user_" + o)
3232
3333
3434 func p (o) = ("user_name_" + o)
3535
3636
3737 func q (o) = ("user_desc_" + o)
3838
3939
4040 func r (o) = ("user_social_" + o)
4141
4242
4343 func s (o) = ("user_thumb_" + o)
4444
4545
4646 func t (o) = ("user_status_" + o)
4747
4848
4949 func u (o) = ("user_date_" + o)
5050
5151
5252 let v = fromBase58String(b("conf_accepted_asset_SIGN"))
5353
5454 let w = value(addressFromString(b("conf_oracle_fee_address")))
5555
5656 func x (c) = valueOrErrorMessage(getInteger(w, c), "Integer undefine or 0 in oracle")
5757
5858
5959 let y = (x(("certification_fee_" + toBase58String(v))) * 2)
6060
6161 let z = b("conf_fee_receiver")
6262
6363 func A (B) = if (contains(B, "/"))
6464 then if (if ((76 > size(B)))
6565 then (size(split(B, "/")[0]) == 59)
6666 else false)
6767 then (16 > size(split(B, "/")[1]))
6868 else false
6969 else false
7070
7171
7272 func C (o,D,E,F,G) = {
7373 let H = if ((size(F) != 0))
7474 then A(F)
7575 else true
7676 if (!(H))
7777 then throw("CID don't match requirement!")
7878 else if (if ((D == ""))
7979 then true
8080 else (E == ""))
8181 then throw("Name and description cannot be empty")
8282 else if ((size(E) > 600))
8383 then throw("600 Char. max description")
8484 else if ((size(D) > 45))
8585 then throw("45 Char. max name")
8686 else {
8787 let I = b(t(o))
8888 if ((I == l))
8989 then throw("Account suspended.")
9090 else if (if (!(G))
9191 then (I == m)
9292 else false)
9393 then throw("Already registered")
9494 else if (if (G)
9595 then (I == "")
9696 else false)
9797 then throw("Register first")
9898 else true
9999 }
100100 }
101101
102102
103103 func J (I,K,L) = {
104104 let M = [m, l]
105105 let N = if (containsElement(M, I))
106106 then I
107107 else throw("Unknown status")
108108 let O = e(u(K))
109109 if ((O == 0))
110110 then throw("You cant set this status, user is not registered.")
111111 else if (if ((L == m))
112112 then (N == m)
113113 else false)
114114 then throw("User already registered")
115115 else if (if ((L == l))
116116 then (N == l)
117117 else false)
118118 then throw("User already suspended")
119119 else N
120120 }
121121
122122
123123 func P (D,F,Q) = (((((("{\"user_name\": \"" + D) + "\", \"user_thumb\":\"") + F) + "\",\"user_date\":\"") + Q) + "\"}")
124124
125125
126126 func R (S) = if ((size(S.payments) == 0))
127127 then throw("No payment attached")
128128 else {
129129 let T = value(S.payments[0])
130130 let U = value(T.amount)
131131 $Tuple2(T, U)
132132 }
133133
134134
135135 func V (S) = {
136136 let W = R(S)
137137 let T = W._1
138138 let U = W._2
139139 let X = if (if (isDefined(T.assetId))
140140 then (T.assetId == v)
141141 else false)
142142 then T.assetId
143143 else throw("Only SIGN token accepted as transaction fee")
144144 if ((U != y))
145145 then throw(("Payment amount should be " + toString(y)))
146146 else $Tuple2(U, X)
147147 }
148148
149149
150150 @Callable(Y)
151151 func setConf (c,Z) = {
152152 let o = toString(Y.caller)
153153 if (containsElement([f, toString(this)], o))
154154 then [StringEntry(c, Z)]
155155 else throw("You are not allowed to change this")
156156 }
157157
158158
159159
160160 @Callable(Y)
161161 func appRunning (aa,ab) = {
162162 let o = toString(Y.caller)
163163 if (containsElement([f, toString(this)], o))
164164 then [BooleanEntry(g, aa), StringEntry(h, ab)]
165165 else throw("You are not allowed to change this")
166166 }
167167
168168
169169
170170 @Callable(Y)
171-func registerUser (D,E,F,ac) = if (!(j))
171+func registerUser (D,E,F,ac,ad) = if (!(j))
172172 then throw(k)
173173 else {
174174 let o = toString(Y.caller)
175- let ad = toBase58String(Y.transactionId)
176- let ae = lastBlock.timestamp
177- let af = V(Y)
178- let U = af._1
179- let X = af._2
175+ let ae = toBase58String(Y.transactionId)
176+ let af = lastBlock.timestamp
177+ let ag = V(Y)
178+ let U = ag._1
179+ let X = ag._2
180180 if (!(isDefined(U)))
181181 then throw("Something went wrong")
182182 else if (!(C(o, D, E, F, false)))
183183 then throw("Something went wrong")
184184 else {
185- let ag = P(toBase64String(toBytes(D)), toBase64String(toBytes(F)), toString(ae))
186-[IntegerEntry(u(o), ae), StringEntry(n(o), ((ad + "_") + toString(ae))), StringEntry(p(o), D), StringEntry(q(o), E), StringEntry(r(o), ac), StringEntry(s(o), F), StringEntry(t(o), m), StringEntry(((m + "_") + o), ag), ScriptTransfer(Address(fromBase58String(z)), U, X)]
185+ let ah = P(toBase64String(toBytes(D)), toBase64String(toBytes(F)), toString(af))
186+[IntegerEntry(u(o), af), StringEntry(n(o), ((ae + "_") + toString(af))), StringEntry(p(o), D), StringEntry(q(o), E), StringEntry(r(o), ac), StringEntry(s(o), F), StringEntry(t(o), m), StringEntry(((m + "_") + o), ah), ScriptTransfer(Address(fromBase58String(z)), U, X)]
187187 }
188188 }
189189
190190
191191
192192 @Callable(Y)
193-func updateUser (D,E,F,ac) = if (!(j))
193+func updateUser (D,E,F,ac,ad) = if (!(j))
194194 then throw(k)
195195 else {
196196 let o = toString(Y.caller)
197197 let I = b(t(o))
198198 if (!(C(o, D, E, F, true)))
199199 then throw("Something went wrong")
200200 else {
201201 let Q = e(u(o))
202- let ag = P(toBase64String(toBytes(D)), toBase64String(toBytes(F)), toString(Q))
203-[StringEntry(p(o), D), StringEntry(q(o), E), StringEntry(r(o), ac), StringEntry(s(o), F), StringEntry(((I + "_") + o), ag)]
202+ let ah = P(toBase64String(toBytes(D)), toBase64String(toBytes(F)), toString(Q))
203+[StringEntry(p(o), D), StringEntry(q(o), E), StringEntry(r(o), ac), StringEntry(s(o), F), StringEntry(((I + "_") + o), ah)]
204204 }
205205 }
206206
207207
208208
209209 @Callable(Y)
210-func changeUserStatus (K,I,ah) = {
210+func changeUserStatus (K,I,ai) = {
211211 let o = toString(Y.caller)
212212 let L = b(t(K))
213213 let N = J(I, K, L)
214214 let D = toBase64String(toBytes(b(p(K))))
215215 let F = toBase64String(toBytes(b(s(K))))
216216 let Q = e(u(K))
217- let ag = P(D, F, toString(Q))
217+ let ah = P(D, F, toString(Q))
218218 if (containsElement([f, toString(this)], o))
219- then [StringEntry(t(K), N), DeleteEntry(((L + "_") + K)), StringEntry(((N + "_") + K), ag), StringEntry(("user_note_" + K), ah)]
219+ then [StringEntry(t(K), N), DeleteEntry(((L + "_") + K)), StringEntry(((N + "_") + K), ah), StringEntry(("user_note_" + K), ai)]
220220 else throw("Not allowed to change user status")
221221 }
222222
223223
224224
225225 @Callable(S)
226-func deleteEntry (ai) = {
226+func deleteEntry (aj) = {
227227 let o = toString(S.caller)
228228 if ((o == f))
229- then [DeleteEntry(ai)]
229+ then [DeleteEntry(aj)]
230230 else throw("no")
231231 }
232232
233233

github/deemru/w8io/026f985 
46.98 ms