tx · GrV1u2t9T5EnwvykP8swXtZzm6AwgwGgEDZPChq31adD

3N8M61KCm8G72mK8PjacFbnnxdbFsyqQDeT:  -0.01400000 Waves

2019.07.01 19:11 [566545] smart account 3N8M61KCm8G72mK8PjacFbnnxdbFsyqQDeT > SELF 0.00000000 Waves

{ "type": 13, "id": "GrV1u2t9T5EnwvykP8swXtZzm6AwgwGgEDZPChq31adD", "fee": 1400000, "feeAssetId": null, "timestamp": 1561997499656, "version": 1, "sender": "3N8M61KCm8G72mK8PjacFbnnxdbFsyqQDeT", "senderPublicKey": "Bhyvkx4xdbEi4KPJNZSzx9gZgzgyLEsavuj2kYSt7SST", "proofs": [ "2gM3vubgKzJMqboWYhgDLQMn2KXAtT7nshvPttTSFnsVp6Hx99pQXnwqkUarhsZJXy6KXQouhPQXvfs1sVLwkGLk" ], "script": "base64:AAIDAAAAAAAAAAAAAAAmAAAAAA9TZXJ2ZXJQdWJsaWNLZXkBAAAAIL79hxhmqWX34iA/RS9p36FY3qCJjLclClmAz4vj6GlBAAAAAA1TZXJ2ZXJBZGRyZXNzCQEAAAAcQGV4dHJVc2VyKGFkZHJlc3NGcm9tU3RyaW5nKQAAAAECAAAAIzNNdThvS1NjV0N3UjMzWW9tVDV1a1U3M1A3akxyeVpUazRzAAAAABBSb3VsZXR0ZVNlY3Rpb25zAAAAAAAAAAAVAAAAABFEYXRhR2FtZU51bWJlcktleQIAAAALQVBQX0dBTUVfSUQAAAAADURhdGFBbW91bnRLZXkCAAAABkFNT1VOVAAAAAAORGF0YVNlY3Rpb25LZXkCAAAAB1NFQ1RJT04AAAAADURhdGFTdGF0dXNLZXkCAAAABlNUQVRVUwAAAAANRGF0YVJlc3VsdEtleQIAAAAGUkVTVUxUAAAAABBEYXRhV2luQW1vdW50S2V5AgAAAApXSU5fQU1PVU5UAAAAAA1EYXRhU3RhdHVzTmV3AgAAAANORVcAAAAADURhdGFTdGF0dXNXaW4CAAAAA1dJTgAAAAAPRGF0YVN0YXR1c0xvb3Nl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AAAEFAAAABWlzV2luCQAETAAAAAIJAQAAAAxTdG9yZURhdGFJbnQAAAADBQAAABFnYW1lVHJhbnNhY3Rpb25JZAUAAAANRGF0YVJlc3VsdEtleQUAAAAEcmFuZAUAAAADbmlsAwUAAAAFaXNXaW4EAAAABndhbGxldAkBAAAAB0dldERhdGEAAAABBQAAABFnYW1lVHJhbnNhY3Rpb25JZAQAAAAJd2luQW1vdW50CQEAAAAKR2V0RGF0YUludAAAAAIFAAAAEWdhbWVUcmFuc2FjdGlvbklkBQAAABBEYXRhV2luQW1vdW50S2V5CQEAAAAMU2NyaXB0UmVzdWx0AAAAAgUAAAAId3JpdGVTZXQJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAAAZ3YWxsZXQFAAAACXdpbkFtb3VudAUAAAAEdW5pdAUAAAADbmlsBQAAAAh3cml0ZVNldAkAAAIAAAABCQABLAAAAAIFAAAADUVycm9yR2FtZU92ZXIFAAAABnN0YXR1cwAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAADCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAANzdHgFAAAAByRtYXRjaDAGBwdRByRp", "chainId": 84, "height": 566545, "spentComplexity": 0 } View: original | compacted Prev: DdidCosjvqoP3AM1mWJ4rp2JXEBF2xaasnvRk2Z8TjjJ Next: ED1Uts4s3TsVKmjLQ1UoRTSAsupSeT2qGeQemCLShAM4 Diff:
OldNewDifferences
3939
4040 let s = (14 * m)
4141
42-let t = [0, 2, 20, 2, 5, 2, 10, 2, 6, 2, 5, 2, 6, 2, 5, 2, 10, 2, 5, 2, 6]
42+let t = "Only waves accepted"
4343
44-let u = "Only waves accepted"
44+let u = "Parameter size must be greater than 0"
4545
46-let v = "Parameter size must be greater than 0"
46+let v = "Parameter size must be less than 100"
4747
48-let w = "Parameter size must be less than 100"
48+let w = "Bet amount must be in Waves"
4949
50-let x = "Bet amount must be in Waves"
50+let x = "Transaction's fee must be in Waves"
5151
52-let y = "Transaction's fee must be in Waves"
52+let y = "Passed txId had been used before. Game aborted."
5353
54-let z = "Passed txId had been used before. Game aborted."
54+let z = "Key not found: "
5555
56-let A = "Key not found: "
56+let A = "Game already is over"
5757
58-let B = "Game already is over"
58+let B = "Incorrect section result"
5959
60-let C = "Incorrect section result"
60+let C = "Bet amount is not in range"
6161
62-let D = "Bet amount is not in range"
63-
64-func E (F,G,H) = DataEntry(((F + "_") + G), H)
62+func D (E,F,G) = DataEntry(((E + "_") + F), G)
6563
6664
67-func I (F,G,H) = DataEntry(((F + "_") + G), H)
65+func H (E,F,G) = DataEntry(((E + "_") + F), G)
6866
6967
70-func J (G) = {
71- let K = getString(this, G)
72- if ($isInstanceOf(K, "String"))
68+func I (F) = {
69+ let J = getString(this, F)
70+ if ($isInstanceOf(J, "String"))
7371 then {
74- let L = K
75- L
72+ let K = J
73+ K
7674 }
77- else throw((A + G))
75+ else throw((z + F))
7876 }
7977
8078
81-func M (F,G) = {
82- let N = ((F + "_") + G)
83- let K = getString(this, N)
84- if ($isInstanceOf(K, "String"))
79+func L (E,F) = {
80+ let M = ((E + "_") + F)
81+ let J = getString(this, M)
82+ if ($isInstanceOf(J, "String"))
8583 then {
86- let L = K
87- L
84+ let K = J
85+ K
8886 }
89- else throw((A + N))
87+ else throw((z + M))
9088 }
9189
9290
93-func O (F,G) = {
94- let N = ((F + "_") + G)
95- let K = getInteger(this, N)
96- if ($isInstanceOf(K, "Int"))
91+func N (E,F) = {
92+ let M = ((E + "_") + F)
93+ let J = getInteger(this, M)
94+ if ($isInstanceOf(J, "Int"))
9795 then {
98- let L = K
99- L
96+ let K = J
97+ K
10098 }
101- else throw((A + N))
99+ else throw((z + M))
102100 }
103101
104102
105-func P () = {
106- let Q = {
107- let K = getInteger(this, d)
108- if ($isInstanceOf(K, "Int"))
103+func O () = {
104+ let P = {
105+ let J = getInteger(this, d)
106+ if ($isInstanceOf(J, "Int"))
109107 then {
110- let R = K
111- R
108+ let Q = J
109+ Q
112110 }
113111 else 0
114112 }
115- (Q + 1)
113+ (P + 1)
116114 }
117115
118116
119-func S (T,U) = {
120- let V = sigVerify(fromBase58String(T), fromBase58String(U), a)
121- if (V)
117+func R (S,T) = {
118+ let U = sigVerify(fromBase58String(S), fromBase58String(T), a)
119+ if (U)
122120 then {
123- let W = (toInt(sha256(toBytes(U))) % c)
124- if ((0 > W))
125- then (-1 * W)
126- else W
121+ let V = (toInt(sha256(toBytes(T))) % c)
122+ if ((0 > V))
123+ then (-1 * V)
124+ else V
127125 }
128126 else throw("Invalid RSA signature")
129127 }
130128
131129
132-func X (Y) = if (Y)
130+func W (X) = if (X)
133131 then k
134132 else l
135133
136134
137-func Z (aa,ab) = {
138- let ac = if ((0 >= ab))
135+func Y (Z,aa) = {
136+ let ab = if (if (if (if ((aa == 2))
139137 then true
140- else (ab > 20)
141- let ad = if (if (if (if ((aa == (o + n)))
138+ else (aa == 5))
142139 then true
143- else (aa == (p + n)))
140+ else (aa == 6))
144141 then true
145- else (aa == (q + n)))
142+ else (aa == 10))
146143 then true
147- else (aa == (r + n)))
144+ else (aa == 20)
145+ let ac = if (if (if (if ((Z == (o + n)))
148146 then true
149- else (aa == (s + n))
150- if (ac)
151- then throw(C)
152- else if (ad)
153- then ((aa - n) * t[ab])
154- else throw(D)
147+ else (Z == (p + n)))
148+ then true
149+ else (Z == (q + n)))
150+ then true
151+ else (Z == (r + n)))
152+ then true
153+ else (Z == (s + n))
154+ if (!(ab))
155+ then throw(B)
156+ else if (ac)
157+ then ((Z - n) * aa)
158+ else throw(C)
155159 }
156160
157161
158-@Callable(ae)
159-func bet (af) = {
160- let ag = P()
161- let ah = toBase58String(ae.transactionId)
162- let ai = toBase58String(ae.caller.bytes)
163- let aj = extract(ae.payment)
164- let ak = isDefined(getString(this, ah))
165- let al = isDefined(aj.assetId)
166- let am = isDefined(aj.assetId)
167- let an = aj.amount
168- let ao = Z(aj.amount, af)
169- if (al)
170- then throw(x)
171- else if (am)
172- then throw(y)
173- else if (ak)
174- then throw(z)
175- else ScriptResult(WriteSet([DataEntry(ah, ai), DataEntry(d, ag), I(ah, e, an), I(ah, f, af), E(ah, g, j), I(ah, i, ao)]), TransferSet([ScriptTransfer(b, n, unit)]))
162+@Callable(ad)
163+func bet (ae) = {
164+ let af = O()
165+ let ag = toBase58String(ad.transactionId)
166+ let ah = toBase58String(ad.caller.bytes)
167+ let ai = extract(ad.payment)
168+ let aj = isDefined(getString(this, ag))
169+ let ak = isDefined(ai.assetId)
170+ let al = isDefined(ai.assetId)
171+ let am = ai.amount
172+ let an = Y(ai.amount, ae)
173+ if (ak)
174+ then throw(w)
175+ else if (al)
176+ then throw(x)
177+ else if (aj)
178+ then throw(y)
179+ else ScriptResult(WriteSet([DataEntry(ag, ah), DataEntry(d, af), H(ag, e, am), H(ag, f, ae), D(ag, g, j), H(ag, i, an)]), TransferSet([ScriptTransfer(b, n, unit)]))
176180 }
177181
178182
179183
180-@Callable(ae)
181-func result (ah,ap) = {
182- let W = S(ah, ap)
183- let aq = O(ah, f)
184- let ar = M(ah, g)
185- if ((ar == j))
184+@Callable(ad)
185+func result (ag,ao) = {
186+ let V = R(ag, ao)
187+ let ap = N(ag, f)
188+ let aq = L(ag, g)
189+ if ((aq == j))
186190 then {
187- let as = (W == aq)
188- let at = WriteSet([E(ah, g, X(as)), I(ah, h, W)])
189- if (as)
191+ let ar = (V == ap)
192+ let as = WriteSet([D(ag, g, W(ar)), H(ag, h, V)])
193+ if (ar)
190194 then {
191- let au = J(ah)
192- let av = O(ah, i)
193- ScriptResult(at, TransferSet([ScriptTransfer(addressFromStringValue(au), av, unit)]))
195+ let at = I(ag)
196+ let au = N(ag, i)
197+ ScriptResult(as, TransferSet([ScriptTransfer(addressFromStringValue(at), au, unit)]))
194198 }
195- else at
199+ else as
196200 }
197- else throw((B + ar))
201+ else throw((A + aq))
198202 }
199203
200204
201-@Verifier(aw)
202-func ax () = if (sigVerify(aw.bodyBytes, aw.proofs[0], aw.senderPublicKey))
205+@Verifier(av)
206+func aw () = if (sigVerify(av.bodyBytes, av.proofs[0], av.senderPublicKey))
203207 then {
204- let K = aw
205- if ($isInstanceOf(K, "SetScriptTransaction"))
208+ let J = av
209+ if ($isInstanceOf(J, "SetScriptTransaction"))
206210 then {
207- let ay = K
211+ let ax = J
208212 true
209213 }
210214 else false
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'DrYgfD7j6AKD1iXtn9uhMka95ATZB42B1kGKCUATP2UG'
55
66 let b = addressFromStringValue("3Mu8oKScWCwR33YomT5ukU73P7jLryZTk4s")
77
88 let c = 21
99
1010 let d = "APP_GAME_ID"
1111
1212 let e = "AMOUNT"
1313
1414 let f = "SECTION"
1515
1616 let g = "STATUS"
1717
1818 let h = "RESULT"
1919
2020 let i = "WIN_AMOUNT"
2121
2222 let j = "NEW"
2323
2424 let k = "WIN"
2525
2626 let l = "LOOSE"
2727
2828 let m = ((100 * 1000) * 1000)
2929
3030 let n = ((5 * m) / 1000)
3131
3232 let o = (1 * m)
3333
3434 let p = (2 * m)
3535
3636 let q = (4 * m)
3737
3838 let r = (8 * m)
3939
4040 let s = (14 * m)
4141
42-let t = [0, 2, 20, 2, 5, 2, 10, 2, 6, 2, 5, 2, 6, 2, 5, 2, 10, 2, 5, 2, 6]
42+let t = "Only waves accepted"
4343
44-let u = "Only waves accepted"
44+let u = "Parameter size must be greater than 0"
4545
46-let v = "Parameter size must be greater than 0"
46+let v = "Parameter size must be less than 100"
4747
48-let w = "Parameter size must be less than 100"
48+let w = "Bet amount must be in Waves"
4949
50-let x = "Bet amount must be in Waves"
50+let x = "Transaction's fee must be in Waves"
5151
52-let y = "Transaction's fee must be in Waves"
52+let y = "Passed txId had been used before. Game aborted."
5353
54-let z = "Passed txId had been used before. Game aborted."
54+let z = "Key not found: "
5555
56-let A = "Key not found: "
56+let A = "Game already is over"
5757
58-let B = "Game already is over"
58+let B = "Incorrect section result"
5959
60-let C = "Incorrect section result"
60+let C = "Bet amount is not in range"
6161
62-let D = "Bet amount is not in range"
63-
64-func E (F,G,H) = DataEntry(((F + "_") + G), H)
62+func D (E,F,G) = DataEntry(((E + "_") + F), G)
6563
6664
67-func I (F,G,H) = DataEntry(((F + "_") + G), H)
65+func H (E,F,G) = DataEntry(((E + "_") + F), G)
6866
6967
70-func J (G) = {
71- let K = getString(this, G)
72- if ($isInstanceOf(K, "String"))
68+func I (F) = {
69+ let J = getString(this, F)
70+ if ($isInstanceOf(J, "String"))
7371 then {
74- let L = K
75- L
72+ let K = J
73+ K
7674 }
77- else throw((A + G))
75+ else throw((z + F))
7876 }
7977
8078
81-func M (F,G) = {
82- let N = ((F + "_") + G)
83- let K = getString(this, N)
84- if ($isInstanceOf(K, "String"))
79+func L (E,F) = {
80+ let M = ((E + "_") + F)
81+ let J = getString(this, M)
82+ if ($isInstanceOf(J, "String"))
8583 then {
86- let L = K
87- L
84+ let K = J
85+ K
8886 }
89- else throw((A + N))
87+ else throw((z + M))
9088 }
9189
9290
93-func O (F,G) = {
94- let N = ((F + "_") + G)
95- let K = getInteger(this, N)
96- if ($isInstanceOf(K, "Int"))
91+func N (E,F) = {
92+ let M = ((E + "_") + F)
93+ let J = getInteger(this, M)
94+ if ($isInstanceOf(J, "Int"))
9795 then {
98- let L = K
99- L
96+ let K = J
97+ K
10098 }
101- else throw((A + N))
99+ else throw((z + M))
102100 }
103101
104102
105-func P () = {
106- let Q = {
107- let K = getInteger(this, d)
108- if ($isInstanceOf(K, "Int"))
103+func O () = {
104+ let P = {
105+ let J = getInteger(this, d)
106+ if ($isInstanceOf(J, "Int"))
109107 then {
110- let R = K
111- R
108+ let Q = J
109+ Q
112110 }
113111 else 0
114112 }
115- (Q + 1)
113+ (P + 1)
116114 }
117115
118116
119-func S (T,U) = {
120- let V = sigVerify(fromBase58String(T), fromBase58String(U), a)
121- if (V)
117+func R (S,T) = {
118+ let U = sigVerify(fromBase58String(S), fromBase58String(T), a)
119+ if (U)
122120 then {
123- let W = (toInt(sha256(toBytes(U))) % c)
124- if ((0 > W))
125- then (-1 * W)
126- else W
121+ let V = (toInt(sha256(toBytes(T))) % c)
122+ if ((0 > V))
123+ then (-1 * V)
124+ else V
127125 }
128126 else throw("Invalid RSA signature")
129127 }
130128
131129
132-func X (Y) = if (Y)
130+func W (X) = if (X)
133131 then k
134132 else l
135133
136134
137-func Z (aa,ab) = {
138- let ac = if ((0 >= ab))
135+func Y (Z,aa) = {
136+ let ab = if (if (if (if ((aa == 2))
139137 then true
140- else (ab > 20)
141- let ad = if (if (if (if ((aa == (o + n)))
138+ else (aa == 5))
142139 then true
143- else (aa == (p + n)))
140+ else (aa == 6))
144141 then true
145- else (aa == (q + n)))
142+ else (aa == 10))
146143 then true
147- else (aa == (r + n)))
144+ else (aa == 20)
145+ let ac = if (if (if (if ((Z == (o + n)))
148146 then true
149- else (aa == (s + n))
150- if (ac)
151- then throw(C)
152- else if (ad)
153- then ((aa - n) * t[ab])
154- else throw(D)
147+ else (Z == (p + n)))
148+ then true
149+ else (Z == (q + n)))
150+ then true
151+ else (Z == (r + n)))
152+ then true
153+ else (Z == (s + n))
154+ if (!(ab))
155+ then throw(B)
156+ else if (ac)
157+ then ((Z - n) * aa)
158+ else throw(C)
155159 }
156160
157161
158-@Callable(ae)
159-func bet (af) = {
160- let ag = P()
161- let ah = toBase58String(ae.transactionId)
162- let ai = toBase58String(ae.caller.bytes)
163- let aj = extract(ae.payment)
164- let ak = isDefined(getString(this, ah))
165- let al = isDefined(aj.assetId)
166- let am = isDefined(aj.assetId)
167- let an = aj.amount
168- let ao = Z(aj.amount, af)
169- if (al)
170- then throw(x)
171- else if (am)
172- then throw(y)
173- else if (ak)
174- then throw(z)
175- else ScriptResult(WriteSet([DataEntry(ah, ai), DataEntry(d, ag), I(ah, e, an), I(ah, f, af), E(ah, g, j), I(ah, i, ao)]), TransferSet([ScriptTransfer(b, n, unit)]))
162+@Callable(ad)
163+func bet (ae) = {
164+ let af = O()
165+ let ag = toBase58String(ad.transactionId)
166+ let ah = toBase58String(ad.caller.bytes)
167+ let ai = extract(ad.payment)
168+ let aj = isDefined(getString(this, ag))
169+ let ak = isDefined(ai.assetId)
170+ let al = isDefined(ai.assetId)
171+ let am = ai.amount
172+ let an = Y(ai.amount, ae)
173+ if (ak)
174+ then throw(w)
175+ else if (al)
176+ then throw(x)
177+ else if (aj)
178+ then throw(y)
179+ else ScriptResult(WriteSet([DataEntry(ag, ah), DataEntry(d, af), H(ag, e, am), H(ag, f, ae), D(ag, g, j), H(ag, i, an)]), TransferSet([ScriptTransfer(b, n, unit)]))
176180 }
177181
178182
179183
180-@Callable(ae)
181-func result (ah,ap) = {
182- let W = S(ah, ap)
183- let aq = O(ah, f)
184- let ar = M(ah, g)
185- if ((ar == j))
184+@Callable(ad)
185+func result (ag,ao) = {
186+ let V = R(ag, ao)
187+ let ap = N(ag, f)
188+ let aq = L(ag, g)
189+ if ((aq == j))
186190 then {
187- let as = (W == aq)
188- let at = WriteSet([E(ah, g, X(as)), I(ah, h, W)])
189- if (as)
191+ let ar = (V == ap)
192+ let as = WriteSet([D(ag, g, W(ar)), H(ag, h, V)])
193+ if (ar)
190194 then {
191- let au = J(ah)
192- let av = O(ah, i)
193- ScriptResult(at, TransferSet([ScriptTransfer(addressFromStringValue(au), av, unit)]))
195+ let at = I(ag)
196+ let au = N(ag, i)
197+ ScriptResult(as, TransferSet([ScriptTransfer(addressFromStringValue(at), au, unit)]))
194198 }
195- else at
199+ else as
196200 }
197- else throw((B + ar))
201+ else throw((A + aq))
198202 }
199203
200204
201-@Verifier(aw)
202-func ax () = if (sigVerify(aw.bodyBytes, aw.proofs[0], aw.senderPublicKey))
205+@Verifier(av)
206+func aw () = if (sigVerify(av.bodyBytes, av.proofs[0], av.senderPublicKey))
203207 then {
204- let K = aw
205- if ($isInstanceOf(K, "SetScriptTransaction"))
208+ let J = av
209+ if ($isInstanceOf(J, "SetScriptTransaction"))
206210 then {
207- let ay = K
211+ let ax = J
208212 true
209213 }
210214 else false
211215 }
212216 else false
213217

github/deemru/w8io/026f985 
84.28 ms