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:AAIFAAAAAAAAAAwIAhIDCgEIEgMKAQgAAAAPAAAAAAZjYXNpbm8CAAAAIzNNdGFDTDR2MWJqVGFiVXFzN29VNG9mUzhmYmFpMzRXTTFpAAAAAAVXQVZFUwAAAAAAO5rKAAAAAAAGbWF4QmV0CQAAaAAAAAIAAAAAAAAAAGQFAAAABVdBVkVTAAAAAAlzZXBhcmF0b3ICAAAAASwBAAAACmdldE5ld0RlY2sAAAAACQAETAAAAAICAAAAAzAxQwkABEwAAAACAgAAAAMwMkMJAARMAAAAAgIAAAADMDNDCQAETAAAAAICAAAAAzA0QwkABEwAAAACAgAAAAMwNUMJAARMAAAAAgIAAAADMDZDCQAETAAAAAICAAAAAzA3QwkABEwAAAACAgAAAAMwOEMJAARMAAAAAgIAAAADMDlDCQAETAAAAAICAAAAAzEwQwkABEwAAAACAgAAAAMxMUMJAARMAAAAAgIAAAADMTJDCQAETAAAAAICAAAAAzEzQwkABEwAAAACAgAAAAMwMUQJAARMAAAAAgIAAAADMDJECQAETAAAAAICAAAAAzAzRAkABEwAAAACAgAAAAMwNEQJAARMAAAAAgIAAAADMDVECQAETAAAAAICAAAAAzA2RAkABEwAAAACAgAAAAMwN0QJAARMAAAAAgIAAAADMDhECQAETAAAAAICAAAAAzA5RAkABEwAAAACAgAAAAMxMEQJAARMAAAAAgIAAAADMTFECQAETAAAAAICAAAAAzEyRAkABEwAAAACAgAAAAMxM0QJAARMAAAAAgIAAAADMDFICQAETAAAAAICAAAAAzAySAkABEwAAAACAgAAAAMwM0gJAARMAAAAAgIAAAADMDRICQAETAAAAAICAAAAAzA1SAkABEwAAAACAgAAAAMwNkgJAARMAAAAAgIAAAADMDdICQAETAAAAAICAAAAAzA4SAkABEwAAAACAgAAAAMwOUgJAARMAAAAAgIAAAADMTBICQAETAAAAAICAAAAAzExSAkABEwAAAACAgAAAAMxMkgJAARMAAAAAgIAAAADMTNICQAETAAAAAICAAAAAzAxUwkABEwAAAACAgAAAAMwMlMJAARMAAAAAgIAAAADMDNTCQAETAAAAAICAAAAAzA0UwkABEwAAAACAgAAAAMwNVMJAARMAAAAAgIAAAADMDZTCQAETAAAAAICAAAAAzA3UwkABEwAAAACAgAAAAMwOFMJAARMAAAAAgIAAAADMDlTCQAETAAAAAICAAAAAzEwUwkABEwAAAACAgAAAAMxMVMJAARMAAAAAgIAAAADMTJTCQAETAAAAAICAAAAAzEzUwUAAAADbmlsAQAAAA5nZXRTaXhOZXdEZWNrcwAAAAAJAAROAAAAAgkABE4AAAACCQAETgAAAAIJAAROAAAAAgkABE4AAAACCQEAAAAKZ2V0TmV3RGVjawAAAAAJAQAAAApnZXROZXdEZWNrAAAAAAkBAAAACmdldE5ld0RlY2sAAAAACQEAAAAKZ2V0TmV3RGVjawAAAAAJAQAAAApnZXROZXdEZWNrAAAAAAkBAAAACmdldE5ld0RlY2sAAAAAAQAAAAdnZXREZWNrAAAAAQAAAARkZWNrAwkAAGcAAAACAAAAAAAAAAAACQABkAAAAAEFAAAABGRlY2sJAQAAAA5nZXRTaXhOZXdEZWNrcwAAAAAFAAAABGRlY2sBAAAAD2dldFJhbmRvb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gcJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgUAAAALd2l0aGRyYXdLZXkJAAGkAAAAAQkAAGgAAAACBQAAAAljdXJTdW1CZXQAAAAAAAAAAAIJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyCQAAaAAAAAIFAAAACWN1clN1bUJldAAAAAAAAAAAAgUAAAAEdW5pdAUAAAADbmlsCQAAAgAAAAECAAAAFllvdSBhcmUgbm90IHRoZSB3aW5uZXIAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleWa4p/Q=", "height": 1817207, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CFjykDMG8FCTwWJmxrjZ7fysznqBTGFoi9Ma1K6ktVYs Next: gKLz3t98YNuYEomLykmuxyFCRVjBJYWnVfe1SFyg4e6 Diff:
Old | New | Differences | |
---|---|---|---|
9 | 9 | ||
10 | 10 | let separator = "," | |
11 | 11 | ||
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 | + | ||
12 | 49 | func getPayment (i) = if ((size(i.payments) == 0)) | |
13 | 50 | then throw("Payment must be attached") | |
14 | 51 | else { | |
19 | 56 | } | |
20 | 57 | ||
21 | 58 | ||
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 | + | } | |
28 | 92 | ||
29 | 93 | ||
30 | 94 | @Callable(i) | |
31 | - | func | |
95 | + | func bet1 (round) = { | |
32 | 96 | let callerAddress = toBase58String(i.caller.bytes) | |
33 | 97 | let p = getPayment(i) | |
34 | - | let curSumBets = getAmountOrZero( | |
35 | - | let currentDraws = match getInteger( | |
98 | + | let curSumBets = getAmountOrZero(this, (round + "_sumBets")) | |
99 | + | let currentDraws = match getInteger(this, (round + "_drawSequence")) { | |
36 | 100 | case a: Int => | |
37 | 101 | (a + 1) | |
38 | 102 | case _ => | |
39 | 103 | 0 | |
40 | 104 | } | |
41 | - | let currentPlayer = match getString( | |
105 | + | let currentPlayer = match getString(this, (round + "_player")) { | |
42 | 106 | case a: String => | |
43 | 107 | a | |
44 | 108 | case _ => | |
45 | 109 | unit | |
46 | 110 | } | |
47 | - | let initialBet = match getInteger( | |
111 | + | let initialBet = match getInteger(this, (round + "_initialBet")) { | |
48 | 112 | case a: Int => | |
49 | 113 | a | |
50 | 114 | case _ => | |
52 | 116 | } | |
53 | 117 | let availableProp = (round + "_available") | |
54 | 118 | 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))) | |
57 | 122 | 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 | + | } | |
59 | 148 | } | |
60 | 149 | ||
61 | 150 | ||
62 | 151 | ||
63 | 152 | @Callable(i) | |
64 | - | func | |
153 | + | func withdraw1 (round) = { | |
65 | 154 | 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 | + | } | |
67 | 176 | } | |
68 | 177 | ||
69 | 178 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let casino = "3MtaCL4v1bjTabUqs7oU4ofS8fbai34WM1i" | |
5 | 5 | ||
6 | 6 | let WAVES = 1000000000 | |
7 | 7 | ||
8 | 8 | let maxBet = (100 * WAVES) | |
9 | 9 | ||
10 | 10 | let separator = "," | |
11 | 11 | ||
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 | + | ||
12 | 49 | func getPayment (i) = if ((size(i.payments) == 0)) | |
13 | 50 | then throw("Payment must be attached") | |
14 | 51 | else { | |
15 | 52 | let pmt = i.payments[0] | |
16 | 53 | if (isDefined(pmt.assetId)) | |
17 | 54 | then throw("This function accepts WAVES tokens only") | |
18 | 55 | else pmt.amount | |
19 | 56 | } | |
20 | 57 | ||
21 | 58 | ||
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 | + | } | |
28 | 92 | ||
29 | 93 | ||
30 | 94 | @Callable(i) | |
31 | - | func | |
95 | + | func bet1 (round) = { | |
32 | 96 | let callerAddress = toBase58String(i.caller.bytes) | |
33 | 97 | let p = getPayment(i) | |
34 | - | let curSumBets = getAmountOrZero( | |
35 | - | let currentDraws = match getInteger( | |
98 | + | let curSumBets = getAmountOrZero(this, (round + "_sumBets")) | |
99 | + | let currentDraws = match getInteger(this, (round + "_drawSequence")) { | |
36 | 100 | case a: Int => | |
37 | 101 | (a + 1) | |
38 | 102 | case _ => | |
39 | 103 | 0 | |
40 | 104 | } | |
41 | - | let currentPlayer = match getString( | |
105 | + | let currentPlayer = match getString(this, (round + "_player")) { | |
42 | 106 | case a: String => | |
43 | 107 | a | |
44 | 108 | case _ => | |
45 | 109 | unit | |
46 | 110 | } | |
47 | - | let initialBet = match getInteger( | |
111 | + | let initialBet = match getInteger(this, (round + "_initialBet")) { | |
48 | 112 | case a: Int => | |
49 | 113 | a | |
50 | 114 | case _ => | |
51 | 115 | p | |
52 | 116 | } | |
53 | 117 | let availableProp = (round + "_available") | |
54 | 118 | 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))) | |
57 | 122 | 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 | + | } | |
59 | 148 | } | |
60 | 149 | ||
61 | 150 | ||
62 | 151 | ||
63 | 152 | @Callable(i) | |
64 | - | func | |
153 | + | func withdraw1 (round) = { | |
65 | 154 | 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 | + | } | |
67 | 176 | } | |
68 | 177 | ||
69 | 178 | ||
70 | 179 | @Verifier(tx) | |
71 | 180 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
72 | 181 |
github/deemru/w8io/026f985 34.86 ms ◑