tx · BpujDnGS7CTNiSLNgfjRaEkfGKkgqxD7fVYH9mHc5L1S

3NAxsbHxS63azdAicVvLGsxjAQ9DsK6L4NL:  -0.01400000 Waves

2019.08.22 15:46 [642339] smart account 3NAxsbHxS63azdAicVvLGsxjAQ9DsK6L4NL > SELF 0.00000000 Waves

{ "type": 13, "id": "BpujDnGS7CTNiSLNgfjRaEkfGKkgqxD7fVYH9mHc5L1S", "fee": 1400000, "feeAssetId": null, "timestamp": 1566477953686, "version": 1, "sender": "3NAxsbHxS63azdAicVvLGsxjAQ9DsK6L4NL", "senderPublicKey": "FbEMepLNcZb6VBpsH5JJg4j43UEV27dMRqv1Pq6JFLgy", "proofs": [ "3NJLuUnqWiFACC1RVB3cHwoAUWmFEpxykar32qyD1JooFmykGhUJSaZ8pJ5UNFpu2pRghhx8oVqqG6JgJ9cNzuPY" ], "script": "base64:AAIDAAAAAAAAAAAAAAAKAAAAAApiZXRBc3NldElkAQAAACAea7QCZF/XAXMBPEnDQ5kqHUHyOfWmXu9KHDHL6zcNNwAAAAAGbWF4RmVlAAAAAAAATEtAAAAAAAZtaW5CZXQAAAAAAABMS0AAAAAAD21pbk1hdGNoTm9taW5hbAAAAAAAAExLQAEAAAATZ2V0Q2FsbGVyQnlEZWxlZ2F0ZQAAAAEAAAABaQQAAAAGY2FsbGVyCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwkAASwAAAACAgAAAAlkZWxlZ2F0ZV8FAAAABmNhbGxlcgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFzBQAAAAckbWF0Y2gwBQAAAAFzBQAAAAZjYWxsZXIBAAAACGNoZWNrRmVlAAAAAQAAAAFpAwkAAGYAAAACCAUAAAABaQAAAANmZWUFAAAABm1heEZlZQkAAAIAAAABAgAAABZ1bnJlYXNvbmFibGUgbGFyZ2UgZmVlAwkBAAAAAiE9AAA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AAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACAgAAAAlkZWxlZ2F0ZV8JAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwUAAAAKZGVsZWdhdGVUbwUAAAADbmlsAAAAAAAAAAAABQAAAAR1bml0AAAAAP07lXw=", "chainId": 84, "height": 642339, "spentComplexity": 0 } View: original | compacted Prev: 6a5mjKo5AA4TMiX6bg7A79bnNtbextx5aZirrfwPEYAE Next: EypVfG5a4fkj65ahrhJeJV9nzyj5DePoGtqwgi8pTVgy Diff:
OldNewDifferences
88 let minBet = 5000000
99
1010 let minMatchNominal = 5000000
11+
12+func getCallerByDelegate (i) = {
13+ let caller = toBase58String(i.caller.bytes)
14+ match getString(this, ("delegate_" + caller)) {
15+ case s: String =>
16+ s
17+ case _ =>
18+ caller
19+ }
20+ }
21+
1122
1223 func checkFee (i) = if ((i.fee > maxFee))
1324 then throw("unreasonable large fee")
122133 then (defeat == 2)
123134 else false)
124135 then throw("can't dispute after approve")
125- else repayFee(i, WriteSet([DataEntry((betId + "_defeat"), defeat)]), 0, unit)
136+ else if ((getString(this, (betId + "_owner")) != getCallerByDelegate(i)))
137+ then throw("must be owner or its delegate to approve")
138+ else repayFee(i, WriteSet([DataEntry((betId + "_defeat"), defeat)]), 0, unit)
126139
127140
128141
149162 }
150163
151164
165+
166+@Callable(i)
167+func delegate (delegateTo) = repayFee(i, WriteSet([DataEntry(("delegate_" + toBase58String(i.caller.bytes)), delegateTo)]), 0, unit)
168+
169+
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let betAssetId = base58'33kV5hRVtgEGpYqhp9wQn2g9hP1fNWSYGCzzYk1T9Hyg'
55
66 let maxFee = 5000000
77
88 let minBet = 5000000
99
1010 let minMatchNominal = 5000000
11+
12+func getCallerByDelegate (i) = {
13+ let caller = toBase58String(i.caller.bytes)
14+ match getString(this, ("delegate_" + caller)) {
15+ case s: String =>
16+ s
17+ case _ =>
18+ caller
19+ }
20+ }
21+
1122
1223 func checkFee (i) = if ((i.fee > maxFee))
1324 then throw("unreasonable large fee")
1425 else if ((i.feeAssetId != unit))
1526 then throw("fee must be in WAVES")
1627 else true
1728
1829
1930 func repayFee (i,ws,amount,recipient) = if (checkFee(i))
2031 then if (if ((amount > 0))
2132 then isDefined(recipient)
2233 else false)
2334 then ScriptResult(ws, TransferSet([ScriptTransfer(i.caller, i.fee, unit), ScriptTransfer(extract(recipient), amount, betAssetId)]))
2435 else ScriptResult(ws, TransferSet([ScriptTransfer(i.caller, i.fee, unit)]))
2536 else throw("error")
2637
2738
2839 func checkOwner (i,betid) = (getString(this, (betid + "_owner")) == toBase58String(i.caller.bytes))
2940
3041
3142 func getUnspent (betid) = (extract(getInteger(this, (betid + "_amount"))) - extract(getInteger(this, (betid + "_spent"))))
3243
3344
3445 func isDefeated (betid) = {
3546 let defeatStatus = getInteger(this, (betid + "_defeat"))
3647 if ((defeatStatus == 1))
3748 then true
3849 else (defeatStatus == 3)
3950 }
4051
4152
4253 @Callable(i)
4354 func bet (event,subevent,side,odds) = {
4455 let owner = toBase58String(i.caller.bytes)
4556 let payment = extract(i.payment)
4657 if ((payment.assetId != betAssetId))
4758 then throw(("bet must be in asset " + toBase58String(betAssetId)))
4859 else if ((minBet > payment.amount))
4960 then throw(("minimum allowed bet is " + toString(minBet)))
5061 else if (if ((side != "for"))
5162 then (side != "against")
5263 else false)
5364 then throw("unexpected side")
5465 else {
5566 let betid = (((((("bet_" + event) + "_") + toBase58String(i.caller.bytes)) + "_") + take(toBase58String(i.transactionId), 15)) + "_")
5667 let sequenceKey = ((("seq_" + event) + "_") + subevent)
5768 let sequence = match getInteger(this, sequenceKey) {
5869 case prevS: Int =>
5970 (prevS + 1)
6071 case _ =>
6172 1
6273 }
6374 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 + "timestamp"), lastBlock.timestamp), DataEntry((betid + "sequence"), sequence), DataEntry(sequenceKey, sequence)]), 0, unit)
6475 }
6576 }
6677
6778
6879
6980 @Callable(i)
7081 func cancel (betid) = if (!(checkOwner(i, betid)))
7182 then throw("permission denied")
7283 else {
7384 let amount = extract(getInteger(this, (betid + "_amount")))
7485 let spent = extract(getInteger(this, (betid + "_spent")))
7586 let cancelAmount = (amount - spent)
7687 repayFee(i, WriteSet([DataEntry((betid + "_spent"), amount), DataEntry((betid + "_cancel_amount"), cancelAmount), DataEntry((betid + "_cancel_tx"), toBase58String(i.transactionId))]), cancelAmount, i.caller)
7788 }
7889
7990
8091
8192 @Callable(i)
8293 func betMatch (betFor,betAgainst) = if ((getString(this, (betFor + "_event")) != getString(this, (betAgainst + "_event"))))
8394 then throw("event id must match")
8495 else if ((getString(this, (betFor + "_subevent")) != getString(this, (betAgainst + "_subevent"))))
8596 then throw("subevent id must match")
8697 else if ((getString(this, (betFor + "_side")) != "for"))
8798 then throw("invalid *for* bet")
8899 else if ((getString(this, (betAgainst + "_side")) != "against"))
89100 then throw("invalid *against* bet")
90101 else {
91102 let betForOwner = getStringValue(this, (betFor + "_owner"))
92103 let betAgainstOwner = getStringValue(this, (betAgainst + "_owner"))
93104 let eventid = extract(getString(this, (betFor + "_event")))
94105 let matchid = (((((((("match_" + eventid) + "_") + takeRight(betForOwner, 10)) + "_") + takeRight(betAgainstOwner, 10)) + "_") + toBase58String(i.transactionId)) + "_")
95106 let odds = extract(getInteger(this, (betFor + "_odds")))
96107 let unspentFor = getUnspent(betFor)
97108 let unspentAgainst = getUnspent(betAgainst)
98109 let maxForNominal = unspentFor
99110 let maxAgainstNominal = ((unspentAgainst * 100) / (odds - 100))
100111 let matchNominal = if ((maxForNominal > maxAgainstNominal))
101112 then maxAgainstNominal
102113 else maxForNominal
103114 if ((minMatchNominal > matchNominal))
104115 then throw("match nominal too low")
105116 else {
106117 let spendFor = matchNominal
107118 let spendAgainst = ((matchNominal * (odds - 100)) / 100)
108119 let newSpentFor = (spendFor + extract(getInteger(this, (betFor + "_spent"))))
109120 let newSpentAgainst = (spendAgainst + extract(getInteger(this, (betAgainst + "_spent"))))
110121 if ((newSpentFor > extract(getInteger(this, (betFor + "_amount")))))
111122 then throw("invalid match")
112123 else if ((newSpentAgainst > extract(getInteger(this, (betAgainst + "_amount")))))
113124 then throw("invalid match")
114125 else repayFee(i, WriteSet([DataEntry((matchid + "amount"), (spendFor + spendAgainst)), DataEntry((matchid + "for"), betFor), DataEntry((matchid + "against"), betAgainst), DataEntry((betFor + "_spent"), newSpentFor), DataEntry((betAgainst + "_spent"), newSpentAgainst)]), 0, unit)
115126 }
116127 }
117128
118129
119130
120131 @Callable(i)
121132 func approveDefeat (betId,defeat) = if (if (isDefined(getInteger(this, (betId + "_defeat"))))
122133 then (defeat == 2)
123134 else false)
124135 then throw("can't dispute after approve")
125- else repayFee(i, WriteSet([DataEntry((betId + "_defeat"), defeat)]), 0, unit)
136+ else if ((getString(this, (betId + "_owner")) != getCallerByDelegate(i)))
137+ then throw("must be owner or its delegate to approve")
138+ else repayFee(i, WriteSet([DataEntry((betId + "_defeat"), defeat)]), 0, unit)
126139
127140
128141
129142 @Callable(i)
130143 func payWinner (matchId) = if (isDefined(getInteger(this, (matchId + "_paid"))))
131144 then throw("already paid")
132145 else {
133146 let betForId = extract(getString(this, (matchId + "_for")))
134147 let betAgainstId = extract(getString(this, (matchId + "_against")))
135148 let betForDefeated = isDefeated(betForId)
136149 let betAgainstDefeated = isDefeated(betAgainstId)
137150 if (if (!(betForDefeated))
138151 then !(betAgainstDefeated)
139152 else false)
140153 then throw("no side approved defeat")
141154 else {
142155 let winnerId = if (betForDefeated)
143156 then betAgainstId
144157 else betForId
145158 let winnerAddress = getStringValue(this, (winnerId + "_owner"))
146159 let amount = extract(getInteger(this, (matchId + "_amount")))
147160 repayFee(i, WriteSet([DataEntry((matchId + "_paid"), toBase58String(i.transactionId))]), amount, addressFromString(winnerAddress))
148161 }
149162 }
150163
151164
165+
166+@Callable(i)
167+func delegate (delegateTo) = repayFee(i, WriteSet([DataEntry(("delegate_" + toBase58String(i.caller.bytes)), delegateTo)]), 0, unit)
168+
169+

github/deemru/w8io/026f985 
36.58 ms