tx · Hwv93F4KHrHoX69TjzAgDaQxAp6PjdBd9By2tvbVfv7k

3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd:  -0.10000001 Waves

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

{ "type": 13, "id": "Hwv93F4KHrHoX69TjzAgDaQxAp6PjdBd9By2tvbVfv7k", "fee": 10000001, "feeAssetId": null, "timestamp": 1638481217787, "version": 2, "chainId": 84, "sender": "3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd", "senderPublicKey": "7Hi4o6vBstRs79NMVMjEove52dmP87RAcvNDAXN8C4Wi", "proofs": [ "59ArfZudZGRcThpRk814G8ZwSyGs5iEhpGFQW5ibQM71i6LGznsXoXT8nwtRxQXrvQso6kaGdbCuaVsSsY48cYAL" ], "script": "base64:AAIFAAAAAAAAAAwIAhIDCgEIEgMKAQgAAAAPAAAAAAZjYXNpbm8CAAAAIzNNdGFDTDR2MWJqVGFiVXFzN29VNG9mUzhmYmFpMzRXTTFpAAAAAAVXQVZFUwAAAAAAO5rKAAAAAAAGbWF4QmV0CQAAaAAAAAIAAAAAAAAAAGQFAAAABVdBVkVTAAAAAAlzZXBhcmF0b3ICAAAAASwBAAAACmdldE5ld0RlY2sAAAAACQAETAAAAAICAAAAAzAxQwkABEwAAAACAgAAAAMwMkMJAARMAAAAAgIAAAADMDNDCQAETAAAAAICAAAAAzA0QwkABEwAAAACAgAAAAMwNUMJAARMAAAAAgIAAAADMDZDCQAETAAAAAICAAAAAzA3QwkABEwAAAACAgAAAAMwOEMJAARMAAAAAgIAAAADMDlDCQAETAAAAAICAAAAAzEwQwkABEwAAAACAgAAAAMxMUMJAARMAAAAAgIAAAADMTJDCQAETAAAAAICAAAAAzEzQwkABEwAAAACAgAAAAMwMUQJAARMAAAAAgIAAAADMDJECQAETAAAAAICAAAAAzAzRAkABEwAAAACAgAAAAMwNEQJAARMAAAAAgIAAAADMDVECQAETAAAAAICAAAAAzA2RAkABEwAAAACAgAAAAMwN0QJAARMAAAAAgIAAAADMDhECQAETAAAAAICAAAAAzA5RAkABEwAAAACAgAAAAMxMEQJAARMAAAAAgIAAAADMTFECQAETAAAAAICAAAAAzEyRAkABEwAAAACAgAAAAMxM0QJAARMAAAAAgIAAAADMDFICQAETAAAAAICAAAAAzAySAkABEwAAAACAgAAAAMwM0gJAARMAAAAAgIAAAADMDRICQAETAAAAAICAAAAAzA1SAkABEwAAAACAgAAAAMwNkgJAARMAAAAAgIAAAADMDdICQAETAAAAAICAAAAAzA4SAkABEwAAAACAgAAAAMwOUgJAARMAAAAAgIAAAADMTBICQAETAAAAAICAAAAAzExSAkABEwAAAACAgAAAAMxMkgJAARMAAAAAgIAAAADMTNICQAETAAAAAICAAAAAzAxUwkABEwAAAACAgAAAAMwMlMJAARMAAAAAgIAAAADMDNTCQAETAAAAAICAAAAAzA0UwkABEwAAAACAgAAAAMwNVMJAARMAAAAAgIAAAADMDZTCQAETAAAAAICAAAAAzA3UwkABEwAAAACAgAAAAMwOFMJAARMAAAAAgIAAAADMDlTCQAETAAAAAICAAAAAzEwUwkABEwAAAACAgAAAAMxMVMJAARMAAAAAgIAAAADMTJTCQAETAAAAAICAAAAAzEzUwUAAAADbmlsAQAAAA5nZXRTaXhOZXdEZWNrcwAAAAAJAAROAAAAAgkABE4AAAACCQAETgAAAAIJAAROAAAAAgkABE4AAAACCQEAAAAKZ2V0TmV3RGVjawAAAAAJAQAAAApnZXROZXdEZWNrAAAAAAkBAAAACmdldE5ld0RlY2sAAAAACQEAAAAKZ2V0TmV3RGVjawAAAAAJAQAAAApnZXROZXdEZWNrAAAAAAkBAAAACmdldE5ld0RlY2sAAAAAAQAAAAdnZXREZWNrAAAAAQAAAARkZWNrAwkAAGcAAAACAAAAAAAAAAAACQABkAAAAAEFAAAABGRlY2sJAQAAAA5nZXRTaXhOZXdEZWNrcwAAAAAFAAAABGRlY2sBAAAAD2dldFJhbmRv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cgcJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgUAAAALd2l0aGRyYXdLZXkJAAGkAAAAAQkAAGgAAAACBQAAAAljdXJTdW1CZXQAAAAAAAAAAAIJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyCQAAaAAAAAIFAAAACWN1clN1bUJldAAAAAAAAAAAAgUAAAAEdW5pdAUAAAADbmlsCQAAAgAAAAECAAAAFllvdSBhcmUgbm90IHRoZSB3aW5uZXIAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleWa4p/Q=", "height": 1817207, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CFjykDMG8FCTwWJmxrjZ7fysznqBTGFoi9Ma1K6ktVYs Next: gKLz3t98YNuYEomLykmuxyFCRVjBJYWnVfe1SFyg4e6 Diff:
OldNewDifferences
99
1010 let separator = ","
1111
12+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"]
13+
14+
15+func getSixNewDecks () = (((((getNewDeck() ++ getNewDeck()) ++ getNewDeck()) ++ getNewDeck()) ++ getNewDeck()) ++ getNewDeck())
16+
17+
18+func getDeck (deck) = if ((0 >= size(deck)))
19+ then getSixNewDecks()
20+ else deck
21+
22+
23+func getRandomNumber (salt1,salt2,answersCount) = {
24+ let hash = sha256(toBytes((salt1 + salt2)))
25+ let index = toInt(hash)
26+ let rand = (index % answersCount)
27+ if ((0 > rand))
28+ then ((-1 * rand) + 1)
29+ else (rand + 1)
30+ }
31+
32+
33+func getPreviousRandomNumber (address) = match getInteger(this, (address + "_LastRandonNumber")) {
34+ case n: Int =>
35+ toString(n)
36+ case _ =>
37+ address
38+}
39+
40+
41+func getAmountOrZero (this,key) = match getInteger(this, key) {
42+ case a: Int =>
43+ a
44+ case _ =>
45+ 0
46+}
47+
48+
1249 func getPayment (i) = if ((size(i.payments) == 0))
1350 then throw("Payment must be attached")
1451 else {
1956 }
2057
2158
22-func getAmountOrZero (this,key) = match getInteger(this, key) {
23- case a: Int =>
24- a
25- case _ =>
26- 0
27-}
59+func getCardValue (stringCard) = {
60+ let p = parseIntValue(take(stringCard, 2))
61+ if ((p == 1))
62+ then 20
63+ else p
64+ }
65+
66+
67+func getWinner (cardPlayer,cardCasino,callerAddress,casino) = {
68+ let p = getCardValue(cardPlayer)
69+ let o = getCardValue(cardCasino)
70+ if ((p > o))
71+ then callerAddress
72+ else casino
73+ }
74+
75+
76+func getAvailableDeck (this,availableProp) = if (isDefined(getString(this, availableProp)))
77+ then {
78+ let stringDeck = getStringValue(this, availableProp)
79+ let deck = split(stringDeck, separator)
80+ getDeck(deck)
81+ }
82+ else getSixNewDecks()
83+
84+
85+func getPlayerCardAndPositionAndUpdateDeck (meKey,callerAddress,deck) = {
86+ let avDeck2 = getDeck(deck)
87+ let cardPosition = getRandomNumber(((meKey + makeString(avDeck2, separator)) + callerAddress), getPreviousRandomNumber(callerAddress), size(avDeck2))
88+ let card = avDeck2[(cardPosition % size(avDeck2))]
89+ let avDeck3 = removeByIndex(avDeck2, (cardPosition % size(avDeck2)))
90+ $Tuple3(card, cardPosition, avDeck3)
91+ }
2892
2993
3094 @Callable(i)
31-func bet2 (round) = {
95+func bet1 (round) = {
3296 let callerAddress = toBase58String(i.caller.bytes)
3397 let p = getPayment(i)
34- let curSumBets = getAmountOrZero(a8, (round + "_sumBets"))
35- let currentDraws = match getInteger(a8, (round + "_drawSequence")) {
98+ let curSumBets = getAmountOrZero(this, (round + "_sumBets"))
99+ let currentDraws = match getInteger(this, (round + "_drawSequence")) {
36100 case a: Int =>
37101 (a + 1)
38102 case _ =>
39103 0
40104 }
41- let currentPlayer = match getString(a8, (round + "_player")) {
105+ let currentPlayer = match getString(this, (round + "_player")) {
42106 case a: String =>
43107 a
44108 case _ =>
45109 unit
46110 }
47- let initialBet = match getInteger(a8, (round + "_initialBet")) {
111+ let initialBet = match getInteger(this, (round + "_initialBet")) {
48112 case a: Int =>
49113 a
50114 case _ =>
52116 }
53117 let availableProp = (round + "_available")
54118 let newSumBets = (curSumBets + p)
55- let aaa = getBoolean(a8, (round + "_stop"))
56- if (isDefined(aaa))
119+ if (if (isDefined(getBoolean(this, (round + "_stop"))))
120+ then true
121+ else isDefined(getString(this, round)))
57122 then throw("This round is already played")
58- else throw("bet2 finished all ok")
123+ else if (if (isDefined(getString(this, (round + "_player"))))
124+ then (currentPlayer != callerAddress)
125+ else false)
126+ then throw("This is not your game")
127+ else if ((newSumBets > maxBet))
128+ then throw(((("Maximum amount of bets for round " + toString(maxBet)) + ". With your bet it's ") + toString(newSumBets)))
129+ else if ((initialBet != p))
130+ then throw(((("Initial bet not maching original:" + toString(initialBet)) + ", actual:") + toString(p)))
131+ else {
132+ 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
141+ if ((getCardValue(cardPlayer) == getCardValue(cardCasino)))
142+ 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))]
143+ else {
144+ let winner = getWinner(cardPlayer, cardCasino, callerAddress, casino)
145+[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)]
146+ }
147+ }
59148 }
60149
61150
62151
63152 @Callable(i)
64-func withdraw2 (round) = {
153+func withdraw1 (round) = {
65154 let callerAddress = toBase58String(i.caller.bytes)
66- throw("called")
155+ let withdrawKey = (round + "_withdraw")
156+ if (isDefined(getString(this, withdrawKey)))
157+ then throw("You have already got your prize")
158+ else if (!(isDefined(getString(this, (round + "_winner")))))
159+ then throw("There is no winner, it was a draw")
160+ else {
161+ let winner = getStringValue(this, (round + "_winner"))
162+ let player = getStringValue(this, (round + "_player"))
163+ let curSumBet = getIntegerValue(this, (round + "_sumBets"))
164+ if ((curSumBet == 0))
165+ then throw("You won nothing this round")
166+ else if (if ((winner == callerAddress))
167+ then (winner == casino)
168+ else false)
169+ then [StringEntry(withdrawKey, toString(curSumBet)), ScriptTransfer(i.caller, curSumBet, unit)]
170+ else if (if ((winner == callerAddress))
171+ then (winner == player)
172+ else false)
173+ then [StringEntry(withdrawKey, toString((curSumBet * 2))), ScriptTransfer(i.caller, (curSumBet * 2), unit)]
174+ else throw("You are not the winner")
175+ }
67176 }
68177
69178
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
12+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"]
13+
14+
15+func getSixNewDecks () = (((((getNewDeck() ++ getNewDeck()) ++ getNewDeck()) ++ getNewDeck()) ++ getNewDeck()) ++ getNewDeck())
16+
17+
18+func getDeck (deck) = if ((0 >= size(deck)))
19+ then getSixNewDecks()
20+ else deck
21+
22+
23+func getRandomNumber (salt1,salt2,answersCount) = {
24+ let hash = sha256(toBytes((salt1 + salt2)))
25+ let index = toInt(hash)
26+ let rand = (index % answersCount)
27+ if ((0 > rand))
28+ then ((-1 * rand) + 1)
29+ else (rand + 1)
30+ }
31+
32+
33+func getPreviousRandomNumber (address) = match getInteger(this, (address + "_LastRandonNumber")) {
34+ case n: Int =>
35+ toString(n)
36+ case _ =>
37+ address
38+}
39+
40+
41+func getAmountOrZero (this,key) = match getInteger(this, key) {
42+ case a: Int =>
43+ a
44+ case _ =>
45+ 0
46+}
47+
48+
1249 func getPayment (i) = if ((size(i.payments) == 0))
1350 then throw("Payment must be attached")
1451 else {
1552 let pmt = i.payments[0]
1653 if (isDefined(pmt.assetId))
1754 then throw("This function accepts WAVES tokens only")
1855 else pmt.amount
1956 }
2057
2158
22-func getAmountOrZero (this,key) = match getInteger(this, key) {
23- case a: Int =>
24- a
25- case _ =>
26- 0
27-}
59+func getCardValue (stringCard) = {
60+ let p = parseIntValue(take(stringCard, 2))
61+ if ((p == 1))
62+ then 20
63+ else p
64+ }
65+
66+
67+func getWinner (cardPlayer,cardCasino,callerAddress,casino) = {
68+ let p = getCardValue(cardPlayer)
69+ let o = getCardValue(cardCasino)
70+ if ((p > o))
71+ then callerAddress
72+ else casino
73+ }
74+
75+
76+func getAvailableDeck (this,availableProp) = if (isDefined(getString(this, availableProp)))
77+ then {
78+ let stringDeck = getStringValue(this, availableProp)
79+ let deck = split(stringDeck, separator)
80+ getDeck(deck)
81+ }
82+ else getSixNewDecks()
83+
84+
85+func getPlayerCardAndPositionAndUpdateDeck (meKey,callerAddress,deck) = {
86+ let avDeck2 = getDeck(deck)
87+ let cardPosition = getRandomNumber(((meKey + makeString(avDeck2, separator)) + callerAddress), getPreviousRandomNumber(callerAddress), size(avDeck2))
88+ let card = avDeck2[(cardPosition % size(avDeck2))]
89+ let avDeck3 = removeByIndex(avDeck2, (cardPosition % size(avDeck2)))
90+ $Tuple3(card, cardPosition, avDeck3)
91+ }
2892
2993
3094 @Callable(i)
31-func bet2 (round) = {
95+func bet1 (round) = {
3296 let callerAddress = toBase58String(i.caller.bytes)
3397 let p = getPayment(i)
34- let curSumBets = getAmountOrZero(a8, (round + "_sumBets"))
35- let currentDraws = match getInteger(a8, (round + "_drawSequence")) {
98+ let curSumBets = getAmountOrZero(this, (round + "_sumBets"))
99+ let currentDraws = match getInteger(this, (round + "_drawSequence")) {
36100 case a: Int =>
37101 (a + 1)
38102 case _ =>
39103 0
40104 }
41- let currentPlayer = match getString(a8, (round + "_player")) {
105+ let currentPlayer = match getString(this, (round + "_player")) {
42106 case a: String =>
43107 a
44108 case _ =>
45109 unit
46110 }
47- let initialBet = match getInteger(a8, (round + "_initialBet")) {
111+ let initialBet = match getInteger(this, (round + "_initialBet")) {
48112 case a: Int =>
49113 a
50114 case _ =>
51115 p
52116 }
53117 let availableProp = (round + "_available")
54118 let newSumBets = (curSumBets + p)
55- let aaa = getBoolean(a8, (round + "_stop"))
56- if (isDefined(aaa))
119+ if (if (isDefined(getBoolean(this, (round + "_stop"))))
120+ then true
121+ else isDefined(getString(this, round)))
57122 then throw("This round is already played")
58- else throw("bet2 finished all ok")
123+ else if (if (isDefined(getString(this, (round + "_player"))))
124+ then (currentPlayer != callerAddress)
125+ else false)
126+ then throw("This is not your game")
127+ else if ((newSumBets > maxBet))
128+ then throw(((("Maximum amount of bets for round " + toString(maxBet)) + ". With your bet it's ") + toString(newSumBets)))
129+ else if ((initialBet != p))
130+ then throw(((("Initial bet not maching original:" + toString(initialBet)) + ", actual:") + toString(p)))
131+ else {
132+ 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
141+ if ((getCardValue(cardPlayer) == getCardValue(cardCasino)))
142+ 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))]
143+ else {
144+ let winner = getWinner(cardPlayer, cardCasino, callerAddress, casino)
145+[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)]
146+ }
147+ }
59148 }
60149
61150
62151
63152 @Callable(i)
64-func withdraw2 (round) = {
153+func withdraw1 (round) = {
65154 let callerAddress = toBase58String(i.caller.bytes)
66- throw("called")
155+ let withdrawKey = (round + "_withdraw")
156+ if (isDefined(getString(this, withdrawKey)))
157+ then throw("You have already got your prize")
158+ else if (!(isDefined(getString(this, (round + "_winner")))))
159+ then throw("There is no winner, it was a draw")
160+ else {
161+ let winner = getStringValue(this, (round + "_winner"))
162+ let player = getStringValue(this, (round + "_player"))
163+ let curSumBet = getIntegerValue(this, (round + "_sumBets"))
164+ if ((curSumBet == 0))
165+ then throw("You won nothing this round")
166+ else if (if ((winner == callerAddress))
167+ then (winner == casino)
168+ else false)
169+ then [StringEntry(withdrawKey, toString(curSumBet)), ScriptTransfer(i.caller, curSumBet, unit)]
170+ else if (if ((winner == callerAddress))
171+ then (winner == player)
172+ else false)
173+ then [StringEntry(withdrawKey, toString((curSumBet * 2))), ScriptTransfer(i.caller, (curSumBet * 2), unit)]
174+ else throw("You are not the winner")
175+ }
67176 }
68177
69178
70179 @Verifier(tx)
71180 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
72181

github/deemru/w8io/026f985 
34.86 ms