tx · gKLz3t98YNuYEomLykmuxyFCRVjBJYWnVfe1SFyg4e6

3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd:  -0.10001000 Waves

2021.12.03 00:40 [1817207] smart account 3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd > SELF 0.00000000 Waves

{ "type": 13, "id": "gKLz3t98YNuYEomLykmuxyFCRVjBJYWnVfe1SFyg4e6", "fee": 10001000, "feeAssetId": null, "timestamp": 1638481275971, "version": 2, "chainId": 84, "sender": "3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd", "senderPublicKey": "7Hi4o6vBstRs79NMVMjEove52dmP87RAcvNDAXN8C4Wi", "proofs": [ "3r55Jr5dgJJd5g3QGhpesyHomkofUZkER2EsEBmFLEDDvCtbguvzYUweyKJqyke8NCFAi52wiwddJSUyxrVJFmBK" ], "script": "base64:AAIFAAAAAAAAAAwIAhIDCgEIEgMKAQgAAAAPAAAAAAZjYXNpbm8CAAAAIzNNdGFDTDR2MWJqVGFiVXFzN29VNG9mUzhmYmFpMzRXTTFpAAAAAAVXQVZFUwAAAAAAO5rKAAAAAAAGbWF4QmV0CQAAaAAAAAIAAAAAAAAAAGQFAAAABVdBVkVTAAAAAAlzZXBhcmF0b3ICAAAAASwBAAAACmdldE5ld0RlY2sAAAAACQAETAAAAAICAAAAAzAxQwkABEwAAAACAgAAAAMwMkMJAARMAAAAAgIAAAADMDNDCQAETAAAAAICAAAAAzA0QwkABEwAAAACAgAAAAMwNUMJAARMAAAAAgIAAAADMDZDCQAETAAAAAICAAAAAzA3QwkABEwAAAACAgAAAAMwOEMJAARMAAAAAgIAAAADMDlDCQAETAAAAAICAAAAAzEwQwkABEwAAAACAgAAAAMxMUMJAARMAAAAAgIAAAADMTJDCQAETAAAAAICAAAAAzEzQwkABEwAAAACAgAAAAMwMUQJAARMAAAAAgIAAAADMDJECQAETAAAAAICAAAAAzAzRAkABEwAAAACAgAAAAMwNEQJAARMAAAAAgIAAAADMDVECQAETAAAAAICAAAAAzA2RAkABEwAAAACAgAAAAMwN0QJAARMAAAAAgIAAAADMDhECQAETAAAAAICAAAAAzA5RAkABEwAAAACAgAAAAMxMEQJAARMAAAAAgIAAAADMTFECQAETAAAAAICAAAAAzEyRAkABEwAAAACAgAAAAMxM0QJAARMAAAAAgIAAAADMDFICQAETAAAAAICAAAAAzAySAkABEwAAAACAgAAAAMwM0gJAARMAAAAAgIAAAADMDRICQAETAAAAAICAAAAAzA1SAkABEwAAAACAgAAAAMwNkgJAARMAAAAAgIAAAADMDdICQAETAAAAAICAAAAAzA4SAkABEwAAAACAgAAAAMwOUgJAARMAAAAAgIAAAADMTBICQAETAAAAAICAAAAAzExSAkABEwAAAACAgAAAAMxMkgJAARMAAAAAgIAAAADMTNICQAETAAAAAICAAAAAzAxUwkABEwAAAACAgAAAAMwMlMJAARMAAAAAgIAAAADMDNTCQAETAAAAAICAAAAAzA0UwkABEwAAAACAgAAAAMwNVMJAARMAAAAAgIAAAADMDZTCQAETAAAAAICAAAAAzA3UwkABEwAAAACAgAAAAMwOFMJAARMAAAAAgIAAAADMDlTCQAETAAAAAICAAAAAzEwUwkABEwAAAACAgAAAAMxMVMJAARMAAAAAgIAAAADMTJTCQAETAAAAAICAAAAAzEzUwUAAAADbmlsAQAAAA5nZXRTaXhOZXdEZWNrcwAAAAAJAAROAAAAAgkABE4AAAACCQAETgAAAAIJAAROAAAAAgkABE4AAAACCQEAAAAKZ2V0TmV3RGVjawAAAAAJAQAAAApnZXROZXdEZWNrAAAAAAkBAAAACmdldE5ld0RlY2sAAAAACQEAAAAKZ2V0TmV3RGVjawAAAAAJAQAAAApnZXROZXdEZWNrAAAAAAkBAAAACmdldE5ld0RlY2sAAAAAAQAAAAdnZXREZWNrAAAAAQAAAARkZWNrAwkAAGcAAAACAAAAAAAAAAAACQABkAAAAAEFAAAABGRlY2sJAQAAAA5nZXRTaXhOZXdEZWNrcwAAAAAFAAAABGRlY2sBAAAAD2dldFJhbmRvbU51bW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XIHCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIFAAAAC3dpdGhkcmF3S2V5CQABpAAAAAEJAABoAAAAAgUAAAAJY3VyU3VtQmV0AAAAAAAAAAACCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgkAAGgAAAACBQAAAAljdXJTdW1CZXQAAAAAAAAAAAIFAAAABHVuaXQFAAAAA25pbAkAAAIAAAABAgAAABZZb3UgYXJlIG5vdCB0aGUgd2lubmVyAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXlVzz6v", "height": 1817207, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Hwv93F4KHrHoX69TjzAgDaQxAp6PjdBd9By2tvbVfv7k Next: Am5TaC7gE7jspn9i27Yho2cngGoGpPHrQr2qvLynDEMH Diff:
OldNewDifferences
9292
9393
9494 @Callable(i)
95-func bet1 (round) = {
95+func bet (round) = {
9696 let callerAddress = toBase58String(i.caller.bytes)
9797 let p = getPayment(i)
9898 let curSumBets = getAmountOrZero(this, (round + "_sumBets"))
130130 then throw(((("Initial bet not maching original:" + toString(initialBet)) + ", actual:") + toString(p)))
131131 else {
132132 let avDeck = getAvailableDeck(this, availableProp)
133- let $t039564071 = getPlayerCardAndPositionAndUpdateDeck(round, callerAddress, avDeck)
134- let cardPlayer = $t039564071._1
135- let cardPositionPlayer = $t039564071._2
136- let avDeck1 = $t039564071._3
137- let $t040764192 = getPlayerCardAndPositionAndUpdateDeck(round, callerAddress, avDeck1)
138- let cardCasino = $t040764192._1
139- let cardPositionCasino = $t040764192._2
140- let avDeck2 = $t040764192._3
133+ let $t039554070 = getPlayerCardAndPositionAndUpdateDeck(round, callerAddress, avDeck)
134+ let cardPlayer = $t039554070._1
135+ let cardPositionPlayer = $t039554070._2
136+ let avDeck1 = $t039554070._3
137+ let $t040754191 = getPlayerCardAndPositionAndUpdateDeck(round, callerAddress, avDeck1)
138+ let cardCasino = $t040754191._1
139+ let cardPositionCasino = $t040754191._2
140+ let avDeck2 = $t040754191._3
141141 if ((getCardValue(cardPlayer) == getCardValue(cardCasino)))
142142 then [StringEntry(availableProp, makeString(avDeck2, separator)), StringEntry((round + "_player"), callerAddress), IntegerEntry((round + "_initialBet"), initialBet), StringEntry((round + "_salt_debug"), round), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), IntegerEntry((round + "_sumBets"), newSumBets), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_drawSequence"), (currentDraws + 1))]
143143 else {
150150
151151
152152 @Callable(i)
153-func withdraw1 (round) = {
153+func withdraw (round) = {
154154 let callerAddress = toBase58String(i.caller.bytes)
155155 let withdrawKey = (round + "_withdraw")
156156 if (isDefined(getString(this, withdrawKey)))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let casino = "3MtaCL4v1bjTabUqs7oU4ofS8fbai34WM1i"
55
66 let WAVES = 1000000000
77
88 let maxBet = (100 * WAVES)
99
1010 let separator = ","
1111
1212 func getNewDeck () = ["01C", "02C", "03C", "04C", "05C", "06C", "07C", "08C", "09C", "10C", "11C", "12C", "13C", "01D", "02D", "03D", "04D", "05D", "06D", "07D", "08D", "09D", "10D", "11D", "12D", "13D", "01H", "02H", "03H", "04H", "05H", "06H", "07H", "08H", "09H", "10H", "11H", "12H", "13H", "01S", "02S", "03S", "04S", "05S", "06S", "07S", "08S", "09S", "10S", "11S", "12S", "13S"]
1313
1414
1515 func getSixNewDecks () = (((((getNewDeck() ++ getNewDeck()) ++ getNewDeck()) ++ getNewDeck()) ++ getNewDeck()) ++ getNewDeck())
1616
1717
1818 func getDeck (deck) = if ((0 >= size(deck)))
1919 then getSixNewDecks()
2020 else deck
2121
2222
2323 func getRandomNumber (salt1,salt2,answersCount) = {
2424 let hash = sha256(toBytes((salt1 + salt2)))
2525 let index = toInt(hash)
2626 let rand = (index % answersCount)
2727 if ((0 > rand))
2828 then ((-1 * rand) + 1)
2929 else (rand + 1)
3030 }
3131
3232
3333 func getPreviousRandomNumber (address) = match getInteger(this, (address + "_LastRandonNumber")) {
3434 case n: Int =>
3535 toString(n)
3636 case _ =>
3737 address
3838 }
3939
4040
4141 func getAmountOrZero (this,key) = match getInteger(this, key) {
4242 case a: Int =>
4343 a
4444 case _ =>
4545 0
4646 }
4747
4848
4949 func getPayment (i) = if ((size(i.payments) == 0))
5050 then throw("Payment must be attached")
5151 else {
5252 let pmt = i.payments[0]
5353 if (isDefined(pmt.assetId))
5454 then throw("This function accepts WAVES tokens only")
5555 else pmt.amount
5656 }
5757
5858
5959 func getCardValue (stringCard) = {
6060 let p = parseIntValue(take(stringCard, 2))
6161 if ((p == 1))
6262 then 20
6363 else p
6464 }
6565
6666
6767 func getWinner (cardPlayer,cardCasino,callerAddress,casino) = {
6868 let p = getCardValue(cardPlayer)
6969 let o = getCardValue(cardCasino)
7070 if ((p > o))
7171 then callerAddress
7272 else casino
7373 }
7474
7575
7676 func getAvailableDeck (this,availableProp) = if (isDefined(getString(this, availableProp)))
7777 then {
7878 let stringDeck = getStringValue(this, availableProp)
7979 let deck = split(stringDeck, separator)
8080 getDeck(deck)
8181 }
8282 else getSixNewDecks()
8383
8484
8585 func getPlayerCardAndPositionAndUpdateDeck (meKey,callerAddress,deck) = {
8686 let avDeck2 = getDeck(deck)
8787 let cardPosition = getRandomNumber(((meKey + makeString(avDeck2, separator)) + callerAddress), getPreviousRandomNumber(callerAddress), size(avDeck2))
8888 let card = avDeck2[(cardPosition % size(avDeck2))]
8989 let avDeck3 = removeByIndex(avDeck2, (cardPosition % size(avDeck2)))
9090 $Tuple3(card, cardPosition, avDeck3)
9191 }
9292
9393
9494 @Callable(i)
95-func bet1 (round) = {
95+func bet (round) = {
9696 let callerAddress = toBase58String(i.caller.bytes)
9797 let p = getPayment(i)
9898 let curSumBets = getAmountOrZero(this, (round + "_sumBets"))
9999 let currentDraws = match getInteger(this, (round + "_drawSequence")) {
100100 case a: Int =>
101101 (a + 1)
102102 case _ =>
103103 0
104104 }
105105 let currentPlayer = match getString(this, (round + "_player")) {
106106 case a: String =>
107107 a
108108 case _ =>
109109 unit
110110 }
111111 let initialBet = match getInteger(this, (round + "_initialBet")) {
112112 case a: Int =>
113113 a
114114 case _ =>
115115 p
116116 }
117117 let availableProp = (round + "_available")
118118 let newSumBets = (curSumBets + p)
119119 if (if (isDefined(getBoolean(this, (round + "_stop"))))
120120 then true
121121 else isDefined(getString(this, round)))
122122 then throw("This round is already played")
123123 else if (if (isDefined(getString(this, (round + "_player"))))
124124 then (currentPlayer != callerAddress)
125125 else false)
126126 then throw("This is not your game")
127127 else if ((newSumBets > maxBet))
128128 then throw(((("Maximum amount of bets for round " + toString(maxBet)) + ". With your bet it's ") + toString(newSumBets)))
129129 else if ((initialBet != p))
130130 then throw(((("Initial bet not maching original:" + toString(initialBet)) + ", actual:") + toString(p)))
131131 else {
132132 let avDeck = getAvailableDeck(this, availableProp)
133- let $t039564071 = getPlayerCardAndPositionAndUpdateDeck(round, callerAddress, avDeck)
134- let cardPlayer = $t039564071._1
135- let cardPositionPlayer = $t039564071._2
136- let avDeck1 = $t039564071._3
137- let $t040764192 = getPlayerCardAndPositionAndUpdateDeck(round, callerAddress, avDeck1)
138- let cardCasino = $t040764192._1
139- let cardPositionCasino = $t040764192._2
140- let avDeck2 = $t040764192._3
133+ let $t039554070 = getPlayerCardAndPositionAndUpdateDeck(round, callerAddress, avDeck)
134+ let cardPlayer = $t039554070._1
135+ let cardPositionPlayer = $t039554070._2
136+ let avDeck1 = $t039554070._3
137+ let $t040754191 = getPlayerCardAndPositionAndUpdateDeck(round, callerAddress, avDeck1)
138+ let cardCasino = $t040754191._1
139+ let cardPositionCasino = $t040754191._2
140+ let avDeck2 = $t040754191._3
141141 if ((getCardValue(cardPlayer) == getCardValue(cardCasino)))
142142 then [StringEntry(availableProp, makeString(avDeck2, separator)), StringEntry((round + "_player"), callerAddress), IntegerEntry((round + "_initialBet"), initialBet), StringEntry((round + "_salt_debug"), round), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), IntegerEntry((round + "_sumBets"), newSumBets), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_drawSequence"), (currentDraws + 1))]
143143 else {
144144 let winner = getWinner(cardPlayer, cardCasino, callerAddress, casino)
145145 [StringEntry(availableProp, makeString(avDeck2, separator)), StringEntry((round + "_player"), callerAddress), IntegerEntry((round + "_initialBet"), initialBet), StringEntry((round + "_salt_debug"), round), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), IntegerEntry((round + "_sumBets"), newSumBets), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), BooleanEntry((round + "_stop"), true), StringEntry((round + "_winner"), winner)]
146146 }
147147 }
148148 }
149149
150150
151151
152152 @Callable(i)
153-func withdraw1 (round) = {
153+func withdraw (round) = {
154154 let callerAddress = toBase58String(i.caller.bytes)
155155 let withdrawKey = (round + "_withdraw")
156156 if (isDefined(getString(this, withdrawKey)))
157157 then throw("You have already got your prize")
158158 else if (!(isDefined(getString(this, (round + "_winner")))))
159159 then throw("There is no winner, it was a draw")
160160 else {
161161 let winner = getStringValue(this, (round + "_winner"))
162162 let player = getStringValue(this, (round + "_player"))
163163 let curSumBet = getIntegerValue(this, (round + "_sumBets"))
164164 if ((curSumBet == 0))
165165 then throw("You won nothing this round")
166166 else if (if ((winner == callerAddress))
167167 then (winner == casino)
168168 else false)
169169 then [StringEntry(withdrawKey, toString(curSumBet)), ScriptTransfer(i.caller, curSumBet, unit)]
170170 else if (if ((winner == callerAddress))
171171 then (winner == player)
172172 else false)
173173 then [StringEntry(withdrawKey, toString((curSumBet * 2))), ScriptTransfer(i.caller, (curSumBet * 2), unit)]
174174 else throw("You are not the winner")
175175 }
176176 }
177177
178178
179179 @Verifier(tx)
180180 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
181181

github/deemru/w8io/026f985 
39.35 ms