tx · 9EduTHtEjczMrDzN1FyDBGVk7JUNR3VVbw7xYQ7oA9hE

3NApQZND35BcskVdo5Ukk7gSyP1148wtktt:  -0.01400000 Waves

2019.09.14 15:58 [675900] smart account 3NApQZND35BcskVdo5Ukk7gSyP1148wtktt > SELF 0.00000000 Waves

{ "type": 13, "id": "9EduTHtEjczMrDzN1FyDBGVk7JUNR3VVbw7xYQ7oA9hE", "fee": 1400000, "feeAssetId": null, "timestamp": 1568465920752, "version": 1, "sender": "3NApQZND35BcskVdo5Ukk7gSyP1148wtktt", "senderPublicKey": "Hf6mTifVmE4QjnGG5MrTpZxwegLPYVUkrUnGYGE1hrVh", "proofs": [ "zavSL2i418n783K4cwLW2KbqFM4tyt6S113YnLzfDfUmaSUef68EqeJ9KeWeniLK6cbeu5wEZEYuPNMkpLmStYA" ], "script": "base64:AAIDAAAAAAAAAAAAAAAXAAAAAAtiZXRBc3NldElkcwkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgIAAAAGc3BvcnRyAgAAACxBY1R6VGdXMVFiSks0UXU2aENzVUNManB4VXlEM2RvZnY4eHEyQ0FQYnpLSgkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgIAAAADZGV4AgAAAAVXQVZFUwUAAAADbmlsAAAAAAZtYXhGZWUAAAAAAABMS0AAAAAABm1pbkJldAAAAAAAAExLQAAAAAAObWluQ3JlYXRlRXZlbnQAAAAAAAHJw4AAAAAAD21pbk1hdGNoTm9taW5hbAAAAAAAAExLQAAAAAAGbGV2ZWwxAAAAAAAAAAD6AAAAAAZsZXZlbDIAAAAAAAAAAJYAAAAABmxldmVsMwAAAAAAAAAAZAAAAAAIY2FzaEJhY2sAAAAAAAAAAfQAAAAACHRvdGFsUmVmAAAAAAAAAAAKAAAAAA1jaGFuZ2VBZGRyZXNzAgAAACMzTkF4c2JIeFM2M2F6ZEFpY1Z2TEdzeGpBUTlEc0s2TDROTAAAAAALbWluV2l0aGRyYXcAAAAAAAAPQkABAAAAE2dldEN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gAAAAIAAAAHcmVmZXJlcgAAAARzYWx0AwkBAAAAASEAAAABCQEAAAAIY2hlY2tGZWUAAAABBQAAAAFpCQAAAgAAAAECAAAABWVycm9yAwkBAAAAAiE9AAAAAgkAAS8AAAACCQACWAAAAAEIBQAAAAFpAAAADXRyYW5zYWN0aW9uSWQAAAAAAAAAAAMCAAAAAzEyMwkAAAIAAAABAgAAABRwcm9vZiBvZiB3b3JrIGZhaWxlZAQAAAAFb3duZXIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwMJAQAAAAlpc0RlZmluZWQAAAABCQEAAAAKZ2V0UmVmZXJlcgAAAAEFAAAABW93bmVyCQAAAgAAAAECAAAAEkFscmVhZHkgcmVnaXN0ZXJlZAkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAAFb3duZXICAAAACF9yZWZlcmVyBQAAAAdyZWZlcmVyCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgUAAAAHcmVmZXJlcgIAAAAKX3JlZmVycmFsXwUAAAAFb3duZXIFAAAABW93bmVyBQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyCAUAAAABaQAAAANmZWUFAAAABHVuaXQFAAAAA25pbAAAAADziqbV", "chainId": 84, "height": 675900, "spentComplexity": 0 } View: original | compacted Prev: 74FDcwyMQsy9z1uTjxeuj75Z2rz83gELgrBL9LjZAJcu Next: FZU3x2ej42T7QXdfRqysebUgF2r5VGBVpLpPLzyXRUCv Diff:
OldNewDifferences
77
88 let minBet = 5000000
99
10-let minCreateEvent = 3000000000
10+let minCreateEvent = 30000000
1111
1212 let minMatchNominal = 5000000
1313
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let betAssetIds = [DataEntry("sportr", "AcTzTgW1QbJK4Qu6hCsUCLjpxUyD3dofv8xq2CAPbzKJ"), DataEntry("dex", "WAVES")]
55
66 let maxFee = 5000000
77
88 let minBet = 5000000
99
10-let minCreateEvent = 3000000000
10+let minCreateEvent = 30000000
1111
1212 let minMatchNominal = 5000000
1313
1414 let level1 = 250
1515
1616 let level2 = 150
1717
1818 let level3 = 100
1919
2020 let cashBack = 500
2121
2222 let totalRef = 10
2323
2424 let changeAddress = "3NAxsbHxS63azdAicVvLGsxjAQ9DsK6L4NL"
2525
2626 let minWithdraw = 1000000
2727
2828 func getCallerByDelegate (i,function) = {
2929 let caller = toBase58String(i.caller.bytes)
3030 let callerPrefix = ("delegate_" + caller)
3131 if ((getBoolean(this, ((callerPrefix + "_") + function)) == true))
3232 then match getString(this, (callerPrefix + "_address")) {
3333 case s: String =>
3434 s
3535 case _ =>
3636 caller
3737 }
3838 else caller
3939 }
4040
4141
4242 func checkFee (i) = if ((i.fee > maxFee))
4343 then throw("unreasonable large fee")
4444 else if ((i.feeAssetId != unit))
4545 then throw("fee must be in WAVES")
4646 else true
4747
4848
4949 func repayFee (i,ws,amount,recipient,betAssetId) = if (checkFee(i))
5050 then if (if ((amount > 0))
5151 then isDefined(recipient)
5252 else false)
5353 then ScriptResult(ws, TransferSet([ScriptTransfer(i.caller, i.fee, unit), ScriptTransfer(extract(recipient), amount, betAssetId)]))
5454 else ScriptResult(ws, TransferSet([ScriptTransfer(i.caller, i.fee, unit)]))
5555 else throw("error")
5656
5757
5858 func checkOwner (i,betid) = (getString(this, (betid + "_owner")) == toBase58String(i.caller.bytes))
5959
6060
6161 func getUnspent (betid) = (extract(getInteger(this, (betid + "_amount"))) - extract(getInteger(this, (betid + "_spent"))))
6262
6363
6464 func isDefeated (betid) = {
6565 let defeatStatus = getInteger(this, (betid + "_defeat"))
6666 if ((defeatStatus == 1))
6767 then true
6868 else (defeatStatus == 3)
6969 }
7070
7171
7272 func getReferer (user) = getString(this, (user + "_referer"))
7373
7474
7575 func balanceIncrement (address,inc) = {
7676 let balanceKey = (address + "_balance")
7777 DataEntry(balanceKey, (inc + match getInteger(this, balanceKey) {
7878 case b: Int =>
7979 b
8080 case _ =>
8181 0
8282 }))
8383 }
8484
8585
8686 func recordBalanceIncrement (address,owner,inc,level,txId,timestamp) = DataEntry(((("fund_" + address) + "_") + txId), ((((((owner + ":") + toString(inc)) + ":") + level) + ":") + timestamp))
8787
8888
8989 func getAssetByAdapter (adapter) = {
9090 let assetString = getStringValue(betAssetIds, adapter)
9191 if ((assetString == "WAVES"))
9292 then unit
9393 else fromBase58String(assetString)
9494 }
9595
9696
9797 func getAssetMnemonic (asset) = if ((asset == unit))
9898 then "WAVES"
9999 else toBase58String(extract(asset))
100100
101101
102102 @Callable(i)
103103 func bet (event,subevent,side,odds,adapter) = {
104104 let marketKey = ("market_" + event)
105105 let betAssetId = getAssetByAdapter(adapter)
106106 let owner = toBase58String(i.caller.bytes)
107107 let payment = extract(i.payment)
108108 if ((payment.assetId != betAssetId))
109109 then throw(((("bet must be in asset " + getAssetMnemonic(betAssetId)) + " for adapter ") + adapter))
110110 else if ((minBet > payment.amount))
111111 then throw(("minimum allowed bet is " + toString(minBet)))
112112 else if (if (if ((adapter == "dex"))
113113 then (minCreateEvent > payment.amount)
114114 else false)
115115 then (getBoolean(this, marketKey) == unit)
116116 else false)
117117 then throw(("min amount to create first bet is " + toString(minCreateEvent)))
118118 else if (if ((side != "for"))
119119 then (side != "against")
120120 else false)
121121 then throw("unexpected side")
122122 else {
123123 let betid = (((((("bet_" + event) + "_") + toBase58String(i.caller.bytes)) + "_") + take(toBase58String(i.transactionId), 15)) + "_")
124124 let sequenceKey = ((("seq_" + event) + "_") + subevent)
125125 let sequence = match getInteger(this, sequenceKey) {
126126 case prevS: Int =>
127127 (prevS + 1)
128128 case _ =>
129129 1
130130 }
131131 repayFee(i, WriteSet([DataEntry((betid + "owner"), owner), DataEntry((betid + "event"), event), DataEntry((betid + "subevent"), subevent), DataEntry((betid + "side"), side), DataEntry((betid + "odds"), odds), DataEntry((betid + "amount"), payment.amount), DataEntry((betid + "spent"), 0), DataEntry((betid + "adapter"), adapter), DataEntry((betid + "timestamp"), lastBlock.timestamp), DataEntry((betid + "sequence"), sequence), DataEntry(marketKey, true), DataEntry(sequenceKey, sequence)]), 0, unit, unit)
132132 }
133133 }
134134
135135
136136
137137 @Callable(i)
138138 func cancel (betid) = if ((getString(this, (betid + "_owner")) != getCallerByDelegate(i, "autocancel")))
139139 then throw("must be owner or its delegate to cancel")
140140 else {
141141 let adapter = getStringValue(this, (betid + "_adapter"))
142142 let amount = getIntegerValue(this, (betid + "_amount"))
143143 let spent = getIntegerValue(this, (betid + "_spent"))
144144 let cancelAmount = (amount - spent)
145145 repayFee(i, WriteSet([DataEntry((betid + "_spent"), amount), DataEntry((betid + "_cancel_amount"), cancelAmount), DataEntry((betid + "_cancel_tx"), toBase58String(i.transactionId))]), cancelAmount, i.caller, getAssetByAdapter(adapter))
146146 }
147147
148148
149149
150150 @Callable(i)
151151 func betMatch (betFor,betAgainst) = if ((getString(this, (betFor + "_event")) != getString(this, (betAgainst + "_event"))))
152152 then throw("event id must match")
153153 else if ((getString(this, (betFor + "_subevent")) != getString(this, (betAgainst + "_subevent"))))
154154 then throw("subevent id must match")
155155 else if ((getString(this, (betFor + "_side")) != "for"))
156156 then throw("invalid *for* bet")
157157 else if ((getString(this, (betAgainst + "_side")) != "against"))
158158 then throw("invalid *against* bet")
159159 else {
160160 let adapter = getStringValue(this, (betFor + "_adapter"))
161161 if ((adapter != getStringValue(this, (betAgainst + "_adapter"))))
162162 then throw("bets has different adapters")
163163 else {
164164 let betForOwner = getStringValue(this, (betFor + "_owner"))
165165 let betAgainstOwner = getStringValue(this, (betAgainst + "_owner"))
166166 let eventid = extract(getString(this, (betFor + "_event")))
167167 let matchid = (((((((("match_" + eventid) + "_") + takeRight(betForOwner, 10)) + "_") + takeRight(betAgainstOwner, 10)) + "_") + toBase58String(i.transactionId)) + "_")
168168 let odds = extract(getInteger(this, (betFor + "_odds")))
169169 let unspentFor = getUnspent(betFor)
170170 let unspentAgainst = getUnspent(betAgainst)
171171 let maxForNominal = unspentFor
172172 let maxAgainstNominal = ((unspentAgainst * 100) / (odds - 100))
173173 let matchNominal = if ((maxForNominal > maxAgainstNominal))
174174 then maxAgainstNominal
175175 else maxForNominal
176176 if ((minMatchNominal > matchNominal))
177177 then throw("match nominal too low")
178178 else {
179179 let spendFor = matchNominal
180180 let spendAgainst = ((matchNominal * (odds - 100)) / 100)
181181 let newSpentFor = (spendFor + extract(getInteger(this, (betFor + "_spent"))))
182182 let newSpentAgainst = (spendAgainst + extract(getInteger(this, (betAgainst + "_spent"))))
183183 if ((newSpentFor > extract(getInteger(this, (betFor + "_amount")))))
184184 then throw("invalid match")
185185 else if ((newSpentAgainst > extract(getInteger(this, (betAgainst + "_amount")))))
186186 then throw("invalid match")
187187 else repayFee(i, WriteSet([DataEntry((matchid + "amount"), (spendFor + spendAgainst)), DataEntry((matchid + "adapter"), adapter), DataEntry((matchid + "for"), betFor), DataEntry((matchid + "against"), betAgainst), DataEntry((betFor + "_spent"), newSpentFor), DataEntry((betAgainst + "_spent"), newSpentAgainst)]), 0, unit, unit)
188188 }
189189 }
190190 }
191191
192192
193193
194194 @Callable(i)
195195 func approveDefeat (betId,defeat) = if (if (isDefined(getInteger(this, (betId + "_defeat"))))
196196 then (defeat == 2)
197197 else false)
198198 then throw("can't dispute after approve")
199199 else if ((getString(this, (betId + "_owner")) != getCallerByDelegate(i, "autoapprove")))
200200 then throw("must be owner or its delegate to approve")
201201 else repayFee(i, WriteSet([DataEntry((betId + "_defeat"), defeat)]), 0, unit, unit)
202202
203203
204204
205205 @Callable(i)
206206 func payWinner (matchId) = if (!(checkFee(i)))
207207 then throw("error")
208208 else if (isDefined(getInteger(this, (matchId + "_paid"))))
209209 then throw("already paid")
210210 else {
211211 let adapter = getStringValue(this, (matchId + "_adapter"))
212212 let betAssetId = getAssetByAdapter(adapter)
213213 let betForId = extract(getString(this, (matchId + "_for")))
214214 let betAgainstId = extract(getString(this, (matchId + "_against")))
215215 let betForDefeated = isDefeated(betForId)
216216 let betAgainstDefeated = isDefeated(betAgainstId)
217217 if (if (!(betForDefeated))
218218 then !(betAgainstDefeated)
219219 else false)
220220 then throw("no side approved defeat")
221221 else {
222222 let winnerId = if (betForDefeated)
223223 then betAgainstId
224224 else betForId
225225 let winnerAddress = getStringValue(this, (winnerId + "_owner"))
226226 let amount = extract(getInteger(this, (matchId + "_amount")))
227227 let txid = toBase58String(i.transactionId)
228228 let timestamp = toString(lastBlock.timestamp)
229229 let refAmount = ((amount * totalRef) / 1000)
230230 ScriptResult(WriteSet([DataEntry((matchId + "_paid"), toBase58String(i.transactionId)), match getReferer(winnerAddress) {
231231 case ref1: String =>
232232 let incLevel1 = ((refAmount * level1) / 1000)
233233 let incCashBack = ((refAmount * cashBack) / 1000)
234234 [balanceIncrement(winnerAddress, incCashBack), recordBalanceIncrement(winnerAddress, winnerAddress, incCashBack, "cashback", txid, timestamp), balanceIncrement(ref1, incLevel1), recordBalanceIncrement(ref1, winnerAddress, incLevel1, "l1", txid, timestamp), match getReferer(ref1) {
235235 case ref2: String =>
236236 let incLevel2 = ((refAmount * level2) / 1000)
237237 [balanceIncrement(ref2, incLevel2), recordBalanceIncrement(ref2, winnerAddress, incLevel2, "l2", txid, timestamp), match getReferer(ref2) {
238238 case ref3: String =>
239239 let incLevel3 = ((refAmount * level3) / 1000)
240240 [balanceIncrement(ref3, incLevel3), recordBalanceIncrement(ref3, winnerAddress, incLevel3, "l3", txid, timestamp), balanceIncrement(changeAddress, (((refAmount - incLevel1) - incLevel2) - incLevel3)), recordBalanceIncrement(changeAddress, winnerAddress, (((refAmount - incLevel1) - incLevel2) - incLevel3), "change", txid, timestamp)]
241241 case _ =>
242242 [balanceIncrement(changeAddress, ((refAmount - incLevel1) - incLevel2)), recordBalanceIncrement(changeAddress, winnerAddress, ((refAmount - incLevel1) - incLevel2), "change", txid, timestamp)]
243243 }]
244244 case _ =>
245245 [balanceIncrement(changeAddress, (refAmount - incLevel1)), recordBalanceIncrement(changeAddress, winnerAddress, (refAmount - incLevel1), "change", txid, timestamp)]
246246 }]
247247 case _ =>
248248 [balanceIncrement(changeAddress, refAmount), recordBalanceIncrement(changeAddress, winnerAddress, refAmount, "change", txid, timestamp)]
249249 }]), TransferSet([ScriptTransfer(i.caller, i.fee, unit), ScriptTransfer(addressFromStringValue(winnerAddress), (amount - refAmount), betAssetId)]))
250250 }
251251 }
252252
253253
254254
255255 @Callable(i)
256256 func delegate (delegateTo,enableAutoApprove,enableAutoCancel) = repayFee(i, WriteSet([DataEntry((("delegate_" + delegateTo) + "_address"), toBase58String(i.caller.bytes)), DataEntry((("delegate_" + delegateTo) + "_autoapprove"), enableAutoApprove), DataEntry((("delegate_" + delegateTo) + "_autocancel"), enableAutoCancel)]), 0, unit, unit)
257257
258258
259259
260260 @Callable(i)
261261 func withdraw () = if (!(checkFee(i)))
262262 then throw("error")
263263 else {
264264 let owner = toBase58String(i.caller.bytes)
265265 let txid = toBase58String(i.transactionId)
266266 let balanceKey = (owner + "_balance")
267267 let amount = match getInteger(this, balanceKey) {
268268 case b: Int =>
269269 b
270270 case _ =>
271271 0
272272 }
273273 if ((minWithdraw > amount))
274274 then throw(("Min withdraw amount is" + toString(minWithdraw)))
275275 else ScriptResult(WriteSet([DataEntry(balanceKey, 0), DataEntry(((("withdraw_" + owner) + "_") + txid), ((toString(amount) + ":") + toString(lastBlock.timestamp)))]), TransferSet([ScriptTransfer(i.caller, (amount + i.fee), unit)]))
276276 }
277277
278278
279279
280280 @Callable(i)
281281 func register (referer,salt) = if (!(checkFee(i)))
282282 then throw("error")
283283 else if ((take(toBase58String(i.transactionId), 3) != "123"))
284284 then throw("proof of work failed")
285285 else {
286286 let owner = toBase58String(i.caller.bytes)
287287 if (isDefined(getReferer(owner)))
288288 then throw("Already registered")
289289 else ScriptResult(WriteSet([DataEntry((owner + "_referer"), referer), DataEntry(((referer + "_referral_") + owner), owner)]), TransferSet([ScriptTransfer(i.caller, i.fee, unit)]))
290290 }
291291
292292

github/deemru/w8io/169f3d6 
64.51 ms