tx · 3d2MqhrBi6PDcT6oxVRZTkb365JbwjmDNwDoot6LwvA8 3N5RZzJX5VLb937k1HkfCPj464fa6a916hj: -0.02000000 Waves 2019.10.21 18:55 [730049] smart account 3N5RZzJX5VLb937k1HkfCPj464fa6a916hj > SELF 0.00000000 Waves
{ "type": 13, "id": "3d2MqhrBi6PDcT6oxVRZTkb365JbwjmDNwDoot6LwvA8", "fee": 2000000, "feeAssetId": null, "timestamp": 1571673361235, "version": 1, "sender": "3N5RZzJX5VLb937k1HkfCPj464fa6a916hj", "senderPublicKey": "DabN1B19F6fW9mT8w79uNApEku9kf5cVL1kBhoDGqvoN", "proofs": [ "51pewVsPSRMRXpUSFTQzgZBgSHazs58w8j5Lr7uf7hkJmrQQiLJHM4su8eimSq5ABD6FS3qbSEn7QLQjJXJs5AV9" ], "script": "base64:AAIDAAAAAAAAAAoIARIAEgQKAgEIAAAAKQAAAAAHV0FWRUxFVAkAAGgAAAACCQAAaAAAAAIAAAAAAAAAAGQAAAAAAAAAA+gAAAAAAAAAA+gAAAAABU1SVEVDAAAAAAAAAABkAAAAAAltYXhSb3VuZHMAAAAAAAX14QAAAAAAB3BtdFN0ZXAJAABoAAAAAgAAAAAAAAAACgUAAAAFTVJURUMAAAAAEHBhcnR5T3duZXJQdWJLZXkJAAJZAAAAAQIAAAAsRkNhUDRqTGhMYXd6RXFid0FRR0FWdlBRQnYyaDNMZEVSQ3g3ZmNrRHZuenIAAAAAEXBhcnR5T3duZXJBZGRyZXNzCQEAAAAUYWRkcmVzc0Zyb21QdWJsaWNLZXkAAAABBQAAABBwYXJ0eU93bmVyUHViS2V5AAAAAA1sZWFzaW5nUGVyaW9kAAAAAAAACSfAAAAAABFsZWFzaW5nSWRMaWZldGltZQAAAAAAAAAAlgAAAAAXbGVhc2luZ0lkRGlmZkluTGlmZXRpbWUAAAAAAAAAAAoAAAAACmxlYXNpbmdBbXQJAABoAAAAAgAAAAAAAAAAAQUAAAAHV0FWRUxFVAAAAAAKaGVpZ2h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9yIGdyZWF0ZXIgdGhhbiAJAAGkAAAAAQUAAAAGTWluRkVFBgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAADdHR4BQAAAAckbWF0Y2gwAwkBAAAAASEAAAABBQAAABJsZWFzaW5nUGVyaW9kRW5kZWQJAAACAAAAAQIAAAA4TVJUIHBhcnR5IGhhcyBub3QgZmluaXNoZWQgeWV0LiBUcmFuc2ZlciBpcyBub3QgYWxsb3dlZC4DCQEAAAACIT0AAAACCAkABCQAAAABCAUAAAADdHR4AAAACXJlY2lwaWVudAAAAAVieXRlcwgFAAAAEXBhcnR5T3duZXJBZGRyZXNzAAAABWJ5dGVzCQAAAgAAAAECAAAAL1RyYW5zZmVyIGlzIGFsbG93ZWQgdG8gUGFydHkgT3duZXIgYWRkcmVzcyBvbmx5AwkBAAAAASEAAAABCQAB9AAAAAMIBQAAAAN0dHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAN0dHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAABBwYXJ0eU93bmVyUHViS2V5CQAAAgAAAAECAAAAKVRyYW5zZmVyIGlzIGFsbG93ZWQgZm9yIFBhcnR5IE93bmVyIG9ubHkuBgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAAA3N0eAUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkHEA1chA==", "chainId": 84, "height": 730049, "spentComplexity": 0 } View: original | compacted Prev: 9hDZnMaLZAZsiNwbLdqL8ketyeHoG8oiokQzcLpnoF5C Next: CYLbhWCHrzcmRfRVXMg1kmjEn4CBSv2bYbo84iYwQgAB Diff:
Old | New | Differences | |
---|---|---|---|
216 | 216 | then isCompetition | |
217 | 217 | else false) | |
218 | 218 | then throw("Impossible to register leasing transaction - winner has not been determined yet") | |
219 | - | else if ((size(fromBase58String(leasingId58)) > | |
219 | + | else if ((size(fromBase58String(leasingId58)) > 100)) | |
220 | 220 | then throw("Invalid leasing transaction id length") | |
221 | 221 | else if ((0 >= size(leasingId))) | |
222 | 222 | then throw("Leasing transaction id is not encoded as Base58 format") |
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 = 100000000 | |
9 | 9 | ||
10 | 10 | let pmtStep = (10 * MRTEC) | |
11 | 11 | ||
12 | 12 | let partyOwnerPubKey = fromBase58String("FCaP4jLhLawzEqbwAQGAVvPQBv2h3LdERCx7fckDvnzr") | |
13 | 13 | ||
14 | 14 | let partyOwnerAddress = addressFromPublicKey(partyOwnerPubKey) | |
15 | 15 | ||
16 | 16 | let leasingPeriod = 600000 | |
17 | 17 | ||
18 | 18 | let leasingIdLifetime = 150 | |
19 | 19 | ||
20 | 20 | let leasingIdDiffInLifetime = 10 | |
21 | 21 | ||
22 | 22 | let leasingAmt = (1 * WAVELET) | |
23 | 23 | ||
24 | 24 | let heightStep = 2 | |
25 | 25 | ||
26 | 26 | let blocksOnGameStart = 729556 | |
27 | 27 | ||
28 | 28 | let blocksPerRound = 12 | |
29 | 29 | ||
30 | 30 | let blocksPerCompetition = 8 | |
31 | 31 | ||
32 | 32 | let MRT = fromBase58String("8b4jE7X1yCNcbF4YXZGBKc8T5xdit7b1gENxxx31daua") | |
33 | 33 | ||
34 | 34 | let MinFEE = ((5 * WAVELET) / 1000) | |
35 | 35 | ||
36 | 36 | let IdxWinHeight = 0 | |
37 | 37 | ||
38 | 38 | let IdxWinPubKey = 1 | |
39 | 39 | ||
40 | 40 | let IdxLeasingId = 2 | |
41 | 41 | ||
42 | 42 | let IdxLeasingIdValidTill = 3 | |
43 | 43 | ||
44 | 44 | func convertChar (char) = { | |
45 | 45 | let B0 = toBytes("0") | |
46 | 46 | let B1 = toBytes("1") | |
47 | 47 | let B2 = toBytes("2") | |
48 | 48 | let B3 = toBytes("3") | |
49 | 49 | let B4 = toBytes("4") | |
50 | 50 | let B5 = toBytes("5") | |
51 | 51 | let B6 = toBytes("6") | |
52 | 52 | let B7 = toBytes("7") | |
53 | 53 | let B8 = toBytes("8") | |
54 | 54 | let B9 = toBytes("9") | |
55 | 55 | if ((char == B0)) | |
56 | 56 | then "0" | |
57 | 57 | else if ((char == B1)) | |
58 | 58 | then "1" | |
59 | 59 | else if ((char == B2)) | |
60 | 60 | then "2" | |
61 | 61 | else if ((char == B3)) | |
62 | 62 | then "3" | |
63 | 63 | else if ((char == B4)) | |
64 | 64 | then "4" | |
65 | 65 | else if ((char == B5)) | |
66 | 66 | then "5" | |
67 | 67 | else if ((char == B6)) | |
68 | 68 | then "6" | |
69 | 69 | else if ((char == B7)) | |
70 | 70 | then "7" | |
71 | 71 | else if ((char == B8)) | |
72 | 72 | then "8" | |
73 | 73 | else if ((char == B9)) | |
74 | 74 | then "9" | |
75 | 75 | else throw("Unsupported char") | |
76 | 76 | } | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func proofToStr (roundNumProof) = { | |
80 | 80 | let s = size(roundNumProof) | |
81 | 81 | if ((s > 2)) | |
82 | 82 | then throw("Invalid ecoded round - size couldn't be greater than 2") | |
83 | 83 | else if ((0 >= s)) | |
84 | 84 | then throw("Invalid ecoded round - size couldn't be less than or equals 0") | |
85 | 85 | else if ((s == 1)) | |
86 | 86 | then convertChar(take(roundNumProof, 1)) | |
87 | 87 | else if ((s == 2)) | |
88 | 88 | then (convertChar(take(roundNumProof, 1)) + convertChar(take(drop(roundNumProof, 1), 1))) | |
89 | 89 | else throw("Invalid encoded round") | |
90 | 90 | } | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func getRoundDataKeyOrFail (round) = if ((0 > round)) | |
94 | 94 | then throw("Invalid round number") | |
95 | 95 | else ("round" + toString(round)) | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func readRoundDataListOrFail (round) = { | |
99 | 99 | let roundDataOpt = getString(this, getRoundDataKeyOrFail(round)) | |
100 | 100 | let roundDataStr = if (isDefined(roundDataOpt)) | |
101 | 101 | then extract(roundDataOpt) | |
102 | 102 | else "" | |
103 | 103 | let partyOwnerAddressStr = toBase58String(partyOwnerAddress.bytes) | |
104 | 104 | if ((roundDataStr != "")) | |
105 | 105 | then split(roundDataStr, "_") | |
106 | 106 | else ["0", toString(pmtStep), partyOwnerAddressStr, "?", "0"] | |
107 | 107 | } | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func readSharedState () = { | |
111 | 111 | let sharedStateOpt = getString(this, "RoundsSharedState") | |
112 | 112 | let sharedStateStr = if (isDefined(sharedStateOpt)) | |
113 | 113 | then extract(sharedStateOpt) | |
114 | 114 | else "" | |
115 | 115 | if ((sharedStateStr != "")) | |
116 | 116 | then split(sharedStateStr, "_") | |
117 | 117 | else ["", "0", ""] | |
118 | 118 | } | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | func writeSetOfRoundData (type,round,newWinHeight,newWinPubKeyStr,newWinPubKey,leasingId58,leaseIdExpirationHeight) = { | |
122 | 122 | let newWinHeightStr = toString(newWinHeight) | |
123 | 123 | let roundData = DataEntry(getRoundDataKeyOrFail(round), ((((((newWinHeightStr + "_") + newWinPubKeyStr) + "_") + leasingId58) + "_") + toString(leaseIdExpirationHeight))) | |
124 | 124 | if ((type == "MOVE")) | |
125 | 125 | then { | |
126 | 126 | let newWinAddressStr = toString(addressFromPublicKey(newWinPubKey)) | |
127 | 127 | let addressLength = size(newWinAddressStr) | |
128 | 128 | let sharedState = readSharedState() | |
129 | 129 | let newTotalGamesCountStr = toString((parseIntValue(sharedState[1]) + 1)) | |
130 | 130 | let currLastPlayersAddr = sharedState[2] | |
131 | 131 | let newLastPlayersAddr = if (if ((currLastPlayersAddr != "")) | |
132 | 132 | then (size(currLastPlayersAddr) > ((addressLength + 1) * 10)) | |
133 | 133 | else false) | |
134 | 134 | then (("-" + newWinAddressStr) + dropRight(currLastPlayersAddr, (addressLength + 1))) | |
135 | 135 | else (("-" + newWinAddressStr) + currLastPlayersAddr) | |
136 | 136 | WriteSet([roundData, DataEntry("RoundsSharedState", ((((newWinHeightStr + "_") + newTotalGamesCountStr) + "_") + newLastPlayersAddr))]) | |
137 | 137 | } | |
138 | 138 | else if ((type == "LEASING")) | |
139 | 139 | then WriteSet([roundData]) | |
140 | 140 | else throw(("Unsupported type in writeSetOfRoundData method: " + type)) | |
141 | 141 | } | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | let offset = (height - blocksOnGameStart) | |
145 | 145 | ||
146 | 146 | let currRoundNum = if ((offset >= 0)) | |
147 | 147 | then (offset / blocksPerRound) | |
148 | 148 | else throw(("Please do not hurry. MRT party will start on " + toString(blocksOnGameStart))) | |
149 | 149 | ||
150 | 150 | let currRoundHeight = (offset % blocksPerRound) | |
151 | 151 | ||
152 | 152 | let currRoundHeightStart = ((currRoundNum * blocksPerRound) + blocksOnGameStart) | |
153 | 153 | ||
154 | 154 | let currRoundCompetitionEnd = (currRoundHeightStart + blocksPerCompetition) | |
155 | 155 | ||
156 | 156 | let currRoundDataList = readRoundDataListOrFail(currRoundNum) | |
157 | 157 | ||
158 | 158 | let currWinHeight = parseIntValue(currRoundDataList[IdxWinHeight]) | |
159 | 159 | ||
160 | 160 | let currMinPmtAmt = pmtStep | |
161 | 161 | ||
162 | 162 | func isWinByHeight (h) = (height >= h) | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | let atLeastOneMoveInRoundPresent = (currWinHeight > currRoundHeightStart) | |
166 | 166 | ||
167 | 167 | let firstCountdownFinished = if ((currWinHeight == 0)) | |
168 | 168 | then isWinByHeight((currRoundHeightStart + heightStep)) | |
169 | 169 | else false | |
170 | 170 | ||
171 | 171 | let isPauseByWin = if (isWinByHeight(currWinHeight)) | |
172 | 172 | then atLeastOneMoveInRoundPresent | |
173 | 173 | else false | |
174 | 174 | ||
175 | 175 | let isPauseByTime = if ((currRoundHeight > blocksPerCompetition)) | |
176 | 176 | then true | |
177 | 177 | else firstCountdownFinished | |
178 | 178 | ||
179 | 179 | let isPause = if (isPauseByWin) | |
180 | 180 | then true | |
181 | 181 | else isPauseByTime | |
182 | 182 | ||
183 | 183 | let isCompetition = !(isPause) | |
184 | 184 | ||
185 | 185 | @Callable(inv) | |
186 | 186 | func move () = { | |
187 | 187 | let overflowedNewWinHeight = (height + heightStep) | |
188 | 188 | let newWinHeight = if ((overflowedNewWinHeight >= currRoundCompetitionEnd)) | |
189 | 189 | then currRoundCompetitionEnd | |
190 | 190 | else overflowedNewWinHeight | |
191 | 191 | let payment = if (isDefined(inv.payment)) | |
192 | 192 | then extract(inv.payment) | |
193 | 193 | else throw("Please attach payment with MRT to participate in MRT party") | |
194 | 194 | if ((currRoundNum >= maxRounds)) | |
195 | 195 | then throw("MRT party is over") | |
196 | 196 | else if (isPause) | |
197 | 197 | then throw((("Sorry but round #" + toString(currRoundNum)) + " is finished.")) | |
198 | 198 | else if ((payment.assetId != MRT)) | |
199 | 199 | then throw("Please use MRT as a payment asset to participate in MRT party") | |
200 | 200 | else if ((currMinPmtAmt > payment.amount)) | |
201 | 201 | then throw(("Sorry my friend but your payment is to small. Current min payment is " + toString(currMinPmtAmt))) | |
202 | 202 | else writeSetOfRoundData("MOVE", currRoundNum, newWinHeight, toBase58String(inv.callerPublicKey), inv.callerPublicKey, "?", 0) | |
203 | 203 | } | |
204 | 204 | ||
205 | 205 | ||
206 | 206 | ||
207 | 207 | @Callable(inv) | |
208 | 208 | func registerLeasingTx (round,leasingId58) = { | |
209 | 209 | let leasingId = fromBase58String(leasingId58) | |
210 | 210 | let roundDataList = readRoundDataListOrFail(round) | |
211 | 211 | let winnerPubKey = fromBase58String(roundDataList[IdxWinPubKey]) | |
212 | 212 | let leaseIdExpirationHeight = parseIntValue(roundDataList[IdxLeasingIdValidTill]) | |
213 | 213 | if ((round > currRoundNum)) | |
214 | 214 | then throw("Impossible to register leasing transaction for round in future") | |
215 | 215 | else if (if ((round == currRoundNum)) | |
216 | 216 | then isCompetition | |
217 | 217 | else false) | |
218 | 218 | then throw("Impossible to register leasing transaction - winner has not been determined yet") | |
219 | - | else if ((size(fromBase58String(leasingId58)) > | |
219 | + | else if ((size(fromBase58String(leasingId58)) > 100)) | |
220 | 220 | then throw("Invalid leasing transaction id length") | |
221 | 221 | else if ((0 >= size(leasingId))) | |
222 | 222 | then throw("Leasing transaction id is not encoded as Base58 format") | |
223 | 223 | else if (isDefined(transactionHeightById(leasingId))) | |
224 | 224 | then throw("Passed leasingId has already existed in blockchain") | |
225 | 225 | else if (if ((leaseIdExpirationHeight != 0)) | |
226 | 226 | then (leaseIdExpirationHeight > height) | |
227 | 227 | else false) | |
228 | 228 | then throw(("Leasing id can be re-registered only on " + toString(leaseIdExpirationHeight))) | |
229 | 229 | else if ((roundDataList[IdxLeasingId] != "?")) | |
230 | 230 | then throw(("Leasing tx id has already registered for round " + toString(round))) | |
231 | 231 | else if ((inv.callerPublicKey != winnerPubKey)) | |
232 | 232 | then throw("Leasing tx can be registered by round winner only") | |
233 | 233 | else { | |
234 | 234 | let roundWinHeight = parseIntValue(roundDataList[IdxWinHeight]) | |
235 | 235 | writeSetOfRoundData("LEASING", round, roundWinHeight, roundDataList[IdxWinPubKey], toBytes(""), leasingId58, (height + leasingIdLifetime)) | |
236 | 236 | } | |
237 | 237 | } | |
238 | 238 | ||
239 | 239 | ||
240 | 240 | @Verifier(tx) | |
241 | 241 | func verify () = { | |
242 | 242 | let leasingPeriodEnded = (height > ((blocksOnGameStart + (maxRounds * blocksPerRound)) + leasingPeriod)) | |
243 | 243 | match tx { | |
244 | 244 | case ltx: LeaseTransaction => | |
245 | 245 | let sig = ltx.proofs[0] | |
246 | 246 | let round = valueOrErrorMessage(parseInt(proofToStr(ltx.proofs[1])), "Error during converting round num into integer representation") | |
247 | 247 | let roundDataList = readRoundDataListOrFail(round) | |
248 | 248 | let roundWinPubKey = fromBase58String(roundDataList[IdxWinPubKey]) | |
249 | 249 | let registeredLeasingId = fromBase58String(roundDataList[IdxLeasingId]) | |
250 | 250 | let leaseIdExpirationHeight = parseIntValue(roundDataList[IdxLeasingIdValidTill]) | |
251 | 251 | if (leasingPeriodEnded) | |
252 | 252 | then throw("Sorry but leasing period has been ended") | |
253 | 253 | else if ((height > (leaseIdExpirationHeight - leasingIdDiffInLifetime))) | |
254 | 254 | then throw("Sorry but lifetime of your leasing transaction id has been expired") | |
255 | 255 | else if (!(sigVerify(ltx.bodyBytes, sig, roundWinPubKey))) | |
256 | 256 | then throw("Invalid leasing transaction signature. Leasing is allowed for winner only.") | |
257 | 257 | else if ((ltx.id != registeredLeasingId)) | |
258 | 258 | then throw("Leasing transaction id doesn't match with registered leasing id") | |
259 | 259 | else if ((ltx.amount != leasingAmt)) | |
260 | 260 | then throw(("Impossible to lease less or greater than " + toString(leasingAmt))) | |
261 | 261 | else if ((ltx.fee != MinFEE)) | |
262 | 262 | then throw(("Impossible to lease with fee less or greater than " + toString(MinFEE))) | |
263 | 263 | else true | |
264 | 264 | case cltx: LeaseCancelTransaction => | |
265 | 265 | if (!(leasingPeriodEnded)) | |
266 | 266 | then throw("MRT party has not finished yet. Leasing Cancel is not allowed.") | |
267 | 267 | else if (!(sigVerify(tx.bodyBytes, tx.proofs[0], partyOwnerPubKey))) | |
268 | 268 | then throw("Leasing Cancel is allowed to Party Owner only") | |
269 | 269 | else if ((cltx.fee != MinFEE)) | |
270 | 270 | then throw(("Impossible to cancle leasing with fee less or greater than " + toString(MinFEE))) | |
271 | 271 | else true | |
272 | 272 | case ttx: TransferTransaction => | |
273 | 273 | if (!(leasingPeriodEnded)) | |
274 | 274 | then throw("MRT party has not finished yet. Transfer is not allowed.") | |
275 | 275 | else if ((addressFromRecipient(ttx.recipient).bytes != partyOwnerAddress.bytes)) | |
276 | 276 | then throw("Transfer is allowed to Party Owner address only") | |
277 | 277 | else if (!(sigVerify(ttx.bodyBytes, ttx.proofs[0], partyOwnerPubKey))) | |
278 | 278 | then throw("Transfer is allowed for Party Owner only.") | |
279 | 279 | else true | |
280 | 280 | case stx: SetScriptTransaction => | |
281 | 281 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
282 | 282 | case _ => | |
283 | 283 | false | |
284 | 284 | } | |
285 | 285 | } | |
286 | 286 |
github/deemru/w8io/169f3d6 77.50 ms ◑