tx · Gu2kPREH9838sHDkS4ecDTdmjaNntodwqF4Nfkm5Eshx 3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd: -0.10000000 Waves 2021.11.13 06:14 [1788671] smart account 3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd > SELF 0.00000000 Waves
{ "type": 13, "id": "Gu2kPREH9838sHDkS4ecDTdmjaNntodwqF4Nfkm5Eshx", "fee": 10000000, "feeAssetId": null, "timestamp": 1636773351351, "version": 2, "chainId": 84, "sender": "3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd", "senderPublicKey": "7Hi4o6vBstRs79NMVMjEove52dmP87RAcvNDAXN8C4Wi", "proofs": [ "5Qj9pTJVyn53SCKP7mMaL51pnjXEqwHYEsbrCZ5n8gcCWKpEFNaXd5T9mb3gWGwVnqh5rZUSPDE2xQgM9RNf8SgK" ], "script": "base64:AAIFAAAAAAAAAAwIAhIDCgEIEgMKAQgAAAANAAAAAAZjYXNpbm8CAAAAIzNNdGFDTDR2MWJqVGFiVXFzN29VNG9mUzhmYmFpMzRXTTFpAAAAAAVXQVZFUwAAAAAAO5rKAAAAAAAGbWF4QmV0CQAAaAAAAAIAAAAAAAAAAGQFAAAABVdBVkVTAAAAAAlzZXBhcmF0b3ICAAAAASwBAAAACmdldE5ld0RlY2sAAAAACQAETAAAAAICAAAAAzAxQwkABEwAAAACAgAAAAMwMkMJAARMAAAAAgIAAAADMDNDCQAETAAAAAICAAAAAzA0QwkABEwAAAACAgAAAAMwNUMJAARMAAAAAgIAAAADMDZDCQAETAAAAAICAAAAAzA3QwkABEwAAAACAgAAAAMwOEMJAARMAAAAAgIAAAADMDlDCQAETAAAAAICAAAAAzEwQwkABEwAAAACAgAAAAMxMUMJAARMAAAAAgIAAAADMTJDCQAETAAAAAICAAAAAzEzQwkABEwAAAACAgAAAAMwMUQJAARMAAAAAgIAAAADMDJECQAETAAAAAICAAAAAzAzRAkABEwAAAACAgAAAAMwNEQJAARMAAAA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VuZAIAAAAHX3dpbm5lcgQAAAAJY3VyU3VtQmV0CQEAAAARQGV4dHJOYXRpdmUoMTA1MCkAAAACBQAAAAR0aGlzCQABLAAAAAIFAAAABXJvdW5kAgAAAAhfc3VtQmV0cwMJAAAAAAAAAgUAAAAJY3VyU3VtQmV0AAAAAAAAAAAACQAAAgAAAAECAAAAGllvdSB3b24gbm90aGluZyB0aGlzIHJvdW5kAwkAAAAAAAACBQAAAAZ3aW5uZXIFAAAADWNhbGxlckFkZHJlc3MJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgUAAAALd2l0aGRyYXdLZXkJAAGkAAAAAQUAAAAJY3VyU3VtQmV0CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAAQkAAAAAQUAAAAEdGhpcwUAAAAJY3VyU3VtQmV0BQAAAAR1bml0BQAAAANuaWwJAAACAAAAAQIAAAAWWW91IGFyZSBub3QgdGhlIHdpbm5lcgAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5nFsdJw==", "height": 1788671, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6F92YCW7jV5R5Dqqo2gVi8ZP5nYyz9m3KXkx5w9mDbAn Next: 9thjY8QwCYyJNJ2m5sGwYfYYMygzG3fiyzvEUGtBi3cU Diff:
Old | New | Differences | |
---|---|---|---|
149 | 149 | if ((curSumBet == 0)) | |
150 | 150 | then throw("You won nothing this round") | |
151 | 151 | else if ((winner == callerAddress)) | |
152 | - | then [StringEntry(withdrawKey, toString(curSumBet)), ScriptTransfer( | |
152 | + | then [StringEntry(withdrawKey, toString(curSumBet)), ScriptTransfer(addressFromRecipient(this), curSumBet, unit)] | |
153 | 153 | else throw("You are not the winner") | |
154 | 154 | } | |
155 | 155 | } |
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 getDeck (deck) = if ((0 >= size(deck))) | |
16 | 16 | then getNewDeck() | |
17 | 17 | else deck | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func getRandomNumber (salt1,salt2,answersCount) = { | |
21 | 21 | let hash = sha256(toBytes((salt1 + salt2))) | |
22 | 22 | let index = toInt(hash) | |
23 | 23 | let rand = (index % answersCount) | |
24 | 24 | if ((0 > rand)) | |
25 | 25 | then ((-1 * rand) + 1) | |
26 | 26 | else (rand + 1) | |
27 | 27 | } | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func getPreviousRandomNumber (address) = match getInteger(this, (address + "_LastRandonNumber")) { | |
31 | 31 | case n: Int => | |
32 | 32 | toString(n) | |
33 | 33 | case _ => | |
34 | 34 | address | |
35 | 35 | } | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | func getAmountOrZero (this,key) = match getInteger(this, key) { | |
39 | 39 | case a: Int => | |
40 | 40 | a | |
41 | 41 | case _ => | |
42 | 42 | 0 | |
43 | 43 | } | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func getPayment (i) = if ((size(i.payments) == 0)) | |
47 | 47 | then throw("Payment must be attached") | |
48 | 48 | else { | |
49 | 49 | let pmt = i.payments[0] | |
50 | 50 | if (isDefined(pmt.assetId)) | |
51 | 51 | then throw("This function accepts WAVES tokens only") | |
52 | 52 | else pmt.amount | |
53 | 53 | } | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | func getCardValue (stringCard) = { | |
57 | 57 | let p = parseIntValue(take(stringCard, 2)) | |
58 | 58 | if ((p == 1)) | |
59 | 59 | then 20 | |
60 | 60 | else p | |
61 | 61 | } | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func getWinner (cardPlayer,cardCasino,callerAddress,casino) = { | |
65 | 65 | let p = getCardValue(cardPlayer) | |
66 | 66 | let o = getCardValue(cardCasino) | |
67 | 67 | if ((p > o)) | |
68 | 68 | then callerAddress | |
69 | 69 | else casino | |
70 | 70 | } | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func getAvailableDeck (this,availableProp) = if (isDefined(getString(this, availableProp))) | |
74 | 74 | then { | |
75 | 75 | let stringDeck = getStringValue(this, availableProp) | |
76 | 76 | let deck = split(stringDeck, separator) | |
77 | 77 | if ((size(deck) == 0)) | |
78 | 78 | then getNewDeck() | |
79 | 79 | else deck | |
80 | 80 | } | |
81 | 81 | else getNewDeck() | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | @Callable(i) | |
85 | 85 | func bet (round) = { | |
86 | 86 | let callerAddress = toBase58String(i.caller.bytes) | |
87 | 87 | let meKey = round | |
88 | 88 | let p = getPayment(i) | |
89 | 89 | let roundBetsKey = (round + "_sumBets") | |
90 | 90 | let curSumBets = getAmountOrZero(this, roundBetsKey) | |
91 | 91 | let currentDraws = match getInteger(this, (round + "_drawSequence")) { | |
92 | 92 | case a: Int => | |
93 | 93 | (a + 1) | |
94 | 94 | case _ => | |
95 | 95 | 0 | |
96 | 96 | } | |
97 | 97 | let currentPlayer = match getString(this, (round + "_player")) { | |
98 | 98 | case a: String => | |
99 | 99 | a | |
100 | 100 | case _ => | |
101 | 101 | unit | |
102 | 102 | } | |
103 | 103 | let availableProp = (meKey + "_available") | |
104 | 104 | let newSumBets = (curSumBets + p) | |
105 | 105 | if (if (isDefined(getBoolean(this, (round + "_stop")))) | |
106 | 106 | then true | |
107 | 107 | else isDefined(getString(this, round))) | |
108 | 108 | then throw("This round is already played") | |
109 | 109 | else if (if (isDefined(getBoolean(this, (round + "_stop")))) | |
110 | 110 | then (currentPlayer != callerAddress) | |
111 | 111 | else false) | |
112 | 112 | then throw("This is not your game") | |
113 | 113 | else if ((newSumBets > maxBet)) | |
114 | 114 | then throw(((("Maximum amount of bets for round " + toString(maxBet)) + ". With your bet it's ") + toString(newSumBets))) | |
115 | 115 | else { | |
116 | 116 | let avDeck = getAvailableDeck(this, availableProp) | |
117 | 117 | let cardPositionPlayer = getRandomNumber(((meKey + makeString(avDeck, separator)) + callerAddress), getPreviousRandomNumber(callerAddress), size(avDeck)) | |
118 | 118 | let cardPlayer = avDeck[(cardPositionPlayer % size(avDeck))] | |
119 | 119 | let avDeck1 = removeByIndex(avDeck, (cardPositionPlayer % size(avDeck))) | |
120 | 120 | let avDeck2 = getDeck(avDeck1) | |
121 | 121 | let cardPositionCasino = getRandomNumber(((meKey + makeString(avDeck2, separator)) + callerAddress), getPreviousRandomNumber(callerAddress), size(avDeck2)) | |
122 | 122 | let cardCasino = avDeck2[(cardPositionCasino % size(avDeck2))] | |
123 | 123 | let avDeck3 = removeByIndex(avDeck2, (cardPositionCasino % size(avDeck2))) | |
124 | 124 | if ((getCardValue(cardPlayer) == getCardValue(cardCasino))) | |
125 | 125 | then [StringEntry((round + "_avDeck"), makeString(avDeck, separator)), StringEntry((round + "_avDeck1"), makeString(avDeck1, separator)), StringEntry((round + "_avDeck2"), makeString(avDeck2, separator)), StringEntry((round + "_avDeck3"), makeString(avDeck3, separator)), IntegerEntry((round + "_cardPositionPlayer"), cardPositionPlayer), IntegerEntry((round + "_cardPositionCasino"), cardPositionCasino), StringEntry(availableProp, makeString(avDeck3, separator)), StringEntry((round + "_player"), callerAddress), StringEntry((meKey + "_salt_debug"), meKey), IntegerEntry((meKey + "_LastRandonNumber"), cardPositionCasino), IntegerEntry((round + "_sumBets"), newSumBets), StringEntry((meKey + "_playerCard"), cardPlayer), StringEntry((meKey + "_casinoCard"), cardCasino), IntegerEntry((round + "_drawSequence"), (currentDraws + 1))] | |
126 | 126 | else { | |
127 | 127 | let winner = getWinner(cardPlayer, cardCasino, callerAddress, casino) | |
128 | 128 | [StringEntry((round + "_avDeck"), makeString(avDeck, separator)), StringEntry((round + "_avDeck1"), makeString(avDeck1, separator)), StringEntry((round + "_avDeck2"), makeString(avDeck2, separator)), StringEntry((round + "_avDeck3"), makeString(avDeck3, separator)), IntegerEntry((round + "_cardPositionPlayer"), cardPositionPlayer), IntegerEntry((round + "_cardPositionCasino"), cardPositionCasino), StringEntry(availableProp, makeString(avDeck3, separator)), StringEntry((meKey + "_salt_debug"), meKey), StringEntry((round + "_player"), callerAddress), IntegerEntry((meKey + "_LastRandonNumber"), cardPositionCasino), IntegerEntry((round + "_sumBets"), newSumBets), StringEntry((meKey + "_playerCard"), cardPlayer), StringEntry((meKey + "_casinoCard"), cardCasino), BooleanEntry((round + "_stop"), true), StringEntry((round + "_winner"), winner)] | |
129 | 129 | } | |
130 | 130 | } | |
131 | 131 | } | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | ||
135 | 135 | @Callable(i) | |
136 | 136 | func withdraw (round) = { | |
137 | 137 | let callerAddress = toBase58String(i.caller.bytes) | |
138 | 138 | let meKey = ((round + "_") + callerAddress) | |
139 | 139 | let withdrawKey = (round + "_withdraw") | |
140 | 140 | if (isDefined(getString(this, withdrawKey))) | |
141 | 141 | then throw("You have already got your prize") | |
142 | 142 | else if (isDefined(getInteger(this, (round + "_drawSequence")))) | |
143 | 143 | then throw("There is no winner, it was a draw") | |
144 | 144 | else if (!(isDefined(getString(this, (round + "_winner"))))) | |
145 | 145 | then throw("There is no winner") | |
146 | 146 | else { | |
147 | 147 | let winner = getStringValue(this, (round + "_winner")) | |
148 | 148 | let curSumBet = getIntegerValue(this, (round + "_sumBets")) | |
149 | 149 | if ((curSumBet == 0)) | |
150 | 150 | then throw("You won nothing this round") | |
151 | 151 | else if ((winner == callerAddress)) | |
152 | - | then [StringEntry(withdrawKey, toString(curSumBet)), ScriptTransfer( | |
152 | + | then [StringEntry(withdrawKey, toString(curSumBet)), ScriptTransfer(addressFromRecipient(this), curSumBet, unit)] | |
153 | 153 | else throw("You are not the winner") | |
154 | 154 | } | |
155 | 155 | } | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | @Verifier(tx) | |
159 | 159 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
160 | 160 |
github/deemru/w8io/026f985 32.98 ms ◑