tx · CuHH6c5GjKdnw6rJoERVaoVeH1KrRYKeLE7cpzJtMxfa 3NAxsbHxS63azdAicVvLGsxjAQ9DsK6L4NL: -0.01400000 Waves 2019.08.22 21:01 [642668] smart account 3NAxsbHxS63azdAicVvLGsxjAQ9DsK6L4NL > SELF 0.00000000 Waves
{ "type": 13, "id": "CuHH6c5GjKdnw6rJoERVaoVeH1KrRYKeLE7cpzJtMxfa", "fee": 1400000, "feeAssetId": null, "timestamp": 1566496892362, "version": 1, "sender": "3NAxsbHxS63azdAicVvLGsxjAQ9DsK6L4NL", "senderPublicKey": "FbEMepLNcZb6VBpsH5JJg4j43UEV27dMRqv1Pq6JFLgy", "proofs": [ "5SVxRG7BcQnnmX9abNh92YwnvdJ9HyNFBoirD9ZQQ6iREc28QcWn5awZia7PaRkqMw3BfJEYWrt8Xp1WWYsTzSBz" ], "script": "base64:AAIDAAAAAAAAAAAAAAAKAAAAAApiZXRBc3NldElkAQAAACAea7QCZF/XAXMBPEnDQ5kqHUHyOfWmXu9KHDHL6zcNNwAAAAAGbWF4RmVlAAAAAAAATEtAAAAAAAZtaW5CZXQAAAAAAABMS0AAAAAAD21pbk1hdGNoTm9taW5hbAAAAAAAAExLQAEAAAATZ2V0Q2FsbGVyQnlEZWxlZ2F0ZQAAAAEAAAABaQQAAAAGY2FsbGVyCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwkAASwAAAACAgAAAAlkZWxlZ2F0ZV8FAAAABmNhbGxlcgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFzBQAAAAckbWF0Y2gwBQAAAAFzBQAAAAZjYWxsZXIBAAAACGNoZWNrRmVlAAAAAQAAAAFpAwkAAGYAAAACCAUAAAABaQAAAANmZWUFAAAABm1heEZlZQkAAAIAAAABAgAAABZ1bnJlYXNvbmFibGUgbGFyZ2UgZmVlAwkBAAAAAiE9AAA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AAAhXcml0ZVNldAAAAAEJAARMAAAAAgMJAAAAAAAAAgUAAAAGZW5hYmxlAAAAAAAAAAABCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACAgAAAAlkZWxlZ2F0ZV8FAAAACmRlbGVnYXRlVG8JAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgIAAAAJZGVsZWdhdGVfBQAAAApkZWxlZ2F0ZVRvBwUAAAADbmlsAAAAAAAAAAAABQAAAAR1bml0AAAAANzMDDY=", "chainId": 84, "height": 642668, "spentComplexity": 0 } View: original | compacted Prev: BQpAhfyfq95r7CJ2PAwKvpHFfjKLq4kyRKKvCZ8oR6Sw Next: CMRpJhjREvmHTstb8x5YFj4TTurSwVpQn2ZFjnE26RXs Diff:
Old | New | Differences | |
---|---|---|---|
164 | 164 | ||
165 | 165 | ||
166 | 166 | @Callable(i) | |
167 | - | func delegate (delegateTo,enable) = repayFee(i, WriteSet([if (enable) | |
167 | + | func delegate (delegateTo,enable) = repayFee(i, WriteSet([if ((enable == 1)) | |
168 | 168 | then DataEntry(("delegate_" + delegateTo), toBase58String(i.caller.bytes)) | |
169 | 169 | else DataEntry(("delegate_" + delegateTo), false)]), 0, unit) | |
170 | 170 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let betAssetId = base58'33kV5hRVtgEGpYqhp9wQn2g9hP1fNWSYGCzzYk1T9Hyg' | |
5 | 5 | ||
6 | 6 | let maxFee = 5000000 | |
7 | 7 | ||
8 | 8 | let minBet = 5000000 | |
9 | 9 | ||
10 | 10 | let minMatchNominal = 5000000 | |
11 | 11 | ||
12 | 12 | func getCallerByDelegate (i) = { | |
13 | 13 | let caller = toBase58String(i.caller.bytes) | |
14 | 14 | match getString(this, ("delegate_" + caller)) { | |
15 | 15 | case s: String => | |
16 | 16 | s | |
17 | 17 | case _ => | |
18 | 18 | caller | |
19 | 19 | } | |
20 | 20 | } | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func checkFee (i) = if ((i.fee > maxFee)) | |
24 | 24 | then throw("unreasonable large fee") | |
25 | 25 | else if ((i.feeAssetId != unit)) | |
26 | 26 | then throw("fee must be in WAVES") | |
27 | 27 | else true | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func repayFee (i,ws,amount,recipient) = if (checkFee(i)) | |
31 | 31 | then if (if ((amount > 0)) | |
32 | 32 | then isDefined(recipient) | |
33 | 33 | else false) | |
34 | 34 | then ScriptResult(ws, TransferSet([ScriptTransfer(i.caller, i.fee, unit), ScriptTransfer(extract(recipient), amount, betAssetId)])) | |
35 | 35 | else ScriptResult(ws, TransferSet([ScriptTransfer(i.caller, i.fee, unit)])) | |
36 | 36 | else throw("error") | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func checkOwner (i,betid) = (getString(this, (betid + "_owner")) == toBase58String(i.caller.bytes)) | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func getUnspent (betid) = (extract(getInteger(this, (betid + "_amount"))) - extract(getInteger(this, (betid + "_spent")))) | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func isDefeated (betid) = { | |
46 | 46 | let defeatStatus = getInteger(this, (betid + "_defeat")) | |
47 | 47 | if ((defeatStatus == 1)) | |
48 | 48 | then true | |
49 | 49 | else (defeatStatus == 3) | |
50 | 50 | } | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | @Callable(i) | |
54 | 54 | func bet (event,subevent,side,odds) = { | |
55 | 55 | let owner = toBase58String(i.caller.bytes) | |
56 | 56 | let payment = extract(i.payment) | |
57 | 57 | if ((payment.assetId != betAssetId)) | |
58 | 58 | then throw(("bet must be in asset " + toBase58String(betAssetId))) | |
59 | 59 | else if ((minBet > payment.amount)) | |
60 | 60 | then throw(("minimum allowed bet is " + toString(minBet))) | |
61 | 61 | else if (if ((side != "for")) | |
62 | 62 | then (side != "against") | |
63 | 63 | else false) | |
64 | 64 | then throw("unexpected side") | |
65 | 65 | else { | |
66 | 66 | let betid = (((((("bet_" + event) + "_") + toBase58String(i.caller.bytes)) + "_") + take(toBase58String(i.transactionId), 15)) + "_") | |
67 | 67 | let sequenceKey = ((("seq_" + event) + "_") + subevent) | |
68 | 68 | let sequence = match getInteger(this, sequenceKey) { | |
69 | 69 | case prevS: Int => | |
70 | 70 | (prevS + 1) | |
71 | 71 | case _ => | |
72 | 72 | 1 | |
73 | 73 | } | |
74 | 74 | 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) | |
75 | 75 | } | |
76 | 76 | } | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | ||
80 | 80 | @Callable(i) | |
81 | 81 | func cancel (betid) = if (!(checkOwner(i, betid))) | |
82 | 82 | then throw("permission denied") | |
83 | 83 | else { | |
84 | 84 | let amount = extract(getInteger(this, (betid + "_amount"))) | |
85 | 85 | let spent = extract(getInteger(this, (betid + "_spent"))) | |
86 | 86 | let cancelAmount = (amount - spent) | |
87 | 87 | repayFee(i, WriteSet([DataEntry((betid + "_spent"), amount), DataEntry((betid + "_cancel_amount"), cancelAmount), DataEntry((betid + "_cancel_tx"), toBase58String(i.transactionId))]), cancelAmount, i.caller) | |
88 | 88 | } | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | ||
92 | 92 | @Callable(i) | |
93 | 93 | func betMatch (betFor,betAgainst) = if ((getString(this, (betFor + "_event")) != getString(this, (betAgainst + "_event")))) | |
94 | 94 | then throw("event id must match") | |
95 | 95 | else if ((getString(this, (betFor + "_subevent")) != getString(this, (betAgainst + "_subevent")))) | |
96 | 96 | then throw("subevent id must match") | |
97 | 97 | else if ((getString(this, (betFor + "_side")) != "for")) | |
98 | 98 | then throw("invalid *for* bet") | |
99 | 99 | else if ((getString(this, (betAgainst + "_side")) != "against")) | |
100 | 100 | then throw("invalid *against* bet") | |
101 | 101 | else { | |
102 | 102 | let betForOwner = getStringValue(this, (betFor + "_owner")) | |
103 | 103 | let betAgainstOwner = getStringValue(this, (betAgainst + "_owner")) | |
104 | 104 | let eventid = extract(getString(this, (betFor + "_event"))) | |
105 | 105 | let matchid = (((((((("match_" + eventid) + "_") + takeRight(betForOwner, 10)) + "_") + takeRight(betAgainstOwner, 10)) + "_") + toBase58String(i.transactionId)) + "_") | |
106 | 106 | let odds = extract(getInteger(this, (betFor + "_odds"))) | |
107 | 107 | let unspentFor = getUnspent(betFor) | |
108 | 108 | let unspentAgainst = getUnspent(betAgainst) | |
109 | 109 | let maxForNominal = unspentFor | |
110 | 110 | let maxAgainstNominal = ((unspentAgainst * 100) / (odds - 100)) | |
111 | 111 | let matchNominal = if ((maxForNominal > maxAgainstNominal)) | |
112 | 112 | then maxAgainstNominal | |
113 | 113 | else maxForNominal | |
114 | 114 | if ((minMatchNominal > matchNominal)) | |
115 | 115 | then throw("match nominal too low") | |
116 | 116 | else { | |
117 | 117 | let spendFor = matchNominal | |
118 | 118 | let spendAgainst = ((matchNominal * (odds - 100)) / 100) | |
119 | 119 | let newSpentFor = (spendFor + extract(getInteger(this, (betFor + "_spent")))) | |
120 | 120 | let newSpentAgainst = (spendAgainst + extract(getInteger(this, (betAgainst + "_spent")))) | |
121 | 121 | if ((newSpentFor > extract(getInteger(this, (betFor + "_amount"))))) | |
122 | 122 | then throw("invalid match") | |
123 | 123 | else if ((newSpentAgainst > extract(getInteger(this, (betAgainst + "_amount"))))) | |
124 | 124 | then throw("invalid match") | |
125 | 125 | 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) | |
126 | 126 | } | |
127 | 127 | } | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | ||
131 | 131 | @Callable(i) | |
132 | 132 | func approveDefeat (betId,defeat) = if (if (isDefined(getInteger(this, (betId + "_defeat")))) | |
133 | 133 | then (defeat == 2) | |
134 | 134 | else false) | |
135 | 135 | then throw("can't dispute after approve") | |
136 | 136 | else if ((getString(this, (betId + "_owner")) != getCallerByDelegate(i))) | |
137 | 137 | then throw("must be owner or its delegate to approve") | |
138 | 138 | else repayFee(i, WriteSet([DataEntry((betId + "_defeat"), defeat)]), 0, unit) | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | ||
142 | 142 | @Callable(i) | |
143 | 143 | func payWinner (matchId) = if (isDefined(getInteger(this, (matchId + "_paid")))) | |
144 | 144 | then throw("already paid") | |
145 | 145 | else { | |
146 | 146 | let betForId = extract(getString(this, (matchId + "_for"))) | |
147 | 147 | let betAgainstId = extract(getString(this, (matchId + "_against"))) | |
148 | 148 | let betForDefeated = isDefeated(betForId) | |
149 | 149 | let betAgainstDefeated = isDefeated(betAgainstId) | |
150 | 150 | if (if (!(betForDefeated)) | |
151 | 151 | then !(betAgainstDefeated) | |
152 | 152 | else false) | |
153 | 153 | then throw("no side approved defeat") | |
154 | 154 | else { | |
155 | 155 | let winnerId = if (betForDefeated) | |
156 | 156 | then betAgainstId | |
157 | 157 | else betForId | |
158 | 158 | let winnerAddress = getStringValue(this, (winnerId + "_owner")) | |
159 | 159 | let amount = extract(getInteger(this, (matchId + "_amount"))) | |
160 | 160 | repayFee(i, WriteSet([DataEntry((matchId + "_paid"), toBase58String(i.transactionId))]), amount, addressFromString(winnerAddress)) | |
161 | 161 | } | |
162 | 162 | } | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | ||
166 | 166 | @Callable(i) | |
167 | - | func delegate (delegateTo,enable) = repayFee(i, WriteSet([if (enable) | |
167 | + | func delegate (delegateTo,enable) = repayFee(i, WriteSet([if ((enable == 1)) | |
168 | 168 | then DataEntry(("delegate_" + delegateTo), toBase58String(i.caller.bytes)) | |
169 | 169 | else DataEntry(("delegate_" + delegateTo), false)]), 0, unit) | |
170 | 170 | ||
171 | 171 |
github/deemru/w8io/026f985 41.57 ms ◑