tx · 4H3AaSGtRRNRjWLJV3kqndyiy7NyFSdYHH39WvPCQits

3N3r2srkFiS6xvSDY9xVPgF2Yjz8djnd3cN:  -0.01400000 Waves

2022.09.07 07:49 [2218230] smart account 3N3r2srkFiS6xvSDY9xVPgF2Yjz8djnd3cN > SELF 0.00000000 Waves

{ "type": 13, "id": "4H3AaSGtRRNRjWLJV3kqndyiy7NyFSdYHH39WvPCQits", "fee": 1400000, "feeAssetId": null, "timestamp": 1662526163710, "version": 2, "chainId": 84, "sender": "3N3r2srkFiS6xvSDY9xVPgF2Yjz8djnd3cN", "senderPublicKey": "Ea9xszKCieHW2X9h4i9PEKXbMC4GDCkHwLoK3FY5T6nC", "proofs": [ "6jhLqQbDLJBPeLMdWhVFCru5QbSTkhvoyME4bjmZoVijFGmheShJoTNrQeoRQq5HifJwQKVY7EzfhjbgizLebsP" ], "script": "base64:BgIqCAISBAoCCAgSBAoCBAgSBgoECAgICBIGCgQICAgIEgUKAwgICBIDCgEIHgAHVkVSU0lPTgIDMC4xAQ5nZXRTdHJpbmdCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCdCAIFBHRoaXMFA2tleQIAAQ9nZXRCb29sZWFuQnlLZXkBA2tleQkBC3ZhbHVlT3JFbHNlAgkAmwgCBQR0aGlzBQNrZXkHAQ9nZXRJbnRlZ2VyQnlLZXkBA2tleQkBC3ZhbHVlT3JFbHNlAgkAmggCBQR0aGlzBQNrZXkAAAAFY2hyaXMJAQ5nZXRTdHJpbmdCeUtleQECDGNvbmZfYWRtaW5fMQAOZGFwcFJ1bm5pbmdLZXkCFGNvbmZfZGFwcF9pc19ydW5uaW5nABFtYWludGVuYW5jZU1TR0tleQIUY29uZl9tYWludGVuYW5jZV9tc2cAEndoaXRlbGlzdGVkb25seUtleQIVY29uZl93aGl0ZWxpc3RlZF9vbmx5AAtkYXBwUnVubmluZwkBC3ZhbHVlT3JFbHNlAgkAmwgCBQR0aGlzBQ5kYXBwUnVubmluZ0tleQYADm1haW50Z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2UgdXNlciBzdGF0dXMBaQELZGVsZXRlRW50cnkBBWVudHJ5BAZjYWxsZXIJAKUIAQgFAWkGY2FsbGVyAwkAAAIFBmNhbGxlcgUFY2hyaXMJAMwIAgkBC0RlbGV0ZUVudHJ5AQUFZW50cnkFA25pbAkAAgECAm5vAKdJYxY=", "height": 2218230, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DUd4d7LEHHd6gUQchThYoW7fCawH1YLwroy7tDCW1yW2 Next: Dt8coWdSc5QNzHdEka83612oEkAAhV21ufHbWyF4S9pi Diff:
OldNewDifferences
5858
5959 let y = (x(("certification_fee_" + toBase58String(v))) * 2)
6060
61-func z (A) = if (contains(A, "/"))
62- then if (if ((76 > size(A)))
63- then (size(split(A, "/")[0]) == 59)
61+let z = b("conf_fee_receiver")
62+
63+func A (B) = if (contains(B, "/"))
64+ then if (if ((76 > size(B)))
65+ then (size(split(B, "/")[0]) == 59)
6466 else false)
65- then (16 > size(split(A, "/")[1]))
67+ then (16 > size(split(B, "/")[1]))
6668 else false
6769 else false
6870
6971
70-func B (o,C,D,E,F) = {
71- let G = if ((size(E) != 0))
72- then z(E)
72+func C (o,D,E,F,G) = {
73+ let H = if ((size(F) != 0))
74+ then A(F)
7375 else true
74- if (!(G))
76+ if (!(H))
7577 then throw("CID don't match requirement!")
76- else if (if ((C == ""))
78+ else if (if ((D == ""))
7779 then true
78- else (D == ""))
80+ else (E == ""))
7981 then throw("Name and description cannot be empty")
80- else if ((size(D) > 600))
82+ else if ((size(E) > 600))
8183 then throw("600 Char. max description")
82- else if ((size(C) > 45))
84+ else if ((size(D) > 45))
8385 then throw("45 Char. max name")
8486 else {
85- let H = b(t(o))
86- if ((H == l))
87+ let I = b(t(o))
88+ if ((I == l))
8789 then throw("Account suspended.")
88- else if (if (!(F))
89- then (H == m)
90+ else if (if (!(G))
91+ then (I == m)
9092 else false)
9193 then throw("Already registered")
92- else if (if (F)
93- then (H == "")
94+ else if (if (G)
95+ then (I == "")
9496 else false)
9597 then throw("Register first")
9698 else true
98100 }
99101
100102
101-func I (H,J,K) = {
102- let L = [m, l]
103- let M = if (containsElement(L, H))
104- then H
103+func J (I,K,L) = {
104+ let M = [m, l]
105+ let N = if (containsElement(M, I))
106+ then I
105107 else throw("Unknown status")
106- let N = e(u(J))
107- if ((N == 0))
108+ let O = e(u(K))
109+ if ((O == 0))
108110 then throw("You cant set this status, user is not registered.")
109- else if (if ((K == m))
110- then (M == m)
111+ else if (if ((L == m))
112+ then (N == m)
111113 else false)
112114 then throw("User already registered")
113- else if (if ((K == l))
114- then (M == l)
115+ else if (if ((L == l))
116+ then (N == l)
115117 else false)
116118 then throw("User already suspended")
117- else M
119+ else N
118120 }
119121
120122
121-func O (C,E,P) = (((((("{\"user_name\": \"" + C) + "\", \"user_thumb\":\"") + E) + "\",\"user_date\":\"") + P) + "\"}")
123+func P (D,F,Q) = (((((("{\"user_name\": \"" + D) + "\", \"user_thumb\":\"") + F) + "\",\"user_date\":\"") + Q) + "\"}")
122124
123125
124-func Q (R) = if ((size(R.payments) == 0))
126+func R (S) = if ((size(S.payments) == 0))
125127 then throw("No payment attached")
126128 else {
127- let S = value(R.payments[0])
128- let T = value(S.amount)
129- $Tuple2(S, T)
129+ let T = value(S.payments[0])
130+ let U = value(T.amount)
131+ $Tuple2(T, U)
130132 }
131133
132134
133-func U (R) = {
134- let V = Q(R)
135- let S = V._1
136- let T = V._2
137- let W = if (if (isDefined(S.assetId))
138- then (S.assetId == v)
135+func V (S) = {
136+ let W = R(S)
137+ let T = W._1
138+ let U = W._2
139+ let X = if (if (isDefined(T.assetId))
140+ then (T.assetId == v)
139141 else false)
140- then S.assetId
142+ then T.assetId
141143 else throw("Only SIGN token accepted as transaction fee")
142- if ((T != y))
144+ if ((U != y))
143145 then throw(("Payment amount should be " + toString(y)))
144- else $Tuple2(T, W)
146+ else $Tuple2(U, X)
145147 }
146148
147149
148-@Callable(X)
149-func setConf (c,Y) = {
150- let o = toString(X.caller)
150+@Callable(Y)
151+func setConf (c,Z) = {
152+ let o = toString(Y.caller)
151153 if (containsElement([f, toString(this)], o))
152- then [StringEntry(c, Y)]
154+ then [StringEntry(c, Z)]
153155 else throw("You are not allowed to change this")
154156 }
155157
156158
157159
158-@Callable(X)
159-func appRunning (Z,aa) = {
160- let o = toString(X.caller)
160+@Callable(Y)
161+func appRunning (aa,ab) = {
162+ let o = toString(Y.caller)
161163 if (containsElement([f, toString(this)], o))
162- then [BooleanEntry(g, Z), StringEntry(h, aa)]
164+ then [BooleanEntry(g, aa), StringEntry(h, ab)]
163165 else throw("You are not allowed to change this")
164166 }
165167
166168
167169
168-@Callable(X)
169-func registerUser (C,D,E,ab) = if (!(j))
170+@Callable(Y)
171+func registerUser (D,E,F,ac) = if (!(j))
170172 then throw(k)
171173 else {
172- let o = toString(X.caller)
173- let ac = toBase58String(X.transactionId)
174- let ad = lastBlock.timestamp
175- let ae = U(X)
176- let T = ae._1
177- let W = ae._2
178- if (!(isDefined(T)))
174+ 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
180+ if (!(isDefined(U)))
179181 then throw("Something went wrong")
180- else if (!(B(o, C, D, E, false)))
182+ else if (!(C(o, D, E, F, false)))
181183 then throw("Something went wrong")
182184 else {
183- let af = O(toBase64String(toBytes(C)), toBase64String(toBytes(E)), toString(ad))
184-[IntegerEntry(u(o), ad), StringEntry(n(o), ((ac + "_") + toString(ad))), StringEntry(p(o), C), StringEntry(q(o), D), StringEntry(r(o), ab), StringEntry(s(o), E), StringEntry(t(o), m), StringEntry(((m + "_") + o), af)]
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)]
185187 }
186188 }
187189
188190
189191
190-@Callable(X)
191-func updateUser (C,D,E,ab) = if (!(j))
192+@Callable(Y)
193+func updateUser (D,E,F,ac) = if (!(j))
192194 then throw(k)
193195 else {
194- let o = toString(X.caller)
195- let H = b(t(o))
196- if (!(B(o, C, D, E, true)))
196+ let o = toString(Y.caller)
197+ let I = b(t(o))
198+ if (!(C(o, D, E, F, true)))
197199 then throw("Something went wrong")
198200 else {
199- let P = e(u(o))
200- let af = O(toBase64String(toBytes(C)), toBase64String(toBytes(E)), toString(P))
201-[StringEntry(p(o), C), StringEntry(q(o), D), StringEntry(r(o), ab), StringEntry(s(o), E), StringEntry(((H + "_") + o), af)]
201+ 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)]
202204 }
203205 }
204206
205207
206208
207-@Callable(X)
208-func changeUserStatus (J,H,ag) = {
209- let o = toString(X.caller)
210- let K = b(t(J))
211- let M = I(H, J, K)
212- let C = toBase64String(toBytes(b(p(J))))
213- let E = toBase64String(toBytes(b(s(J))))
214- let P = e(u(J))
215- let af = O(C, E, toString(P))
209+@Callable(Y)
210+func changeUserStatus (K,I,ah) = {
211+ let o = toString(Y.caller)
212+ let L = b(t(K))
213+ let N = J(I, K, L)
214+ let D = toBase64String(toBytes(b(p(K))))
215+ let F = toBase64String(toBytes(b(s(K))))
216+ let Q = e(u(K))
217+ let ag = P(D, F, toString(Q))
216218 if (containsElement([f, toString(this)], o))
217- then [StringEntry(t(J), M), DeleteEntry(((K + "_") + J)), StringEntry(((M + "_") + J), af), StringEntry(("user_note_" + J), ag)]
219+ then [StringEntry(t(K), N), DeleteEntry(((L + "_") + K)), StringEntry(((N + "_") + K), ag), StringEntry(("user_note_" + K), ah)]
218220 else throw("Not allowed to change user status")
219221 }
220222
221223
222224
223-@Callable(R)
224-func deleteEntry (ah) = {
225- let o = toString(R.caller)
225+@Callable(S)
226+func deleteEntry (ai) = {
227+ let o = toString(S.caller)
226228 if ((o == f))
227- then [DeleteEntry(ah)]
229+ then [DeleteEntry(ai)]
228230 else throw("no")
229231 }
230232
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "0.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
61-func z (A) = if (contains(A, "/"))
62- then if (if ((76 > size(A)))
63- then (size(split(A, "/")[0]) == 59)
61+let z = b("conf_fee_receiver")
62+
63+func A (B) = if (contains(B, "/"))
64+ then if (if ((76 > size(B)))
65+ then (size(split(B, "/")[0]) == 59)
6466 else false)
65- then (16 > size(split(A, "/")[1]))
67+ then (16 > size(split(B, "/")[1]))
6668 else false
6769 else false
6870
6971
70-func B (o,C,D,E,F) = {
71- let G = if ((size(E) != 0))
72- then z(E)
72+func C (o,D,E,F,G) = {
73+ let H = if ((size(F) != 0))
74+ then A(F)
7375 else true
74- if (!(G))
76+ if (!(H))
7577 then throw("CID don't match requirement!")
76- else if (if ((C == ""))
78+ else if (if ((D == ""))
7779 then true
78- else (D == ""))
80+ else (E == ""))
7981 then throw("Name and description cannot be empty")
80- else if ((size(D) > 600))
82+ else if ((size(E) > 600))
8183 then throw("600 Char. max description")
82- else if ((size(C) > 45))
84+ else if ((size(D) > 45))
8385 then throw("45 Char. max name")
8486 else {
85- let H = b(t(o))
86- if ((H == l))
87+ let I = b(t(o))
88+ if ((I == l))
8789 then throw("Account suspended.")
88- else if (if (!(F))
89- then (H == m)
90+ else if (if (!(G))
91+ then (I == m)
9092 else false)
9193 then throw("Already registered")
92- else if (if (F)
93- then (H == "")
94+ else if (if (G)
95+ then (I == "")
9496 else false)
9597 then throw("Register first")
9698 else true
9799 }
98100 }
99101
100102
101-func I (H,J,K) = {
102- let L = [m, l]
103- let M = if (containsElement(L, H))
104- then H
103+func J (I,K,L) = {
104+ let M = [m, l]
105+ let N = if (containsElement(M, I))
106+ then I
105107 else throw("Unknown status")
106- let N = e(u(J))
107- if ((N == 0))
108+ let O = e(u(K))
109+ if ((O == 0))
108110 then throw("You cant set this status, user is not registered.")
109- else if (if ((K == m))
110- then (M == m)
111+ else if (if ((L == m))
112+ then (N == m)
111113 else false)
112114 then throw("User already registered")
113- else if (if ((K == l))
114- then (M == l)
115+ else if (if ((L == l))
116+ then (N == l)
115117 else false)
116118 then throw("User already suspended")
117- else M
119+ else N
118120 }
119121
120122
121-func O (C,E,P) = (((((("{\"user_name\": \"" + C) + "\", \"user_thumb\":\"") + E) + "\",\"user_date\":\"") + P) + "\"}")
123+func P (D,F,Q) = (((((("{\"user_name\": \"" + D) + "\", \"user_thumb\":\"") + F) + "\",\"user_date\":\"") + Q) + "\"}")
122124
123125
124-func Q (R) = if ((size(R.payments) == 0))
126+func R (S) = if ((size(S.payments) == 0))
125127 then throw("No payment attached")
126128 else {
127- let S = value(R.payments[0])
128- let T = value(S.amount)
129- $Tuple2(S, T)
129+ let T = value(S.payments[0])
130+ let U = value(T.amount)
131+ $Tuple2(T, U)
130132 }
131133
132134
133-func U (R) = {
134- let V = Q(R)
135- let S = V._1
136- let T = V._2
137- let W = if (if (isDefined(S.assetId))
138- then (S.assetId == v)
135+func V (S) = {
136+ let W = R(S)
137+ let T = W._1
138+ let U = W._2
139+ let X = if (if (isDefined(T.assetId))
140+ then (T.assetId == v)
139141 else false)
140- then S.assetId
142+ then T.assetId
141143 else throw("Only SIGN token accepted as transaction fee")
142- if ((T != y))
144+ if ((U != y))
143145 then throw(("Payment amount should be " + toString(y)))
144- else $Tuple2(T, W)
146+ else $Tuple2(U, X)
145147 }
146148
147149
148-@Callable(X)
149-func setConf (c,Y) = {
150- let o = toString(X.caller)
150+@Callable(Y)
151+func setConf (c,Z) = {
152+ let o = toString(Y.caller)
151153 if (containsElement([f, toString(this)], o))
152- then [StringEntry(c, Y)]
154+ then [StringEntry(c, Z)]
153155 else throw("You are not allowed to change this")
154156 }
155157
156158
157159
158-@Callable(X)
159-func appRunning (Z,aa) = {
160- let o = toString(X.caller)
160+@Callable(Y)
161+func appRunning (aa,ab) = {
162+ let o = toString(Y.caller)
161163 if (containsElement([f, toString(this)], o))
162- then [BooleanEntry(g, Z), StringEntry(h, aa)]
164+ then [BooleanEntry(g, aa), StringEntry(h, ab)]
163165 else throw("You are not allowed to change this")
164166 }
165167
166168
167169
168-@Callable(X)
169-func registerUser (C,D,E,ab) = if (!(j))
170+@Callable(Y)
171+func registerUser (D,E,F,ac) = if (!(j))
170172 then throw(k)
171173 else {
172- let o = toString(X.caller)
173- let ac = toBase58String(X.transactionId)
174- let ad = lastBlock.timestamp
175- let ae = U(X)
176- let T = ae._1
177- let W = ae._2
178- if (!(isDefined(T)))
174+ 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
180+ if (!(isDefined(U)))
179181 then throw("Something went wrong")
180- else if (!(B(o, C, D, E, false)))
182+ else if (!(C(o, D, E, F, false)))
181183 then throw("Something went wrong")
182184 else {
183- let af = O(toBase64String(toBytes(C)), toBase64String(toBytes(E)), toString(ad))
184-[IntegerEntry(u(o), ad), StringEntry(n(o), ((ac + "_") + toString(ad))), StringEntry(p(o), C), StringEntry(q(o), D), StringEntry(r(o), ab), StringEntry(s(o), E), StringEntry(t(o), m), StringEntry(((m + "_") + o), af)]
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)]
185187 }
186188 }
187189
188190
189191
190-@Callable(X)
191-func updateUser (C,D,E,ab) = if (!(j))
192+@Callable(Y)
193+func updateUser (D,E,F,ac) = if (!(j))
192194 then throw(k)
193195 else {
194- let o = toString(X.caller)
195- let H = b(t(o))
196- if (!(B(o, C, D, E, true)))
196+ let o = toString(Y.caller)
197+ let I = b(t(o))
198+ if (!(C(o, D, E, F, true)))
197199 then throw("Something went wrong")
198200 else {
199- let P = e(u(o))
200- let af = O(toBase64String(toBytes(C)), toBase64String(toBytes(E)), toString(P))
201-[StringEntry(p(o), C), StringEntry(q(o), D), StringEntry(r(o), ab), StringEntry(s(o), E), StringEntry(((H + "_") + o), af)]
201+ 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)]
202204 }
203205 }
204206
205207
206208
207-@Callable(X)
208-func changeUserStatus (J,H,ag) = {
209- let o = toString(X.caller)
210- let K = b(t(J))
211- let M = I(H, J, K)
212- let C = toBase64String(toBytes(b(p(J))))
213- let E = toBase64String(toBytes(b(s(J))))
214- let P = e(u(J))
215- let af = O(C, E, toString(P))
209+@Callable(Y)
210+func changeUserStatus (K,I,ah) = {
211+ let o = toString(Y.caller)
212+ let L = b(t(K))
213+ let N = J(I, K, L)
214+ let D = toBase64String(toBytes(b(p(K))))
215+ let F = toBase64String(toBytes(b(s(K))))
216+ let Q = e(u(K))
217+ let ag = P(D, F, toString(Q))
216218 if (containsElement([f, toString(this)], o))
217- then [StringEntry(t(J), M), DeleteEntry(((K + "_") + J)), StringEntry(((M + "_") + J), af), StringEntry(("user_note_" + J), ag)]
219+ then [StringEntry(t(K), N), DeleteEntry(((L + "_") + K)), StringEntry(((N + "_") + K), ag), StringEntry(("user_note_" + K), ah)]
218220 else throw("Not allowed to change user status")
219221 }
220222
221223
222224
223-@Callable(R)
224-func deleteEntry (ah) = {
225- let o = toString(R.caller)
225+@Callable(S)
226+func deleteEntry (ai) = {
227+ let o = toString(S.caller)
226228 if ((o == f))
227- then [DeleteEntry(ah)]
229+ then [DeleteEntry(ai)]
228230 else throw("no")
229231 }
230232
231233

github/deemru/w8io/026f985 
68.62 ms