tx · 69cgsjnCqb2wF3DPDtYobhrPDSnf4SgZDauxybkmAQnS 3MzwSciZ5ru91AgMAHHgXPhqWpPLBhKgs8T: -0.01000000 Waves 2019.10.18 12:39 [725282] smart account 3MzwSciZ5ru91AgMAHHgXPhqWpPLBhKgs8T > SELF 0.00000000 Waves
{ "type": 13, "id": "69cgsjnCqb2wF3DPDtYobhrPDSnf4SgZDauxybkmAQnS", "fee": 1000000, "feeAssetId": null, "timestamp": 1571391576574, "version": 1, "sender": "3MzwSciZ5ru91AgMAHHgXPhqWpPLBhKgs8T", "senderPublicKey": "Bwz8HQRg8k37zvicevDRKUcg6oUKmPWYKHMCcrLT9zTB", "proofs": [ "5aqJVmtk2fcdSqq6tS1t4y6JHm4D5VqyT2RbdZ8MGBVntyFyp3WzVMBPqZz1E7o7wJ7o9vQfQwAAuTCpYttKuKtJ" ], "script": "base64:AAIDAAAAAAAAAAoIARIAEgQKAgEIAAAAJQAAAAAHV0FWRUxFVAkAAGgAAAACCQAAaAAAAAIAAAAAAAAAAGQAAAAAAAAAA+gAAAAAAAAAA+gAAAAABU1SVEVDAAAAAAAAAABkAAAAAApwbXRPblN0YXJ0CQAAaAAAAAIAAAAAAAAAAAoFAAAABU1SVEVDAAAAABBwYXJ0eU93bmVyUHViS2V5CQACWQAAAAECAAAALEZDYVA0akxoTGF3ekVxYndBUUdBVnZQUUJ2MmgzTGRFUkN4N2Zja0R2bnpyAAAAABFwYXJ0eU93bmVyQWRkcmVzcwkBAAAAFGFkZHJlc3NGcm9tUHVibGljS2V5AAAAAQUAAAAQcGFydHlPd25lclB1YktleQAAAAANbGVhc2luZ1BlcmlvZAAAAAAAAAknwAAAAAARbGVhc2luZ0lkTGlmZXRpbWUAAAAAAAAAAJYAAAAABndpbkFtdAkAAGgAAAACAAAAAAAAAAABBQAAAAdXQVZFTEVUAAAAAApoZWlnaHRTdGVwAAAAAAAAAAACAAAAABFibG9ja3NPbkdhbWVTdGFydAAAAAAAAAsRIQAAAAAOYmxvY2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4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQfHAudl", "chainId": 84, "height": 725282, "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 pmtOnStart = (10 * MRTEC) | |
9 | + | ||
10 | + | let partyOwnerPubKey = fromBase58String("FCaP4jLhLawzEqbwAQGAVvPQBv2h3LdERCx7fckDvnzr") | |
11 | + | ||
12 | + | let partyOwnerAddress = addressFromPublicKey(partyOwnerPubKey) | |
13 | + | ||
14 | + | let leasingPeriod = 600000 | |
15 | + | ||
16 | + | let leasingIdLifetime = 150 | |
17 | + | ||
18 | + | let winAmt = (1 * WAVELET) | |
19 | + | ||
20 | + | let heightStep = 2 | |
21 | + | ||
22 | + | let blocksOnGameStart = 725281 | |
23 | + | ||
24 | + | let blocksPerRound = 12 | |
25 | + | ||
26 | + | let blocksPerCompetition = 8 | |
27 | + | ||
28 | + | let MRT = fromBase58String("8b4jE7X1yCNcbF4YXZGBKc8T5xdit7b1gENxxx31daua") | |
29 | + | ||
30 | + | let MinFEE = ((5 * WAVELET) / 1000) | |
31 | + | ||
32 | + | let IdxWinHeight = 0 | |
33 | + | ||
34 | + | let IdxWinPubKey = 1 | |
35 | + | ||
36 | + | let IdxLeasingId = 2 | |
37 | + | ||
38 | + | let IdxLeasingIdValidTill = 3 | |
39 | + | ||
40 | + | func getRoundDataKeyOrFail (round) = if ((0 > round)) | |
41 | + | then throw("Invalid round number") | |
42 | + | else ("round" + toString(round)) | |
43 | + | ||
44 | + | ||
45 | + | func readRoundDataListOrFail (round) = { | |
46 | + | let roundDataOpt = getString(this, getRoundDataKeyOrFail(round)) | |
47 | + | let roundDataStr = if (isDefined(roundDataOpt)) | |
48 | + | then extract(roundDataOpt) | |
49 | + | else "" | |
50 | + | let partyOwnerAddressStr = toBase58String(partyOwnerAddress.bytes) | |
51 | + | if ((roundDataStr != "")) | |
52 | + | then split(roundDataStr, "_") | |
53 | + | else ["0", toString(pmtOnStart), partyOwnerAddressStr, "?", "0"] | |
54 | + | } | |
55 | + | ||
56 | + | ||
57 | + | func readSharedState () = { | |
58 | + | let sharedStateOpt = getString(this, "RoundsSharedState") | |
59 | + | let sharedStateStr = if (isDefined(sharedStateOpt)) | |
60 | + | then extract(sharedStateOpt) | |
61 | + | else "" | |
62 | + | if ((sharedStateStr != "")) | |
63 | + | then split(sharedStateStr, "_") | |
64 | + | else ["", "0", ""] | |
65 | + | } | |
66 | + | ||
67 | + | ||
68 | + | func writeSetOfRoundData (type,round,newWinHeight,newWinPubKeyStr,newWinPubKey,leasingId58,leaseIdExpirationHeight) = { | |
69 | + | let newWinHeightStr = toString(newWinHeight) | |
70 | + | let roundData = DataEntry(getRoundDataKeyOrFail(round), ((((((newWinHeightStr + "_") + newWinPubKeyStr) + "_") + leasingId58) + "_") + toString(leaseIdExpirationHeight))) | |
71 | + | if ((type == "MOVE")) | |
72 | + | then { | |
73 | + | let newWinAddressStr = toString(addressFromPublicKey(newWinPubKey)) | |
74 | + | let addressLength = size(newWinAddressStr) | |
75 | + | let sharedState = readSharedState() | |
76 | + | let newTotalGamesCountStr = toString((parseIntValue(sharedState[1]) + 1)) | |
77 | + | let currLastPlayersAddr = sharedState[2] | |
78 | + | let newLastPlayersAddr = if (if ((currLastPlayersAddr != "")) | |
79 | + | then (size(currLastPlayersAddr) > ((addressLength + 1) * 10)) | |
80 | + | else false) | |
81 | + | then (("-" + newWinAddressStr) + dropRight(currLastPlayersAddr, (addressLength + 1))) | |
82 | + | else (("-" + newWinAddressStr) + currLastPlayersAddr) | |
83 | + | WriteSet([roundData, DataEntry("RoundsSharedState", ((((newWinHeightStr + "_") + newTotalGamesCountStr) + "_") + newLastPlayersAddr))]) | |
84 | + | } | |
85 | + | else if ((type == "LEASING")) | |
86 | + | then WriteSet([roundData]) | |
87 | + | else throw(("Unsupported type in writeSetOfRoundData method: " + type)) | |
88 | + | } | |
89 | + | ||
90 | + | ||
91 | + | let offset = (height - blocksOnGameStart) | |
92 | + | ||
93 | + | let currRoundNum = if ((offset >= 0)) | |
94 | + | then (offset / blocksPerRound) | |
95 | + | else throw(("Please do not hurry. MRT party will start on " + toString(blocksOnGameStart))) | |
96 | + | ||
97 | + | let currRoundHeight = (offset % blocksPerRound) | |
98 | + | ||
99 | + | let currRoundHeightStart = ((currRoundNum * blocksPerRound) + blocksOnGameStart) | |
100 | + | ||
101 | + | let currRoundCompetitionEnd = (currRoundHeightStart + blocksPerCompetition) | |
102 | + | ||
103 | + | let currRoundDataList = readRoundDataListOrFail(currRoundNum) | |
104 | + | ||
105 | + | let currWinHeight = parseIntValue(currRoundDataList[IdxWinHeight]) | |
106 | + | ||
107 | + | let currMinPmtAmt = pmtOnStart | |
108 | + | ||
109 | + | func isWinByHeight (h) = (height >= h) | |
110 | + | ||
111 | + | ||
112 | + | let atLeastOneMoveInRoundPresent = (currWinHeight > currRoundHeightStart) | |
113 | + | ||
114 | + | let firstCountdownFinished = if ((currWinHeight == 0)) | |
115 | + | then isWinByHeight((currRoundHeightStart + heightStep)) | |
116 | + | else false | |
117 | + | ||
118 | + | let isPauseByWin = if (isWinByHeight(currWinHeight)) | |
119 | + | then atLeastOneMoveInRoundPresent | |
120 | + | else false | |
121 | + | ||
122 | + | let isPauseByTime = if ((currRoundHeight > blocksPerCompetition)) | |
123 | + | then true | |
124 | + | else firstCountdownFinished | |
125 | + | ||
126 | + | let isPause = if (isPauseByWin) | |
127 | + | then true | |
128 | + | else isPauseByTime | |
129 | + | ||
130 | + | let isCompetition = !(isPause) | |
131 | + | ||
132 | + | @Callable(inv) | |
133 | + | func move () = { | |
134 | + | let overflowedNewWinHeight = (height + heightStep) | |
135 | + | let newWinHeight = if ((overflowedNewWinHeight >= currRoundCompetitionEnd)) | |
136 | + | then currRoundCompetitionEnd | |
137 | + | else overflowedNewWinHeight | |
138 | + | let payment = if (isDefined(inv.payment)) | |
139 | + | then extract(inv.payment) | |
140 | + | else throw("Please attach payment with MRT to participate in MRT party") | |
141 | + | if (isPause) | |
142 | + | then throw((("Sorry but round #" + toString(currRoundNum)) + " is finished.")) | |
143 | + | else if ((payment.assetId != MRT)) | |
144 | + | then throw("Please use MRT as a payment asset to participate in MRT party") | |
145 | + | else if ((currMinPmtAmt > payment.amount)) | |
146 | + | then throw(("Sorry my friend but your payment is to small. Current min payment is " + toString(currMinPmtAmt))) | |
147 | + | else writeSetOfRoundData("MOVE", currRoundNum, newWinHeight, toBase58String(inv.callerPublicKey), inv.callerPublicKey, "?", 0) | |
148 | + | } | |
149 | + | ||
150 | + | ||
151 | + | ||
152 | + | @Callable(inv) | |
153 | + | func registerLeasingTx (round,leasingId58) = { | |
154 | + | let leasingId = fromBase58String(leasingId58) | |
155 | + | let roundDataList = readRoundDataListOrFail(round) | |
156 | + | let winnerPubKey = fromBase58String(roundDataList[IdxWinPubKey]) | |
157 | + | let leaseIdExpirationHeight = parseIntValue(roundDataList[IdxLeasingIdValidTill]) | |
158 | + | if ((round > currRoundNum)) | |
159 | + | then throw("Impossible to register leasing transaction for round in future") | |
160 | + | else if (if ((round == currRoundNum)) | |
161 | + | then isCompetition | |
162 | + | else false) | |
163 | + | then throw("Impossible to register leasing transaction - winner has not been determined yet") | |
164 | + | else if ((size(leasingId58) != 44)) | |
165 | + | then throw("Invalid leasing transaction id length") | |
166 | + | else if ((0 >= size(leasingId))) | |
167 | + | then throw("Leasing transaction id is not encoded as Base58 format") | |
168 | + | else if (isDefined(transactionHeightById(leasingId))) | |
169 | + | then throw("Passed leasingId has already existed in blockchain") | |
170 | + | else if (if ((leaseIdExpirationHeight != 0)) | |
171 | + | then (height > leaseIdExpirationHeight) | |
172 | + | else false) | |
173 | + | then throw(("Leasing id can be re-registered only on " + toString(leaseIdExpirationHeight))) | |
174 | + | else if ((roundDataList[IdxLeasingId] != "?")) | |
175 | + | then throw(("Leasing tx id has already registered for round " + toString(round))) | |
176 | + | else if ((inv.callerPublicKey != winnerPubKey)) | |
177 | + | then throw("Leasing tx can be registered by round winner only") | |
178 | + | else { | |
179 | + | let roundWinHeight = parseIntValue(roundDataList[IdxWinHeight]) | |
180 | + | writeSetOfRoundData("LEASING", round, roundWinHeight, roundDataList[IdxWinPubKey], toBytes(""), leasingId58, (height + leasingIdLifetime)) | |
181 | + | } | |
182 | + | } | |
183 | + | ||
184 | + | ||
185 | + | @Verifier(tx) | |
186 | + | func verify () = { | |
187 | + | let leasingPeriodEnded = (height > (blocksOnGameStart + leasingPeriod)) | |
188 | + | match tx { | |
189 | + | case ltx: LeaseTransaction => | |
190 | + | let sig = ltx.proofs[0] | |
191 | + | let round = toInt(ltx.proofs[1]) | |
192 | + | let roundDataList = readRoundDataListOrFail(round) | |
193 | + | let roundWinPubKey = fromBase58String(roundDataList[IdxWinPubKey]) | |
194 | + | let registeredLeasingId = fromBase58String(roundDataList[IdxLeasingId]) | |
195 | + | let leaseIdExpirationHeight = parseIntValue(roundDataList[IdxLeasingIdValidTill]) | |
196 | + | if (leasingPeriodEnded) | |
197 | + | then throw("Sorry but leasing period has been ended") | |
198 | + | else if ((height > (leaseIdExpirationHeight - 10))) | |
199 | + | then throw("Sorry but lifetime of your leasing transaction id has been expired") | |
200 | + | else if (!(sigVerify(ltx.bodyBytes, sig, roundWinPubKey))) | |
201 | + | then throw("Invalid leasing transaction signature. Leasing is allowed for winner only.") | |
202 | + | else if ((ltx.id != registeredLeasingId)) | |
203 | + | then throw("Leasing transaction id doesn't match with registered leasing id") | |
204 | + | else if ((ltx.amount != winAmt)) | |
205 | + | then throw(("Impossible to lease less or greater than " + toString(winAmt))) | |
206 | + | else if ((ltx.fee != MinFEE)) | |
207 | + | then throw(("Impossible to lease with fee less or greater than " + toString(MinFEE))) | |
208 | + | else true | |
209 | + | case cltx: LeaseCancelTransaction => | |
210 | + | if (!(leasingPeriodEnded)) | |
211 | + | then throw("MRT party has not finished yet. Leasing Cancel is not allowed.") | |
212 | + | else if (!(sigVerify(tx.bodyBytes, tx.proofs[0], partyOwnerPubKey))) | |
213 | + | then throw("Leasing Cancel is allowed to Party Owner only") | |
214 | + | else if ((cltx.fee != MinFEE)) | |
215 | + | then throw(("Impossible to cancle leasing with fee less or greater than " + toString(MinFEE))) | |
216 | + | else true | |
217 | + | case ttx: TransferTransaction => | |
218 | + | if (!(leasingPeriodEnded)) | |
219 | + | then throw("MRT party has not finished yet. Transfer is not allowed.") | |
220 | + | else if ((addressFromRecipient(ttx.recipient).bytes != partyOwnerAddress.bytes)) | |
221 | + | then throw("Transfer is allowed to Party Owner address only") | |
222 | + | else if (!(sigVerify(ttx.bodyBytes, ttx.proofs[0], partyOwnerPubKey))) | |
223 | + | then throw("Transfer is allowed for Party Owner only.") | |
224 | + | else true | |
225 | + | case stx: SetScriptTransaction => | |
226 | + | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
227 | + | case _ => | |
228 | + | false | |
229 | + | } | |
230 | + | } | |
231 | + |
github/deemru/w8io/026f985 18.97 ms ◑