tx · 5rvpZRhiBw9zDWWdWwWj9ddqmVyuLmxXsExcTr4JNxBi

3NCGjbgqZVk7eaqrLMEnEnqRhozNm1KTG5z:  -0.01300000 Waves

2025.01.07 16:59 [3448846] smart account 3NCGjbgqZVk7eaqrLMEnEnqRhozNm1KTG5z > SELF 0.00000000 Waves

{ "type": 13, "id": "5rvpZRhiBw9zDWWdWwWj9ddqmVyuLmxXsExcTr4JNxBi", "fee": 1300000, "feeAssetId": null, "timestamp": 1736258391899, "version": 2, "chainId": 84, "sender": "3NCGjbgqZVk7eaqrLMEnEnqRhozNm1KTG5z", "senderPublicKey": "5CoDbXxoqnvJpx9GrS6M4G5GYJXh9rcoiXJz7RYTPVkL", "proofs": [ "k2Kn7GtLZmJUAfW3CET2pU6HuXfSF1yFafSbmGV6j7itrXDBqKjqyPBJgGcgumz7ZStH8Cz9Qf2ao8mcZnSSefV" ], "script": "base64:BgIyCAISCgoIAQgEAhEYFBISBAoCCAgSABIDCgEBEgASABIAEgMKAQESABIDCgEIEgMKAQgsAANNMTYAgICE/qbe4READlNUQUtFUlNfQU1PVU5UAICAzvK+j6oFAAtURUFNX0FNT1VOVACAgJqm6q/jAQANTUFSS0VUX0FNT1VOVACAgJzl/Z7UCgALWUVBUl9CTE9DS1MJAGgCAO0CAKALAAxTVEFLRV9QRVJJT0QJAGgCAAUFC1lFQVJfQkxPQ0tTAAtCTEVTU19QUklDRQCA0NvD9AIADUxPVFRFUllfUFJJQ0UAgNDbw/QCAAtGT01PX1BFUklPRAA8AAxSQU5ET01fREVMQVkAAgAUQ1VSUkVOVF9KQUNLUE9UX1BFUkMAMgARTkVYVF9KQUNLUE9UX1BFUkMAFAAMU1RBS0VSU19QRVJDABQACVRFQU1fUEVSQwAKAA5nb3JjQXNzZXRJZEtleQILZ29yY0Fzc2V0SWQAC2dvcmNBc3NldElkCQETdmFsdWVPckVycm9yTWVzc2FnZQIJAKEIAQUOZ29yY0Fzc2V0SWRLZXkCFkdPUkMgaXMgbm90IGlzc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CQDMCAIJAKwCAgINJXMlZF9fZ3Vlc3NfXwkApAMBBQVndWVzcwUDbmlsAWkBEndhbGxldEluZm9SRUFET05MWQEOdXNlckFkZHJlc3NPcHQJAJQKAgUDbmlsCQEOd2FsbGV0SW50ZXJuYWwBBQ51c2VyQWRkcmVzc09wdACgWdLK", "height": 3448846, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: nrHckPCsDibbJErdzhdt5m9gk8oea1CUSrwfQmoqX4W Next: 8FKkxFVgbff7We1HYdDk9TsPERUy3bd4DuamRE85kmeT Diff:
OldNewDifferences
5555
5656 let lastFomoPlayerKey = "lastFomoPlayer"
5757
58+let lastFomoWinnerKey = "lastFomoWinner"
59+
60+let lastFomoWinnerAmountKey = "lastFomoWinnerAmount"
61+
62+let lastFomoWinnerTimeKey = "lastFomoWinnerTime"
63+
5864 let teamWalletAddrKey = "teamWalletAddr"
5965
6066 let brokerAddrKey = "brokerAddr"
7177 let currLotteryJackpotKey = "currLotteryJackpot"
7278
7379 let nextLotteryJackpotKey = "nextLotteryJackpot"
80+
81+let lastLotteryWinnerKey = "lastLotteryWinner"
82+
83+let lastLotteryWinnerAmountKey = "lastLotteryWinnerAmount"
84+
85+let lastLotteryWinnerTimeKey = "lastLotteryWinnerTime"
7486
7587 func gorcStats (userAddrOpt) = {
7688 let amountLeftTotal = valueOrElse(getInteger(stakersAmountLeftKey), 0)
130142 else false)
131143 then (lastFomoPlayer != "")
132144 else false)
133- then [ScriptTransfer(addressFromStringValue(lastFomoPlayer), fomoCurrJackpot, gorcAssetId), IntegerEntry(currFomoJackpotKey, (fomoNextJackpot + deltaCurrJackpot)), IntegerEntry(nextFomoJackpotKey, deltaNextJackpot)]
145+ then [ScriptTransfer(addressFromStringValue(lastFomoPlayer), fomoCurrJackpot, gorcAssetId), StringEntry(lastFomoWinnerKey, lastFomoPlayer), IntegerEntry(lastFomoWinnerAmountKey, fomoCurrJackpot), IntegerEntry(lastFomoWinnerTimeKey, lastBlock.timestamp), IntegerEntry(currFomoJackpotKey, (fomoNextJackpot + deltaCurrJackpot)), IntegerEntry(nextFomoJackpotKey, deltaNextJackpot)]
134146 else [IntegerEntry(currFomoJackpotKey, (fomoCurrJackpot + deltaCurrJackpot)), IntegerEntry(nextFomoJackpotKey, (fomoNextJackpot + deltaNextJackpot))]
135147 (([IntegerEntry(lastFomoTimeKey, height), StringEntry(lastFomoPlayerKey, toString(i.caller)), ScriptTransfer(addressFromStringValue(getStringValue(teamWalletAddrKey)), deltaTeamAmount, gorcAssetId), IntegerEntry(stakersAmountLeftKey, (getIntegerValue(stakersAmountLeftKey) + deltaStakersAmount)), IntegerEntry(stakersAmountTotalKey, (getIntegerValue(stakersAmountTotalKey) + deltaStakersAmount))] ++ changeActions) ++ fomoActions)
136148 }
188200 then throw("GORC payments only!")
189201 else {
190202 let addr = toString(i.caller)
191- let $t069787029 = gorcStats(addr)
192- let userAmount = $t069787029._1
193- let amountLeftTotal = $t069787029._2
203+ let $t074627513 = gorcStats(addr)
204+ let userAmount = $t074627513._1
205+ let amountLeftTotal = $t074627513._2
194206 let userAmountKey = stakedAmountByUserKey(addr)
195207 let claimActions = if ((userAmount > 0))
196208 then [ScriptTransfer(i.caller, userAmount, gorcAssetId)]
214226 if ((0 > (oldAmount - amount)))
215227 then throw(((("You have only " + fixedPoint(oldAmount, 8)) + " GORC staked, tried to unstake ") + fixedPoint(amount, 8)))
216228 else {
217- let $t079908041 = gorcStats(addr)
218- let userAmount = $t079908041._1
219- let amountLeftTotal = $t079908041._2
229+ let $t084748525 = gorcStats(addr)
230+ let userAmount = $t084748525._1
231+ let amountLeftTotal = $t084748525._2
220232 let claimActions = if ((userAmount > 0))
221233 then [ScriptTransfer(i.caller, userAmount, gorcAssetId)]
222234 else nil
232244 then throw("No payments required")
233245 else {
234246 let addr = toString(i.caller)
235- let $t086058656 = gorcStats(addr)
236- let userAmount = $t086058656._1
237- let amountLeftTotal = $t086058656._2
247+ let $t090899140 = gorcStats(addr)
248+ let userAmount = $t090899140._1
249+ let amountLeftTotal = $t090899140._2
238250 let claimActions = if ((userAmount > 0))
239251 then [ScriptTransfer(i.caller, userAmount, gorcAssetId)]
240252 else nil
310322 let rand = getRandomNumber(12, salt, entropy)
311323 let currJackpot = valueOrElse(getInteger(currLotteryJackpotKey), 0)
312324 let winActions = if ((rand == guess))
313- then [ScriptTransfer(i.caller, currJackpot, gorcAssetId), IntegerEntry(currLotteryJackpotKey, valueOrElse(getInteger(nextLotteryJackpotKey), 0)), IntegerEntry(nextLotteryJackpotKey, 0)]
325+ then [ScriptTransfer(i.caller, currJackpot, gorcAssetId), StringEntry(lastLotteryWinnerKey, addr), IntegerEntry(lastLotteryWinnerAmountKey, currJackpot), IntegerEntry(lastLotteryWinnerTimeKey, lastBlock.timestamp), IntegerEntry(currLotteryJackpotKey, valueOrElse(getInteger(nextLotteryJackpotKey), 0)), IntegerEntry(nextLotteryJackpotKey, 0)]
314326 else nil
315327 $Tuple2(([DeleteEntry(finishKey), DeleteEntry(guessKey), DeleteEntry(saltKey)] ++ winActions), rand)
316328 }
320332
321333 @Callable(i)
322334 func statsREADONLY (userAddrOpt) = {
323- let $t01245012508 = gorcStats(userAddrOpt)
324- let userAmount = $t01245012508._1
325- let amountLeftTotal = $t01245012508._2
335+ let $t01310313161 = gorcStats(userAddrOpt)
336+ let userAmount = $t01310313161._1
337+ let amountLeftTotal = $t01310313161._2
326338 let currFomoJackpot = valueOrElse(getInteger(currFomoJackpotKey), 0)
327339 let nextFomoJackpot = valueOrElse(getInteger(nextFomoJackpotKey), 0)
328340 let lastFomoTime = valueOrElse(getInteger(lastFomoTimeKey), 0)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let M16 = 10000000000000000
55
66 let STAKERS_AMOUNT = 3000000000000000
77
88 let TEAM_AMOUNT = 1000000000000000
99
1010 let MARKET_AMOUNT = 6000000000000000
1111
1212 let YEAR_BLOCKS = (365 * 1440)
1313
1414 let STAKE_PERIOD = (5 * YEAR_BLOCKS)
1515
1616 let BLESS_PRICE = 100000000000
1717
1818 let LOTTERY_PRICE = 100000000000
1919
2020 let FOMO_PERIOD = 60
2121
2222 let RANDOM_DELAY = 2
2323
2424 let CURRENT_JACKPOT_PERC = 50
2525
2626 let NEXT_JACKPOT_PERC = 20
2727
2828 let STAKERS_PERC = 20
2929
3030 let TEAM_PERC = 10
3131
3232 let gorcAssetIdKey = "gorcAssetId"
3333
3434 let gorcAssetId = valueOrErrorMessage(getBinary(gorcAssetIdKey), "GORC is not issued yet")
3535
3636 let issueTimeKey = "issueTime"
3737
3838 let stakersAmountTotalKey = "stakersAmountTotal"
3939
4040 let stakersAmountLeftKey = "stakersAmountLeft"
4141
4242 let stakedAmountTotalKey = "stakedTotal"
4343
4444 func stakedAmountByUserKey (addr) = ("stakedAmount_" + addr)
4545
4646
4747 func lastClaimTimeByUserKey (addr) = ("lastClaimTime_" + addr)
4848
4949
5050 let lastFomoTimeKey = "lastFomoTime"
5151
5252 let currFomoJackpotKey = "currFomoJackpot"
5353
5454 let nextFomoJackpotKey = "nextFomoJackpot"
5555
5656 let lastFomoPlayerKey = "lastFomoPlayer"
5757
58+let lastFomoWinnerKey = "lastFomoWinner"
59+
60+let lastFomoWinnerAmountKey = "lastFomoWinnerAmount"
61+
62+let lastFomoWinnerTimeKey = "lastFomoWinnerTime"
63+
5864 let teamWalletAddrKey = "teamWalletAddr"
5965
6066 let brokerAddrKey = "brokerAddr"
6167
6268 func keyCommit (address) = ("finishBlockFor_" + address)
6369
6470
6571 func keyGuess (address) = ("guessFor_" + address)
6672
6773
6874 func keySalt (address) = ("saltFor_" + address)
6975
7076
7177 let currLotteryJackpotKey = "currLotteryJackpot"
7278
7379 let nextLotteryJackpotKey = "nextLotteryJackpot"
80+
81+let lastLotteryWinnerKey = "lastLotteryWinner"
82+
83+let lastLotteryWinnerAmountKey = "lastLotteryWinnerAmount"
84+
85+let lastLotteryWinnerTimeKey = "lastLotteryWinnerTime"
7486
7587 func gorcStats (userAddrOpt) = {
7688 let amountLeftTotal = valueOrElse(getInteger(stakersAmountLeftKey), 0)
7789 let lastUserTime = valueOrElse(getInteger(lastClaimTimeByUserKey(userAddrOpt)), -1)
7890 if ((0 > lastUserTime))
7991 then $Tuple2(0, amountLeftTotal)
8092 else {
8193 let issueTime = valueOrErrorMessage(getInteger(issueTimeKey), "GORC is not issued yet")
8294 let nowLimited = min([height, (issueTime + STAKE_PERIOD)])
8395 let userShares = valueOrElse(getInteger(stakedAmountByUserKey(userAddrOpt)), 0)
8496 let totalShares = valueOrElse(getInteger(stakedAmountTotalKey), 0)
8597 let stakersAmountTotal = valueOrElse(getInteger(stakersAmountTotalKey), STAKERS_AMOUNT)
8698 let userTemporal = fraction(stakersAmountTotal, (nowLimited - lastUserTime), STAKE_PERIOD)
8799 let userAmount = if ((totalShares != 0))
88100 then fraction(userTemporal, userShares, totalShares)
89101 else 0
90102 $Tuple2(userAmount, (amountLeftTotal - userAmount))
91103 }
92104 }
93105
94106
95107 func fixedPoint (val,decimals) = {
96108 let tenPow = pow(10, 0, decimals, 0, 0, DOWN)
97109 let lowPart = toString((val % tenPow))
98110 let zeroes = drop(toString(tenPow), (1 + size(lowPart)))
99111 (((toString((val / tenPow)) + ".") + zeroes) + lowPart)
100112 }
101113
102114
103115 func fomoInternal (i) = if ((size(i.payments) != 1))
104116 then throw("exactly 1 payment must be attached")
105117 else {
106118 let pmt = i.payments[0]
107119 let amt = pmt.amount
108120 if (if (!(isDefined(pmt.assetId)))
109121 then true
110122 else (value(pmt.assetId) != gorcAssetId))
111123 then throw("GORC payments only!")
112124 else {
113125 let change = (amt - BLESS_PRICE)
114126 if ((0 > change))
115127 then throw(((("You need to sacrifice " + fixedPoint(BLESS_PRICE, 8)) + " GORC, but I see only ") + fixedPoint(amt, 8)))
116128 else {
117129 let changeActions = if ((change > 0))
118130 then [ScriptTransfer(i.caller, change, gorcAssetId)]
119131 else nil
120132 let lastFomoTime = valueOrElse(getInteger(lastFomoTimeKey), 0)
121133 let lastFomoPlayer = valueOrElse(getString(lastFomoPlayerKey), "")
122134 let deltaCurrJackpot = fraction(BLESS_PRICE, CURRENT_JACKPOT_PERC, 100)
123135 let deltaNextJackpot = fraction(BLESS_PRICE, NEXT_JACKPOT_PERC, 100)
124136 let deltaTeamAmount = fraction(BLESS_PRICE, TEAM_PERC, 100)
125137 let deltaStakersAmount = (((BLESS_PRICE - deltaCurrJackpot) - deltaNextJackpot) - deltaTeamAmount)
126138 let fomoCurrJackpot = valueOrElse(getInteger(currFomoJackpotKey), 0)
127139 let fomoNextJackpot = valueOrElse(getInteger(nextFomoJackpotKey), 0)
128140 let fomoActions = if (if (if ((height > (lastFomoTime + FOMO_PERIOD)))
129141 then (fomoCurrJackpot > 0)
130142 else false)
131143 then (lastFomoPlayer != "")
132144 else false)
133- then [ScriptTransfer(addressFromStringValue(lastFomoPlayer), fomoCurrJackpot, gorcAssetId), IntegerEntry(currFomoJackpotKey, (fomoNextJackpot + deltaCurrJackpot)), IntegerEntry(nextFomoJackpotKey, deltaNextJackpot)]
145+ then [ScriptTransfer(addressFromStringValue(lastFomoPlayer), fomoCurrJackpot, gorcAssetId), StringEntry(lastFomoWinnerKey, lastFomoPlayer), IntegerEntry(lastFomoWinnerAmountKey, fomoCurrJackpot), IntegerEntry(lastFomoWinnerTimeKey, lastBlock.timestamp), IntegerEntry(currFomoJackpotKey, (fomoNextJackpot + deltaCurrJackpot)), IntegerEntry(nextFomoJackpotKey, deltaNextJackpot)]
134146 else [IntegerEntry(currFomoJackpotKey, (fomoCurrJackpot + deltaCurrJackpot)), IntegerEntry(nextFomoJackpotKey, (fomoNextJackpot + deltaNextJackpot))]
135147 (([IntegerEntry(lastFomoTimeKey, height), StringEntry(lastFomoPlayerKey, toString(i.caller)), ScriptTransfer(addressFromStringValue(getStringValue(teamWalletAddrKey)), deltaTeamAmount, gorcAssetId), IntegerEntry(stakersAmountLeftKey, (getIntegerValue(stakersAmountLeftKey) + deltaStakersAmount)), IntegerEntry(stakersAmountTotalKey, (getIntegerValue(stakersAmountTotalKey) + deltaStakersAmount))] ++ changeActions) ++ fomoActions)
136148 }
137149 }
138150 }
139151
140152
141153 func getRandomNumber (maxValue,salt,entropy) = if ((0 >= maxValue))
142154 then throw("maxValue should be > 0")
143155 else {
144156 let randomHash = sha256_16Kb((salt + entropy))
145157 (toInt(randomHash) % maxValue)
146158 }
147159
148160
149161 func walletInternal (userAddressOpt) = {
150162 let addr = addressFromString(userAddressOpt)
151163 let balance = if (isDefined(addr))
152164 then wavesBalance(value(addr))
153165 else BalanceDetails(0, 0, 0, 0)
154166 let gorcBalance = if (isDefined(addr))
155167 then assetBalance(value(addr), gorcAssetId)
156168 else 0
157169 let stakedGorc = valueOrElse(getInteger(stakedAmountByUserKey(userAddressOpt)), 0)
158170 [("%s%d__wavesBalance__" + toString(balance.available)), ("%s%d__gorcBalance__" + toString(gorcBalance)), ("%s%d__stakedGorc__" + toString(stakedGorc))]
159171 }
160172
161173
162174 @Callable(i)
163175 func testArgs (intVal,strVal,boolVal,binVal,arrInt,arrStr,arrBool,arrBin) = nil
164176
165177
166178
167179 @Callable(i)
168180 func constructorV1 (teamWalletAddr,brokerAddr) = if ((i.caller != this))
169181 then throw("Permission denied")
170182 else {
171183 let issuedAmount = M16
172184 let issue = Issue("GORC", "Meme coin by God of Random Chance. Visit https://gorc.meme, sacrifice to the God of Random and you will receive an answer to any question or a blessing. Lucky one gets a Gift of God", issuedAmount, 8, false, unit, 0)
173185 let assetId = calculateAssetId(issue)
174186 [issue, BinaryEntry(gorcAssetIdKey, assetId), IntegerEntry(issueTimeKey, height), IntegerEntry(stakersAmountLeftKey, STAKERS_AMOUNT), IntegerEntry(stakersAmountTotalKey, STAKERS_AMOUNT), StringEntry(teamWalletAddrKey, teamWalletAddr), StringEntry(brokerAddrKey, brokerAddr), ScriptTransfer(addressFromStringValue(teamWalletAddr), TEAM_AMOUNT, assetId), ScriptTransfer(addressFromStringValue(brokerAddr), MARKET_AMOUNT, assetId)]
175187 }
176188
177189
178190
179191 @Callable(i)
180192 func stakeGorc () = if ((size(i.payments) != 1))
181193 then throw("exactly 1 payment must be attached")
182194 else {
183195 let pmt = i.payments[0]
184196 let amt = pmt.amount
185197 if (if (!(isDefined(pmt.assetId)))
186198 then true
187199 else (value(pmt.assetId) != gorcAssetId))
188200 then throw("GORC payments only!")
189201 else {
190202 let addr = toString(i.caller)
191- let $t069787029 = gorcStats(addr)
192- let userAmount = $t069787029._1
193- let amountLeftTotal = $t069787029._2
203+ let $t074627513 = gorcStats(addr)
204+ let userAmount = $t074627513._1
205+ let amountLeftTotal = $t074627513._2
194206 let userAmountKey = stakedAmountByUserKey(addr)
195207 let claimActions = if ((userAmount > 0))
196208 then [ScriptTransfer(i.caller, userAmount, gorcAssetId)]
197209 else nil
198210 $Tuple2((claimActions ++ [IntegerEntry(stakedAmountTotalKey, (valueOrElse(getInteger(stakedAmountTotalKey), 0) + amt)), IntegerEntry(userAmountKey, (valueOrElse(getInteger(userAmountKey), 0) + amt)), IntegerEntry(lastClaimTimeByUserKey(addr), height), IntegerEntry(stakersAmountLeftKey, amountLeftTotal)]), userAmount)
199211 }
200212 }
201213
202214
203215
204216 @Callable(i)
205217 func unstakeGorc (amount) = if ((0 >= amount))
206218 then throw("Amount should be positive")
207219 else {
208220 let addr = toString(i.caller)
209221 if ((size(i.payments) != 0))
210222 then throw("No payments required")
211223 else {
212224 let userAmountKey = stakedAmountByUserKey(addr)
213225 let oldAmount = valueOrElse(getInteger(userAmountKey), 0)
214226 if ((0 > (oldAmount - amount)))
215227 then throw(((("You have only " + fixedPoint(oldAmount, 8)) + " GORC staked, tried to unstake ") + fixedPoint(amount, 8)))
216228 else {
217- let $t079908041 = gorcStats(addr)
218- let userAmount = $t079908041._1
219- let amountLeftTotal = $t079908041._2
229+ let $t084748525 = gorcStats(addr)
230+ let userAmount = $t084748525._1
231+ let amountLeftTotal = $t084748525._2
220232 let claimActions = if ((userAmount > 0))
221233 then [ScriptTransfer(i.caller, userAmount, gorcAssetId)]
222234 else nil
223235 $Tuple2((claimActions ++ [IntegerEntry(stakedAmountTotalKey, (valueOrErrorMessage(getInteger(stakedAmountTotalKey), "No GORC staked") - amount)), IntegerEntry(userAmountKey, (oldAmount - amount)), IntegerEntry(lastClaimTimeByUserKey(addr), height), IntegerEntry(stakersAmountLeftKey, amountLeftTotal)]), 0)
224236 }
225237 }
226238 }
227239
228240
229241
230242 @Callable(i)
231243 func claimGorc () = if ((size(i.payments) != 0))
232244 then throw("No payments required")
233245 else {
234246 let addr = toString(i.caller)
235- let $t086058656 = gorcStats(addr)
236- let userAmount = $t086058656._1
237- let amountLeftTotal = $t086058656._2
247+ let $t090899140 = gorcStats(addr)
248+ let userAmount = $t090899140._1
249+ let amountLeftTotal = $t090899140._2
238250 let claimActions = if ((userAmount > 0))
239251 then [ScriptTransfer(i.caller, userAmount, gorcAssetId)]
240252 else nil
241253 $Tuple2((claimActions ++ [IntegerEntry(lastClaimTimeByUserKey(addr), height), IntegerEntry(stakersAmountLeftKey, amountLeftTotal)]), userAmount)
242254 }
243255
244256
245257
246258 @Callable(i)
247259 func answerMe () = $Tuple2(fomoInternal(i), toInt(i.transactionId))
248260
249261
250262
251263 @Callable(i)
252264 func blessMe () = $Tuple2(fomoInternal(i), 42)
253265
254266
255267
256268 @Callable(i)
257269 func commitGuess (guess) = {
258270 let addr = toString(i.caller)
259271 let finishKey = keyCommit(addr)
260272 let guessKey = keyGuess(addr)
261273 if (isDefined(getInteger(finishKey)))
262274 then throw("You already made a bet, please use it")
263275 else if (if ((0 > guess))
264276 then true
265277 else (guess > 11))
266278 then throw("The number should be between 0 and 11")
267279 else if ((size(i.payments) != 1))
268280 then throw("exactly 1 payment must be attached")
269281 else {
270282 let pmt = i.payments[0]
271283 let amt = pmt.amount
272284 if (if (!(isDefined(pmt.assetId)))
273285 then true
274286 else (value(pmt.assetId) != gorcAssetId))
275287 then throw("GORC payments only!")
276288 else {
277289 let change = (amt - LOTTERY_PRICE)
278290 if ((0 > change))
279291 then throw(((("You need to sacrifice " + fixedPoint(LOTTERY_PRICE, 8)) + " GORC, but I see only ") + fixedPoint(amt, 8)))
280292 else {
281293 let changeActions = if ((change > 0))
282294 then [ScriptTransfer(i.caller, change, gorcAssetId)]
283295 else nil
284296 let finishBlock = (height + RANDOM_DELAY)
285297 let deltaCurrJackpot = fraction(LOTTERY_PRICE, CURRENT_JACKPOT_PERC, 100)
286298 let deltaNextJackpot = fraction(LOTTERY_PRICE, NEXT_JACKPOT_PERC, 100)
287299 let deltaTeamAmount = fraction(LOTTERY_PRICE, TEAM_PERC, 100)
288300 let deltaStakersAmount = (((LOTTERY_PRICE - deltaCurrJackpot) - deltaNextJackpot) - deltaTeamAmount)
289301 $Tuple2(([IntegerEntry(finishKey, finishBlock), IntegerEntry(guessKey, guess), IntegerEntry(currLotteryJackpotKey, (valueOrElse(getInteger(currLotteryJackpotKey), 0) + deltaCurrJackpot)), IntegerEntry(nextLotteryJackpotKey, (valueOrElse(getInteger(nextLotteryJackpotKey), 0) + deltaNextJackpot)), ScriptTransfer(addressFromStringValue(getStringValue(teamWalletAddrKey)), deltaTeamAmount, gorcAssetId), IntegerEntry(stakersAmountLeftKey, (getIntegerValue(stakersAmountLeftKey) + deltaStakersAmount)), IntegerEntry(stakersAmountTotalKey, (getIntegerValue(stakersAmountTotalKey) + deltaStakersAmount)), StringEntry(keySalt(addr), toBase58String(i.transactionId))] ++ changeActions), finishBlock)
290302 }
291303 }
292304 }
293305 }
294306
295307
296308
297309 @Callable(i)
298310 func guessLottery () = {
299311 let addr = toString(i.caller)
300312 let finishKey = keyCommit(addr)
301313 let guessKey = keyGuess(addr)
302314 let guess = valueOrErrorMessage(getInteger(guessKey), "You have not made a bet")
303315 let finishBlock = valueOrErrorMessage(getInteger(finishKey), "You have not made a bet")
304316 if ((finishBlock > height))
305317 then throw(("Random number is not ready yet, wait until height = " + toString(finishBlock)))
306318 else {
307319 let entropy = value(value(blockInfoByHeight(finishBlock)).vrf)
308320 let saltKey = keySalt(addr)
309321 let salt = fromBase58String(valueOrElse(getString(saltKey), "DEFAULT"))
310322 let rand = getRandomNumber(12, salt, entropy)
311323 let currJackpot = valueOrElse(getInteger(currLotteryJackpotKey), 0)
312324 let winActions = if ((rand == guess))
313- then [ScriptTransfer(i.caller, currJackpot, gorcAssetId), IntegerEntry(currLotteryJackpotKey, valueOrElse(getInteger(nextLotteryJackpotKey), 0)), IntegerEntry(nextLotteryJackpotKey, 0)]
325+ then [ScriptTransfer(i.caller, currJackpot, gorcAssetId), StringEntry(lastLotteryWinnerKey, addr), IntegerEntry(lastLotteryWinnerAmountKey, currJackpot), IntegerEntry(lastLotteryWinnerTimeKey, lastBlock.timestamp), IntegerEntry(currLotteryJackpotKey, valueOrElse(getInteger(nextLotteryJackpotKey), 0)), IntegerEntry(nextLotteryJackpotKey, 0)]
314326 else nil
315327 $Tuple2(([DeleteEntry(finishKey), DeleteEntry(guessKey), DeleteEntry(saltKey)] ++ winActions), rand)
316328 }
317329 }
318330
319331
320332
321333 @Callable(i)
322334 func statsREADONLY (userAddrOpt) = {
323- let $t01245012508 = gorcStats(userAddrOpt)
324- let userAmount = $t01245012508._1
325- let amountLeftTotal = $t01245012508._2
335+ let $t01310313161 = gorcStats(userAddrOpt)
336+ let userAmount = $t01310313161._1
337+ let amountLeftTotal = $t01310313161._2
326338 let currFomoJackpot = valueOrElse(getInteger(currFomoJackpotKey), 0)
327339 let nextFomoJackpot = valueOrElse(getInteger(nextFomoJackpotKey), 0)
328340 let lastFomoTime = valueOrElse(getInteger(lastFomoTimeKey), 0)
329341 let lastFomoPlayer = valueOrElse(getString(lastFomoPlayerKey), "")
330342 let currLotteryJackpot = valueOrElse(getInteger(currLotteryJackpotKey), 0)
331343 let nextLotteryJackpot = valueOrElse(getInteger(nextLotteryJackpotKey), 0)
332344 let finishKey = keyCommit(userAddrOpt)
333345 let guessKey = keyGuess(userAddrOpt)
334346 let guess = valueOrElse(getInteger(guessKey), -1)
335347 let finishBlock = valueOrElse(getInteger(finishKey), -1)
336348 $Tuple2(nil, [("%s%d__gorcAvailToClaim__" + toString(userAmount)), ("%s%d__currFomoJackpotAmount__" + toString(currFomoJackpot)), ("%s%d__nextFomoJackpotAmount__" + toString(nextFomoJackpot)), ("%s%d__currLotteryJackpotAmount__" + toString(currLotteryJackpot)), ("%s%d__nextLotteryJackpotAmount__" + toString(nextLotteryJackpot)), ("%s%d__lastFomoTime__" + toString(lastFomoTime)), ("%s%s__lastFomoPlayer__" + lastFomoPlayer), ("%s%d__amountLeftTotal__" + toString(amountLeftTotal)), ("%s%d__finishBlock__" + toString(finishBlock)), ("%s%d__guess__" + toString(guess))])
337349 }
338350
339351
340352
341353 @Callable(i)
342354 func walletInfoREADONLY (userAddressOpt) = $Tuple2(nil, walletInternal(userAddressOpt))
343355
344356

github/deemru/w8io/169f3d6 
42.72 ms