tx · 9eDrnFEeAcEvcSefRrmR922rPi7jjsLvedRTSdmYrt4x

3MruafMJreX8ctzVcTmFUfoXjxWZJH6qLaY:  -0.01000000 Waves

2019.09.06 16:58 [664288] smart account 3MruafMJreX8ctzVcTmFUfoXjxWZJH6qLaY > SELF 0.00000000 Waves

{ "type": 13, "id": "9eDrnFEeAcEvcSefRrmR922rPi7jjsLvedRTSdmYrt4x", "fee": 1000000, "feeAssetId": null, "timestamp": 1567778279540, "version": 1, "sender": "3MruafMJreX8ctzVcTmFUfoXjxWZJH6qLaY", "senderPublicKey": "3hFYVAmQg2xYSTpUUEXnTV3xygKtrm9SRKdA6JDLs8hS", "proofs": [ "4hL18idqx63ucmkGdsJmsB2CPw1ZgPqQWy9hSb4ZpJCgipZdxzqozQaSnzXPDD3VCKdARQXvibmygXTYCpN1m9Pd" ], "script": "base64:AAIDAAAAAAAAAAAAAAATAAAAAAdDT1VOVEVSAgAAAANjbnQAAAAAAVMCAAAAAV8AAAAAB0ZSRUVaRUQCAAAAB2ZyZWV6ZWQAAAAABlNIQVJFUwIAAAAGc2hhcmVzAAAAAAxNQVJLRVRTVEFUVVMCAAAACW1rdHN0YXR1cwAAAAALT1JERVJTVEFUVVMCAAAACW9yZHN0YXR1cwAAAAAKT1JERVJPV05FUgIAAAAIb3Jkb3duZXIAAAAACUxBU1RCTE9DSwIAAAAJbGFzdGJsb2NrAAAAAAhSRVBPUlRFUgIAAAAIcmVwb3J0ZXIAAAAACUFDVElPTkJVWQIAAAABYgAAAAAKQUNUSU9OU0VMTAIAAAABcwAAAAADTkVXAgAAAANuZXcAAAAABkFDVElWRQIAAAAGYWN0aXZlAAAAAAZDTE9TRUQCAAAABmNsb3NlZAAAAAAFT1JERVICAAAAA29yZAAAAAASREVGQVVMVEJMT0NLU0RFTEFZAAAAAAAAAAAFAAAAAAxERUZBVUxUUFJJQ0UAAAAAAAAPQkAAAAAACUNMT1NFRFlFUwIAAAAKY2xvc2VkX3llcwAAAAAIQ0xPU0VETk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AAIFAAAAF2N1cnJlbnRTaGFyZXNCYWxhbmNlS2V5AAAAAAAAAAAACQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAABhjdXJyZW50RnJlZXplZEJhbGFuY2VLZXkAAAAAAAAAAAAFAAAAA25pbAAAAAAU5V3u", "chainId": 84, "height": 664288, "spentComplexity": 0 } View: original | compacted Prev: none Next: At4uQiD1fKgrJU4PkrcLopTQK5D8zpsGv8Vu9mWSadHT Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let COUNTER = "cnt"
5+
6+let S = "_"
7+
8+let FREEZED = "freezed"
9+
10+let SHARES = "shares"
11+
12+let MARKETSTATUS = "mktstatus"
13+
14+let ORDERSTATUS = "ordstatus"
15+
16+let ORDEROWNER = "ordowner"
17+
18+let LASTBLOCK = "lastblock"
19+
20+let REPORTER = "reporter"
21+
22+let ACTIONBUY = "b"
23+
24+let ACTIONSELL = "s"
25+
26+let NEW = "new"
27+
28+let ACTIVE = "active"
29+
30+let CLOSED = "closed"
31+
32+let ORDER = "ord"
33+
34+let DEFAULTBLOCKSDELAY = 5
35+
36+let DEFAULTPRICE = 1000000
37+
38+let CLOSEDYES = "closed_yes"
39+
40+let CLOSEDNO = "closed_no"
41+
42+@Callable(i)
43+func deposit () = {
44+ let pmt = extract(i.payment)
45+ if (isDefined(pmt.assetId))
46+ then throw("can hodl waves only at the moment")
47+ else {
48+ let currentKey = toBase58String(i.caller.bytes)
49+ let currentAmount = match getInteger(this, currentKey) {
50+ case a: Int =>
51+ a
52+ case _ =>
53+ 0
54+ }
55+ let newAmount = (currentAmount + pmt.amount)
56+ WriteSet([DataEntry(currentKey, newAmount)])
57+ }
58+ }
59+
60+
61+
62+@Callable(i)
63+func withdraw (amount) = {
64+ let currentKey = toBase58String(i.caller.bytes)
65+ let currentAmount = match getInteger(this, currentKey) {
66+ case a: Int =>
67+ a
68+ case _ =>
69+ 0
70+ }
71+ let newAmount = (currentAmount - amount)
72+ if ((0 > amount))
73+ then throw("Can't withdraw negative amount")
74+ else if ((0 > newAmount))
75+ then throw("Not enough balance")
76+ else ScriptResult(WriteSet([DataEntry(currentKey, newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, unit)]))
77+ }
78+
79+
80+
81+@Callable(i)
82+func createMarket (title,description,oracle,interval) = {
83+ let currentKey = toBase58String(i.caller.bytes)
84+ let counter = match getInteger(this, COUNTER) {
85+ case a: Int =>
86+ a
87+ case _ =>
88+ 0
89+ }
90+ let marketIdKey = ((((toString(counter) + S) + toString(height)) + S) + currentKey)
91+ let lastBlockKey = ((marketIdKey + S) + LASTBLOCK)
92+ WriteSet([DataEntry(COUNTER, (counter + 1)), DataEntry(("market_n_" + toString(counter)), marketIdKey), DataEntry(((marketIdKey + S) + REPORTER), oracle), DataEntry(((marketIdKey + S) + MARKETSTATUS), ACTIVE), DataEntry(lastBlockKey, (height + interval)), DataEntry(((marketIdKey + S) + "title"), title), DataEntry(((marketIdKey + S) + "description"), description)])
93+ }
94+
95+
96+
97+@Callable(i)
98+func setOrderLimitSell (marketId,price,volume) = {
99+ let currentKey = toBase58String(i.caller.bytes)
100+ let currentFreezedBalanceKey = ((((marketId + S) + currentKey) + S) + FREEZED)
101+ let orderSybKey = ((((((ORDER + S) + marketId) + S) + toString(price)) + S) + toString(volume))
102+ let orderKey = ((orderSybKey + S) + ACTIONSELL)
103+ let orderStatusKey = ((orderKey + S) + ORDERSTATUS)
104+ let orderOwnerKey = ((orderKey + S) + ORDEROWNER)
105+ let adjustedAmount = (volume * DEFAULTPRICE)
106+ let currentAmount = match getInteger(this, currentKey) {
107+ case a: Int =>
108+ a
109+ case _ =>
110+ 0
111+ }
112+ let freezedBalance = match getInteger(this, currentFreezedBalanceKey) {
113+ case a: Int =>
114+ a
115+ case _ =>
116+ 0
117+ }
118+ let status = match getString(this, orderStatusKey) {
119+ case a: String =>
120+ a
121+ case _ =>
122+ NEW
123+ }
124+ let lastBlockKey = ((marketId + S) + LASTBLOCK)
125+ let lastblock = match getInteger(this, lastBlockKey) {
126+ case a: Int =>
127+ a
128+ case _ =>
129+ 0
130+ }
131+ if ((height > lastblock))
132+ then throw("Can't create an order after market finished")
133+ else if ((status == ACTIVE))
134+ then throw("An order already exist")
135+ else if ((adjustedAmount > currentAmount))
136+ then throw("Not enough funds")
137+ else WriteSet([DataEntry(currentKey, (currentAmount - adjustedAmount)), DataEntry(currentFreezedBalanceKey, (freezedBalance + adjustedAmount)), DataEntry(orderStatusKey, ACTIVE), DataEntry(orderOwnerKey, currentKey)])
138+ }
139+
140+
141+
142+@Callable(i)
143+func setOrderMarketBuy (marketId,price,volume) = {
144+ let currentKey = toBase58String(i.caller.bytes)
145+ let currentSharesBalanceKey = ((((marketId + S) + currentKey) + S) + SHARES)
146+ let orderSybKey = ((((((ORDER + S) + marketId) + S) + toString(price)) + S) + toString(volume))
147+ let orderKey = ((orderSybKey + S) + ACTIONBUY)
148+ let contrOrderKey = ((orderSybKey + S) + ACTIONSELL)
149+ let contrOrderStatusKey = ((contrOrderKey + S) + ORDERSTATUS)
150+ let contrOrderOwnerKey = ((contrOrderKey + S) + ORDEROWNER)
151+ let currentAmount = match getInteger(this, currentKey) {
152+ case a: Int =>
153+ a
154+ case _ =>
155+ 0
156+ }
157+ let sharesBalance = match getInteger(this, currentSharesBalanceKey) {
158+ case a: Int =>
159+ a
160+ case _ =>
161+ 0
162+ }
163+ let contrStatus = match getString(this, contrOrderStatusKey) {
164+ case a: String =>
165+ a
166+ case _ =>
167+ NEW
168+ }
169+ let contrOwner = match getString(this, contrOrderOwnerKey) {
170+ case a: String =>
171+ a
172+ case _ =>
173+ NEW
174+ }
175+ let contrCurrentAmount = match getInteger(this, contrOwner) {
176+ case a: Int =>
177+ a
178+ case _ =>
179+ 0
180+ }
181+ let contrCurrentSharesBalanceKey = ((((marketId + S) + contrOwner) + S) + SHARES)
182+ let contrSharesBalance = match getInteger(this, contrCurrentSharesBalanceKey) {
183+ case a: Int =>
184+ a
185+ case _ =>
186+ 0
187+ }
188+ let lastblock = match getInteger(this, ((marketId + S) + LASTBLOCK)) {
189+ case a: Int =>
190+ a
191+ case _ =>
192+ 0
193+ }
194+ let adjustedAmount = ((volume * price) * (DEFAULTPRICE / 100))
195+ if ((height > lastblock))
196+ then throw("Can't execute an order after market finished")
197+ else if ((contrStatus != ACTIVE))
198+ then throw("A counter-order doesn't exist yet")
199+ else if (((volume * price) > currentAmount))
200+ then throw("Not enough funds")
201+ else WriteSet([DataEntry(currentKey, (currentAmount - adjustedAmount)), DataEntry(currentSharesBalanceKey, (sharesBalance + volume)), DataEntry(contrOrderStatusKey, CLOSED), DataEntry(contrOwner, (contrCurrentAmount + adjustedAmount)), DataEntry(contrCurrentSharesBalanceKey, (contrSharesBalance - volume))])
202+ }
203+
204+
205+
206+@Callable(i)
207+func reportMarket (marketId,result) = {
208+ let reporter = toBase58String(i.caller.bytes)
209+ let reporterKey = ((marketId + S) + REPORTER)
210+ let lastBlockKey = ((marketId + S) + LASTBLOCK)
211+ let marketStatusKey = ((marketId + S) + MARKETSTATUS)
212+ let marketReporter = match getString(this, reporterKey) {
213+ case a: String =>
214+ a
215+ case _ =>
216+ NEW
217+ }
218+ let marketStatus = match getString(this, marketStatusKey) {
219+ case a: String =>
220+ a
221+ case _ =>
222+ NEW
223+ }
224+ let lastblock = match getInteger(this, lastBlockKey) {
225+ case a: Int =>
226+ a
227+ case _ =>
228+ 0
229+ }
230+ if ((marketReporter != reporter))
231+ then throw("You are not reporter for this market")
232+ else if ((marketStatus != ACTIVE))
233+ then throw("Market isn't active")
234+ else if ((lastblock > height))
235+ then throw("Too early to report market")
236+ else if ((height > (lastblock + DEFAULTBLOCKSDELAY)))
237+ then throw("Too late to report market")
238+ else if (if ((result != CLOSEDYES))
239+ then (result != CLOSEDNO)
240+ else false)
241+ then throw("Bad report result format")
242+ else WriteSet([DataEntry(marketStatusKey, result)])
243+ }
244+
245+
246+
247+@Callable(i)
248+func claimFundsResultYes (marketId,account) = {
249+ let callerAdress = account
250+ let currentSharesBalanceKey = ((((marketId + S) + callerAdress) + S) + SHARES)
251+ let currentFreezedBalanceKey = ((((marketId + S) + callerAdress) + S) + FREEZED)
252+ let marketStatusKey = ((marketId + S) + MARKETSTATUS)
253+ let marketStatus = match getString(this, marketStatusKey) {
254+ case a: String =>
255+ a
256+ case _ =>
257+ NEW
258+ }
259+ let freezedBalance = match getInteger(this, currentFreezedBalanceKey) {
260+ case a: Int =>
261+ a
262+ case _ =>
263+ 0
264+ }
265+ let sharesBalance = match getInteger(this, currentSharesBalanceKey) {
266+ case a: Int =>
267+ a
268+ case _ =>
269+ 0
270+ }
271+ let currentAmount = match getInteger(this, callerAdress) {
272+ case a: Int =>
273+ a
274+ case _ =>
275+ 0
276+ }
277+ if ((marketStatus != CLOSEDYES))
278+ then throw("claimFundsResultYes - wrong market result")
279+ else if (if ((freezedBalance == 0))
280+ then (sharesBalance == 0)
281+ else false)
282+ then throw("You can't claim funds for market and account")
283+ else WriteSet([DataEntry(callerAdress, ((currentAmount + (sharesBalance * DEFAULTPRICE)) + freezedBalance)), DataEntry(currentSharesBalanceKey, 0), DataEntry(currentFreezedBalanceKey, 0)])
284+ }
285+
286+
287+
288+@Callable(i)
289+func claimFundsResultNo (marketId,account) = {
290+ let callerAdress = account
291+ let currentSharesBalanceKey = ((((marketId + S) + callerAdress) + S) + SHARES)
292+ let currentFreezedBalanceKey = ((((marketId + S) + callerAdress) + S) + FREEZED)
293+ let marketStatusKey = ((marketId + S) + MARKETSTATUS)
294+ let lastBlockKey = ((marketId + S) + LASTBLOCK)
295+ let marketStatus = match getString(this, marketStatusKey) {
296+ case a: String =>
297+ a
298+ case _ =>
299+ NEW
300+ }
301+ let freezedBalance = match getInteger(this, currentFreezedBalanceKey) {
302+ case a: Int =>
303+ a
304+ case _ =>
305+ 0
306+ }
307+ let sharesBalance = match getInteger(this, currentSharesBalanceKey) {
308+ case a: Int =>
309+ a
310+ case _ =>
311+ 0
312+ }
313+ let currentAmount = match getInteger(this, callerAdress) {
314+ case a: Int =>
315+ a
316+ case _ =>
317+ 0
318+ }
319+ let lastblock = match getInteger(this, lastBlockKey) {
320+ case a: Int =>
321+ a
322+ case _ =>
323+ 0
324+ }
325+ if (if ((marketStatus == CLOSEDYES))
326+ then true
327+ else ((lastblock + DEFAULTBLOCKSDELAY) >= height))
328+ then throw("claimFundsResultNo - wrong market result or time")
329+ else if (if ((freezedBalance == 0))
330+ then (sharesBalance == 0)
331+ else false)
332+ then throw("You can't claim funds for market and account")
333+ else WriteSet([DataEntry(callerAdress, (currentAmount + freezedBalance)), DataEntry(currentSharesBalanceKey, 0), DataEntry(currentFreezedBalanceKey, 0)])
334+ }
335+
336+

github/deemru/w8io/026f985 
22.98 ms