tx · CKE3MgLpBSHxLyzu23BcJUQhFrUCL3Dqykgq5rXNQ2zh

3N2fUtnbJepCL98ZWtX849EaLhG7ARZLtvV:  -0.01000000 Waves

2019.10.09 11:48 [712086] smart account 3N2fUtnbJepCL98ZWtX849EaLhG7ARZLtvV > SELF 0.00000000 Waves

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

github/deemru/w8io/026f985 
77.33 ms