tx · DSAcTpaQdfnwGgFnSYFsGZYeoTsWB4dbhXAXC3VsdVb4 3Mz5wFCFSTfF4iW9me9EVrj4Ahm2VTCTsHZ: -0.01400000 Waves 2019.06.23 12:36 [554515] smart account 3Mz5wFCFSTfF4iW9me9EVrj4Ahm2VTCTsHZ > SELF 0.00000000 Waves
{ "type": 13, "id": "DSAcTpaQdfnwGgFnSYFsGZYeoTsWB4dbhXAXC3VsdVb4", "fee": 1400000, "feeAssetId": null, "timestamp": 1561282636138, "version": 1, "sender": "3Mz5wFCFSTfF4iW9me9EVrj4Ahm2VTCTsHZ", "senderPublicKey": "55dGDbXbEiK5dkWmRvEkVpQP3ZxxA8qUV3xwxnBuD6Rg", "proofs": [ "3sLtfAGoecynmricF2ABgRenEqYzPPHnQmhVrFuSXz4ztgy37FyLuuRwHzwMdi6gpnqMqiLFWFavihZ3rfxKCtcr" ], "script": "base64:AAIDAAAAAAAAAAAAAAAeAAAAAAROT05FAgAAAARub25lAAAAAAZWT1RFUlMAAAAAAAAAAAMAAAAABlFVT1JVTQAAAAAAAAAAAgAAAAAGVk9USU5HAgAAAAZ2b3RpbmcAAAAABlJFVkVBTAIAAAAGcmV2ZWFsAAAAAAhGRUFUVVJFRAIAAAAIZmVhdHVyZWQAAAAACERFTElTVEVEAgAAAAhkZWxpc3RlZAAAAAAEd0VVUgEAAAAg+SHGy1pmNV9GZrG9FQtKAbSPH2Hck25AKl3UAeE+e4gBAAAACmdldEtleUl0ZW0AAAACAAAACHN1cHBsaWVyAAAABXRpdGxlCQABLAAAAAICAAAABWl0ZW1fCQACWAAAAAEJAAH3AAAAAQkAAZsAAAABCQABLAAAAAIFAAAACHN1cHBsaWVyBQAAAAV0aXRsZQEAAAASZ2V0S2V5SXRlbVN1cHBsaWVyAAAAAQAAAARpdGVtCQABLAAAAAIFAAAABGl0ZW0CAAAABl9vd25lcgEAAAAVZ2V0S2V5QmFsYW5jZVN1cHBsaWVyAAAAAQAAAARpdGVtCQABLAAAAAIFAAAABG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mN1cnJlbnRLZXkJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAANY3VycmVudEFtb3VudAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAApjdXJyZW50S2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAACW5ld0FNb3VudAkAAGUAAAACBQAAAA1jdXJyZW50QW1vdW50BQAAAAZhbW91bnQDCQAAZgAAAAIAAAAAAAAAAAAFAAAABmFtb3VudAkAAAIAAAABAgAAABhDYW4ndCB3ZCBuZWdhdGl2ZSBhbW91bnQDCQAAZgAAAAIAAAAAAAAAAAAFAAAACW5ld0FNb3VudAkAAAIAAAABAgAAAApub3QgZW5vdWdoCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAKY3VycmVudEtleQUAAAAJbmV3QU1vdW50BQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAZhbW91bnQFAAAABHdFVVIFAAAAA25pbAAAAADFz9tF", "chainId": 84, "height": 554515, "spentComplexity": 0 } View: original | compacted Prev: XuBjMEQP8dRhCD9UXJfJhtueJQq1ZKGz2Ejv4uB5agz Next: 3WwJdvwomHk4fw5noNCvYWZNDEbx55cZqpdAEuZD5X25 Diff:
Old | New | Differences | |
---|---|---|---|
14 | 14 | let FEATURED = "featured" | |
15 | 15 | ||
16 | 16 | let DELISTED = "delisted" | |
17 | + | ||
18 | + | let wEUR = base58'HmWPZDMJ6zq2QCcpCMucVQtQuMGkCTkz37J5qjvUwJe3' | |
17 | 19 | ||
18 | 20 | func getKeyItem (supplier,title) = ("item_" + toBase58String(sha256(toBytes((supplier + title))))) | |
19 | 21 | ||
155 | 157 | ||
156 | 158 | ||
157 | 159 | @Callable(i) | |
158 | - | func | |
160 | + | func withdrawO () = { | |
159 | 161 | let supplierAddress = toBase58String(i.caller.bytes) | |
160 | 162 | let balance = getValueBalanceSupplier(supplierAddress) | |
161 | 163 | if ((0 >= balance)) | |
216 | 218 | } | |
217 | 219 | ||
218 | 220 | ||
221 | + | ||
222 | + | @Callable(i) | |
223 | + | func deposit () = { | |
224 | + | let pmt = extract(i.payment) | |
225 | + | if ((pmt.assetId != wEUR)) | |
226 | + | then throw("HmWPZDMJ6zq2QCcpCMucVQtQuMGkCTkz37J5qjvUwJe3 only at moment") | |
227 | + | else { | |
228 | + | let currentKey = toBase58String(i.caller.bytes) | |
229 | + | let currentAmount = match getInteger(this, currentKey) { | |
230 | + | case a: Int => | |
231 | + | a | |
232 | + | case _ => | |
233 | + | 0 | |
234 | + | } | |
235 | + | let newAMount = (currentAmount + pmt.amount) | |
236 | + | WriteSet([DataEntry(currentKey, newAMount)]) | |
237 | + | } | |
238 | + | } | |
239 | + | ||
240 | + | ||
241 | + | ||
242 | + | @Callable(i) | |
243 | + | func withdraw (amount) = { | |
244 | + | let currentKey = toBase58String(i.caller.bytes) | |
245 | + | let currentAmount = match getInteger(this, currentKey) { | |
246 | + | case a: Int => | |
247 | + | a | |
248 | + | case _ => | |
249 | + | 0 | |
250 | + | } | |
251 | + | let newAMount = (currentAmount - amount) | |
252 | + | if ((0 > amount)) | |
253 | + | then throw("Can't wd negative amount") | |
254 | + | else if ((0 > newAMount)) | |
255 | + | then throw("not enough") | |
256 | + | else ScriptResult(WriteSet([DataEntry(currentKey, newAMount)]), TransferSet([ScriptTransfer(i.caller, amount, wEUR)])) | |
257 | + | } | |
258 | + | ||
259 | + |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let NONE = "none" | |
5 | 5 | ||
6 | 6 | let VOTERS = 3 | |
7 | 7 | ||
8 | 8 | let QUORUM = 2 | |
9 | 9 | ||
10 | 10 | let VOTING = "voting" | |
11 | 11 | ||
12 | 12 | let REVEAL = "reveal" | |
13 | 13 | ||
14 | 14 | let FEATURED = "featured" | |
15 | 15 | ||
16 | 16 | let DELISTED = "delisted" | |
17 | + | ||
18 | + | let wEUR = base58'HmWPZDMJ6zq2QCcpCMucVQtQuMGkCTkz37J5qjvUwJe3' | |
17 | 19 | ||
18 | 20 | func getKeyItem (supplier,title) = ("item_" + toBase58String(sha256(toBytes((supplier + title))))) | |
19 | 21 | ||
20 | 22 | ||
21 | 23 | func getKeyItemSupplier (item) = (item + "_owner") | |
22 | 24 | ||
23 | 25 | ||
24 | 26 | func getKeyBalanceSupplier (item) = (item + "_balance") | |
25 | 27 | ||
26 | 28 | ||
27 | 29 | func getKeyItemPrice (item) = (item + "_price") | |
28 | 30 | ||
29 | 31 | ||
30 | 32 | func getKeyItemData (item) = (item + "_data") | |
31 | 33 | ||
32 | 34 | ||
33 | 35 | func getKeyUserItemCounter (user,item) = (((item + "_") + user) + "_cnt") | |
34 | 36 | ||
35 | 37 | ||
36 | 38 | func getStrByKey (key) = { | |
37 | 39 | let str = match getString(this, key) { | |
38 | 40 | case a: String => | |
39 | 41 | a | |
40 | 42 | case _ => | |
41 | 43 | NONE | |
42 | 44 | } | |
43 | 45 | str | |
44 | 46 | } | |
45 | 47 | ||
46 | 48 | ||
47 | 49 | func getNumberByKey (key) = { | |
48 | 50 | let num = match getInteger(this, key) { | |
49 | 51 | case a: Int => | |
50 | 52 | a | |
51 | 53 | case _ => | |
52 | 54 | 0 | |
53 | 55 | } | |
54 | 56 | num | |
55 | 57 | } | |
56 | 58 | ||
57 | 59 | ||
58 | 60 | func getValueItemSupplier (item) = getStrByKey(getKeyItemSupplier(item)) | |
59 | 61 | ||
60 | 62 | ||
61 | 63 | func getValueItemPrice (item) = getNumberByKey(getKeyItemPrice(item)) | |
62 | 64 | ||
63 | 65 | ||
64 | 66 | func getValueUserItemCounter (user,item) = getNumberByKey(getKeyUserItemCounter(user, item)) | |
65 | 67 | ||
66 | 68 | ||
67 | 69 | func getValueBalanceSupplier (account) = getNumberByKey(getKeyBalanceSupplier(account)) | |
68 | 70 | ||
69 | 71 | ||
70 | 72 | func getKeyCommit (item,user) = (((item + "_") + user) + "_commit") | |
71 | 73 | ||
72 | 74 | ||
73 | 75 | func getValueCommit (item,user) = getStrByKey(getKeyCommit(item, user)) | |
74 | 76 | ||
75 | 77 | ||
76 | 78 | func getKeyCommitsCount (item) = (item + "_comcnt") | |
77 | 79 | ||
78 | 80 | ||
79 | 81 | func getValueCommitsCount (item) = getNumberByKey(getKeyCommitsCount(item)) | |
80 | 82 | ||
81 | 83 | ||
82 | 84 | func getKeyReveal (item,user) = (((item + "_") + user) + "_reveal") | |
83 | 85 | ||
84 | 86 | ||
85 | 87 | func getValueReveal (item,user) = getStrByKey(getKeyReveal(item, user)) | |
86 | 88 | ||
87 | 89 | ||
88 | 90 | func getKeyItemStatus (item) = (item + "_status") | |
89 | 91 | ||
90 | 92 | ||
91 | 93 | func getValueItemStatus (item) = getStrByKey(getKeyItemStatus(item)) | |
92 | 94 | ||
93 | 95 | ||
94 | 96 | func getKeyVoteCount (item,vote) = ((item + "_res:") + vote) | |
95 | 97 | ||
96 | 98 | ||
97 | 99 | func getValueVoteCount (item,vote) = getNumberByKey(getKeyVoteCount(item, vote)) | |
98 | 100 | ||
99 | 101 | ||
100 | 102 | @Callable(i) | |
101 | 103 | func purchaseOld (type) = { | |
102 | 104 | let pmt = extract(i.payment) | |
103 | 105 | if (isDefined(pmt.assetId)) | |
104 | 106 | then throw("can use WAVES only at the moment") | |
105 | 107 | else { | |
106 | 108 | let customerAddress = toBase58String(i.caller.bytes) | |
107 | 109 | let price = match getInteger(this, (("item_" + type) + "_coupon_price")) { | |
108 | 110 | case a: Int => | |
109 | 111 | a | |
110 | 112 | case _ => | |
111 | 113 | 0 | |
112 | 114 | } | |
113 | 115 | if ((price > pmt.amount)) | |
114 | 116 | then throw("purschase amount cannot be less than item price") | |
115 | 117 | else if ((pmt.amount > price)) | |
116 | 118 | then throw("purchase amount cannot be higher than item price") | |
117 | 119 | else WriteSet([DataEntry(((("status:purchase_item_" + type) + "_customer_") + customerAddress), "confirmed"), DataEntry(((("price:purchase_item_" + type) + "_customer_") + customerAddress), price)]) | |
118 | 120 | } | |
119 | 121 | } | |
120 | 122 | ||
121 | 123 | ||
122 | 124 | ||
123 | 125 | @Callable(i) | |
124 | 126 | func addItem (title,price,data) = { | |
125 | 127 | let supplierAddress = toBase58String(i.caller.bytes) | |
126 | 128 | let item = getKeyItem(supplierAddress, title) | |
127 | 129 | if ((0 >= price)) | |
128 | 130 | then throw("purchase amount cannot be less than item price") | |
129 | 131 | else if ((getValueItemSupplier(item) != NONE)) | |
130 | 132 | then throw("an items is already exist") | |
131 | 133 | else WriteSet([DataEntry(getKeyItemSupplier(item), supplierAddress), DataEntry(getKeyItemPrice(item), price), DataEntry(getKeyItemData(item), data)]) | |
132 | 134 | } | |
133 | 135 | ||
134 | 136 | ||
135 | 137 | ||
136 | 138 | @Callable(i) | |
137 | 139 | func purchase (item) = { | |
138 | 140 | let pmt = extract(i.payment) | |
139 | 141 | if (isDefined(pmt.assetId)) | |
140 | 142 | then throw("WAVES tokens only at the moment") | |
141 | 143 | else { | |
142 | 144 | let userAddress = toBase58String(i.caller.bytes) | |
143 | 145 | let price = getValueItemPrice(item) | |
144 | 146 | let supplierAddress = getValueItemSupplier(item) | |
145 | 147 | if ((price > pmt.amount)) | |
146 | 148 | then throw("purchase amount cannot be less than item price") | |
147 | 149 | else if ((pmt.amount > price)) | |
148 | 150 | then throw("purchase amount cannot be higher than item price") | |
149 | 151 | else if ((supplierAddress == NONE)) | |
150 | 152 | then throw("supplier does not exist") | |
151 | 153 | else WriteSet([DataEntry(getKeyUserItemCounter(userAddress, item), (getValueUserItemCounter(userAddress, item) + 1)), DataEntry(getKeyBalanceSupplier(supplierAddress), (getValueBalanceSupplier(supplierAddress) + pmt.amount))]) | |
152 | 154 | } | |
153 | 155 | } | |
154 | 156 | ||
155 | 157 | ||
156 | 158 | ||
157 | 159 | @Callable(i) | |
158 | - | func | |
160 | + | func withdrawO () = { | |
159 | 161 | let supplierAddress = toBase58String(i.caller.bytes) | |
160 | 162 | let balance = getValueBalanceSupplier(supplierAddress) | |
161 | 163 | if ((0 >= balance)) | |
162 | 164 | then throw("insufficient balance") | |
163 | 165 | else ScriptResult(WriteSet([DataEntry(getKeyBalanceSupplier(supplierAddress), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(supplierAddress), balance, unit)])) | |
164 | 166 | } | |
165 | 167 | ||
166 | 168 | ||
167 | 169 | ||
168 | 170 | @Callable(i) | |
169 | 171 | func voteCommit (item,hash) = { | |
170 | 172 | let user = toBase58String(i.caller.bytes) | |
171 | 173 | let commits = getValueCommitsCount(item) | |
172 | 174 | let status = getValueItemStatus(item) | |
173 | 175 | if ((commits >= VOTERS)) | |
174 | 176 | then throw("max votes") | |
175 | 177 | else if ((getValueCommit(item, user) != NONE)) | |
176 | 178 | then throw("already participated") | |
177 | 179 | else if ((getKeyItemSupplier(item) == NONE)) | |
178 | 180 | then throw("item not exist") | |
179 | 181 | else if (if ((status != NONE)) | |
180 | 182 | then (status != VOTING) | |
181 | 183 | else false) | |
182 | 184 | then throw("voting not possible") | |
183 | 185 | else WriteSet([DataEntry(getKeyCommit(item, user), hash), DataEntry(getKeyCommitsCount(item), (commits + 1)), DataEntry(getKeyItemStatus(item), if ((commits == VOTERS)) | |
184 | 186 | then REVEAL | |
185 | 187 | else VOTING)]) | |
186 | 188 | } | |
187 | 189 | ||
188 | 190 | ||
189 | 191 | ||
190 | 192 | @Callable(i) | |
191 | 193 | func voteReveal (item,vote,salt) = { | |
192 | 194 | let user = toBase58String(i.caller.bytes) | |
193 | 195 | let status = getValueItemStatus(item) | |
194 | 196 | let newVoteCount = (getValueVoteCount(item, vote) + 1) | |
195 | 197 | if ((toBase58String(sha256(toBytes((vote + salt)))) != getValueCommit(item, user))) | |
196 | 198 | then throw("reveal data is not valid") | |
197 | 199 | else if ((VOTERS > getValueCommitsCount(item))) | |
198 | 200 | then throw("max num of voters not reached") | |
199 | 201 | else if ((getValueReveal(item, user) != NONE)) | |
200 | 202 | then throw("user has already participated") | |
201 | 203 | else if (if ((status != VOTING)) | |
202 | 204 | then (status != REVEAL) | |
203 | 205 | else false) | |
204 | 206 | then throw("wrong status") | |
205 | 207 | else if (if ((vote != FEATURED)) | |
206 | 208 | then (vote != DELISTED) | |
207 | 209 | else false) | |
208 | 210 | then throw("wrong vote") | |
209 | 211 | else if (if ((status == FEATURED)) | |
210 | 212 | then true | |
211 | 213 | else (status == DELISTED)) | |
212 | 214 | then throw("vote finished") | |
213 | 215 | else WriteSet([DataEntry(getKeyReveal(item, user), vote), DataEntry(getKeyVoteCount(item, vote), newVoteCount), DataEntry(getKeyItemStatus(item), if ((newVoteCount >= QUORUM)) | |
214 | 216 | then vote | |
215 | 217 | else REVEAL)]) | |
216 | 218 | } | |
217 | 219 | ||
218 | 220 | ||
221 | + | ||
222 | + | @Callable(i) | |
223 | + | func deposit () = { | |
224 | + | let pmt = extract(i.payment) | |
225 | + | if ((pmt.assetId != wEUR)) | |
226 | + | then throw("HmWPZDMJ6zq2QCcpCMucVQtQuMGkCTkz37J5qjvUwJe3 only at moment") | |
227 | + | else { | |
228 | + | let currentKey = toBase58String(i.caller.bytes) | |
229 | + | let currentAmount = match getInteger(this, currentKey) { | |
230 | + | case a: Int => | |
231 | + | a | |
232 | + | case _ => | |
233 | + | 0 | |
234 | + | } | |
235 | + | let newAMount = (currentAmount + pmt.amount) | |
236 | + | WriteSet([DataEntry(currentKey, newAMount)]) | |
237 | + | } | |
238 | + | } | |
239 | + | ||
240 | + | ||
241 | + | ||
242 | + | @Callable(i) | |
243 | + | func withdraw (amount) = { | |
244 | + | let currentKey = toBase58String(i.caller.bytes) | |
245 | + | let currentAmount = match getInteger(this, currentKey) { | |
246 | + | case a: Int => | |
247 | + | a | |
248 | + | case _ => | |
249 | + | 0 | |
250 | + | } | |
251 | + | let newAMount = (currentAmount - amount) | |
252 | + | if ((0 > amount)) | |
253 | + | then throw("Can't wd negative amount") | |
254 | + | else if ((0 > newAMount)) | |
255 | + | then throw("not enough") | |
256 | + | else ScriptResult(WriteSet([DataEntry(currentKey, newAMount)]), TransferSet([ScriptTransfer(i.caller, amount, wEUR)])) | |
257 | + | } | |
258 | + | ||
259 | + |
github/deemru/w8io/026f985 36.26 ms ◑