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+gAAAAACkNPTU1JU1NJT04JAABpAAAAAgkAAGgAAAACAAAAAAAAAAAFBQAAAAdXQVZFTEVUAAAAAAAAAAPoAAAAAA5UaWNrZXRzUGVyV2F2ZQAAAAAAAAAAZAAAAAALQ1VSUkVOVEdBTUUCAAAADSRDVVJSRU5UX0dBTUUAAAAACkxBU1RUSUNLRVQCAAAADCRMQVNUX1RJQ0tFVAEAAAAPR2VuZXJhdGVSYW5kSW50AAAAAgAAAAZnYW1lSWQAAAAHcnNhU2lnbgQAAAAKbGFzdFRp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AAZnYW1lSWQFAAAAB3JzYVNpZ24EAAAAEHdpbm5lckFkZHJlc3NTdHIJAQAAAAxkZWZpbmVXaW5uZXIAAAACBQAAAAZnYW1lSWQFAAAACXdpblRpY2tldAQAAAAGd2luQW10CQEAAAAMZGVmaW5lV2luQW10AAAAAQUAAAAQd2lubmVyQWRkcmVzc1N0cgQAAAAFd2luVFgJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAABB3aW5uZXJBZGRyZXNzU3RyBQAAAAZ3aW5BbXQFAAAABHVuaXQFAAAAA25pbAQAAAAKZ2FtZVJlc3VsdAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACBQAAAAZnYW1lSWQCAAAAB19yZXN1bHQJAAGkAAAAAQUAAAAJd2luVGlja2V0CQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAABmdhbWVJZAIAAAAHX3dpbm5lcgUAAAAQd2lubmVyQWRkcmVzc1N0cgkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACBQAAAAZnYW1lSWQCAAAAB193aW5BbXQFAAAABndpbkFtdAUAAAADbmlsCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQUAAAAKZ2FtZVJlc3VsdAkBAAAAC1RyYW5zZmVyU2V0AAAAAQUAAAAFd2luVFgJAAACAAAAAQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAQQ3VycmVudCBHYW1lIGlzIAUAAAALY3VycmVudEdhbWUCAAAACiwgYnV0IG5vdCAFAAAABmdhbWVJZAAAAADJg0yO", "chainId": 84, "height": 666713, "spentComplexity": 0 } View: original | compacted Prev: BdcbaA9oBiVYJpP7HCLpMmnisL3mptRw2ZkBsYowHGSV Next: GPMEoeDGzmpAZ4cCpxx3DAVdRYRx4mEmVSRTUbfw3A3a Diff:
Old | New | Differences | |
---|---|---|---|
52 | 52 | func x (p) = ["1", "100", "101", "300", "0", "0", "0", "0"] | |
53 | 53 | ||
54 | 54 | ||
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) | |
59 | 66 | else false) | |
60 | 67 | then true | |
61 | - | else if (if (( | |
62 | - | then (parseIntValue( | |
68 | + | else if (if ((A >= parseIntValue(B[2]))) | |
69 | + | then (parseIntValue(B[3]) >= A) | |
63 | 70 | else false) | |
64 | 71 | then true | |
65 | - | else if (if (( | |
66 | - | then (parseIntValue( | |
72 | + | else if (if ((A >= parseIntValue(B[4]))) | |
73 | + | then (parseIntValue(B[5]) >= A) | |
67 | 74 | else false) | |
68 | 75 | then true | |
69 | - | else if (if (( | |
70 | - | then (parseIntValue( | |
76 | + | else if (if ((A >= parseIntValue(B[6]))) | |
77 | + | then (parseIntValue(B[7]) >= A) | |
71 | 78 | else false) | |
72 | 79 | then true | |
73 | 80 | else false | |
74 | 81 | } | |
75 | 82 | ||
76 | 83 | ||
77 | - | func | |
78 | - | let | |
79 | - | let | |
80 | - | if ( | |
81 | - | then | |
82 | - | else if ( | |
83 | - | then | |
84 | - | else if ( | |
85 | - | then | |
86 | - | else if ( | |
87 | - | then | |
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] | |
88 | 95 | else throw("Error with defining winner") | |
89 | 96 | } | |
90 | 97 | ||
91 | 98 | ||
92 | - | func | |
99 | + | func F (G) = (1 * c) | |
93 | 100 | ||
94 | 101 | ||
95 | - | @Callable( | |
96 | - | func generateResult (i, | |
97 | - | let | |
98 | - | if (( | |
102 | + | @Callable(H) | |
103 | + | func generateResult (i,I) = { | |
104 | + | let J = getStringValue(b, f) | |
105 | + | if ((J == i)) | |
99 | 106 | then { | |
100 | - | let j = fromBase58String( | |
101 | - | let | |
102 | - | let | |
103 | - | let | |
104 | - | let | |
105 | - | let | |
106 | - | ScriptResult(WriteSet( | |
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)) | |
107 | 114 | } | |
108 | - | else throw(((("Current Game is " + | |
115 | + | else throw(((("Current Game is " + J) + ", but not ") + i)) | |
109 | 116 | } | |
110 | 117 | ||
111 | 118 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = fromBase58String("7im9caiCmE4SL6jTm4KTicHH4bGPf5v59rnfUA3cCRDj") | |
5 | 5 | ||
6 | 6 | let b = addressFromStringValue("3N6yFJ5Z8NUUQvfGGMLp5efmevRRtTgQuun") | |
7 | 7 | ||
8 | 8 | let c = ((100 * 1000) * 1000) | |
9 | 9 | ||
10 | 10 | let d = ((5 * c) / 1000) | |
11 | 11 | ||
12 | 12 | let e = 100 | |
13 | 13 | ||
14 | 14 | let f = "$CURRENT_GAME" | |
15 | 15 | ||
16 | 16 | let g = "$LAST_TICKET" | |
17 | 17 | ||
18 | 18 | func h (i,j) = { | |
19 | 19 | let k = getIntegerValue(b, g) | |
20 | 20 | let l = sigVerify(toBytes(i), j, a) | |
21 | 21 | if (l) | |
22 | 22 | then { | |
23 | 23 | let m = (toInt(sha256(j)) % k) | |
24 | 24 | if ((0 > m)) | |
25 | 25 | then ((-1 * m) + 1) | |
26 | 26 | else (m + 1) | |
27 | 27 | } | |
28 | 28 | else throw("Invalid RSA signature") | |
29 | 29 | } | |
30 | 30 | ||
31 | 31 | ||
32 | 32 | func n (i,o) = { | |
33 | 33 | let p = (((i + "_") + o) + "_tickets") | |
34 | 34 | getStringValue(b, p) | |
35 | 35 | } | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | func q (r) = { | |
39 | 39 | let s = size(r) | |
40 | 40 | if ((s > 0)) | |
41 | 41 | then { | |
42 | 42 | let t = parseIntValue(take(r, 2)) | |
43 | 43 | let u = take(drop(r, 2), t) | |
44 | 44 | let v = drop(r, (t + 2)) | |
45 | 45 | let w = v | |
46 | 46 | [u, w] | |
47 | 47 | } | |
48 | 48 | else throw("Empty string was passed into parseNextAttribute func") | |
49 | 49 | } | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func x (p) = ["1", "100", "101", "300", "0", "0", "0", "0"] | |
53 | 53 | ||
54 | 54 | ||
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) | |
59 | 66 | else false) | |
60 | 67 | then true | |
61 | - | else if (if (( | |
62 | - | then (parseIntValue( | |
68 | + | else if (if ((A >= parseIntValue(B[2]))) | |
69 | + | then (parseIntValue(B[3]) >= A) | |
63 | 70 | else false) | |
64 | 71 | then true | |
65 | - | else if (if (( | |
66 | - | then (parseIntValue( | |
72 | + | else if (if ((A >= parseIntValue(B[4]))) | |
73 | + | then (parseIntValue(B[5]) >= A) | |
67 | 74 | else false) | |
68 | 75 | then true | |
69 | - | else if (if (( | |
70 | - | then (parseIntValue( | |
76 | + | else if (if ((A >= parseIntValue(B[6]))) | |
77 | + | then (parseIntValue(B[7]) >= A) | |
71 | 78 | else false) | |
72 | 79 | then true | |
73 | 80 | else false | |
74 | 81 | } | |
75 | 82 | ||
76 | 83 | ||
77 | - | func | |
78 | - | let | |
79 | - | let | |
80 | - | if ( | |
81 | - | then | |
82 | - | else if ( | |
83 | - | then | |
84 | - | else if ( | |
85 | - | then | |
86 | - | else if ( | |
87 | - | then | |
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] | |
88 | 95 | else throw("Error with defining winner") | |
89 | 96 | } | |
90 | 97 | ||
91 | 98 | ||
92 | - | func | |
99 | + | func F (G) = (1 * c) | |
93 | 100 | ||
94 | 101 | ||
95 | - | @Callable( | |
96 | - | func generateResult (i, | |
97 | - | let | |
98 | - | if (( | |
102 | + | @Callable(H) | |
103 | + | func generateResult (i,I) = { | |
104 | + | let J = getStringValue(b, f) | |
105 | + | if ((J == i)) | |
99 | 106 | then { | |
100 | - | let j = fromBase58String( | |
101 | - | let | |
102 | - | let | |
103 | - | let | |
104 | - | let | |
105 | - | let | |
106 | - | ScriptResult(WriteSet( | |
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)) | |
107 | 114 | } | |
108 | - | else throw(((("Current Game is " + | |
115 | + | else throw(((("Current Game is " + J) + ", but not ") + i)) | |
109 | 116 | } | |
110 | 117 | ||
111 | 118 |
github/deemru/w8io/169f3d6 442.89 ms ◑