tx · 3HpUH3t3CQFNJLzNFrjKHBwJ7R6ektpvL8oUCsUCcxwq

3MxN6Cszfki941gTcEwXc8ngmbWPTsHoJFq:  -0.01400000 Waves

2019.06.22 22:42 [553684] smart account 3MxN6Cszfki941gTcEwXc8ngmbWPTsHoJFq > SELF 0.00000000 Waves

{ "type": 13, "id": "3HpUH3t3CQFNJLzNFrjKHBwJ7R6ektpvL8oUCsUCcxwq", "fee": 1400000, "feeAssetId": null, "timestamp": 1561232550747, "version": 1, "sender": "3MxN6Cszfki941gTcEwXc8ngmbWPTsHoJFq", "senderPublicKey": "4fygXNNAjU52sT9N6uq4o9Ck8G75e94ukktN3pd4VxVo", "proofs": [ "PfxZqxDEBthS2pcDtrpwutbjraff2rM7nsrRGv5KtVesPKppMrFFQQNjDC9j75AKRXMRuRPq6E8GAiK8PEiF6JV" ], "script": "base64:AAIDAAAAAAAAAAAAAAAdAAAAAAROT05FAgAAAARub25lAQAAAA9nZXRLZXlJdGVtUHJpY2UAAAABAAAABGl0ZW0JAAEsAAAAAgUAAAAEaXRlbQIAAAAGX3ByaWNlAQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAANudW0EAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAFAAAAA251bQEAAAALZ2V0U3RyQnlLZXkAAAABAAAAA2tleQQAAAADc3RyBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhBQAAAAROT05FBQAAAANzdHIBAAAAFWdldEtleVVzZXJJdGVtQ291bnRlcgAAAAIAAAAEdXNlcgAAAARpdGVtCQABLAAAAAIJAAEsAAAAAgkAASwAAAACBQAAAARpdGVtA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AACE2RYe", "chainId": 84, "height": 553684, "spentComplexity": 0 } View: original | compacted Prev: 5cp6kSLnPCDNRt4Xo9LTgKpdGmQqGZs318NkncRMq7vS Next: none Diff:
OldNewDifferences
184184 else false)
185185 then throw("wrong status")
186186 else if (if ((M != B))
187- then true
188- else (M != C))
187+ then (M != C)
188+ else false)
189189 then throw("wrong vote")
190190 else if (if ((Z == B))
191191 then true
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "none"
55
66 func b (c) = (c + "_price")
77
88
99 func d (e) = {
1010 let f = {
1111 let g = getInteger(this, e)
1212 if ($isInstanceOf(g, "Int"))
1313 then {
1414 let h = g
1515 h
1616 }
1717 else 0
1818 }
1919 f
2020 }
2121
2222
2323 func i (e) = {
2424 let j = {
2525 let g = getString(this, e)
2626 if ($isInstanceOf(g, "String"))
2727 then {
2828 let h = g
2929 h
3030 }
3131 else a
3232 }
3333 j
3434 }
3535
3636
3737 func k (l,c) = (((c + "_") + l) + "_cnt")
3838
3939
4040 func m (c) = d(b(c))
4141
4242
4343 func n (l,c) = d(k(l, c))
4444
4545
4646 func o (p,q) = ("item_" + toBase58String(sha256(toBytes((p + q)))))
4747
4848
4949 func r (c) = (c + "_data")
5050
5151
5252 func s (c) = (c + "_owner")
5353
5454
5555 func t (c) = i(s(c))
5656
5757
5858 func u (v) = (v + "_balance")
5959
6060
6161 func w (v) = d(u(v))
6262
6363
6464 let x = 3
6565
6666 let y = 2
6767
6868 let z = "voting"
6969
7070 let A = "reveal"
7171
7272 let B = "featured"
7373
7474 let C = "delisted"
7575
7676 func D (c,l) = (((c + "_") + l) + "_commit")
7777
7878
7979 func E (c,l) = i(D(c, l))
8080
8181
8282 func F (c) = (c + "+comcnt")
8383
8484
8585 func G (c) = d(F(c))
8686
8787
8888 func H (c,l) = (((c + "_") + l) + "_reveal")
8989
9090
9191 func I (c,l) = i(H(c, l))
9292
9393
9494 func J (c) = (c + "_status")
9595
9696
9797 func K (c) = i(J(c))
9898
9999
100100 func L (c,M) = ((c + "_res:") + M)
101101
102102
103103 func N (c,M) = d(L(c, M))
104104
105105
106106 @Callable(O)
107107 func additem (q,P,Q) = {
108108 let R = toBase58String(O.caller.bytes)
109109 let c = o(R, q)
110110 if ((0 >= P))
111111 then throw("purchase amount cannot be less than 0 or 0")
112112 else if ((t(c) != a))
113113 then throw("an item already exists")
114114 else WriteSet([DataEntry(s(c), R), DataEntry(b(c), P), DataEntry(r(c), Q)])
115115 }
116116
117117
118118
119119 @Callable(O)
120120 func purchase (c) = {
121121 let S = extract(O.payment)
122122 if (isDefined(S.assetId))
123123 then throw("Can use Waves only at the moment")
124124 else {
125125 let T = toBase58String(O.caller.bytes)
126126 let P = m(c)
127127 let U = t(c)
128128 if ((P > S.amount))
129129 then throw("purchase amount cannot be less than item price ")
130130 else if ((S.amount > P))
131131 then throw("purchase amount cannot be higher than item price")
132132 else WriteSet([DataEntry(k(T, c), (n(T, c) + 1)), DataEntry(u(U), (w(U) + S.amount))])
133133 }
134134 }
135135
136136
137137
138138 @Callable(O)
139139 func withdraw () = {
140140 let V = toBase58String(O.caller.bytes)
141141 let W = d("3MqjzNpmZAF3K7W6RRcezbSdWorMAXXwdqo_balance")
142142 if ((0 >= W))
143143 then throw("Insufficient Balance xD")
144144 else ScriptResult(WriteSet([DataEntry(u(V), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(V), W, unit)]))
145145 }
146146
147147
148148
149149 @Callable(O)
150150 func voteCommit (c,X) = {
151151 let l = toBase58String(O.caller.bytes)
152152 let Y = G(c)
153153 let Z = K(c)
154154 if ((Y >= x))
155155 then throw("Max votes")
156156 else if ((E(c, l) != a))
157157 then throw("already done")
158158 else if ((s(c) == a))
159159 then throw("item doesnot exist")
160160 else if (if ((Z != a))
161161 then (Z != z)
162162 else false)
163163 then throw("not possilble")
164164 else WriteSet([DataEntry(D(c, l), X), DataEntry(F(c), (Y + 1)), DataEntry(J(c), if ((Y == x))
165165 then A
166166 else z)])
167167 }
168168
169169
170170
171171 @Callable(O)
172172 func voteReveal (c,M,aa) = {
173173 let l = toBase58String(O.caller.bytes)
174174 let Z = K(c)
175175 let ab = (N(c, M) + 1)
176176 if ((toBase58String(sha256(toBytes((M + aa)))) != E(c, l)))
177177 then throw("reveal is not valid")
178178 else if ((x > G(c)))
179179 then throw("not enough votes")
180180 else if ((I(c, l) != a))
181181 then throw("usr already participated")
182182 else if (if ((Z != z))
183183 then (Z != A)
184184 else false)
185185 then throw("wrong status")
186186 else if (if ((M != B))
187- then true
188- else (M != C))
187+ then (M != C)
188+ else false)
189189 then throw("wrong vote")
190190 else if (if ((Z == B))
191191 then true
192192 else (Z == C))
193193 then throw("voting finished already")
194194 else WriteSet([DataEntry(H(c, l), M), DataEntry(L(c, M), ab), DataEntry(J(c), if ((ab >= y))
195195 then M
196196 else A)])
197197 }
198198
199199

github/deemru/w8io/026f985 
42.06 ms