tx · B5P1NN7JAiUVE6CFbWxSB6QBEhDWAeHrL1T9xrGAMAwZ

3N6sV5FdSVpUfuoUwS9gRBP5pG9C7mQWGza:  -0.01000000 Waves

2019.10.21 16:26 [729894] smart account 3N6sV5FdSVpUfuoUwS9gRBP5pG9C7mQWGza > SELF 0.00000000 Waves

{ "type": 13, "id": "B5P1NN7JAiUVE6CFbWxSB6QBEhDWAeHrL1T9xrGAMAwZ", "fee": 1000000, "feeAssetId": null, "timestamp": 1571664388620, "version": 1, "sender": "3N6sV5FdSVpUfuoUwS9gRBP5pG9C7mQWGza", "senderPublicKey": "xv2CE6Yjj1tBsKoKR3Ysz1TGDSjrzENcDS5gx9r8zkB", "proofs": [ "4nCULFmD24nxpyCs5xMEBAN9kwB5ypEjck46Du77vtrzLqeiqQcvSHkfrxXn7oCHdbZPggPyGybimbgQVxmc9b1C" ], "script": "base64:AAIDAAAAAAAAABYIARIFCgMIAQgSAwoBCBIAEgQKAggIAAAAHgAAAAAGcHViS2V5AQAAACAOUuUiid1tDu2mcNciqH2+bm/m7V1n/8AEWDKBtJ+SNAAAAAAETk9ORQIAAAAEbm9uZQEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQQAAAADbnVtBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABQAAAANudW0BAAAAC2dldFN0ckJ5S2V5AAAAAQAAAANrZXkEAAAAA3N0cgQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQUAAAAETk9ORQUAAAADc3RyAQAAAA9nZXRLZXlJdGVtUHJpY2UAAAABAAAABGl0ZW0JAAEsAAAAAgUAAAAEaXRlbQIAAAAGX3Bya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AByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgQAAAABZAUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAABnB1YktleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAXSW52b2tlU2NyaXB0VHJhbnNhY3Rpb24EAAAAAWkFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAZwdWJLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAEElzc3VlVHJhbnNhY3Rpb24EAAAAAXQFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAZwdWJLZXkHi+3K+g==", "chainId": 84, "height": 729894, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let a = base58'xv2CE6Yjj1tBsKoKR3Ysz1TGDSjrzENcDS5gx9r8zkB'
5+
6+let b = "none"
7+
8+func c (d) = {
9+ let e = {
10+ let f = getInteger(this, d)
11+ if ($isInstanceOf(f, "Int"))
12+ then {
13+ let g = f
14+ g
15+ }
16+ else 0
17+ }
18+ e
19+ }
20+
21+
22+func h (d) = {
23+ let i = {
24+ let f = getString(this, d)
25+ if ($isInstanceOf(f, "String"))
26+ then {
27+ let g = f
28+ g
29+ }
30+ else b
31+ }
32+ i
33+ }
34+
35+
36+func j (k) = (k + "_price")
37+
38+
39+func l (k) = c(j(k))
40+
41+
42+func m (n,k) = (((k + "_") + n) + "_cnt")
43+
44+
45+func o (n,k) = c(m(n, k))
46+
47+
48+func p (q,r) = ("item_" + toBase58String(sha256(toBytes((q + r)))))
49+
50+
51+func s (k) = (k + "_data")
52+
53+
54+func t (k) = (k + "_owner")
55+
56+
57+func u (k) = h(t(k))
58+
59+
60+func v (w) = (w + "_balance")
61+
62+
63+func x (w) = c(v(w))
64+
65+
66+let y = 3
67+
68+let z = 2
69+
70+let A = "voting"
71+
72+let B = "reveal"
73+
74+let C = "featured"
75+
76+let D = "delisted"
77+
78+func E (k,n) = (((k + "_") + n) + "_commit")
79+
80+
81+func F (k,n) = h(E(k, n))
82+
83+
84+func G (k) = (k + "_comcnt")
85+
86+
87+func H (k) = c(G(k))
88+
89+
90+func I (k,n) = (((k + "_") + n) + "_reveal")
91+
92+
93+func J (k,n) = h(I(k, n))
94+
95+
96+func K (k) = (k + "_status")
97+
98+
99+func L (k) = h(K(k))
100+
101+
102+func M (k,N) = ((k + "_res:") + N)
103+
104+
105+func O (k,N) = c(M(k, N))
106+
107+
108+@Callable(P)
109+func addItem (r,Q,R) = {
110+ let S = toBase58String(P.caller.bytes)
111+ let k = p(S, r)
112+ if ((0 > Q))
113+ then throw("purchase amount cannot be less than item price")
114+ else if ((u(k) != b))
115+ then throw("an item is already exist")
116+ else WriteSet([DataEntry(t(k), S), DataEntry(j(k), Q), DataEntry(s(k), R)])
117+ }
118+
119+
120+
121+@Callable(P)
122+func purchase (k) = {
123+ let T = extract(P.payment)
124+ if (isDefined(T.assetId))
125+ then throw("payment can be done only by WAVES")
126+ else {
127+ let U = toBase58String(P.caller.bytes)
128+ let Q = l(k)
129+ let S = u(k)
130+ if ((Q > T.amount))
131+ then throw("purchase amount cannot be less than item price")
132+ else if ((T.amount > Q))
133+ then throw("purchase amount cannot be higher than item price")
134+ else if ((S == b))
135+ then throw("supplier does not exist")
136+ else WriteSet([DataEntry(m(U, k), (o(U, k) + 1)), DataEntry(v(S), (x(S) + T.amount))])
137+ }
138+ }
139+
140+
141+
142+@Callable(P)
143+func withdraw () = {
144+ let S = toBase58String(P.caller.bytes)
145+ let V = x(S)
146+ if ((0 >= V))
147+ then throw("insufficient balance")
148+ else ScriptResult(WriteSet([DataEntry(v(S), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(S), V, unit)]))
149+ }
150+
151+
152+
153+@Callable(P)
154+func voteCommit (k,W) = {
155+ let n = toBase58String(P.caller.bytes)
156+ let X = H(k)
157+ let Y = L(k)
158+ if ((X >= y))
159+ then throw("reached max num of voters")
160+ else if ((F(k, n) != b))
161+ then throw("user has already participated")
162+ else if ((t(k) == b))
163+ then throw("item does note exist")
164+ else if (if ((Y != b))
165+ then (Y != A)
166+ else false)
167+ then throw("voting is not possible")
168+ else WriteSet([DataEntry(E(k, n), W), DataEntry(G(k), (X + 1)), DataEntry(K(k), if ((X == y))
169+ then B
170+ else A)])
171+ }
172+
173+
174+@Verifier(Z)
175+func aa () = {
176+ let f = Z
177+ if ($isInstanceOf(f, "DataTransaction"))
178+ then {
179+ let ab = f
180+ sigVerify(Z.bodyBytes, Z.proofs[0], a)
181+ }
182+ else if ($isInstanceOf(f, "InvokeScriptTransaction"))
183+ then {
184+ let P = f
185+ sigVerify(Z.bodyBytes, Z.proofs[0], a)
186+ }
187+ else if ($isInstanceOf(f, "IssueTransaction"))
188+ then {
189+ let ac = f
190+ sigVerify(Z.bodyBytes, Z.proofs[0], a)
191+ }
192+ else false
193+ }
194+

github/deemru/w8io/169f3d6 
25.07 ms