tx · DSgTqxw9vomsU4KfLjjYLMDUdJW3rkYPafHn4q1sR39k

3N8YkRZsgDVNAxtmwU1F65EpcYMb8f7QPos:  -0.01100000 Waves

2024.05.14 15:34 [3105693] smart account 3N8YkRZsgDVNAxtmwU1F65EpcYMb8f7QPos > SELF 0.00000000 Waves

{ "type": 13, "id": "DSgTqxw9vomsU4KfLjjYLMDUdJW3rkYPafHn4q1sR39k", "fee": 1100000, "feeAssetId": null, "timestamp": 1715690012471, "version": 2, "chainId": 84, "sender": "3N8YkRZsgDVNAxtmwU1F65EpcYMb8f7QPos", "senderPublicKey": "F7SLwr7RYVQpyocmVScFC6ooaAwewaGq6wNRDYvyiPj1", "proofs": [ "S9S1jQY2n7VQqorZbqPVPSBAXFgSKuX3bRuUUjUnMdgwtY7GYsE9Madi8AZDZAB6UDqysEABxoCXb3PjSTb7UPh" ], "script": "base64:AAIFAAAAAAAAAAoIAhIECgIICBIAAAAABAAAAAAKbWF4Q291bnRlcgAAAAAAAAAAAwAAAAANZGVmYXVsdFJhdGluZwAAAAAAAAAAZAEAAAAUc2VhcmNoRm9yUHJlZGljdGlvbnMAAAACAAAABml0ZW1JZAAAAAdjb3VudGVyBAAAABBzZWFyY2hGb3JDb3VudGVyBAAAAAckbWF0Y2gwCQAEIgAAAAEJAAEsAAAAAgkAASwAAAACBQAAAAZpdGVtSWQCAAAAAV8JAAGkAAAAAQUAAAAHY291bnRlcgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFzBQAAAAckbWF0Y2gwBQAAAAFzAgAAAAdObyBVc2VyBQAAABBzZWFyY2hGb3JDb3VudGVyAQAAABZmaW5kUHJlZGljdGlvbkFkcmVzc2VzAAAAAgAAAAZpdGVtSWQAAAAHY291bnRlcgQAAAAKYWRyZXNzTGlzdAUAAAADbmlsAwkAAGcAAAACBQAAAAdjb3VudGVyAAAAAAAAAAABBAAAAAdhZHJlc3MxCQEAAAAUc2VhcmNoRm9yUHJlZGljdGlvbn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0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXl13gjJ", "height": 3105693, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CfPFMxDkvxFr4BNcWpW6bPkg8vErv18DZzvLyPdKLwaA Next: 3LznDyEZnroS5VU5YsA1EM8VP4seozQ42jUfKGmdFDu5 Diff:
OldNewDifferences
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 3
55
6-func b (c,d) = {
7- let e = {
8- let f = getString(((c + "_") + toString(d)))
9- if ($isInstanceOf(f, "String"))
6+let b = 100
7+
8+func c (d,e) = {
9+ let f = {
10+ let g = getString(((d + "_") + toString(e)))
11+ if ($isInstanceOf(g, "String"))
1012 then {
11- let g = f
12- g
13+ let h = g
14+ h
1315 }
1416 else "No User"
1517 }
16- e
18+ f
1719 }
1820
1921
20-func h (c,d) = {
21- let i = nil
22- if ((d >= 1))
22+func i (d,e) = {
23+ let j = nil
24+ if ((e >= 1))
2325 then {
24- let j = b(c, 1)
25- (i :+ j)
26+ let k = c(d, 1)
27+ (j :+ k)
2628 }
27- else if ((d >= 2))
29+ else if ((e >= 2))
2830 then {
29- let j = b(c, 1)
30- let k = b(c, 2)
31- ((i :+ j) :+ k)
31+ let k = c(d, 1)
32+ let l = c(d, 2)
33+ ((j :+ k) :+ l)
3234 }
33- else if ((d >= 3))
35+ else if ((e >= 3))
3436 then {
35- let j = b(c, 1)
36- let k = b(c, 2)
37- let l = b(c, 3)
38- (((i :+ j) :+ k) :+ l)
37+ let k = c(d, 1)
38+ let l = c(d, 2)
39+ let m = c(d, 3)
40+ (((j :+ k) :+ l) :+ m)
3941 }
40- else if ((d >= 4))
42+ else if ((e >= 4))
4143 then {
42- let j = b(c, 1)
43- let k = b(c, 2)
44- let l = b(c, 3)
45- let m = b(c, 4)
46- ((((i :+ j) :+ k) :+ l) :+ m)
44+ let k = c(d, 1)
45+ let l = c(d, 2)
46+ let m = c(d, 3)
47+ let n = c(d, 4)
48+ ((((j :+ k) :+ l) :+ m) :+ n)
4749 }
4850 else {
49- let j = b(c, 1)
50- let k = b(c, 2)
51- let l = b(c, 3)
52- let m = b(c, 4)
53- let n = b(c, 5)
54- (((((i :+ j) :+ k) :+ l) :+ m) :+ n)
51+ let k = c(d, 1)
52+ let l = c(d, 2)
53+ let m = c(d, 3)
54+ let n = c(d, 4)
55+ let o = c(d, 5)
56+ (((((j :+ k) :+ l) :+ m) :+ n) :+ o)
5557 }
5658 }
5759
5860
59-@Callable(o)
60-func savePrediction (c,p) = {
61- let q = toString(o.caller)
62- let r = {
63- let f = getString(c)
64- if ($isInstanceOf(f, "String"))
61+@Callable(p)
62+func savePrediction (d,q) = {
63+ let r = toString(p.caller)
64+ let s = {
65+ let g = getString(d)
66+ if ($isInstanceOf(g, "String"))
6567 then {
66- let g = f
67- g
68+ let h = g
69+ h
6870 }
6971 else "no Data exists"
7072 }
71- if ((r == "no Data exists"))
73+ if ((s == "no Data exists"))
7274 then throw("This ItemID does not exist!")
7375 else {
74- let e = {
75- let f = getString(q)
76- if ($isInstanceOf(f, "String"))
76+ let t = {
77+ let g = getInteger(r)
78+ if ($isInstanceOf(g, "Int"))
7779 then {
78- let g = f
79- g
80+ let h = g
81+ h
8082 }
8183 else "no User exists"
8284 }
83- if ((e == "no User exists"))
85+ if ((t == "no User exists"))
8486 then throw("User does not exist")
8587 else {
86- let s = {
87- let f = getInteger((c + "_counter"))
88- if ($isInstanceOf(f, "Int"))
88+ let f = {
89+ let g = getInteger((d + "_counter"))
90+ if ($isInstanceOf(g, "Int"))
8991 then {
90- let g = f
91- g
92+ let h = g
93+ h
9294 }
9395 else -1
9496 }
95- let i = h(c, s)
96- if (containsElement(i, q))
97+ let j = i(d, f)
98+ if (containsElement(j, r))
9799 then throw("This User already gave a Prediction")
98- else if ((s >= 1))
100+ else if ((f >= 1))
99101 then {
100- let t = {
101- let f = getInteger((c + "_predictionCounter"))
102- if ($isInstanceOf(f, "Int"))
102+ let u = {
103+ let g = getInteger((d + "_predictionCounter"))
104+ if ($isInstanceOf(g, "Int"))
103105 then {
104- let g = f
105- g
106+ let h = g
107+ h
106108 }
107109 else -1
108110 }
109- let u = i[(size(i) - 1)]
110- let v = {
111- let f = getString(((c + "_") + u))
112- if ($isInstanceOf(f, "String"))
111+ let v = j[(size(j) - 1)]
112+ let w = {
113+ let g = getString(((d + "_") + v))
114+ if ($isInstanceOf(g, "String"))
113115 then {
114- let g = f
115- g
116+ let h = g
117+ h
116118 }
117119 else "no Prediction Found"
118120 }
119- let w = (s + 1)
120- if ((v == p))
121- then if (((t + 1) == a))
122- then [StringEntry(((c + "_") + toString(w)), q), StringEntry(((c + "_") + q), p), IntegerEntry((c + "_counter"), w), IntegerEntry((c + "_predictionCounter"), (t + 1)), BooleanEntry((c + "_final"), true), BooleanEntry((c + "_cancelled"), false)]
123- else [StringEntry(((c + "_") + toString(w)), q), StringEntry(((c + "_") + q), p), IntegerEntry((c + "_counter"), w), IntegerEntry((c + "_predictionCounter"), (t + 1)), BooleanEntry((c + "_final"), false), BooleanEntry((c + "_cancelled"), false)]
124- else if ((w >= 6))
125- then [StringEntry(((c + "_") + toString(w)), q), StringEntry(((c + "_") + q), p), IntegerEntry((c + "_counter"), w), IntegerEntry((c + "_predictionCounter"), (t - 1)), BooleanEntry((c + "_cancelled"), true), BooleanEntry((c + "_final"), false)]
126- else [StringEntry(((c + "_") + toString(w)), q), StringEntry(((c + "_") + q), p), IntegerEntry((c + "_counter"), w), IntegerEntry((c + "_predictionCounter"), (t - 1)), BooleanEntry((c + "_cancelled"), false), BooleanEntry((c + "_final"), false)]
121+ let x = (f + 1)
122+ if ((w == q))
123+ then if (((u + 1) == a))
124+ then [StringEntry(((d + "_") + toString(x)), r), StringEntry(((d + "_") + r), q), IntegerEntry((d + "_counter"), x), IntegerEntry((d + "_predictionCounter"), (u + 1)), BooleanEntry((d + "_final"), true), BooleanEntry((d + "_cancelled"), false)]
125+ else [StringEntry(((d + "_") + toString(x)), r), StringEntry(((d + "_") + r), q), IntegerEntry((d + "_counter"), x), IntegerEntry((d + "_predictionCounter"), (u + 1)), BooleanEntry((d + "_final"), false), BooleanEntry((d + "_cancelled"), false)]
126+ else if ((x >= 6))
127+ then [StringEntry(((d + "_") + toString(x)), r), StringEntry(((d + "_") + r), q), IntegerEntry((d + "_counter"), x), IntegerEntry((d + "_predictionCounter"), (u - 1)), BooleanEntry((d + "_cancelled"), true), BooleanEntry((d + "_final"), false)]
128+ else [StringEntry(((d + "_") + toString(x)), r), StringEntry(((d + "_") + r), q), IntegerEntry((d + "_counter"), x), IntegerEntry((d + "_predictionCounter"), (u - 1)), BooleanEntry((d + "_cancelled"), false), BooleanEntry((d + "_final"), false)]
127129 }
128- else [StringEntry(((c + "_") + toString(1)), q), StringEntry(((c + "_") + q), p), IntegerEntry((c + "_counter"), 1), IntegerEntry((c + "_predictionCounter"), 1)]
130+ else [StringEntry(((d + "_") + toString(1)), r), StringEntry(((d + "_") + r), q), IntegerEntry((d + "_counter"), 1), IntegerEntry((d + "_predictionCounter"), 1)]
129131 }
130132 }
131133 }
132134
133135
134-@Verifier(x)
135-func y () = sigVerify(x.bodyBytes, x.proofs[0], x.senderPublicKey)
136+
137+@Callable(p)
138+func registerUser () = {
139+ let r = toString(p.caller)
140+ let t = {
141+ let g = getInteger(r)
142+ if ($isInstanceOf(g, "Int"))
143+ then {
144+ let h = g
145+ h
146+ }
147+ else "No user found"
148+ }
149+ if ((t != "No user Found"))
150+ then throw("User already exists")
151+ else [IntegerEntry(r, b)]
152+ }
153+
154+
155+@Verifier(y)
156+func z () = sigVerify(y.bodyBytes, y.proofs[0], y.senderPublicKey)
136157
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 3
55
6-func b (c,d) = {
7- let e = {
8- let f = getString(((c + "_") + toString(d)))
9- if ($isInstanceOf(f, "String"))
6+let b = 100
7+
8+func c (d,e) = {
9+ let f = {
10+ let g = getString(((d + "_") + toString(e)))
11+ if ($isInstanceOf(g, "String"))
1012 then {
11- let g = f
12- g
13+ let h = g
14+ h
1315 }
1416 else "No User"
1517 }
16- e
18+ f
1719 }
1820
1921
20-func h (c,d) = {
21- let i = nil
22- if ((d >= 1))
22+func i (d,e) = {
23+ let j = nil
24+ if ((e >= 1))
2325 then {
24- let j = b(c, 1)
25- (i :+ j)
26+ let k = c(d, 1)
27+ (j :+ k)
2628 }
27- else if ((d >= 2))
29+ else if ((e >= 2))
2830 then {
29- let j = b(c, 1)
30- let k = b(c, 2)
31- ((i :+ j) :+ k)
31+ let k = c(d, 1)
32+ let l = c(d, 2)
33+ ((j :+ k) :+ l)
3234 }
33- else if ((d >= 3))
35+ else if ((e >= 3))
3436 then {
35- let j = b(c, 1)
36- let k = b(c, 2)
37- let l = b(c, 3)
38- (((i :+ j) :+ k) :+ l)
37+ let k = c(d, 1)
38+ let l = c(d, 2)
39+ let m = c(d, 3)
40+ (((j :+ k) :+ l) :+ m)
3941 }
40- else if ((d >= 4))
42+ else if ((e >= 4))
4143 then {
42- let j = b(c, 1)
43- let k = b(c, 2)
44- let l = b(c, 3)
45- let m = b(c, 4)
46- ((((i :+ j) :+ k) :+ l) :+ m)
44+ let k = c(d, 1)
45+ let l = c(d, 2)
46+ let m = c(d, 3)
47+ let n = c(d, 4)
48+ ((((j :+ k) :+ l) :+ m) :+ n)
4749 }
4850 else {
49- let j = b(c, 1)
50- let k = b(c, 2)
51- let l = b(c, 3)
52- let m = b(c, 4)
53- let n = b(c, 5)
54- (((((i :+ j) :+ k) :+ l) :+ m) :+ n)
51+ let k = c(d, 1)
52+ let l = c(d, 2)
53+ let m = c(d, 3)
54+ let n = c(d, 4)
55+ let o = c(d, 5)
56+ (((((j :+ k) :+ l) :+ m) :+ n) :+ o)
5557 }
5658 }
5759
5860
59-@Callable(o)
60-func savePrediction (c,p) = {
61- let q = toString(o.caller)
62- let r = {
63- let f = getString(c)
64- if ($isInstanceOf(f, "String"))
61+@Callable(p)
62+func savePrediction (d,q) = {
63+ let r = toString(p.caller)
64+ let s = {
65+ let g = getString(d)
66+ if ($isInstanceOf(g, "String"))
6567 then {
66- let g = f
67- g
68+ let h = g
69+ h
6870 }
6971 else "no Data exists"
7072 }
71- if ((r == "no Data exists"))
73+ if ((s == "no Data exists"))
7274 then throw("This ItemID does not exist!")
7375 else {
74- let e = {
75- let f = getString(q)
76- if ($isInstanceOf(f, "String"))
76+ let t = {
77+ let g = getInteger(r)
78+ if ($isInstanceOf(g, "Int"))
7779 then {
78- let g = f
79- g
80+ let h = g
81+ h
8082 }
8183 else "no User exists"
8284 }
83- if ((e == "no User exists"))
85+ if ((t == "no User exists"))
8486 then throw("User does not exist")
8587 else {
86- let s = {
87- let f = getInteger((c + "_counter"))
88- if ($isInstanceOf(f, "Int"))
88+ let f = {
89+ let g = getInteger((d + "_counter"))
90+ if ($isInstanceOf(g, "Int"))
8991 then {
90- let g = f
91- g
92+ let h = g
93+ h
9294 }
9395 else -1
9496 }
95- let i = h(c, s)
96- if (containsElement(i, q))
97+ let j = i(d, f)
98+ if (containsElement(j, r))
9799 then throw("This User already gave a Prediction")
98- else if ((s >= 1))
100+ else if ((f >= 1))
99101 then {
100- let t = {
101- let f = getInteger((c + "_predictionCounter"))
102- if ($isInstanceOf(f, "Int"))
102+ let u = {
103+ let g = getInteger((d + "_predictionCounter"))
104+ if ($isInstanceOf(g, "Int"))
103105 then {
104- let g = f
105- g
106+ let h = g
107+ h
106108 }
107109 else -1
108110 }
109- let u = i[(size(i) - 1)]
110- let v = {
111- let f = getString(((c + "_") + u))
112- if ($isInstanceOf(f, "String"))
111+ let v = j[(size(j) - 1)]
112+ let w = {
113+ let g = getString(((d + "_") + v))
114+ if ($isInstanceOf(g, "String"))
113115 then {
114- let g = f
115- g
116+ let h = g
117+ h
116118 }
117119 else "no Prediction Found"
118120 }
119- let w = (s + 1)
120- if ((v == p))
121- then if (((t + 1) == a))
122- then [StringEntry(((c + "_") + toString(w)), q), StringEntry(((c + "_") + q), p), IntegerEntry((c + "_counter"), w), IntegerEntry((c + "_predictionCounter"), (t + 1)), BooleanEntry((c + "_final"), true), BooleanEntry((c + "_cancelled"), false)]
123- else [StringEntry(((c + "_") + toString(w)), q), StringEntry(((c + "_") + q), p), IntegerEntry((c + "_counter"), w), IntegerEntry((c + "_predictionCounter"), (t + 1)), BooleanEntry((c + "_final"), false), BooleanEntry((c + "_cancelled"), false)]
124- else if ((w >= 6))
125- then [StringEntry(((c + "_") + toString(w)), q), StringEntry(((c + "_") + q), p), IntegerEntry((c + "_counter"), w), IntegerEntry((c + "_predictionCounter"), (t - 1)), BooleanEntry((c + "_cancelled"), true), BooleanEntry((c + "_final"), false)]
126- else [StringEntry(((c + "_") + toString(w)), q), StringEntry(((c + "_") + q), p), IntegerEntry((c + "_counter"), w), IntegerEntry((c + "_predictionCounter"), (t - 1)), BooleanEntry((c + "_cancelled"), false), BooleanEntry((c + "_final"), false)]
121+ let x = (f + 1)
122+ if ((w == q))
123+ then if (((u + 1) == a))
124+ then [StringEntry(((d + "_") + toString(x)), r), StringEntry(((d + "_") + r), q), IntegerEntry((d + "_counter"), x), IntegerEntry((d + "_predictionCounter"), (u + 1)), BooleanEntry((d + "_final"), true), BooleanEntry((d + "_cancelled"), false)]
125+ else [StringEntry(((d + "_") + toString(x)), r), StringEntry(((d + "_") + r), q), IntegerEntry((d + "_counter"), x), IntegerEntry((d + "_predictionCounter"), (u + 1)), BooleanEntry((d + "_final"), false), BooleanEntry((d + "_cancelled"), false)]
126+ else if ((x >= 6))
127+ then [StringEntry(((d + "_") + toString(x)), r), StringEntry(((d + "_") + r), q), IntegerEntry((d + "_counter"), x), IntegerEntry((d + "_predictionCounter"), (u - 1)), BooleanEntry((d + "_cancelled"), true), BooleanEntry((d + "_final"), false)]
128+ else [StringEntry(((d + "_") + toString(x)), r), StringEntry(((d + "_") + r), q), IntegerEntry((d + "_counter"), x), IntegerEntry((d + "_predictionCounter"), (u - 1)), BooleanEntry((d + "_cancelled"), false), BooleanEntry((d + "_final"), false)]
127129 }
128- else [StringEntry(((c + "_") + toString(1)), q), StringEntry(((c + "_") + q), p), IntegerEntry((c + "_counter"), 1), IntegerEntry((c + "_predictionCounter"), 1)]
130+ else [StringEntry(((d + "_") + toString(1)), r), StringEntry(((d + "_") + r), q), IntegerEntry((d + "_counter"), 1), IntegerEntry((d + "_predictionCounter"), 1)]
129131 }
130132 }
131133 }
132134
133135
134-@Verifier(x)
135-func y () = sigVerify(x.bodyBytes, x.proofs[0], x.senderPublicKey)
136+
137+@Callable(p)
138+func registerUser () = {
139+ let r = toString(p.caller)
140+ let t = {
141+ let g = getInteger(r)
142+ if ($isInstanceOf(g, "Int"))
143+ then {
144+ let h = g
145+ h
146+ }
147+ else "No user found"
148+ }
149+ if ((t != "No user Found"))
150+ then throw("User already exists")
151+ else [IntegerEntry(r, b)]
152+ }
153+
154+
155+@Verifier(y)
156+func z () = sigVerify(y.bodyBytes, y.proofs[0], y.senderPublicKey)
136157

github/deemru/w8io/026f985 
72.64 ms