tx · Gb1METas8sCSMMZjfEWKYCAEMhmCLotbQmPmcWTT9jZB

3N9XnyPpWxYohKH7z5dEuq8rpnobpyzPrzE:  -0.01400000 Waves

2019.09.08 08:53 [666713] smart account 3N9XnyPpWxYohKH7z5dEuq8rpnobpyzPrzE > SELF 0.00000000 Waves

{ "type": 13, "id": "Gb1METas8sCSMMZjfEWKYCAEMhmCLotbQmPmcWTT9jZB", "fee": 1400000, "feeAssetId": null, "timestamp": 1567922077895, "version": 1, "sender": "3N9XnyPpWxYohKH7z5dEuq8rpnobpyzPrzE", "senderPublicKey": "ESNVczQiY4oxY2hoRSZcruKNBwsPdXVu1nSCbpprDGJB", "proofs": [ "pgRuktLa6qY2qQiTc3qEudM3mnizYXrJjV7Y2kHaMsvTqEHy1uwTwQFyaF1Tccg27yUsYq1VzS1KuzgeuP3HABY" ], "script": "base64:AAIDAAAAAAAAAAAAAAAPAAAAAA9TZXJ2ZXJQdWJsaWNLZXkJAAJZAAAAAQIAAAAsN2ltOWNhaUNtRTRTTDZqVG00S1RpY0hINGJHUGY1djU5cm5mVUEzY0NSRGoAAAAACUJldFNlcnZlcgkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABAgAAACMzTjZ5Rko1WjhOVVVRdmZHR01McDVlZm1ldlJSdFRnUXV1bgAAAAAHV0FWRUxFVAkAAGgAAAACCQAAaAAAAAIAAAAAAAAAAGQAAAAAAAAAA+gAAAAAAAAAA+gAAAAACkNPTU1JU1NJT04JAABpAAAAAgkAAGgAAAACAAAAAAAAAAAFBQAAAAdXQVZFTEVUAAAAAAAAAAPoAAAAAA5UaWNrZXRzUGVyV2F2ZQAAAAAAAAAAZAAAAAALQ1VSUkVOVEdBTUUCAAAADSRDVVJSRU5UX0dBTUUAAAAACkxBU1RUSUNLRVQCAAAADCRMQVNUX1RJQ0tFVAEAAAAPR2VuZXJhdGVSYW5kSW50AAAAAgAAAAZnYW1lSWQAAAAHcnNhU2lnbgQAAAAKbGFzdFR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AAAZnYW1lSWQFAAAAB3JzYVNpZ24EAAAAEHdpbm5lckFkZHJlc3NTdHIJAQAAAAxkZWZpbmVXaW5uZXIAAAACBQAAAAZnYW1lSWQFAAAACXdpblRpY2tldAQAAAAGd2luQW10CQEAAAAMZGVmaW5lV2luQW10AAAAAQUAAAAQd2lubmVyQWRkcmVzc1N0cgQAAAAFd2luVFgJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAABB3aW5uZXJBZGRyZXNzU3RyBQAAAAZ3aW5BbXQFAAAABHVuaXQFAAAAA25pbAQAAAAKZ2FtZVJlc3VsdAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACBQAAAAZnYW1lSWQCAAAAB19yZXN1bHQJAAGkAAAAAQUAAAAJd2luVGlja2V0CQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAABmdhbWVJZAIAAAAHX3dpbm5lcgUAAAAQd2lubmVyQWRkcmVzc1N0cgkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACBQAAAAZnYW1lSWQCAAAAB193aW5BbXQFAAAABndpbkFtdAUAAAADbmlsCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQUAAAAKZ2FtZVJlc3VsdAkBAAAAC1RyYW5zZmVyU2V0AAAAAQUAAAAFd2luVFgJAAACAAAAAQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAQQ3VycmVudCBHYW1lIGlzIAUAAAALY3VycmVudEdhbWUCAAAACiwgYnV0IG5vdCAFAAAABmdhbWVJZAAAAADJg0yO", "chainId": 84, "height": 666713, "spentComplexity": 0 } View: original | compacted Prev: BdcbaA9oBiVYJpP7HCLpMmnisL3mptRw2ZkBsYowHGSV Next: GPMEoeDGzmpAZ4cCpxx3DAVdRYRx4mEmVSRTUbfw3A3a Diff:
OldNewDifferences
5252 func x (p) = ["1", "100", "101", "300", "0", "0", "0", "0"]
5353
5454
55-func y (i,o,z) = {
56- let A = x(n(i, o))
57- if (if ((z >= parseIntValue(A[0])))
58- then (parseIntValue(A[1]) >= z)
55+func y (o) = if ((o == "3MsD5LWNJmQkkWpj3RtaeRVrKGLgoCE7kpB"))
56+ then ["1", "100", "0", "0", "0", "0", "0", "0"]
57+ else if ((o == "3N8bMv9V4spvb9bAeRtGve5RLkVN8swFDWc"))
58+ then ["101", "300", "0", "0", "0", "0", "0", "0"]
59+ else throw("Победитель не учавствовал епт")
60+
61+
62+func z (i,o,A) = {
63+ let B = y(o)
64+ if (if ((A >= parseIntValue(B[0])))
65+ then (parseIntValue(B[1]) >= A)
5966 else false)
6067 then true
61- else if (if ((z >= parseIntValue(A[2])))
62- then (parseIntValue(A[3]) >= z)
68+ else if (if ((A >= parseIntValue(B[2])))
69+ then (parseIntValue(B[3]) >= A)
6370 else false)
6471 then true
65- else if (if ((z >= parseIntValue(A[4])))
66- then (parseIntValue(A[5]) >= z)
72+ else if (if ((A >= parseIntValue(B[4])))
73+ then (parseIntValue(B[5]) >= A)
6774 else false)
6875 then true
69- else if (if ((z >= parseIntValue(A[6])))
70- then (parseIntValue(A[7]) >= z)
76+ else if (if ((A >= parseIntValue(B[6])))
77+ then (parseIntValue(B[7]) >= A)
7178 else false)
7279 then true
7380 else false
7481 }
7582
7683
77-func B (i,z) = {
78- let C = getStringValue(b, (i + "_players"))
79- let D = split(C, "_")
80- if (y(i, D[0], z))
81- then D[0]
82- else if (y(i, D[1], z))
83- then D[1]
84- else if (y(i, D[2], z))
85- then D[2]
86- else if (y(i, D[3], z))
87- then D[3]
84+func C (i,A) = {
85+ let D = getStringValue(b, (i + "_players"))
86+ let E = split(D, "_")
87+ if (z(i, E[0], A))
88+ then E[0]
89+ else if (z(i, E[1], A))
90+ then E[1]
91+ else if (z(i, E[2], A))
92+ then E[2]
93+ else if (z(i, E[3], A))
94+ then E[3]
8895 else throw("Error with defining winner")
8996 }
9097
9198
92-func E (F) = (1 * c)
99+func F (G) = (1 * c)
93100
94101
95-@Callable(G)
96-func generateResult (i,H) = {
97- let I = getStringValue(b, f)
98- if ((I == i))
102+@Callable(H)
103+func generateResult (i,I) = {
104+ let J = getStringValue(b, f)
105+ if ((J == i))
99106 then {
100- let j = fromBase58String(H)
101- let z = h(i, j)
102- let F = "3N6xavpiLALkk4H4qWfeZ4N1cmvoykyToBa"
103- let J = E(F)
104- let K = [ScriptTransfer(addressFromStringValue(F), J, unit)]
105- let L = [DataEntry((i + "_result"), toString(z)), DataEntry((i + "_winner"), F), DataEntry((i + "_winAmt"), J)]
106- ScriptResult(WriteSet(L), TransferSet(K))
107+ let j = fromBase58String(I)
108+ let A = h(i, j)
109+ let G = C(i, A)
110+ let K = F(G)
111+ let L = [ScriptTransfer(addressFromStringValue(G), K, unit)]
112+ let M = [DataEntry((i + "_result"), toString(A)), DataEntry((i + "_winner"), G), DataEntry((i + "_winAmt"), K)]
113+ ScriptResult(WriteSet(M), TransferSet(L))
107114 }
108- else throw(((("Current Game is " + I) + ", but not ") + i))
115+ else throw(((("Current Game is " + J) + ", but not ") + i))
109116 }
110117
111118
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = fromBase58String("7im9caiCmE4SL6jTm4KTicHH4bGPf5v59rnfUA3cCRDj")
55
66 let b = addressFromStringValue("3N6yFJ5Z8NUUQvfGGMLp5efmevRRtTgQuun")
77
88 let c = ((100 * 1000) * 1000)
99
1010 let d = ((5 * c) / 1000)
1111
1212 let e = 100
1313
1414 let f = "$CURRENT_GAME"
1515
1616 let g = "$LAST_TICKET"
1717
1818 func h (i,j) = {
1919 let k = getIntegerValue(b, g)
2020 let l = sigVerify(toBytes(i), j, a)
2121 if (l)
2222 then {
2323 let m = (toInt(sha256(j)) % k)
2424 if ((0 > m))
2525 then ((-1 * m) + 1)
2626 else (m + 1)
2727 }
2828 else throw("Invalid RSA signature")
2929 }
3030
3131
3232 func n (i,o) = {
3333 let p = (((i + "_") + o) + "_tickets")
3434 getStringValue(b, p)
3535 }
3636
3737
3838 func q (r) = {
3939 let s = size(r)
4040 if ((s > 0))
4141 then {
4242 let t = parseIntValue(take(r, 2))
4343 let u = take(drop(r, 2), t)
4444 let v = drop(r, (t + 2))
4545 let w = v
4646 [u, w]
4747 }
4848 else throw("Empty string was passed into parseNextAttribute func")
4949 }
5050
5151
5252 func x (p) = ["1", "100", "101", "300", "0", "0", "0", "0"]
5353
5454
55-func y (i,o,z) = {
56- let A = x(n(i, o))
57- if (if ((z >= parseIntValue(A[0])))
58- then (parseIntValue(A[1]) >= z)
55+func y (o) = if ((o == "3MsD5LWNJmQkkWpj3RtaeRVrKGLgoCE7kpB"))
56+ then ["1", "100", "0", "0", "0", "0", "0", "0"]
57+ else if ((o == "3N8bMv9V4spvb9bAeRtGve5RLkVN8swFDWc"))
58+ then ["101", "300", "0", "0", "0", "0", "0", "0"]
59+ else throw("Победитель не учавствовал епт")
60+
61+
62+func z (i,o,A) = {
63+ let B = y(o)
64+ if (if ((A >= parseIntValue(B[0])))
65+ then (parseIntValue(B[1]) >= A)
5966 else false)
6067 then true
61- else if (if ((z >= parseIntValue(A[2])))
62- then (parseIntValue(A[3]) >= z)
68+ else if (if ((A >= parseIntValue(B[2])))
69+ then (parseIntValue(B[3]) >= A)
6370 else false)
6471 then true
65- else if (if ((z >= parseIntValue(A[4])))
66- then (parseIntValue(A[5]) >= z)
72+ else if (if ((A >= parseIntValue(B[4])))
73+ then (parseIntValue(B[5]) >= A)
6774 else false)
6875 then true
69- else if (if ((z >= parseIntValue(A[6])))
70- then (parseIntValue(A[7]) >= z)
76+ else if (if ((A >= parseIntValue(B[6])))
77+ then (parseIntValue(B[7]) >= A)
7178 else false)
7279 then true
7380 else false
7481 }
7582
7683
77-func B (i,z) = {
78- let C = getStringValue(b, (i + "_players"))
79- let D = split(C, "_")
80- if (y(i, D[0], z))
81- then D[0]
82- else if (y(i, D[1], z))
83- then D[1]
84- else if (y(i, D[2], z))
85- then D[2]
86- else if (y(i, D[3], z))
87- then D[3]
84+func C (i,A) = {
85+ let D = getStringValue(b, (i + "_players"))
86+ let E = split(D, "_")
87+ if (z(i, E[0], A))
88+ then E[0]
89+ else if (z(i, E[1], A))
90+ then E[1]
91+ else if (z(i, E[2], A))
92+ then E[2]
93+ else if (z(i, E[3], A))
94+ then E[3]
8895 else throw("Error with defining winner")
8996 }
9097
9198
92-func E (F) = (1 * c)
99+func F (G) = (1 * c)
93100
94101
95-@Callable(G)
96-func generateResult (i,H) = {
97- let I = getStringValue(b, f)
98- if ((I == i))
102+@Callable(H)
103+func generateResult (i,I) = {
104+ let J = getStringValue(b, f)
105+ if ((J == i))
99106 then {
100- let j = fromBase58String(H)
101- let z = h(i, j)
102- let F = "3N6xavpiLALkk4H4qWfeZ4N1cmvoykyToBa"
103- let J = E(F)
104- let K = [ScriptTransfer(addressFromStringValue(F), J, unit)]
105- let L = [DataEntry((i + "_result"), toString(z)), DataEntry((i + "_winner"), F), DataEntry((i + "_winAmt"), J)]
106- ScriptResult(WriteSet(L), TransferSet(K))
107+ let j = fromBase58String(I)
108+ let A = h(i, j)
109+ let G = C(i, A)
110+ let K = F(G)
111+ let L = [ScriptTransfer(addressFromStringValue(G), K, unit)]
112+ let M = [DataEntry((i + "_result"), toString(A)), DataEntry((i + "_winner"), G), DataEntry((i + "_winAmt"), K)]
113+ ScriptResult(WriteSet(M), TransferSet(L))
107114 }
108- else throw(((("Current Game is " + I) + ", but not ") + i))
115+ else throw(((("Current Game is " + J) + ", but not ") + i))
109116 }
110117
111118

github/deemru/w8io/169f3d6 
442.89 ms