tx · Gnn2Nt8G2kTDrQgaBZdZHAzZrC5rtdSYM8shKMMD7Ds3

3Mv68WTT3tJhBJJZMawRXvSufCdkdCi6qm6:  -0.01000000 Waves

2019.10.14 14:14 [719540] smart account 3Mv68WTT3tJhBJJZMawRXvSufCdkdCi6qm6 > SELF 0.00000000 Waves

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

github/deemru/w8io/169f3d6 
38.10 ms