tx · AQMBQGrszZevyxe33J1dW69svFNTKPtrnNtaBx1intb3 3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd: -0.10000000 Waves 2021.11.16 01:34 [1792748] smart account 3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd > SELF 0.00000000 Waves
{ "type": 13, "id": "AQMBQGrszZevyxe33J1dW69svFNTKPtrnNtaBx1intb3", "fee": 10000000, "feeAssetId": null, "timestamp": 1637015701171, "version": 2, "chainId": 84, "sender": "3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd", "senderPublicKey": "7Hi4o6vBstRs79NMVMjEove52dmP87RAcvNDAXN8C4Wi", "proofs": [ "2m1B9f48MCL67JiGXxgDqYHB5knokQ2LXqeTZyF3RJFrJPiuLL9KTCdFLAwwYJ8gv2W8Sxa1U9zSA7eY5jUhdExx" ], "script": "base64:AAIFAAAAAAAAAAwIAhIDCgEIEgMKAQgAAAANAAAAAAZjYXNpbm8CAAAAIzNNdGFDTDR2MWJqVGFiVXFzN29VNG9mUzhmYmFpMzRXTTFpAAAAAAVXQVZFUwAAAAAAO5rKAAAAAAAGbWF4QmV0CQAAaAAAAAIAAAAAAAAAAGQFAAAABVdBVkVTAAAAAAlzZXBhcmF0b3ICAAAAASwBAAAACmdldE5ld0RlY2sAAAAACQAETAAAAAICAAAAAzAxQwkABEwAAAACAgAAAAMwMkMJAARMAAAAAgIAAAADMDNDCQAETAAAAAICAAAAAzA0QwkABEwAAAACAgAAAAMwNUMJAARMAAAAAgIAAAADMDZDCQAETAAAAAICAAAAAzA3QwkABEwAAAACAgAAAAMwOEMJAARMAAAAAgIAAAADMDlDCQAETAAAAAICAAAAAzEwQwkABEwAAAACAgAAAAMxMUMJAARMAAAAAgIAAAADMTJDCQAETAAAAAICAAAAAzEzQwkABEwAAAACAgAAAAMwMUQJAARMAAAAAgIAAAADMDJECQAETAAAAAICAAAAAzAzRAkABEwAAAACAgAAAAMwNEQJAARMAAAAAgIAAAADMDV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AOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAACWN1clN1bUJldAUAAAAEdW5pdAUAAAADbmlsAwMJAAAAAAAAAgUAAAAGd2lubmVyBQAAAA1jYWxsZXJBZGRyZXNzCQAAAAAAAAIFAAAABndpbm5lcgUAAAAGcGxheWVyBwkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACBQAAAAt3aXRoZHJhd0tleQkAAaQAAAABCQAAaAAAAAIFAAAACWN1clN1bUJldAAAAAAAAAAAAgkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIJAABoAAAAAgUAAAAJY3VyU3VtQmV0AAAAAAAAAAACBQAAAAR1bml0BQAAAANuaWwJAAACAAAAAQIAAAAWWW91IGFyZSBub3QgdGhlIHdpbm5lcgAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5sA5/cw==", "height": 1792748, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HDF4eqfcW99NAANuC6s3RRcfCSMCEqrKNLmAHeuk83au Next: 7zwrvgDowCo1YH4ML9TfC2BLfCzZuQq7TCkZcPETj3uo Diff:
Old | New | Differences | |
---|---|---|---|
131 | 131 | let T = removeByIndex(R, (S % size(R))) | |
132 | 132 | let U = f(T) | |
133 | 133 | let V = h(((L + makeString(U, d)) + F), o(F), size(U)) | |
134 | - | let E = U[( | |
134 | + | let E = U[(V % size(U))] | |
135 | 135 | let W = removeByIndex(U, (V % size(U))) | |
136 | 136 | if ((z(D) == z(E))) | |
137 | 137 | then [StringEntry(I, makeString(W, d)), StringEntry((K + "_player"), F), StringEntry((L + "_salt_debug"), L), IntegerEntry((L + "_LastRandonNumber"), V), IntegerEntry((K + "_sumBets"), Q), StringEntry((L + "_playerCard"), D), StringEntry((L + "_casinoCard"), E), IntegerEntry((K + "_drawSequence"), (O + 1))] |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "3MtaCL4v1bjTabUqs7oU4ofS8fbai34WM1i" | |
5 | 5 | ||
6 | 6 | let b = 1000000000 | |
7 | 7 | ||
8 | 8 | let c = (100 * b) | |
9 | 9 | ||
10 | 10 | let d = "," | |
11 | 11 | ||
12 | 12 | func e () = ["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 f (g) = if ((0 >= size(g))) | |
16 | 16 | then e() | |
17 | 17 | else g | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func h (i,j,k) = { | |
21 | 21 | let l = sha256(toBytes((i + j))) | |
22 | 22 | let m = toInt(l) | |
23 | 23 | let n = (m % k) | |
24 | 24 | if ((0 > n)) | |
25 | 25 | then ((-1 * n) + 1) | |
26 | 26 | else (n + 1) | |
27 | 27 | } | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func o (p) = { | |
31 | 31 | let q = getInteger(this, (p + "_LastRandonNumber")) | |
32 | 32 | if ($isInstanceOf(q, "Int")) | |
33 | 33 | then { | |
34 | 34 | let r = q | |
35 | 35 | toString(r) | |
36 | 36 | } | |
37 | 37 | else p | |
38 | 38 | } | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | func s (t,u) = { | |
42 | 42 | let q = getInteger(t, u) | |
43 | 43 | if ($isInstanceOf(q, "Int")) | |
44 | 44 | then { | |
45 | 45 | let v = q | |
46 | 46 | v | |
47 | 47 | } | |
48 | 48 | else 0 | |
49 | 49 | } | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func w (x) = if ((size(x.payments) == 0)) | |
53 | 53 | then throw("Payment must be attached") | |
54 | 54 | else { | |
55 | 55 | let y = x.payments[0] | |
56 | 56 | if (isDefined(y.assetId)) | |
57 | 57 | then throw("This function accepts WAVES tokens only") | |
58 | 58 | else y.amount | |
59 | 59 | } | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func z (A) = { | |
63 | 63 | let B = parseIntValue(take(A, 2)) | |
64 | 64 | if ((B == 1)) | |
65 | 65 | then 20 | |
66 | 66 | else B | |
67 | 67 | } | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func C (D,E,F,a) = { | |
71 | 71 | let B = z(D) | |
72 | 72 | let G = z(E) | |
73 | 73 | if ((B > G)) | |
74 | 74 | then F | |
75 | 75 | else a | |
76 | 76 | } | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func H (t,I) = if (isDefined(getString(t, I))) | |
80 | 80 | then { | |
81 | 81 | let J = getStringValue(t, I) | |
82 | 82 | let g = split(J, d) | |
83 | 83 | if ((size(g) == 0)) | |
84 | 84 | then e() | |
85 | 85 | else g | |
86 | 86 | } | |
87 | 87 | else e() | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | @Callable(x) | |
91 | 91 | func bet (K) = { | |
92 | 92 | let F = toBase58String(x.caller.bytes) | |
93 | 93 | let L = K | |
94 | 94 | let B = w(x) | |
95 | 95 | let M = (K + "_sumBets") | |
96 | 96 | let N = s(this, M) | |
97 | 97 | let O = { | |
98 | 98 | let q = getInteger(this, (K + "_drawSequence")) | |
99 | 99 | if ($isInstanceOf(q, "Int")) | |
100 | 100 | then { | |
101 | 101 | let v = q | |
102 | 102 | (v + 1) | |
103 | 103 | } | |
104 | 104 | else 0 | |
105 | 105 | } | |
106 | 106 | let P = { | |
107 | 107 | let q = getString(this, (K + "_player")) | |
108 | 108 | if ($isInstanceOf(q, "String")) | |
109 | 109 | then { | |
110 | 110 | let v = q | |
111 | 111 | v | |
112 | 112 | } | |
113 | 113 | else unit | |
114 | 114 | } | |
115 | 115 | let I = (L + "_available") | |
116 | 116 | let Q = (N + B) | |
117 | 117 | if (if (isDefined(getBoolean(this, (K + "_stop")))) | |
118 | 118 | then true | |
119 | 119 | else isDefined(getString(this, K))) | |
120 | 120 | then throw("This round is already played") | |
121 | 121 | else if (if (isDefined(getString(this, (K + "_player")))) | |
122 | 122 | then (P != F) | |
123 | 123 | else false) | |
124 | 124 | then throw("This is not your game") | |
125 | 125 | else if ((Q > c)) | |
126 | 126 | then throw(((("Maximum amount of bets for round " + toString(c)) + ". With your bet it's ") + toString(Q))) | |
127 | 127 | else { | |
128 | 128 | let R = H(this, I) | |
129 | 129 | let S = h(((L + makeString(R, d)) + F), o(F), size(R)) | |
130 | 130 | let D = R[(S % size(R))] | |
131 | 131 | let T = removeByIndex(R, (S % size(R))) | |
132 | 132 | let U = f(T) | |
133 | 133 | let V = h(((L + makeString(U, d)) + F), o(F), size(U)) | |
134 | - | let E = U[( | |
134 | + | let E = U[(V % size(U))] | |
135 | 135 | let W = removeByIndex(U, (V % size(U))) | |
136 | 136 | if ((z(D) == z(E))) | |
137 | 137 | then [StringEntry(I, makeString(W, d)), StringEntry((K + "_player"), F), StringEntry((L + "_salt_debug"), L), IntegerEntry((L + "_LastRandonNumber"), V), IntegerEntry((K + "_sumBets"), Q), StringEntry((L + "_playerCard"), D), StringEntry((L + "_casinoCard"), E), IntegerEntry((K + "_drawSequence"), (O + 1))] | |
138 | 138 | else { | |
139 | 139 | let X = C(D, E, F, a) | |
140 | 140 | [StringEntry(I, makeString(W, d)), StringEntry((L + "_salt_debug"), L), StringEntry((K + "_player"), F), IntegerEntry((L + "_LastRandonNumber"), V), IntegerEntry((K + "_sumBets"), Q), StringEntry((L + "_playerCard"), D), StringEntry((L + "_casinoCard"), E), BooleanEntry((K + "_stop"), true), StringEntry((K + "_winner"), X)] | |
141 | 141 | } | |
142 | 142 | } | |
143 | 143 | } | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | ||
147 | 147 | @Callable(x) | |
148 | 148 | func withdraw (K) = { | |
149 | 149 | let F = toBase58String(x.caller.bytes) | |
150 | 150 | let L = ((K + "_") + F) | |
151 | 151 | let Y = (K + "_withdraw") | |
152 | 152 | if (isDefined(getString(this, Y))) | |
153 | 153 | then throw("You have already got your prize") | |
154 | 154 | else if (!(isDefined(getString(this, (K + "_winner"))))) | |
155 | 155 | then throw("There is no winner, it was a draw") | |
156 | 156 | else { | |
157 | 157 | let X = getStringValue(this, (K + "_winner")) | |
158 | 158 | let Z = getStringValue(this, (K + "_player")) | |
159 | 159 | let aa = getIntegerValue(this, (K + "_sumBets")) | |
160 | 160 | if ((aa == 0)) | |
161 | 161 | then throw("You won nothing this round") | |
162 | 162 | else if (if ((X == F)) | |
163 | 163 | then (X == a) | |
164 | 164 | else false) | |
165 | 165 | then [StringEntry(Y, toString(aa)), ScriptTransfer(x.caller, aa, unit)] | |
166 | 166 | else if (if ((X == F)) | |
167 | 167 | then (X == Z) | |
168 | 168 | else false) | |
169 | 169 | then [StringEntry(Y, toString((aa * 2))), ScriptTransfer(x.caller, (aa * 2), unit)] | |
170 | 170 | else throw("You are not the winner") | |
171 | 171 | } | |
172 | 172 | } | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | @Verifier(ab) | |
176 | 176 | func ac () = sigVerify(ab.bodyBytes, ab.proofs[0], ab.senderPublicKey) | |
177 | 177 |
github/deemru/w8io/026f985 36.65 ms ◑