tx · BXoq9HPYdUTBdzkxg48CZzV35jXg784ytdQVzcHdenJb

3Mze7XxHJtXw48uyWhjTJgMLcEzNBmi9tS9:  -0.01400000 Waves

2019.08.04 10:01 [615808] smart account 3Mze7XxHJtXw48uyWhjTJgMLcEzNBmi9tS9 > SELF 0.00000000 Waves

{ "type": 13, "id": "BXoq9HPYdUTBdzkxg48CZzV35jXg784ytdQVzcHdenJb", "fee": 1400000, "feeAssetId": null, "timestamp": 1564902183560, "version": 1, "sender": "3Mze7XxHJtXw48uyWhjTJgMLcEzNBmi9tS9", "senderPublicKey": "BZri78A6CXpGPmAHZNwqQXoNfWamwRZiuaBas3VdDKZp", "proofs": [ "5m9hgXB9SYGVR3s9adKy1YJ9YUNBPYGs9mB4GYLad5648a6boh7xiUYSTz5Dtr2p5pY8sBGi3wTzEooGju358uTy" ], "script": "base64:AAIDAAAAAAAAAAAAAAAdAAAAAAROT05FAgAAAARub25lAAAAAAZWT1RFUlMAAAAAAAAAAAMAAAAABlFVT1JVTQAAAAAAAAAAAgAAAAAGVk9USU5HAgAAAAZ2b3RpbmcAAAAABlJFVkVBTAIAAAAGcmV2ZWFsAAAAAAhGRUFUVVJFRAIAAAAIZmVhdHVyZWQAAAAACERFTElTVEVEAgAAAAhkZWxpc3RlZAEAAAALZ2V0TnVtQnlLZXkAAAABAAAAA2tleQQAAAADbnVtBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABQAAAANudW0BAAAAC2dldFN0ckJ5S2V5AAAAAQAAAANrZXkEAAAAA3N0cgQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQUAAAAETk9ORQUAAAADc3RyAQAAAAxnZ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udHJ5AAAAAgkBAAAAEGdldEtleUl0ZW1TdGF0dXMAAAABBQAAAARpdGVtAwkAAAAAAAACBQAAAAdjb21taXRzBQAAAAZWT1RFUlMFAAAABlJFVkVBTAUAAAAGVk9USU5HBQAAAANuaWwAAAAAjReghg==", "chainId": 84, "height": 615808, "spentComplexity": 0 } View: original | compacted Prev: 9RN7yAfyy3mkY8sVBbFT1J8mW1qVoiTKRGjXYVQPt7aR Next: GrYmihKNvvZh5gaxTFbwmksP5KHFznUBkVqU7yHXr4jU Diff:
OldNewDifferences
156156 if ((W >= b))
157157 then throw("Reached max n. of votes")
158158 else if ((w(p, q) != a))
159- then throw("User already voted for this item")
159+ then throw((("User " + q) + " already voted for this item"))
160160 else if ((F(p) == a))
161161 then throw("Item does not exist")
162162 else if (if ((X != 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,q) = (((p + "_") + q) + "_commit")
4747
4848
4949 func r (p) = (p + "_comcnt")
5050
5151
5252 func s (p,q) = (((p + "_") + q) + "_reveal")
5353
5454
5555 func t (p) = (p + "_status")
5656
5757
5858 func u (p,v) = ((p + "_res:") + v)
5959
6060
6161 func w (p,q) = m(o(p, q))
6262
6363
6464 func x (p) = h(r(p))
6565
6666
6767 func y (p,q) = m(s(p, q))
6868
6969
7070 func z (p) = m(t(p))
7171
7272
7373 func A (p,q) = h(u(p, q))
7474
7575
7676 func B (q,p) = (((p + "_") + q) + "_cnt")
7777
7878
7979 func C (D,E) = ("item" + toBase58String(sha256(toBytes((D + E)))))
8080
8181
8282 func F (p) = (p + "_owner")
8383
8484
8585 func G (p) = (p + "_price")
8686
8787
8888 func H (p) = (p + "_data")
8989
9090
9191 func I (p) = m(F(p))
9292
9393
9494 func J (p) = h(G(p))
9595
9696
9797 func K (q,p) = h(G(p))
9898
9999
100100 func L (M) = (M + "_balance")
101101
102102
103103 func N (M) = h(L(M))
104104
105105
106106 @Callable(O)
107107 func purchase (p) = {
108108 let P = extract(O.payment)
109109 if (isDefined(P.assetId))
110110 then throw("Can use only WAVES at the moment.")
111111 else {
112112 let Q = drop(toBase58String(O.caller.bytes), 10)
113113 let R = J(p)
114114 let S = I(p)
115115 if ((R > P.amount))
116116 then throw(((("Amount cannot be less than item price. You specified amount: " + toString(P.amount)) + "but price is ") + toString(R)))
117117 else if ((P.amount > R))
118118 then throw(((((("Amount cannot be greater than item price. You specified amount: " + toString(P.amount)) + " but price of item: ") + p) + " is ") + toString(R)))
119119 else if ((S == a))
120120 then throw("Supplier not found.")
121121 else WriteSet([DataEntry(B(Q, p), (K(Q, p) + 1)), DataEntry(L(S), (N(S) + P.amount))])
122122 }
123123 }
124124
125125
126126
127127 @Callable(O)
128128 func addItem (E,R,T) = {
129129 let S = drop(toBase58String(O.caller.bytes), 10)
130130 let p = C(S, E)
131131 if ((0 >= R))
132132 then throw("Price must be positive.")
133133 else if ((I(p) != a))
134134 then throw("An item like this already exists.")
135135 else WriteSet([DataEntry(F(p), S), DataEntry(G(p), R), DataEntry(H(p), T)])
136136 }
137137
138138
139139
140140 @Callable(O)
141141 func withdraw () = {
142142 let S = toBase58String(O.caller.bytes)
143143 let U = N(S)
144144 if ((0 >= U))
145145 then throw("Insufficient Balance")
146146 else ScriptResult(WriteSet([DataEntry(L(S), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(S), U, unit)]))
147147 }
148148
149149
150150
151151 @Callable(O)
152152 func voteCommit (p,V) = {
153153 let q = toBase58String(O.caller.bytes)
154154 let W = x(p)
155155 let X = z(p)
156156 if ((W >= b))
157157 then throw("Reached max n. of votes")
158158 else if ((w(p, q) != a))
159- then throw("User already voted for this item")
159+ then throw((("User " + q) + " already voted for this item"))
160160 else if ((F(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("It is not possible to vote now.")
166166 else WriteSet([DataEntry(o(p, q), V), DataEntry(r(p), (W + 1)), DataEntry(t(p), if ((W == b))
167167 then e
168168 else d)])
169169 }
170170
171171

github/deemru/w8io/026f985 
31.08 ms