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:AAIFAAAAAAAAAAwIAhIDCgEIEgMKAQgAAAAPAAAAAAZjYXNpbm8CAAAAIzNNdGFDTDR2MWJqVGFiVXFzN29VNG9mUzhmYmFpMzRXTTFpAAAAAAVXQVZFUwAAAAAAO5rKAAAAAAAGbWF4QmV0CQAAaAAAAAIAAAAAAAAAAGQFAAAABVdBVkVTAAAAAAlzZXBhcmF0b3ICAAAAASwBAAAACmdldE5ld0RlY2sAAAAACQAETAAAAAICAAAAAzAxQwkABEwAAAACAgAAAAMwMkMJAARMAAAAAgIAAAADMDNDCQAETAAAAAICAAAAAzA0QwkABEwAAAACAgAAAAMwNUMJAARMAAAAAgIAAAADMDZDCQAETAAAAAICAAAAAzA3QwkABEwAAAACAgAAAAMwOEMJAARMAAAAAgIAAAADMDlDCQAETAAAAAICAAAAAzEwQwkABEwAAAACAgAAAAMxMUMJAARMAAAAAgIAAAADMTJDCQAETAAAAAICAAAAAzEzQwkABEwAAAACAgAAAAMwMUQJAARMAAAAAgIAAAADMDJECQAETAAAAAICAAAAAzAzRAkABEwAAAACAgAAAAMwNEQJAARMAAAAAgIAAAADMDVECQAETAAAAAICAAAAAzA2RAkABEwAAAACAgAAAAMwN0QJAARMAAAAAgIAAAADMDhECQAETAAAAAICAAAAAzA5RAkABEwAAAACAgAAAAMxMEQJAARMAAAAAgIAAAADMTFECQAETAAAAAICAAAAAzEyRAkABEwAAAACAgAAAAMxM0QJAARMAAAAAgIAAAADMDFICQAETAAAAAICAAAAAzAySAkABEwAAAACAgAAAAMwM0gJAARMAAAAAgIAAAADMDRICQAETAAAAAICAAAAAzA1SAkABEwAAAACAgAAAAMwNkgJAARMAAAAAgIAAAADMDdICQAETAAAAAICAAAAAzA4SAkABEwAAAACAgAAAAMwOUgJAARMAAAAAgIAAAADMTBICQAETAAAAAICAAAAAzExSAkABEwAAAACAgAAAAMxMkgJAARMAAAAAgIAAAADMTNICQAETAAAAAICAAAAAzAxUwkABEwAAAACAgAAAAMwMlMJAARMAAAAAgIAAAADMDNTCQAETAAAAAICAAAAAzA0UwkABEwAAAACAgAAAAMwNVMJAARMAAAAAgIAAAADMDZTCQAETAAAAAICAAAAAzA3UwkABEwAAAACAgAAAAMwOFMJAARMAAAAAgIAAAADMDlTCQAETAAAAAICAAAAAzEwUwkABEwAAAACAgAAAAMxMVMJAARMAAAAAgIAAAADMTJTCQAETAAAAAICAAAAAzEzUwUAAAADbmlsAQAAAA5nZXRTaXhOZXdEZWNrcwAAAAAJAAROAAAAAgkABE4AAAACCQAETgAAAAIJAAROAAAAAgkABE4AAAACCQEAAAAKZ2V0TmV3RGVjawAAAAAJAQAAAApnZXROZXdEZWNrAAAAAAkBAAAACmdldE5ld0RlY2sAAAAACQEAAAAKZ2V0TmV3RGVjawAAAAAJAQAAAApnZXROZXdEZWNrAAAAAAkBAAAACmdldE5ld0RlY2sAAAAAAQAAAAdnZXREZWNrAAAAAQAAAARkZWNrAwkAAGcAAAACAAAAAAAAAAAACQABkAAAAAEFAAAABGRlY2sJAQAAAA5nZXRTaXhOZXdEZWNrcwAAAAAFAAAABGRlY2sBAAAAD2dldFJhbmRvbU51bWJ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IHCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIFAAAAC3dpdGhkcmF3S2V5CQABpAAAAAEJAABoAAAAAgUAAAAJY3VyU3VtQmV0AAAAAAAAAAACCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgkAAGgAAAACBQAAAAljdXJTdW1CZXQAAAAAAAAAAAIFAAAABHVuaXQFAAAAA25pbAkAAAIAAAABAgAAABZZb3UgYXJlIG5vdCB0aGUgd2lubmVyAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXlVzz6v", "height": 1817207, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Hwv93F4KHrHoX69TjzAgDaQxAp6PjdBd9By2tvbVfv7k Next: Am5TaC7gE7jspn9i27Yho2cngGoGpPHrQr2qvLynDEMH Diff:
Old | New | Differences | |
---|---|---|---|
92 | 92 | ||
93 | 93 | ||
94 | 94 | @Callable(i) | |
95 | - | func | |
95 | + | func bet (round) = { | |
96 | 96 | let callerAddress = toBase58String(i.caller.bytes) | |
97 | 97 | let p = getPayment(i) | |
98 | 98 | let curSumBets = getAmountOrZero(this, (round + "_sumBets")) | |
130 | 130 | then throw(((("Initial bet not maching original:" + toString(initialBet)) + ", actual:") + toString(p))) | |
131 | 131 | else { | |
132 | 132 | let avDeck = getAvailableDeck(this, availableProp) | |
133 | - | let $ | |
134 | - | let cardPlayer = $ | |
135 | - | let cardPositionPlayer = $ | |
136 | - | let avDeck1 = $ | |
137 | - | let $ | |
138 | - | let cardCasino = $ | |
139 | - | let cardPositionCasino = $ | |
140 | - | let avDeck2 = $ | |
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 | |
141 | 141 | if ((getCardValue(cardPlayer) == getCardValue(cardCasino))) | |
142 | 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 | 143 | else { | |
150 | 150 | ||
151 | 151 | ||
152 | 152 | @Callable(i) | |
153 | - | func | |
153 | + | func withdraw (round) = { | |
154 | 154 | let callerAddress = toBase58String(i.caller.bytes) | |
155 | 155 | let withdrawKey = (round + "_withdraw") | |
156 | 156 | if (isDefined(getString(this, withdrawKey))) |
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 | 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 | 13 | ||
14 | 14 | ||
15 | 15 | func getSixNewDecks () = (((((getNewDeck() ++ getNewDeck()) ++ getNewDeck()) ++ getNewDeck()) ++ getNewDeck()) ++ getNewDeck()) | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | func getDeck (deck) = if ((0 >= size(deck))) | |
19 | 19 | then getSixNewDecks() | |
20 | 20 | else deck | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func getRandomNumber (salt1,salt2,answersCount) = { | |
24 | 24 | let hash = sha256(toBytes((salt1 + salt2))) | |
25 | 25 | let index = toInt(hash) | |
26 | 26 | let rand = (index % answersCount) | |
27 | 27 | if ((0 > rand)) | |
28 | 28 | then ((-1 * rand) + 1) | |
29 | 29 | else (rand + 1) | |
30 | 30 | } | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func getPreviousRandomNumber (address) = match getInteger(this, (address + "_LastRandonNumber")) { | |
34 | 34 | case n: Int => | |
35 | 35 | toString(n) | |
36 | 36 | case _ => | |
37 | 37 | address | |
38 | 38 | } | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | func getAmountOrZero (this,key) = match getInteger(this, key) { | |
42 | 42 | case a: Int => | |
43 | 43 | a | |
44 | 44 | case _ => | |
45 | 45 | 0 | |
46 | 46 | } | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func getPayment (i) = if ((size(i.payments) == 0)) | |
50 | 50 | then throw("Payment must be attached") | |
51 | 51 | else { | |
52 | 52 | let pmt = i.payments[0] | |
53 | 53 | if (isDefined(pmt.assetId)) | |
54 | 54 | then throw("This function accepts WAVES tokens only") | |
55 | 55 | else pmt.amount | |
56 | 56 | } | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func getCardValue (stringCard) = { | |
60 | 60 | let p = parseIntValue(take(stringCard, 2)) | |
61 | 61 | if ((p == 1)) | |
62 | 62 | then 20 | |
63 | 63 | else p | |
64 | 64 | } | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func getWinner (cardPlayer,cardCasino,callerAddress,casino) = { | |
68 | 68 | let p = getCardValue(cardPlayer) | |
69 | 69 | let o = getCardValue(cardCasino) | |
70 | 70 | if ((p > o)) | |
71 | 71 | then callerAddress | |
72 | 72 | else casino | |
73 | 73 | } | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func getAvailableDeck (this,availableProp) = if (isDefined(getString(this, availableProp))) | |
77 | 77 | then { | |
78 | 78 | let stringDeck = getStringValue(this, availableProp) | |
79 | 79 | let deck = split(stringDeck, separator) | |
80 | 80 | getDeck(deck) | |
81 | 81 | } | |
82 | 82 | else getSixNewDecks() | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func getPlayerCardAndPositionAndUpdateDeck (meKey,callerAddress,deck) = { | |
86 | 86 | let avDeck2 = getDeck(deck) | |
87 | 87 | let cardPosition = getRandomNumber(((meKey + makeString(avDeck2, separator)) + callerAddress), getPreviousRandomNumber(callerAddress), size(avDeck2)) | |
88 | 88 | let card = avDeck2[(cardPosition % size(avDeck2))] | |
89 | 89 | let avDeck3 = removeByIndex(avDeck2, (cardPosition % size(avDeck2))) | |
90 | 90 | $Tuple3(card, cardPosition, avDeck3) | |
91 | 91 | } | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | @Callable(i) | |
95 | - | func | |
95 | + | func bet (round) = { | |
96 | 96 | let callerAddress = toBase58String(i.caller.bytes) | |
97 | 97 | let p = getPayment(i) | |
98 | 98 | let curSumBets = getAmountOrZero(this, (round + "_sumBets")) | |
99 | 99 | let currentDraws = match getInteger(this, (round + "_drawSequence")) { | |
100 | 100 | case a: Int => | |
101 | 101 | (a + 1) | |
102 | 102 | case _ => | |
103 | 103 | 0 | |
104 | 104 | } | |
105 | 105 | let currentPlayer = match getString(this, (round + "_player")) { | |
106 | 106 | case a: String => | |
107 | 107 | a | |
108 | 108 | case _ => | |
109 | 109 | unit | |
110 | 110 | } | |
111 | 111 | let initialBet = match getInteger(this, (round + "_initialBet")) { | |
112 | 112 | case a: Int => | |
113 | 113 | a | |
114 | 114 | case _ => | |
115 | 115 | p | |
116 | 116 | } | |
117 | 117 | let availableProp = (round + "_available") | |
118 | 118 | let newSumBets = (curSumBets + p) | |
119 | 119 | if (if (isDefined(getBoolean(this, (round + "_stop")))) | |
120 | 120 | then true | |
121 | 121 | else isDefined(getString(this, round))) | |
122 | 122 | then throw("This round is already played") | |
123 | 123 | else if (if (isDefined(getString(this, (round + "_player")))) | |
124 | 124 | then (currentPlayer != callerAddress) | |
125 | 125 | else false) | |
126 | 126 | then throw("This is not your game") | |
127 | 127 | else if ((newSumBets > maxBet)) | |
128 | 128 | then throw(((("Maximum amount of bets for round " + toString(maxBet)) + ". With your bet it's ") + toString(newSumBets))) | |
129 | 129 | else if ((initialBet != p)) | |
130 | 130 | then throw(((("Initial bet not maching original:" + toString(initialBet)) + ", actual:") + toString(p))) | |
131 | 131 | else { | |
132 | 132 | let avDeck = getAvailableDeck(this, availableProp) | |
133 | - | let $ | |
134 | - | let cardPlayer = $ | |
135 | - | let cardPositionPlayer = $ | |
136 | - | let avDeck1 = $ | |
137 | - | let $ | |
138 | - | let cardCasino = $ | |
139 | - | let cardPositionCasino = $ | |
140 | - | let avDeck2 = $ | |
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 | |
141 | 141 | if ((getCardValue(cardPlayer) == getCardValue(cardCasino))) | |
142 | 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 | 143 | else { | |
144 | 144 | let winner = getWinner(cardPlayer, cardCasino, callerAddress, casino) | |
145 | 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 | 146 | } | |
147 | 147 | } | |
148 | 148 | } | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | ||
152 | 152 | @Callable(i) | |
153 | - | func | |
153 | + | func withdraw (round) = { | |
154 | 154 | let callerAddress = toBase58String(i.caller.bytes) | |
155 | 155 | let withdrawKey = (round + "_withdraw") | |
156 | 156 | if (isDefined(getString(this, withdrawKey))) | |
157 | 157 | then throw("You have already got your prize") | |
158 | 158 | else if (!(isDefined(getString(this, (round + "_winner"))))) | |
159 | 159 | then throw("There is no winner, it was a draw") | |
160 | 160 | else { | |
161 | 161 | let winner = getStringValue(this, (round + "_winner")) | |
162 | 162 | let player = getStringValue(this, (round + "_player")) | |
163 | 163 | let curSumBet = getIntegerValue(this, (round + "_sumBets")) | |
164 | 164 | if ((curSumBet == 0)) | |
165 | 165 | then throw("You won nothing this round") | |
166 | 166 | else if (if ((winner == callerAddress)) | |
167 | 167 | then (winner == casino) | |
168 | 168 | else false) | |
169 | 169 | then [StringEntry(withdrawKey, toString(curSumBet)), ScriptTransfer(i.caller, curSumBet, unit)] | |
170 | 170 | else if (if ((winner == callerAddress)) | |
171 | 171 | then (winner == player) | |
172 | 172 | else false) | |
173 | 173 | then [StringEntry(withdrawKey, toString((curSumBet * 2))), ScriptTransfer(i.caller, (curSumBet * 2), unit)] | |
174 | 174 | else throw("You are not the winner") | |
175 | 175 | } | |
176 | 176 | } | |
177 | 177 | ||
178 | 178 | ||
179 | 179 | @Verifier(tx) | |
180 | 180 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
181 | 181 |
github/deemru/w8io/026f985 39.35 ms ◑