tx · 1WWTFMu5bdszJd9Xv7dXM5iPomBLpKvUAknz8mBaFd5

3N1MvvKPNWqQ9JWYV1vWE84GnMKP3mENpSg:  -0.01400000 Waves

2019.07.05 12:53 [572054] smart account 3N1MvvKPNWqQ9JWYV1vWE84GnMKP3mENpSg > SELF 0.00000000 Waves

{ "type": 13, "id": "1WWTFMu5bdszJd9Xv7dXM5iPomBLpKvUAknz8mBaFd5", "fee": 1400000, "feeAssetId": null, "timestamp": 1562320482924, "version": 1, "sender": "3N1MvvKPNWqQ9JWYV1vWE84GnMKP3mENpSg", "senderPublicKey": "GBcKAM5muVn8dBji3B7ciEqt4XzrT4CBrAKXoTVfbw7", "proofs": [ "5apbr5qkuHYjSADWAfLWvwHYA1TWNXqfK57Mcv4h8dHdeVefvBWEs7YTUtsm1Qpgt3puHuMWmcgUpZf5rnxjGQWY" ], "script": "base64:AAIDAAAAAAAAAAAAAAAhAAAAAAROT05FAgAAAARub25lAAAAAAZWT1RFUlMAAAAAAAAAAAMAAAAABlFVT1JVTQAAAAAAAAAAAgAAAAAGVk9USU5HAgAAAAZ2b3RpbmcAAAAABlJFVkVBTAIAAAAGcmV2ZWFsAAAAAAhGRUFUVVJFRAIAAAAIZmVhdHVyZWQAAAAACERFTElTVEVEAgAAAAhkZWxpc3RlZAEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQQAAAADbnVtBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABQAAAANudW0BAAAAC2dldFN0ckJ5S2V5AAAAAQAAAANrZXkEAAAAA3N0cgQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQUAAAAETk9ORQUAAA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VZvdGVDb3VudAAAAAIFAAAABGl0ZW0FAAAABHZvdGUFAAAADG5ld1ZvdGVDb3VudAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAEGdldEtleUl0ZW1TdGF0dXMAAAABBQAAAARpdGVtAwkAAGcAAAACBQAAAAxuZXdWb3RlQ291bnQFAAAABlFVT1JVTQUAAAAEdm90ZQUAAAAGUkVWRUFMBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tlee9+EMI=", "chainId": 84, "height": 572054, "spentComplexity": 0 } View: original | compacted Prev: HapicqVsT1h5UBtqTNRejEFy53GYLSyzd6dtkpMDXVBv Next: none Diff:
OldNewDifferences
103103 func N (p,M) = h(L(p, M))
104104
105105
106-@Callable(O)
107-func addItem (w,P,Q) = {
108- let R = toBase58String(O.caller.bytes)
109- let p = u(R, w)
110- if ((0 >= P))
106+func O () = extract(addressFromString("3N3M8E7uF1QstBzTMeobiUg1rGFttQNbgCz"))
107+
108+
109+let P = "blacklist"
110+
111+func Q (B) = (B + "_verifier_status")
112+
113+
114+func R (S,B) = {
115+ let n = {
116+ let k = getString(S, Q(B))
117+ if ($isInstanceOf(k, "String"))
118+ then {
119+ let l = k
120+ l
121+ }
122+ else a
123+ }
124+ n
125+ }
126+
127+
128+@Callable(T)
129+func addItem (w,U,V) = {
130+ let W = toBase58String(T.caller.bytes)
131+ let p = u(W, w)
132+ let X = R(O(), W)
133+ if ((0 >= U))
111134 then throw("Purchase amount cannot be less that item price")
112135 else if ((z(p) != a))
113136 then throw("This item already exist")
114- else WriteSet([DataEntry(y(p), R), DataEntry(o(p), P), DataEntry(x(p), Q)])
137+ else if ((X == P))
138+ then throw("Supplier's account has been blacklisted")
139+ else WriteSet([DataEntry(y(p), W), DataEntry(o(p), U), DataEntry(x(p), V), DataEntry(Q(W), X)])
115140 }
116141
117142
118143
119-@Callable(O)
144+@Callable(T)
120145 func purchase (p) = {
121- let S = extract(O.payment)
122- if (isDefined(S.assetId))
146+ let Y = extract(T.payment)
147+ if (isDefined(Y.assetId))
123148 then throw("Waves token only at this moment")
124149 else {
125- let T = toBase58String(O.caller.bytes)
126- let P = q(p)
127- let R = z(p)
128- if ((P > S.amount))
150+ let Z = toBase58String(T.caller.bytes)
151+ let U = q(p)
152+ let W = z(p)
153+ if ((U > Y.amount))
129154 then throw("Purchase amount can not be less than item price")
130- else if ((S.amount > P))
155+ else if ((Y.amount > U))
131156 then throw("Purchase amount can not be higher than item price")
132- else if ((R == a))
157+ else if ((W == a))
133158 then throw("Supplier does not exist")
134- else WriteSet([DataEntry(r(T, p), (t(T, p) + 1)), DataEntry(A(R), (C(R) + S.amount))])
159+ else WriteSet([DataEntry(r(Z, p), (t(Z, p) + 1)), DataEntry(A(W), (C(W) + Y.amount))])
135160 }
136161 }
137162
138163
139164
140-@Callable(O)
165+@Callable(T)
141166 func withdraw () = {
142- let R = toBase58String(O.caller.bytes)
143- let U = C(R)
144- if ((0 >= U))
167+ let W = toBase58String(T.caller.bytes)
168+ let aa = C(W)
169+ if ((0 >= aa))
145170 then throw("Insufficient Balance")
146- else ScriptResult(WriteSet([DataEntry(A(R), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(R), U, unit)]))
171+ else ScriptResult(WriteSet([DataEntry(A(W), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(W), aa, unit)]))
147172 }
148173
149174
150175
151-@Callable(O)
152-func voteCommit (p,V) = {
153- let s = toBase58String(O.caller.bytes)
154- let W = G(p)
155- let X = K(p)
156- if ((W >= b))
176+@Callable(T)
177+func voteCommit (p,ab) = {
178+ let s = toBase58String(T.caller.bytes)
179+ let ac = G(p)
180+ let ad = K(p)
181+ if ((ac >= b))
157182 then throw("Reached max numbers of voters")
158183 else if ((E(p, s) != a))
159184 then throw("User has already participated")
160185 else if ((y(p) == a))
161186 then throw("Item does not exist")
162- else if (if ((X != a))
163- then (X != d)
187+ else if (if ((ad != a))
188+ then (ad != d)
164189 else false)
165190 then throw("Voting is not possible")
166- else WriteSet([DataEntry(D(p, s), V), DataEntry(F(p), (W + 1)), DataEntry(J(p), if ((W == b))
191+ else WriteSet([DataEntry(D(p, s), ab), DataEntry(F(p), (ac + 1)), DataEntry(J(p), if ((ac == b))
167192 then e
168193 else d)])
169194 }
170195
171196
172197
173-@Callable(O)
174-func voteReveal (p,M,Y) = {
175- let s = toBase58String(O.caller.bytes)
176- let X = K(p)
177- let Z = (N(p, M) + 1)
178- if ((toBase58String(sha256(toBytes((M + Y)))) != E(p, s)))
198+@Callable(T)
199+func voteReveal (p,M,ae) = {
200+ let s = toBase58String(T.caller.bytes)
201+ let ad = K(p)
202+ let af = (N(p, M) + 1)
203+ if ((toBase58String(sha256(toBytes((M + ae)))) != E(p, s)))
179204 then throw("reveal data is not valid")
180205 else if ((b > G(p)))
181206 then throw("Max number of votes hasn't been reached yet")
182207 else if ((I(p, s) != a))
183208 then throw("user has already participated")
184- else if (if ((X != d))
185- then (X != e)
209+ else if (if ((ad != d))
210+ then (ad != e)
186211 else false)
187212 then throw("wrong status")
188213 else if (if ((M != f))
189214 then (M != g)
190215 else false)
191216 then throw("wrong vote")
192- else if (if ((X == f))
217+ else if (if ((ad == f))
193218 then true
194- else (X == g))
219+ else (ad == g))
195220 then throw("Vote has finished")
196- else WriteSet([DataEntry(H(p, s), M), DataEntry(L(p, M), Z), DataEntry(J(p), if ((Z >= c))
221+ else WriteSet([DataEntry(H(p, s), M), DataEntry(L(p, M), af), DataEntry(J(p), if ((af >= c))
197222 then M
198223 else e)])
199224 }
200225
201226
202-@Verifier(aa)
203-func ab () = sigVerify(aa.bodyBytes, aa.proofs[0], aa.senderPublicKey)
227+@Verifier(ag)
228+func ah () = sigVerify(ag.bodyBytes, ag.proofs[0], ag.senderPublicKey)
204229
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 + "_user") + "_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
106-@Callable(O)
107-func addItem (w,P,Q) = {
108- let R = toBase58String(O.caller.bytes)
109- let p = u(R, w)
110- if ((0 >= P))
106+func O () = extract(addressFromString("3N3M8E7uF1QstBzTMeobiUg1rGFttQNbgCz"))
107+
108+
109+let P = "blacklist"
110+
111+func Q (B) = (B + "_verifier_status")
112+
113+
114+func R (S,B) = {
115+ let n = {
116+ let k = getString(S, Q(B))
117+ if ($isInstanceOf(k, "String"))
118+ then {
119+ let l = k
120+ l
121+ }
122+ else a
123+ }
124+ n
125+ }
126+
127+
128+@Callable(T)
129+func addItem (w,U,V) = {
130+ let W = toBase58String(T.caller.bytes)
131+ let p = u(W, w)
132+ let X = R(O(), W)
133+ if ((0 >= U))
111134 then throw("Purchase amount cannot be less that item price")
112135 else if ((z(p) != a))
113136 then throw("This item already exist")
114- else WriteSet([DataEntry(y(p), R), DataEntry(o(p), P), DataEntry(x(p), Q)])
137+ else if ((X == P))
138+ then throw("Supplier's account has been blacklisted")
139+ else WriteSet([DataEntry(y(p), W), DataEntry(o(p), U), DataEntry(x(p), V), DataEntry(Q(W), X)])
115140 }
116141
117142
118143
119-@Callable(O)
144+@Callable(T)
120145 func purchase (p) = {
121- let S = extract(O.payment)
122- if (isDefined(S.assetId))
146+ let Y = extract(T.payment)
147+ if (isDefined(Y.assetId))
123148 then throw("Waves token only at this moment")
124149 else {
125- let T = toBase58String(O.caller.bytes)
126- let P = q(p)
127- let R = z(p)
128- if ((P > S.amount))
150+ let Z = toBase58String(T.caller.bytes)
151+ let U = q(p)
152+ let W = z(p)
153+ if ((U > Y.amount))
129154 then throw("Purchase amount can not be less than item price")
130- else if ((S.amount > P))
155+ else if ((Y.amount > U))
131156 then throw("Purchase amount can not be higher than item price")
132- else if ((R == a))
157+ else if ((W == a))
133158 then throw("Supplier does not exist")
134- else WriteSet([DataEntry(r(T, p), (t(T, p) + 1)), DataEntry(A(R), (C(R) + S.amount))])
159+ else WriteSet([DataEntry(r(Z, p), (t(Z, p) + 1)), DataEntry(A(W), (C(W) + Y.amount))])
135160 }
136161 }
137162
138163
139164
140-@Callable(O)
165+@Callable(T)
141166 func withdraw () = {
142- let R = toBase58String(O.caller.bytes)
143- let U = C(R)
144- if ((0 >= U))
167+ let W = toBase58String(T.caller.bytes)
168+ let aa = C(W)
169+ if ((0 >= aa))
145170 then throw("Insufficient Balance")
146- else ScriptResult(WriteSet([DataEntry(A(R), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(R), U, unit)]))
171+ else ScriptResult(WriteSet([DataEntry(A(W), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(W), aa, unit)]))
147172 }
148173
149174
150175
151-@Callable(O)
152-func voteCommit (p,V) = {
153- let s = toBase58String(O.caller.bytes)
154- let W = G(p)
155- let X = K(p)
156- if ((W >= b))
176+@Callable(T)
177+func voteCommit (p,ab) = {
178+ let s = toBase58String(T.caller.bytes)
179+ let ac = G(p)
180+ let ad = K(p)
181+ if ((ac >= b))
157182 then throw("Reached max numbers of voters")
158183 else if ((E(p, s) != a))
159184 then throw("User has already participated")
160185 else if ((y(p) == a))
161186 then throw("Item does not exist")
162- else if (if ((X != a))
163- then (X != d)
187+ else if (if ((ad != a))
188+ then (ad != d)
164189 else false)
165190 then throw("Voting is not possible")
166- else WriteSet([DataEntry(D(p, s), V), DataEntry(F(p), (W + 1)), DataEntry(J(p), if ((W == b))
191+ else WriteSet([DataEntry(D(p, s), ab), DataEntry(F(p), (ac + 1)), DataEntry(J(p), if ((ac == b))
167192 then e
168193 else d)])
169194 }
170195
171196
172197
173-@Callable(O)
174-func voteReveal (p,M,Y) = {
175- let s = toBase58String(O.caller.bytes)
176- let X = K(p)
177- let Z = (N(p, M) + 1)
178- if ((toBase58String(sha256(toBytes((M + Y)))) != E(p, s)))
198+@Callable(T)
199+func voteReveal (p,M,ae) = {
200+ let s = toBase58String(T.caller.bytes)
201+ let ad = K(p)
202+ let af = (N(p, M) + 1)
203+ if ((toBase58String(sha256(toBytes((M + ae)))) != E(p, s)))
179204 then throw("reveal data is not valid")
180205 else if ((b > G(p)))
181206 then throw("Max number of votes hasn't been reached yet")
182207 else if ((I(p, s) != a))
183208 then throw("user has already participated")
184- else if (if ((X != d))
185- then (X != e)
209+ else if (if ((ad != d))
210+ then (ad != e)
186211 else false)
187212 then throw("wrong status")
188213 else if (if ((M != f))
189214 then (M != g)
190215 else false)
191216 then throw("wrong vote")
192- else if (if ((X == f))
217+ else if (if ((ad == f))
193218 then true
194- else (X == g))
219+ else (ad == g))
195220 then throw("Vote has finished")
196- else WriteSet([DataEntry(H(p, s), M), DataEntry(L(p, M), Z), DataEntry(J(p), if ((Z >= c))
221+ else WriteSet([DataEntry(H(p, s), M), DataEntry(L(p, M), af), DataEntry(J(p), if ((af >= c))
197222 then M
198223 else e)])
199224 }
200225
201226
202-@Verifier(aa)
203-func ab () = sigVerify(aa.bodyBytes, aa.proofs[0], aa.senderPublicKey)
227+@Verifier(ag)
228+func ah () = sigVerify(ag.bodyBytes, ag.proofs[0], ag.senderPublicKey)
204229

github/deemru/w8io/026f985 
52.26 ms