tx · 43W4qBFhbhuu1H1usWRuUCgC4JAkYNxcpbgZnsxWGq6o

3N4MRFCMQe7MnE4rntwZPDQ6w987uasrf7g:  -0.01400000 Waves

2020.07.31 12:14 [1111602] smart account 3N4MRFCMQe7MnE4rntwZPDQ6w987uasrf7g > SELF 0.00000000 Waves

{ "type": 13, "id": "43W4qBFhbhuu1H1usWRuUCgC4JAkYNxcpbgZnsxWGq6o", "fee": 1400000, "feeAssetId": null, "timestamp": 1596186903767, "version": 1, "sender": "3N4MRFCMQe7MnE4rntwZPDQ6w987uasrf7g", "senderPublicKey": "9VGyJzYW53ZSxV3ayKqDqHasm3PPszDVEQV4GpECgoSf", "proofs": [ "24dXsYvQgbwtMhrJKyo643kNmGf5YirHiDR3Eay2fTucZtei3BSSqw7oQ4aUXimcSWo3KjojJCm4jB2LgDsg1DUG" ], "script": "base64:AAIDAAAAAAAAAB0IARIFCgMIAQgSAwoBCBIAEgQKAggIEgUKAwgICAAAAB0AAAAABE5PTkUCAAAABG5vbmUAAAAABlZPVEVSUwAAAAAAAAAAAwAAAAAGUVVPUlVNAAAAAAAAAAACAAAAAAZWT1RJTkcCAAAABnZvdGluZwAAAAAGUkVWRUFMAgAAAAZyZXZlYWwAAAAACEZFQVRVUkVEAgAAAAhmZWF0dXJlZAAAAAAIREVMSVNURUQCAAAACGRlbGlzdGVkAQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAANudW0EAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAFAAAAA251bQEAAAALZ2V0U3RyQnlLZXkAAAABAAAAA2tleQQAAAADc3RyBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF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YXRjaDAJAAH0AAAAAwgFAAAAA3R0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAA3R0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAN0dHgAAAAPc2VuZGVyUHVibGljS2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABdNYXNzVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAADbXR4BQAAAAckbWF0Y2gwCQAB9AAAAAMIBQAAAANtdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAANtdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAADbXR4AAAAD3NlbmRlclB1YmxpY0tleQfhYHJ2", "chainId": 84, "height": 1111602, "spentComplexity": 0 } View: original | compacted Prev: 7qGTzBCL841qqJVCbUX1SM1XJomRHhcsf5zf4SsmG83z Next: none Diff:
OldNewDifferences
176176 let X = K(p)
177177 let Z = (N(p, M) + 1)
178178 if ((toBase58String(sha256(toBytes((M + Y)))) != E(p, s)))
179- then throw(("reveal data is not valid" + E(p, s)))
179+ then throw(((("reveal data is not valid" + toBase58String(sha256(toBytes((M + Y))))) + "__") + E(p, s)))
180180 else if ((b > G(p)))
181181 then throw("max num of voters hash't reached yet")
182182 else if ((I(p, s) != a))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "none"
55
66 let b = 3
77
88 let c = 2
99
1010 let d = "voting"
1111
1212 let e = "reveal"
1313
1414 let f = "featured"
1515
1616 let g = "delisted"
1717
1818 func h (i) = {
1919 let j = {
2020 let k = getInteger(this, i)
2121 if ($isInstanceOf(k, "Int"))
2222 then {
2323 let l = k
2424 l
2525 }
2626 else 0
2727 }
2828 j
2929 }
3030
3131
3232 func m (i) = {
3333 let n = {
3434 let k = getString(this, i)
3535 if ($isInstanceOf(k, "String"))
3636 then {
3737 let l = k
3838 l
3939 }
4040 else a
4141 }
4242 n
4343 }
4444
4545
4646 func o (p) = (p + "_price")
4747
4848
4949 func q (p) = h(o(p))
5050
5151
5252 func r (s,p) = (((p + "_") + s) + "_cnt")
5353
5454
5555 func t (s,p) = h(r(s, p))
5656
5757
5858 func u (v,w) = ("item_" + toBase58String(sha256(toBytes((v + w)))))
5959
6060
6161 func x (p) = (p + "_data")
6262
6363
6464 func y (p) = (p + "_owner")
6565
6666
6767 func z (p) = m(y(p))
6868
6969
7070 func A (B) = (B + "_balance")
7171
7272
7373 func C (B) = h(A(B))
7474
7575
7676 func D (p,s) = (((p + "_") + s) + "_commit")
7777
7878
7979 func E (p,s) = m(D(p, s))
8080
8181
8282 func F (p) = (p + "_comcnt")
8383
8484
8585 func G (p) = h(F(p))
8686
8787
8888 func H (p,s) = (((p + "_") + s) + "_reveal")
8989
9090
9191 func I (p,s) = m(H(p, s))
9292
9393
9494 func J (p) = (p + "_status")
9595
9696
9797 func K (p) = m(J(p))
9898
9999
100100 func L (p,M) = ((p + "_res:") + M)
101101
102102
103103 func N (p,M) = h(L(p, M))
104104
105105
106106 @Callable(O)
107107 func addItem (w,P,Q) = {
108108 let R = toBase58String(O.caller.bytes)
109109 let p = u(R, w)
110110 if ((0 >= P))
111111 then throw("purchase amount cannot be less then item price")
112112 else if ((z(p) != a))
113113 then throw("an Item is already exist")
114114 else WriteSet([DataEntry(y(p), R), DataEntry(o(p), P), DataEntry(x(p), Q)])
115115 }
116116
117117
118118
119119 @Callable(O)
120120 func purchase (p) = {
121121 let S = extract(O.payment)
122122 if (isDefined(S.assetId))
123123 then throw("WAVES only at the moment")
124124 else {
125125 let T = toBase58String(O.caller.bytes)
126126 let P = q(p)
127127 let R = z(p)
128128 if ((P > S.amount))
129129 then throw("purchase amount can't be less then item price")
130130 else if ((S.amount > P))
131131 then throw("purchase amount can't be higher then item price")
132132 else if ((R == a))
133133 then throw("supplier dose not exist")
134134 else WriteSet([DataEntry(r(T, p), (t(T, p) + 1)), DataEntry(A(R), (C(R) + S.amount))])
135135 }
136136 }
137137
138138
139139
140140 @Callable(O)
141141 func supplierWithdraw () = {
142142 let R = toBase58String(O.caller.bytes)
143143 let U = C(R)
144144 if ((0 >= U))
145145 then throw("insufficient balance")
146146 else ScriptResult(WriteSet([DataEntry(A(R), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(R), U, unit)]))
147147 }
148148
149149
150150
151151 @Callable(O)
152152 func voteCommit (p,V) = {
153153 let s = toBase58String(O.caller.bytes)
154154 let W = G(p)
155155 let X = K(p)
156156 if ((W >= b))
157157 then throw("reached max num of voters")
158158 else if ((E(p, s) != a))
159159 then throw("user has already participated")
160160 else if ((y(p) == a))
161161 then throw("item does not exist")
162162 else if (if ((X != a))
163163 then (X != d)
164164 else false)
165165 then throw("voting is not possible")
166166 else WriteSet([DataEntry(D(p, s), V), DataEntry(F(p), (W + 1)), DataEntry(J(p), if ((W == b))
167167 then e
168168 else d)])
169169 }
170170
171171
172172
173173 @Callable(O)
174174 func voteReveal (p,M,Y) = {
175175 let s = toBase58String(O.caller.bytes)
176176 let X = K(p)
177177 let Z = (N(p, M) + 1)
178178 if ((toBase58String(sha256(toBytes((M + Y)))) != E(p, s)))
179- then throw(("reveal data is not valid" + E(p, s)))
179+ then throw(((("reveal data is not valid" + toBase58String(sha256(toBytes((M + Y))))) + "__") + E(p, s)))
180180 else if ((b > G(p)))
181181 then throw("max num of voters hash't reached yet")
182182 else if ((I(p, s) != a))
183183 then throw("user has already participated")
184184 else if (if ((X != d))
185185 then (X != e)
186186 else false)
187187 then throw("wrong status")
188188 else if (if ((M != f))
189189 then (M != g)
190190 else false)
191191 then throw("wrong vote")
192192 else if (if ((X == f))
193193 then true
194194 else (X == g))
195195 then throw("vote has finished")
196196 else WriteSet([DataEntry(H(p, s), M), DataEntry(L(p, M), Z), DataEntry(J(p), if ((Z >= c))
197197 then M
198198 else e)])
199199 }
200200
201201
202202 @Verifier(aa)
203203 func ab () = {
204204 let k = aa
205205 if ($isInstanceOf(k, "DataTransaction"))
206206 then {
207207 let ac = k
208208 sigVerify(ac.bodyBytes, ac.proofs[0], ac.senderPublicKey)
209209 }
210210 else if ($isInstanceOf(k, "SetScriptTransaction"))
211211 then {
212212 let ad = k
213213 sigVerify(ad.bodyBytes, ad.proofs[0], ad.senderPublicKey)
214214 }
215215 else if ($isInstanceOf(k, "TransferTransaction"))
216216 then {
217217 let ae = k
218218 sigVerify(ae.bodyBytes, ae.proofs[0], ae.senderPublicKey)
219219 }
220220 else if ($isInstanceOf(k, "MassTransferTransaction"))
221221 then {
222222 let af = k
223223 sigVerify(af.bodyBytes, af.proofs[0], af.senderPublicKey)
224224 }
225225 else false
226226 }
227227

github/deemru/w8io/169f3d6 
51.91 ms