tx · 4dg1xsgPuA7LXoET1eVEejYrrL8yn6avT5xvaHtVcdmC 3N3KC2tdvnMJGx1m6vidngYmQ9Vx1vD25yQ: -0.02000000 Waves 2019.12.10 16:47 [802770] smart account 3N3KC2tdvnMJGx1m6vidngYmQ9Vx1vD25yQ > SELF 0.00000000 Waves
{ "type": 13, "id": "4dg1xsgPuA7LXoET1eVEejYrrL8yn6avT5xvaHtVcdmC", "fee": 2000000, "feeAssetId": null, "timestamp": 1575985248375, "version": 1, "sender": "3N3KC2tdvnMJGx1m6vidngYmQ9Vx1vD25yQ", "senderPublicKey": "5hFJATDiJD8dJsn37rMkyq5azHhoGyy3mSuG98wX4q4S", "proofs": [ "59T38WZXjx9m6ZX4ZMvLPKADnPzEiqY9H3iigATnBToEEnSf4fjf82ewrQVhsNqq1vpPq5h7Pa5V3WTH2X8fiumU" ], "script": "base64:AAIDAAAAAAAAAA4IARIAEgMKAQESAwoBAQAAACcAAAAAB1dBVkVMRVQJAABoAAAAAgkAAGgAAAACAAAAAAAAAABkAAAAAAAAAAPoAAAAAAAAAAPoAAAAAAVNUlRFQwAAAAAAAAAAZAAAAAAJbWF4Um91bmRzAAAAAAAAAAA8AAAAAAdwbXRTdGVwCQAAaAAAAAIAAAAAAAAAAGQFAAAABU1SVEVDAAAAABBwYXJ0eU93bmVyUHViS2V5CQACWQAAAAECAAAALDVpRGsydllVSDV3OW52S2pTcXZuWGRIR3NZUVc0TWFoUTVFdVVrblhaTE1BAAAAABFwYXJ0eU93bmVyQWRkcmVzcwkBAAAAFGFkZHJlc3NGcm9tUHVibGljS2V5AAAAAQUAAAAQcGFydHlPd25lclB1YktleQAAAAAMcGFydHlBZGRyZXNzCQEAAAAUYWRkcmVzc0Zyb21QdWJsaWNLZXkAAAABCQACWQAAAAECAAAALDZ0NlBIRUZ4N0JBeWg5cWNrcWNEZWFqVVZOaUg2V05zeUhnZ1hrTHgyN0pvAAAAAA53aXRoZHJhd1BlcmlvZAAAAAAAAACowAAAAAAGd2luQ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uc2FjdGlvbgQAAAADaXR4BQAAAAckbWF0Y2gwAwkBAAAAASEAAAABCQAB9AAAAAMIBQAAAANpdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAANpdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAADaXR4AAAAD3NlbmRlclB1YmxpY0tleQkAAAIAAAABAgAAAAFzCQEAAAAEbW92ZQAAAAEIBQAAAANpdHgAAAAPc2VuZGVyUHVibGljS2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9CdXJuVHJhbnNhY3Rpb24EAAAAA2J0eAUAAAAHJG1hdGNoMAMJAQAAAAEhAAAAAQUAAAATd2l0aGRyYXdQZXJpb2RFbmRlZAkAAAIAAAABAgAAADRNUlQgcGFydHkgaGFzIG5vdCBmaW5pc2hlZCB5ZXQuIEJ1cm4gaXMgbm90IGFsbG93ZWQuAwkBAAAAASEAAAABCQAB9AAAAAMIBQAAAANidHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAANidHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAABBwYXJ0eU93bmVyUHViS2V5CQAAAgAAAAECAAAAJUJ1cm4gaXMgYWxsb3dlZCBmb3IgUGFydHkgT3duZXIgb25seS4DCQEAAAACIT0AAAACCAUAAAADYnR4AAAAA2ZlZQUAAAAGTWluRkVFCQAAAgAAAAEJAAEsAAAAAgIAAAAxSW1wb3NzaWJsZSB0byBidXJuIHdpdGggZmVlIGxlc3Mgb3IgZ3JlYXRlciB0aGFuIAkAAaQAAAABBQAAAAZNaW5GRUUGCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tledVD3Tw=", "chainId": 84, "height": 802770, "spentComplexity": 0 } View: original | compacted Prev: HhgAdUtkc3K7GSYx9t3VJxW8Gnbgpf5pLmzr3b8R53Dt Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let WAVELET = ((100 * 1000) * 1000) | |
5 | 5 | ||
6 | 6 | let MRTEC = 100 | |
7 | 7 | ||
8 | 8 | let maxRounds = 60 | |
9 | 9 | ||
10 | 10 | let pmtStep = (100 * MRTEC) | |
11 | 11 | ||
12 | 12 | let partyOwnerPubKey = fromBase58String("5iDk2vYUH5w9nvKjSqvnXdHGsYQW4MahQ5EuUknXZLMA") | |
13 | 13 | ||
14 | 14 | let partyOwnerAddress = addressFromPublicKey(partyOwnerPubKey) | |
15 | 15 | ||
16 | 16 | let partyAddress = addressFromPublicKey(fromBase58String("6t6PHEFx7BAyh9qckqcDeajUVNiH6WNsyHggXkLx27Jo")) | |
17 | 17 | ||
18 | 18 | let withdrawPeriod = 43200 | |
19 | 19 | ||
20 | 20 | let winAmt = (500 * WAVELET) | |
21 | 21 | ||
22 | 22 | let heightStep = 15 | |
23 | 23 | ||
24 | 24 | let blocksOnGameStart = 1824280 | |
25 | 25 | ||
26 | 26 | let blocksPerRound = 1460 | |
27 | 27 | ||
28 | 28 | let blocksPerCompetition = 1450 | |
29 | 29 | ||
30 | 30 | let MRT = fromBase58String("4uK8i4ThRGbehENwa6MxyLtxAjAo1Rj9fduborGExarC") | |
31 | 31 | ||
32 | 32 | let MinFEE = ((5 * WAVELET) / 1000) | |
33 | 33 | ||
34 | 34 | let IdxWinHeight = 0 | |
35 | 35 | ||
36 | 36 | let IdxWinAddress = 1 | |
37 | 37 | ||
38 | 38 | let IdxWinPubKey = 2 | |
39 | 39 | ||
40 | 40 | let IdxWithdrawId = 3 | |
41 | 41 | ||
42 | 42 | func getRoundDataKeyOrFail (round) = if ((0 > round)) | |
43 | 43 | then throw("Invalid round number") | |
44 | 44 | else ("round" + toString(round)) | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | func readRoundDataListOrFail (round) = { | |
48 | 48 | let roundDataOpt = getString(partyAddress, getRoundDataKeyOrFail(round)) | |
49 | 49 | let roundDataStr = if (isDefined(roundDataOpt)) | |
50 | 50 | then extract(roundDataOpt) | |
51 | 51 | else "" | |
52 | 52 | if ((roundDataStr != "")) | |
53 | 53 | then split(roundDataStr, "_") | |
54 | 54 | else ["0", toString(pmtStep), "?", "?", "?", "0"] | |
55 | 55 | } | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func readSharedState () = { | |
59 | 59 | let sharedStateOpt = getString(partyAddress, "RoundsSharedState") | |
60 | 60 | let sharedStateStr = if (isDefined(sharedStateOpt)) | |
61 | 61 | then extract(sharedStateOpt) | |
62 | 62 | else "" | |
63 | 63 | if ((sharedStateStr != "")) | |
64 | 64 | then split(sharedStateStr, "_") | |
65 | 65 | else ["?", "0", "?"] | |
66 | 66 | } | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func writeSetOfRoundData (type,round,newWinHeight,newWinAddressStr,newWinPubKeyStr,withdrawId58) = { | |
70 | 70 | let newWinHeightStr = toString(newWinHeight) | |
71 | 71 | let roundData = DataEntry(getRoundDataKeyOrFail(round), ((((((newWinHeightStr + "_") + newWinAddressStr) + "_") + newWinPubKeyStr) + "_") + withdrawId58)) | |
72 | 72 | if ((type == "MOVE")) | |
73 | 73 | then { | |
74 | 74 | let addressLength = size(newWinAddressStr) | |
75 | 75 | let sharedState = readSharedState() | |
76 | 76 | let newTotalGamesCountStr = toString((parseIntValue(sharedState[1]) + 1)) | |
77 | 77 | let currLastPlayersAddr = if ((sharedState[2] == "?")) | |
78 | 78 | then "" | |
79 | 79 | else sharedState[2] | |
80 | 80 | let newLastPlayersAddr = if (if ((currLastPlayersAddr != "")) | |
81 | 81 | then (size(currLastPlayersAddr) > ((addressLength + 1) * 10)) | |
82 | 82 | else false) | |
83 | 83 | then (("-" + newWinAddressStr) + dropRight(currLastPlayersAddr, (addressLength + 1))) | |
84 | 84 | else (("-" + newWinAddressStr) + currLastPlayersAddr) | |
85 | 85 | WriteSet([roundData, DataEntry("RoundsSharedState", ((((newWinHeightStr + "_") + newTotalGamesCountStr) + "_") + newLastPlayersAddr))]) | |
86 | 86 | } | |
87 | 87 | else if ((type == "WITHDRAW")) | |
88 | 88 | then WriteSet([roundData]) | |
89 | 89 | else throw(("Unsupported type in writeSetOfRoundData method: " + type)) | |
90 | 90 | } | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | let offset = (height - blocksOnGameStart) | |
94 | 94 | ||
95 | 95 | let currRoundNum = if ((offset >= 0)) | |
96 | 96 | then (offset / blocksPerRound) | |
97 | 97 | else throw(("Please do not hurry. MRT party will start on " + toString(blocksOnGameStart))) | |
98 | 98 | ||
99 | 99 | let currRoundHeight = (offset % blocksPerRound) | |
100 | 100 | ||
101 | 101 | let currRoundHeightStart = ((currRoundNum * blocksPerRound) + blocksOnGameStart) | |
102 | 102 | ||
103 | 103 | let currRoundCompetitionEnd = (currRoundHeightStart + blocksPerCompetition) | |
104 | 104 | ||
105 | 105 | let currRoundDataList = readRoundDataListOrFail(currRoundNum) | |
106 | 106 | ||
107 | 107 | let currWinHeight = parseIntValue(currRoundDataList[IdxWinHeight]) | |
108 | 108 | ||
109 | 109 | let currMinPmtAmt = pmtStep | |
110 | 110 | ||
111 | 111 | func isWinByHeight (h) = (height >= h) | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | let atLeastOneMoveInRoundPresent = (currWinHeight > currRoundHeightStart) | |
115 | 115 | ||
116 | 116 | let firstCountdownFinished = if ((currWinHeight == 0)) | |
117 | 117 | then isWinByHeight((currRoundHeightStart + heightStep)) | |
118 | 118 | else false | |
119 | 119 | ||
120 | 120 | let isPauseByWin = if (isWinByHeight(currWinHeight)) | |
121 | 121 | then atLeastOneMoveInRoundPresent | |
122 | 122 | else false | |
123 | 123 | ||
124 | 124 | let isPauseByTime = if ((currRoundHeight > blocksPerCompetition)) | |
125 | 125 | then true | |
126 | 126 | else firstCountdownFinished | |
127 | 127 | ||
128 | 128 | let isPause = if (isPauseByWin) | |
129 | 129 | then true | |
130 | 130 | else isPauseByTime | |
131 | 131 | ||
132 | 132 | let isCompetition = !(isPause) | |
133 | 133 | ||
134 | 134 | func move (p) = if (!(isCompetition)) | |
135 | 135 | then throw("o") | |
136 | 136 | else { | |
137 | 137 | let roundDataList = readRoundDataListOrFail(currRoundNum) | |
138 | 138 | let winnerPubKey = fromBase58String(roundDataList[IdxWinPubKey]) | |
139 | 139 | if ((p == winnerPubKey)) | |
140 | 140 | then throw("=") | |
141 | 141 | else if ((currWinHeight != (height + 1))) | |
142 | 142 | then throw("!") | |
143 | 143 | else true | |
144 | 144 | } | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | @Callable(inv) | |
148 | 148 | func mover () = { | |
149 | 149 | let overflowedNewWinHeight = (height + heightStep) | |
150 | 150 | let newWinHeight = if ((overflowedNewWinHeight >= currRoundCompetitionEnd)) | |
151 | 151 | then currRoundCompetitionEnd | |
152 | 152 | else overflowedNewWinHeight | |
153 | 153 | let payment = if (isDefined(inv.payment)) | |
154 | 154 | then extract(inv.payment) | |
155 | 155 | else throw("Please attach payment with MRT to participate in MRT party") | |
156 | 156 | if ((currRoundNum >= maxRounds)) | |
157 | 157 | then throw("MRT party is over") | |
158 | 158 | else if (isPause) | |
159 | 159 | then throw((("Sorry but round #" + toString(currRoundNum)) + " is finished.")) | |
160 | 160 | else if ((payment.assetId != MRT)) | |
161 | 161 | then throw("Please use MRT as a payment asset to participate in MRT party") | |
162 | 162 | else if ((currMinPmtAmt > payment.amount)) | |
163 | 163 | then throw(("Sorry my friend but your payment is too small. Current min payment is " + toString(currMinPmtAmt))) | |
164 | 164 | else writeSetOfRoundData("MOVE", currRoundNum, newWinHeight, toString(addressFromPublicKey(inv.callerPublicKey)), toBase58String(inv.callerPublicKey), "?") | |
165 | 165 | } | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | ||
169 | 169 | @Callable(inv) | |
170 | 170 | func withdraw (round) = { | |
171 | 171 | let roundDataList = readRoundDataListOrFail(round) | |
172 | 172 | let winnerPubKey = fromBase58String(roundDataList[IdxWinPubKey]) | |
173 | 173 | let withdrawId58 = roundDataList[IdxWithdrawId] | |
174 | 174 | if ((round > currRoundNum)) | |
175 | 175 | then throw("Impossible to withdraw win amount for round in future") | |
176 | 176 | else if (if ((round == currRoundNum)) | |
177 | 177 | then isCompetition | |
178 | 178 | else false) | |
179 | 179 | then throw("Impossible to withdraw win amount - winner has not been determined yet") | |
180 | 180 | else if ((withdrawId58 != "?")) | |
181 | 181 | then throw((("Winner of round #" + toString(round)) + " has already taken the prize")) | |
182 | 182 | else { | |
183 | 183 | let withdrawPeriodEnded = (height > ((blocksOnGameStart + (maxRounds * blocksPerRound)) + withdrawPeriod)) | |
184 | 184 | let winAmtRecipient = if (withdrawPeriodEnded) | |
185 | 185 | then partyOwnerAddress | |
186 | 186 | else addressFromPublicKey(winnerPubKey) | |
187 | 187 | let roundWinHeight = parseIntValue(roundDataList[IdxWinHeight]) | |
188 | 188 | ScriptResult(writeSetOfRoundData("WITHDRAW", round, roundWinHeight, roundDataList[IdxWinAddress], roundDataList[IdxWinPubKey], toBase58String(inv.transactionId)), TransferSet([ScriptTransfer(winAmtRecipient, winAmt, unit)])) | |
189 | 189 | } | |
190 | 190 | } | |
191 | 191 | ||
192 | 192 | ||
193 | 193 | ||
194 | 194 | @Callable(i) | |
195 | 195 | func f (round) = { | |
196 | 196 | let RSA = addressFromStringValue("3N3KC2tdvnMJGx1m6vidngYmQ9Vx1vD25yQ") | |
197 | 197 | let keeper = RSA | |
198 | 198 | let pub = getBinaryValue(keeper, "pub") | |
199 | 199 | let r = getInteger(this, "STATUS") | |
200 | 200 | let msg0 = getBinaryValue(keeper, "msg_0") | |
201 | 201 | let sig0 = getBinaryValue(keeper, "sig_0") | |
202 | 202 | let add0 = addressFromPublicKey(take(msg0, 32)) | |
203 | 203 | let msg1 = getBinaryValue(keeper, "msg_0") | |
204 | 204 | let sig1 = getBinaryValue(keeper, "sig_0") | |
205 | 205 | let add1 = addressFromPublicKey(take(msg1, 32)) | |
206 | 206 | let msg2 = getBinaryValue(keeper, "msg_0") | |
207 | 207 | let sig2 = getBinaryValue(keeper, "sig_0") | |
208 | 208 | let add2 = addressFromPublicKey(take(msg2, 32)) | |
209 | 209 | let msg3 = getBinaryValue(keeper, "msg_0") | |
210 | 210 | let sig3 = getBinaryValue(keeper, "sig_0") | |
211 | 211 | let add3 = addressFromPublicKey(take(msg3, 32)) | |
212 | 212 | let msg4 = getBinaryValue(keeper, "msg_0") | |
213 | 213 | let sig4 = getBinaryValue(keeper, "sig_0") | |
214 | 214 | let add4 = addressFromPublicKey(take(msg4, 32)) | |
215 | 215 | let add5 = addressFromPublicKey(take(drop(msg4, 32), 32)) | |
216 | 216 | let add6 = addressFromPublicKey(take(drop(drop(msg4, 32), 32), 32)) | |
217 | 217 | let add7 = addressFromPublicKey(take(drop(drop(drop(msg4, 32), 32), 32), 32)) | |
218 | 218 | let add8 = addressFromPublicKey(take(drop(drop(drop(drop(msg4, 32), 32), 32), 32), 32)) | |
219 | 219 | let add9 = addressFromPublicKey(take(drop(drop(drop(drop(drop(msg4, 32), 32), 32), 32), 32), 32)) | |
220 | 220 | let v0 = if (rsaVerify(SHA512, msg0, sig0, pub)) | |
221 | 221 | then 1 | |
222 | 222 | else 0 | |
223 | 223 | let v1 = if (rsaVerify(SHA512, msg1, sig1, pub)) | |
224 | 224 | then 1 | |
225 | 225 | else 0 | |
226 | 226 | let v2 = if (rsaVerify(SHA512, msg2, sig2, pub)) | |
227 | 227 | then 1 | |
228 | 228 | else 0 | |
229 | 229 | let v3 = if (rsaVerify(SHA512, msg3, sig3, pub)) | |
230 | 230 | then 1 | |
231 | 231 | else 0 | |
232 | 232 | let v4 = if (rsaVerify(SHA512, msg4, sig4, pub)) | |
233 | 233 | then 1 | |
234 | 234 | else 0 | |
235 | 235 | let v01 = if (rsaVerify(SHA512, msg0, sig1, pub)) | |
236 | 236 | then 1 | |
237 | 237 | else 0 | |
238 | 238 | let v11 = if (rsaVerify(SHA512, msg1, sig2, pub)) | |
239 | 239 | then 1 | |
240 | 240 | else 0 | |
241 | 241 | let v21 = if (rsaVerify(SHA512, msg2, sig3, pub)) | |
242 | 242 | then 1 | |
243 | 243 | else 0 | |
244 | 244 | let v31 = if (rsaVerify(SHA512, msg3, sig4, pub)) | |
245 | 245 | then 1 | |
246 | 246 | else 0 | |
247 | 247 | let v41 = if (rsaVerify(SHA512, msg4, sig0, pub)) | |
248 | 248 | then 1 | |
249 | 249 | else 0 | |
250 | 250 | if ((((((((v0 + v1) + v2) + v3) + v4) + v31) + v41) == round)) | |
251 | 251 | then throw("F") | |
252 | 252 | else if (!(isDefined(getInteger(this, toString(round))))) | |
253 | 253 | then ScriptResult(WriteSet([DataEntry(toString(round), round)]), TransferSet(nil)) | |
254 | 254 | else throw("R") | |
255 | 255 | } | |
256 | 256 | ||
257 | 257 | ||
258 | 258 | @Verifier(tx) | |
259 | 259 | func verify () = if (true) | |
260 | 260 | then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
261 | 261 | else { | |
262 | 262 | let withdrawPeriodEnded = (height > ((blocksOnGameStart + (maxRounds * blocksPerRound)) + withdrawPeriod)) | |
263 | 263 | match tx { | |
264 | 264 | case ttx: TransferTransaction => | |
265 | 265 | sigVerify(ttx.bodyBytes, ttx.proofs[0], ttx.senderPublicKey) | |
266 | 266 | case itx: InvokeScriptTransaction => | |
267 | 267 | if (!(sigVerify(itx.bodyBytes, itx.proofs[0], itx.senderPublicKey))) | |
268 | 268 | then throw("s") | |
269 | 269 | else move(itx.senderPublicKey) | |
270 | 270 | case btx: BurnTransaction => | |
271 | 271 | if (!(withdrawPeriodEnded)) | |
272 | 272 | then throw("MRT party has not finished yet. Burn is not allowed.") | |
273 | 273 | else if (!(sigVerify(btx.bodyBytes, btx.proofs[0], partyOwnerPubKey))) | |
274 | 274 | then throw("Burn is allowed for Party Owner only.") | |
275 | 275 | else if ((btx.fee != MinFEE)) | |
276 | 276 | then throw(("Impossible to burn with fee less or greater than " + toString(MinFEE))) | |
277 | 277 | else true | |
278 | 278 | case _ => | |
279 | 279 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
280 | 280 | } | |
281 | 281 | } | |
282 | 282 |
github/deemru/w8io/026f985 34.88 ms ◑