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