tx · 6t3NCK5DALSh2saSnVwVQGRx8p8k4gqNxDx1E1tGBEoR

3N54a2KYKDBv33ZSbsKspCJSMmu6hSfYUab:  -0.01500000 Waves

2021.02.09 16:39 [1390729] smart account 3N54a2KYKDBv33ZSbsKspCJSMmu6hSfYUab > SELF 0.00000000 Waves

{ "type": 13, "id": "6t3NCK5DALSh2saSnVwVQGRx8p8k4gqNxDx1E1tGBEoR", "fee": 1500000, "feeAssetId": null, "timestamp": 1612878005744, "version": 2, "chainId": 84, "sender": "3N54a2KYKDBv33ZSbsKspCJSMmu6hSfYUab", "senderPublicKey": "EUYTgGvTF6vQpruVMPYLBijYZWdTPcLLsT5iwsNhNeVc", "proofs": [ "3icYbjiSsCEfeN48i1CJFBv9oWjLu89uccT7AGcsB3Cabj9vHM49X8Y9y8wDRDpxzWe79Bf89WQzVKBrizLztiWA" ], "script": "base64:AAIDAAAAAAAAAA0IARIHCgUBAQEBCBIAAAAAEAAAAAANbG90dGVyeWFtb3VudAIAAAAHX2Ftb3VudAAAAAASbG90dGVyeXByb2JhYmlsaXR5AgAAAAxfcHJvYmFiaWxpdHkAAAAAGWxvdHRlcnlwcm9iYWJpbGl0eWRlY2ltYWwCAAAAFF9wcm9iYWJpbGl0eV9kZWNpbWFsAAAAAAxsb3R0ZXJ5UHJpY2UCAAAABl9wcmljZQAAAAANbG90dGVyeVByaWNlcwIAAAAPX2xvdHRlcnlfcHJpY2VzAAAAAA5sb3R0ZXJ5QXNzZXRJZAIAAAARX2xvdHRlcnlfYXNzZXRfaWQAAAAADWNvdW50T2ZQcmljZXMCAAAADV9jb3VudF9wcmljZXMAAAAAFGxhc3RIYXNoUmFuZG9tTnVtYmVyAgAAABVsYXN0X3NwaW5fcmFuZG9tX2hhc2gAAAAAE2xhc3RUb2tlblJhbmRvbUhhc2gCAAAAFmxhc3RfdG9rZW5fcmFuZG9tX2hhc2gAAAAACmRBcHBBZGRyZXMCAAAALDNCS0ZRTGVvNUV4WjVZMXB0OUZ0enNubzdh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AAAAAAAAAQDCQAAAAAAAAIFAAAADSRzaXplNzU5NTc2NDIAAAAAAAAAAAUFAAAADSRhY2M1NzU5NTc2NDIEAAAADSRhY2M2NzU5NTc2NDIJAQAAAA1wcm9jZWRMb3R0ZXJ5AAAAAgUAAAANJGFjYzU3NTk1NzY0MgkAAZEAAAACBQAAAA0kbGlzdDc1OTU3NjQyAAAAAAAAAAAFCQAAAgAAAAECAAAAEkxpc3Qgc2l6ZSBleGNlZWQgNQQAAAAPc2l6ZU9mV2luUHJpY2VzCQABkAAAAAEFAAAADHdpbm5pbmdUb2tlbgkAAAIAAAABCQABpAAAAAEFAAAAD3NpemVPZldpblByaWNlcwAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24GAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgYJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V56QoIKA==", "height": 1390729, "applicationStatus": "succeeded", "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 lotteryamount = "_amount"
5+
6+let lotteryprobability = "_probability"
7+
8+let lotteryprobabilitydecimal = "_probability_decimal"
9+
10+let lotteryPrice = "_price"
11+
12+let lotteryPrices = "_lottery_prices"
13+
14+let lotteryAssetId = "_lottery_asset_id"
15+
16+let countOfPrices = "_count_prices"
17+
18+let lastHashRandomNumber = "last_spin_random_hash"
19+
20+let lastTokenRandomHash = "last_token_random_hash"
21+
22+let dAppAddres = "3BKFQLeo5ExZ5Y1pt9Ftzsno7aRwzD96zoYVHP3tcLgV"
23+
24+let allowSizeLottery = 5
25+
26+func randomizer (inv) = {
27+ let lastPlay = match getBinary(this, lastHashRandomNumber) {
28+ case s: ByteVector =>
29+ s
30+ case _: Unit =>
31+ base58'2ee4oFDYriWJ9EMeR'
32+ case _ =>
33+ throw("Match error")
34+ }
35+ let rand = (((((lastPlay + inv.transactionId) + inv.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height))
36+ sha256(rand)
37+ }
38+
39+
40+func generatorRandomHash (inv) = {
41+ let lastHashForToken = match getBinary(this, lastTokenRandomHash) {
42+ case s: ByteVector =>
43+ s
44+ case _: Unit =>
45+ base58'4dD7osCQzvuXJdTiGfKvTwnKT'
46+ case _ =>
47+ throw("Match error")
48+ }
49+ let rand = (((((lastHashForToken + inv.transactionId) + inv.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height))
50+ sha256(rand)
51+ }
52+
53+
54+func getPriceArray () = {
55+ let tempPrices = getStringValue(this, lotteryPrices)
56+ let trimPrices = take(tempPrices, (size(tempPrices) - 1))
57+ let newArray = split(trimPrices, ",")
58+ newArray
59+ }
60+
61+
62+func generateNewListOfPrices (token,val) = {
63+ let indexOfComma = indexOf(token, ",")
64+ if ((indexOfComma == unit))
65+ then (val + ",")
66+ else ((token + val) + ",")
67+ }
68+
69+
70+func procedLottery (win,token) = if (isDefined(token))
71+ then {
72+ let tokenProbability = getIntegerValue(this, (token + lotteryprobability))
73+ let tokenProbabilityDecimal = getIntegerValue(this, (token + lotteryprobabilitydecimal))
74+ let probabilityValue = (tokenProbabilityDecimal * 1000)
75+ let probCompare = (tokenProbabilityDecimal % probabilityValue)
76+ let sizeOfWin = size(win)
77+ if ((sizeOfWin == 1))
78+ then {
79+ let randomNumber = win[0]
80+ let comp = toInt(fromBase64String(randomNumber))
81+ throw(randomNumber)
82+ }
83+ else win
84+ }
85+ else win
86+
87+
88+@Callable(i)
89+func updateprobability (probability,amount,poolprice,probDecimal,assetId) = {
90+ let token = toBase64String(generatorRandomHash(i))
91+ let paymentIsDefined = if (!(isDefined(i.payment)))
92+ then false
93+ else true
94+ let lotteryAssetTN = if ((assetId == ""))
95+ then true
96+ else false
97+ let totalRequiredAmount = (amount * poolprice)
98+ if ((paymentIsDefined == true))
99+ then {
100+ let payment = extract(i.payment)
101+ let paymentAssetId = match payment.assetId {
102+ case a: ByteVector =>
103+ toBase64String(a)
104+ case _: Unit =>
105+ ""
106+ case _ =>
107+ throw("Match error")
108+ }
109+ let paymentAmount = payment.amount
110+ if ((paymentAssetId != assetId))
111+ then throw("Asset Id not matching with Payment Asset Id")
112+ else if ((totalRequiredAmount > paymentAmount))
113+ then throw("Not enough Asset Amount")
114+ else {
115+ let tempValue = match getString(this, lotteryPrices) {
116+ case a: String =>
117+ a
118+ case _: Unit =>
119+ ""
120+ case _ =>
121+ throw("Match error")
122+ }
123+ let containKey = indexOf(tempValue, token)
124+ let storedTokensValues = match containKey {
125+ case _: Unit =>
126+ ((tempValue + token) + ",")
127+ case x: Int =>
128+ throw("Token is duplicated")
129+ case _ =>
130+ throw("Match error")
131+ }
132+ let countTokens = match getInteger(this, countOfPrices) {
133+ case a: Int =>
134+ a
135+ case _: Unit =>
136+ 0
137+ case _ =>
138+ throw("Match error")
139+ }
140+ if ((allowSizeLottery > countTokens))
141+ then {
142+ let updateLotteryPool = WriteSet([DataEntry((token + lotteryamount), amount), DataEntry((token + lotteryprobability), probability), DataEntry((token + lotteryPrice), poolprice), DataEntry(lotteryPrices, storedTokensValues), DataEntry(countOfPrices, (countTokens + 1)), DataEntry((token + lotteryprobabilitydecimal), probDecimal), DataEntry((token + lotteryAssetId), assetId), DataEntry(lastTokenRandomHash, token)])
143+ ScriptResult(updateLotteryPool, TransferSet(nil))
144+ }
145+ else throw(("Lottery prices has reached maximum " + toString(allowSizeLottery)))
146+ }
147+ }
148+ else {
149+ let tnBalance = if (lotteryAssetTN)
150+ then wavesBalance(this)
151+ else assetBalance(this, fromBase64String(assetId))
152+ if ((totalRequiredAmount > tnBalance))
153+ then throw("Not enough Asset Amount")
154+ else {
155+ let tempValue = match getString(this, lotteryPrices) {
156+ case a: String =>
157+ a
158+ case _: Unit =>
159+ ""
160+ case _ =>
161+ throw("Match error")
162+ }
163+ let containKey = indexOf(tempValue, token)
164+ let storedTokensValues = match containKey {
165+ case _: Unit =>
166+ ((tempValue + token) + ",")
167+ case x: Int =>
168+ throw("Token is duplicated")
169+ case _ =>
170+ throw("Match error")
171+ }
172+ let countTokens = match getInteger(this, countOfPrices) {
173+ case a: Int =>
174+ a
175+ case _: Unit =>
176+ 0
177+ case _ =>
178+ throw("Match error")
179+ }
180+ if ((allowSizeLottery > countTokens))
181+ then {
182+ let updateLotteryPool = WriteSet([DataEntry((token + lotteryamount), amount), DataEntry((token + lotteryprobability), probability), DataEntry((token + lotteryPrice), poolprice), DataEntry(lotteryPrices, storedTokensValues), DataEntry(countOfPrices, (countTokens + 1)), DataEntry((token + lotteryprobabilitydecimal), probDecimal), DataEntry((token + lotteryAssetId), assetId), DataEntry(lastTokenRandomHash, token)])
183+ ScriptResult(updateLotteryPool, TransferSet(nil))
184+ }
185+ else throw(("Lottery prices has reached maximum " + toString(allowSizeLottery)))
186+ }
187+ }
188+ }
189+
190+
191+
192+@Callable(i)
193+func startlotto () = {
194+ let currentKey = toBase58String(i.caller.bytes)
195+ let randhash = randomizer(i)
196+ let countTokens = match getInteger(this, countOfPrices) {
197+ case a: Int =>
198+ a
199+ case _: Unit =>
200+ 0
201+ case _ =>
202+ throw("Match error")
203+ }
204+ let priceList = getPriceArray()
205+ let randNumber = toBase64String(randhash)
206+ let winningToken = {
207+ let $list75957642 = priceList
208+ let $size75957642 = size($list75957642)
209+ let $acc075957642 = [randNumber]
210+ if (($size75957642 == 0))
211+ then $acc075957642
212+ else {
213+ let $acc175957642 = procedLottery($acc075957642, $list75957642[0])
214+ if (($size75957642 == 1))
215+ then $acc175957642
216+ else {
217+ let $acc275957642 = procedLottery($acc175957642, $list75957642[1])
218+ if (($size75957642 == 2))
219+ then $acc275957642
220+ else {
221+ let $acc375957642 = procedLottery($acc275957642, $list75957642[2])
222+ if (($size75957642 == 3))
223+ then $acc375957642
224+ else {
225+ let $acc475957642 = procedLottery($acc375957642, $list75957642[3])
226+ if (($size75957642 == 4))
227+ then $acc475957642
228+ else {
229+ let $acc575957642 = procedLottery($acc475957642, $list75957642[4])
230+ if (($size75957642 == 5))
231+ then $acc575957642
232+ else {
233+ let $acc675957642 = procedLottery($acc575957642, $list75957642[5])
234+ throw("List size exceed 5")
235+ }
236+ }
237+ }
238+ }
239+ }
240+ }
241+ }
242+ let sizeOfWinPrices = size(winningToken)
243+ throw(toString(sizeOfWinPrices))
244+ }
245+
246+
247+@Verifier(tx)
248+func verify () = match tx {
249+ case _: DataTransaction =>
250+ true
251+ case _: SetScriptTransaction =>
252+ true
253+ case _ =>
254+ sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
255+}
256+

github/deemru/w8io/026f985 
18.97 ms