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