tx · 9YWZEUdaZisAJ7AvsaToWskp7nGe4j4RcQqL5iih8Rjo

3N5rNyYSAsaP9QL2eQq286RhevB8msHFffu:  -0.01400000 Waves

2020.08.27 21:44 [1151492] smart account 3N5rNyYSAsaP9QL2eQq286RhevB8msHFffu > SELF 0.00000000 Waves

{ "type": 13, "id": "9YWZEUdaZisAJ7AvsaToWskp7nGe4j4RcQqL5iih8Rjo", "fee": 1400000, "feeAssetId": null, "timestamp": 1598553861864, "version": 1, "sender": "3N5rNyYSAsaP9QL2eQq286RhevB8msHFffu", "senderPublicKey": "CBTEuFN6ku1LNaPuGHHTMh2CBb3kPa5D73XXTJvKydun", "proofs": [ "56gfYLqvrWkcv5v5mFLQCtu67etj5pmvS7yKMAfGBq8Xnr9XwFoPrfd6ZBqZ4G9rNuqcRt6YCc9f2o7iGDeKP1Uu" ], "script": "base64:AAIDAAAAAAAAABsIARIHCgUICAgICBIECgIICBIDCgEIEgMKAQgAAAAMAAAAAAZ1cFZvdGUCAAAABnVwdm90ZQAAAAAIZG93blZvdGUCAAAACGRvd252b3RlAAAAAAxhZG1pbkFkZHJlc3MBAAAAGgFUOLYhWIA2WAg9IJQBVCmgZJeEnZPD9jSLAQAAAA1nZXRQcm9maWxlS2V5AAAAAQAAAAJpZAkAASwAAAACBQAAAAJpZAIAAAAUX2VudHJlcHJlbmV1clByb2ZpbGUBAAAADGdldFN0YXR1c0tleQAAAAEAAAACaWQJAAEsAAAAAgUAAAACaWQCAAAAB19zdGF0dXMBAAAACmdldFZvdGVLZXkAAAACAAAAAmlkAAAABHR5cGUDCQAAAAAAAAIFAAAABHR5cGUCAAAABnVwdm90ZQkAASwAAAACBQAAAAJpZAIAAAAHX3Vwdm90ZQMJAAAAAAAAAgUAAAAEdHlwZQIAAAAIZG93bnZvdGUJAAEsAAAAAgUAAAACaWQCAAAACV9kb3dudm90ZQkAAAIAAAABAgAAABFJbnZhbGlkIHZvdGUgdHlwZQEAAAAMcHJvZmlsZUV4aXN0AAAAAQAA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HJlc3MJAAACAAAAAQIAAAAuT25seSBEeXpydXB0IEFkbWluIGNhbiBjYWxsIHRoaXMgZEFwcCBmdW5jdGlvbgMJAQAAAAxwcm9maWxlRXhpc3QAAAABBQAAAAZ2b3RlSWQJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAAAxnZXRTdGF0dXNLZXkAAAABBQAAAAZ2b3RlSWQCAAAABG9wZW4FAAAAA25pbAkAAAIAAAABAgAAAApJbnZhbGlkIElEAAAAAWkBAAAACWNsb3NlVm90ZQAAAAEAAAAGdm90ZUlkAwkBAAAAAiE9AAAAAggIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwUAAAAMYWRtaW5BZGRyZXNzCQAAAgAAAAECAAAALk9ubHkgRHl6cnVwdCBBZG1pbiBjYW4gY2FsbCB0aGlzIGRBcHAgZnVuY3Rpb24DCQEAAAAMcHJvZmlsZUV4aXN0AAAAAQUAAAAGdm90ZUlkCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQEAAAAMZ2V0U3RhdHVzS2V5AAAAAQUAAAAGdm90ZUlkAgAAAAZjbG9zZWQFAAAAA25pbAkAAAIAAAABAgAAAApJbnZhbGlkIElEAAAAAMosPxc=", "chainId": 84, "height": 1151492, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4m7YTvePdAzignJRoWbXYNKoukdLpP5znYQdjjDXgJDc Next: Hee47hqHSerHkFYv38TzHviUUTXnxR8pze5pfAZz4927 Diff:
OldNewDifferences
5353 }
5454
5555
56-@Callable(p)
57-func addEntrepreneurProfile (q,r,s,t,u) = if ((p.caller.bytes != c))
56+func p (q,m) = ((((q + "_") + m) + "_") + "vote")
57+
58+
59+func r (q,m) = {
60+ let j = getString(this, p(q, m))
61+ if ($isInstanceOf(j, "String"))
62+ then {
63+ let k = j
64+ k
65+ }
66+ else ""
67+ }
68+
69+
70+func s (q,m) = {
71+ let t = r(q, m)
72+ if ((t == ""))
73+ then true
74+ else false
75+ }
76+
77+
78+@Callable(u)
79+func addEntrepreneurProfile (v,w,x,y,z) = if ((u.caller.bytes != c))
5880 then throw("Only Dyzrupt Admin can call this dApp function")
5981 else {
60- let v = toBase58String(p.transactionId)
61- WriteSet([DataEntry(d(v), ((((((((q + "_") + r) + "_") + s) + "_") + t) + "_") + u)), DataEntry(g(v, "upvote"), 0), DataEntry(f(v), "open"), DataEntry(g(v, "downvote"), 0)])
82+ let A = toBase58String(u.transactionId)
83+ WriteSet([DataEntry(d(A), ((((((((v + "_") + w) + "_") + x) + "_") + y) + "_") + z)), DataEntry(g(A, "upvote"), 0), DataEntry(f(A), "open"), DataEntry(g(A, "downvote"), 0)])
6284 }
6385
6486
6587
66-@Callable(p)
67-func vote (m,o) = if (i(m))
68- then if ((l(m) == "open"))
69- then if (if ((o == a))
70- then true
71- else (o == b))
72- then {
73- let w = n(m, o)
74- let x = (w + 1)
75- WriteSet([DataEntry(g(m, o), x)])
76- }
77- else throw("Not a valid vote value")
78- else throw("This profile is not open for voting")
79- else throw("Invalid Profile")
88+@Callable(u)
89+func vote (m,o) = if (s(toBase58String(u.caller.bytes), m))
90+ then if (i(m))
91+ then if ((l(m) == "open"))
92+ then if (if ((o == a))
93+ then true
94+ else (o == b))
95+ then {
96+ let B = n(m, o)
97+ let C = (B + 1)
98+ WriteSet([DataEntry(g(m, o), C), DataEntry(p(toBase58String(u.caller.bytes), m), m)])
99+ }
100+ else throw("Not a valid vote value")
101+ else throw("This profile is not open for voting")
102+ else throw("Invalid Profile")
103+ else throw("You can't vote twice")
80104
81105
82106
83-@Callable(p)
84-func openVote (m) = if ((p.caller.bytes != c))
107+@Callable(u)
108+func openVote (m) = if ((u.caller.bytes != c))
85109 then throw("Only Dyzrupt Admin can call this dApp function")
86110 else if (i(m))
87111 then WriteSet([DataEntry(f(m), "open")])
89113
90114
91115
92-@Callable(p)
93-func closeVote (m) = if ((p.caller.bytes != c))
116+@Callable(u)
117+func closeVote (m) = if ((u.caller.bytes != c))
94118 then throw("Only Dyzrupt Admin can call this dApp function")
95119 else if (i(m))
96120 then WriteSet([DataEntry(f(m), "closed")])
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "upvote"
55
66 let b = "downvote"
77
88 let c = base58'3Mu5woJ54s7vHJgaeNcJ4C9ByfdmMF2jpjC'
99
1010 func d (e) = (e + "_entrepreneurProfile")
1111
1212
1313 func f (e) = (e + "_status")
1414
1515
1616 func g (e,h) = if ((h == "upvote"))
1717 then (e + "_upvote")
1818 else if ((h == "downvote"))
1919 then (e + "_downvote")
2020 else throw("Invalid vote type")
2121
2222
2323 func i (e) = {
2424 let j = getString(this, d(e))
2525 if ($isInstanceOf(j, "String"))
2626 then {
2727 let k = j
2828 true
2929 }
3030 else false
3131 }
3232
3333
3434 func l (m) = {
3535 let j = getString(this, f(m))
3636 if ($isInstanceOf(j, "String"))
3737 then {
3838 let k = j
3939 k
4040 }
4141 else false
4242 }
4343
4444
4545 func n (m,o) = {
4646 let j = getInteger(this, g(m, o))
4747 if ($isInstanceOf(j, "Int"))
4848 then {
4949 let k = j
5050 k
5151 }
5252 else throw("Not a valid vote ID")
5353 }
5454
5555
56-@Callable(p)
57-func addEntrepreneurProfile (q,r,s,t,u) = if ((p.caller.bytes != c))
56+func p (q,m) = ((((q + "_") + m) + "_") + "vote")
57+
58+
59+func r (q,m) = {
60+ let j = getString(this, p(q, m))
61+ if ($isInstanceOf(j, "String"))
62+ then {
63+ let k = j
64+ k
65+ }
66+ else ""
67+ }
68+
69+
70+func s (q,m) = {
71+ let t = r(q, m)
72+ if ((t == ""))
73+ then true
74+ else false
75+ }
76+
77+
78+@Callable(u)
79+func addEntrepreneurProfile (v,w,x,y,z) = if ((u.caller.bytes != c))
5880 then throw("Only Dyzrupt Admin can call this dApp function")
5981 else {
60- let v = toBase58String(p.transactionId)
61- WriteSet([DataEntry(d(v), ((((((((q + "_") + r) + "_") + s) + "_") + t) + "_") + u)), DataEntry(g(v, "upvote"), 0), DataEntry(f(v), "open"), DataEntry(g(v, "downvote"), 0)])
82+ let A = toBase58String(u.transactionId)
83+ WriteSet([DataEntry(d(A), ((((((((v + "_") + w) + "_") + x) + "_") + y) + "_") + z)), DataEntry(g(A, "upvote"), 0), DataEntry(f(A), "open"), DataEntry(g(A, "downvote"), 0)])
6284 }
6385
6486
6587
66-@Callable(p)
67-func vote (m,o) = if (i(m))
68- then if ((l(m) == "open"))
69- then if (if ((o == a))
70- then true
71- else (o == b))
72- then {
73- let w = n(m, o)
74- let x = (w + 1)
75- WriteSet([DataEntry(g(m, o), x)])
76- }
77- else throw("Not a valid vote value")
78- else throw("This profile is not open for voting")
79- else throw("Invalid Profile")
88+@Callable(u)
89+func vote (m,o) = if (s(toBase58String(u.caller.bytes), m))
90+ then if (i(m))
91+ then if ((l(m) == "open"))
92+ then if (if ((o == a))
93+ then true
94+ else (o == b))
95+ then {
96+ let B = n(m, o)
97+ let C = (B + 1)
98+ WriteSet([DataEntry(g(m, o), C), DataEntry(p(toBase58String(u.caller.bytes), m), m)])
99+ }
100+ else throw("Not a valid vote value")
101+ else throw("This profile is not open for voting")
102+ else throw("Invalid Profile")
103+ else throw("You can't vote twice")
80104
81105
82106
83-@Callable(p)
84-func openVote (m) = if ((p.caller.bytes != c))
107+@Callable(u)
108+func openVote (m) = if ((u.caller.bytes != c))
85109 then throw("Only Dyzrupt Admin can call this dApp function")
86110 else if (i(m))
87111 then WriteSet([DataEntry(f(m), "open")])
88112 else throw("Invalid ID")
89113
90114
91115
92-@Callable(p)
93-func closeVote (m) = if ((p.caller.bytes != c))
116+@Callable(u)
117+func closeVote (m) = if ((u.caller.bytes != c))
94118 then throw("Only Dyzrupt Admin can call this dApp function")
95119 else if (i(m))
96120 then WriteSet([DataEntry(f(m), "closed")])
97121 else throw("Invalid ID")
98122
99123

github/deemru/w8io/026f985 
28.60 ms