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