tx · H5dPL26d7Avd4wcCTVS1Nst6JcvspGQ5YpCSW9MayG9B

3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd:  -0.10000000 Waves

2021.11.16 01:04 [1792715] smart account 3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd > SELF 0.00000000 Waves

{ "type": 13, "id": "H5dPL26d7Avd4wcCTVS1Nst6JcvspGQ5YpCSW9MayG9B", "fee": 10000000, "feeAssetId": null, "timestamp": 1637013881802, "version": 2, "chainId": 84, "sender": "3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd", "senderPublicKey": "7Hi4o6vBstRs79NMVMjEove52dmP87RAcvNDAXN8C4Wi", "proofs": [ "3bnFRHEYAH6FnMb5tkmmtsfRLrzZD7iSt53Vebgba5qDV4ZvU5oLWno8vTzhpEAeow9yEfV6LorDRaEBNfTB199t" ], "script": "base64:AAIFAAAAAAAAAAwIAhIDCgEIEgMKAQgAAAANAAAAAAZjYXNpbm8CAAAAIzNNdGFDTDR2MWJqVGFiVXFzN29VNG9mUzhmYmFpMzRXTTFpAAAAAAVXQVZFUwAAAAAAO5rKAAAAAAAGbWF4QmV0CQAAaAAAAAIAAAAAAAAAAGQFAAAABVdBVkVTAAAAAAlzZXBhcmF0b3ICAAAAASwBAAAACmdldE5ld0RlY2sAAAAACQAETAAAAAICAAAAAzAxQwkABEwAAAACAgAAAAMwMkMJAARMAAAAAgIAAAADMDNDCQAETAAAAAICAAAAAzA0QwkABEwAAAACAgAAAAMwNUMJAARMAAAAAgIAAAADMDZDCQAETAAAAAICAAAAAzA3QwkABEwAAAACAgAAAAMwOEMJAARMAAAAAgIAAAADMDlDCQAETAAAAAICAAAAAzEwQwkABEwAAAACAgAAAAMxMUMJAARMAAAAAgIAAAADMTJDCQAETAAAAAICAAAAAzEzQwkABEwAAAACAgAAAAMwMUQJAARMAAAAAgIAAAADMDJECQAETAAAAAICAAAAAzAzRAkABEwAAAACAgAAAAMwNEQJAARMAAAAAgI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AAAAAEFAAAACWN1clN1bUJldAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAACWN1clN1bUJldAUAAAAEdW5pdAUAAAADbmlsCQAAAgAAAAECAAAAFllvdSBhcmUgbm90IHRoZSB3aW5uZXIAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleRzRtiU=", "height": 1792715, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9hykvjx48vzpnv3zqtt8BrqM65Nqri8hYyaeyDfgypkD Next: Bnc31rVMSsQnM6jNnH4JxPVnYEh3fcGzZmdk4wqAwuRz Diff:
OldNewDifferences
118118 then true
119119 else isDefined(getString(this, K)))
120120 then throw("This round is already played")
121- else if (if (isDefined(getBoolean(this, (K + "_player"))))
121+ else if (if (isDefined(getString(this, (K + "_player"))))
122122 then (P != F)
123123 else false)
124124 then throw("This is not your game")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "3MtaCL4v1bjTabUqs7oU4ofS8fbai34WM1i"
55
66 let b = 1000000000
77
88 let c = (100 * b)
99
1010 let d = ","
1111
1212 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"]
1313
1414
1515 func f (g) = if ((0 >= size(g)))
1616 then e()
1717 else g
1818
1919
2020 func h (i,j,k) = {
2121 let l = sha256(toBytes((i + j)))
2222 let m = toInt(l)
2323 let n = (m % k)
2424 if ((0 > n))
2525 then ((-1 * n) + 1)
2626 else (n + 1)
2727 }
2828
2929
3030 func o (p) = {
3131 let q = getInteger(this, (p + "_LastRandonNumber"))
3232 if ($isInstanceOf(q, "Int"))
3333 then {
3434 let r = q
3535 toString(r)
3636 }
3737 else p
3838 }
3939
4040
4141 func s (t,u) = {
4242 let q = getInteger(t, u)
4343 if ($isInstanceOf(q, "Int"))
4444 then {
4545 let v = q
4646 v
4747 }
4848 else 0
4949 }
5050
5151
5252 func w (x) = if ((size(x.payments) == 0))
5353 then throw("Payment must be attached")
5454 else {
5555 let y = x.payments[0]
5656 if (isDefined(y.assetId))
5757 then throw("This function accepts WAVES tokens only")
5858 else y.amount
5959 }
6060
6161
6262 func z (A) = {
6363 let B = parseIntValue(take(A, 2))
6464 if ((B == 1))
6565 then 20
6666 else B
6767 }
6868
6969
7070 func C (D,E,F,a) = {
7171 let B = z(D)
7272 let G = z(E)
7373 if ((B > G))
7474 then F
7575 else a
7676 }
7777
7878
7979 func H (t,I) = if (isDefined(getString(t, I)))
8080 then {
8181 let J = getStringValue(t, I)
8282 let g = split(J, d)
8383 if ((size(g) == 0))
8484 then e()
8585 else g
8686 }
8787 else e()
8888
8989
9090 @Callable(x)
9191 func bet (K) = {
9292 let F = toBase58String(x.caller.bytes)
9393 let L = K
9494 let B = w(x)
9595 let M = (K + "_sumBets")
9696 let N = s(this, M)
9797 let O = {
9898 let q = getInteger(this, (K + "_drawSequence"))
9999 if ($isInstanceOf(q, "Int"))
100100 then {
101101 let v = q
102102 (v + 1)
103103 }
104104 else 0
105105 }
106106 let P = {
107107 let q = getString(this, (K + "_player"))
108108 if ($isInstanceOf(q, "String"))
109109 then {
110110 let v = q
111111 v
112112 }
113113 else unit
114114 }
115115 let I = (L + "_available")
116116 let Q = (N + B)
117117 if (if (isDefined(getBoolean(this, (K + "_stop"))))
118118 then true
119119 else isDefined(getString(this, K)))
120120 then throw("This round is already played")
121- else if (if (isDefined(getBoolean(this, (K + "_player"))))
121+ else if (if (isDefined(getString(this, (K + "_player"))))
122122 then (P != F)
123123 else false)
124124 then throw("This is not your game")
125125 else if ((Q > c))
126126 then throw(((("Maximum amount of bets for round " + toString(c)) + ". With your bet it's ") + toString(Q)))
127127 else {
128128 let R = H(this, I)
129129 let S = h(((L + makeString(R, d)) + F), o(F), size(R))
130130 let D = R[(S % size(R))]
131131 let T = removeByIndex(R, (S % size(R)))
132132 let U = f(T)
133133 let V = h(((L + makeString(U, d)) + F), o(F), size(U))
134134 let E = U[((S + 12) % size(U))]
135135 let W = removeByIndex(U, (V % size(U)))
136136 if ((z(D) == z(E)))
137137 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))]
138138 else {
139139 let X = C(D, E, F, a)
140140 [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)]
141141 }
142142 }
143143 }
144144
145145
146146
147147 @Callable(x)
148148 func withdraw (K) = {
149149 let F = toBase58String(x.caller.bytes)
150150 let L = ((K + "_") + F)
151151 let Y = (K + "_withdraw")
152152 if (isDefined(getString(this, Y)))
153153 then throw("You have already got your prize")
154154 else if (isDefined(getInteger(this, (K + "_drawSequence"))))
155155 then throw("There is no winner, it was a draw")
156156 else if (!(isDefined(getString(this, (K + "_winner")))))
157157 then throw("There is no winner")
158158 else {
159159 let X = getStringValue(this, (K + "_winner"))
160160 let Z = getIntegerValue(this, (K + "_sumBets"))
161161 if ((Z == 0))
162162 then throw("You won nothing this round")
163163 else if ((X == F))
164164 then [StringEntry(Y, toString(Z)), ScriptTransfer(x.caller, Z, unit)]
165165 else throw("You are not the winner")
166166 }
167167 }
168168
169169
170170 @Verifier(aa)
171171 func ab () = sigVerify(aa.bodyBytes, aa.proofs[0], aa.senderPublicKey)
172172

github/deemru/w8io/026f985 
27.64 ms