tx · 32kGkj89KUW4ci8NGuHUXTBrGhMScP865vLDZBkySyhT 3N2Z6EjzrzaCpD8ypDYLWDKe2PPVU8y9dJs: -0.01400000 Waves 2019.08.27 23:35 [650086] smart account 3N2Z6EjzrzaCpD8ypDYLWDKe2PPVU8y9dJs > SELF 0.00000000 Waves
{ "type": 13, "id": "32kGkj89KUW4ci8NGuHUXTBrGhMScP865vLDZBkySyhT", "fee": 1400000, "feeAssetId": null, "timestamp": 1566938242847, "version": 1, "sender": "3N2Z6EjzrzaCpD8ypDYLWDKe2PPVU8y9dJs", "senderPublicKey": "HSTmdhPrJF81ozDBaqVn8QVtV76oD7gzDfcHPQRdxdwW", "proofs": [ "4Wkz3XbdKLqUngXpEZCE41n6LtCyyPhsyMbu8p5YNwKD6kJrpRkJQv3PZkaDqJJjCWA5j748jmPWrcsrdgp6PcFK" ], "script": "base64:AAIDAAAAAAAAAAAAAAAQAAAAAAdXQVZFTEVUCQAAaAAAAAIJAABoAAAAAgAAAAAAAAAAZAAAAAAAAAAD6AAAAAAAAAAD6AAAAAAKQ09NTUlTU0lPTgkAAGkAAAACCQAAaAAAAAIAAAAAAAAAAAUFAAAAB1dBVkVMRVQAAAAAAAAAA+gAAAAAClRva2VuUHJpY2UAAAAAAAAAAAoAAAAAEERPTkFURUNPVU5URVJLRVkCAAAACyRET05BVEVfTlVNAAAAAAdCVVlJVEVNAgAAAAkkQlVZX0lURU0AAAAABEJhZzEJAABoAAAAAgAAAAAAAAAAAQUAAAAHV0FWRUxFVAAAAAAEQmFnNQkAAGgAAAACAAAAAAAAAAAFBQAAAAdXQVZFTEVUAAAAAAVCYWcxMAkAAGgAAAACAAAAAAAAAAAKBQAAAAdXQVZFTEVUAAAAAAVCYWcyMAkAAGgAAAACAAAAAAAAAAAUBQAAAAdXQVZFTEVUAAAAAAVCYWc1MAkAAGgAAAACAAAAAAAAAAAyBQAAAAdXQVZFTEVUAAAAAAZCYWcxMDAJAABoAAAAAgAAAAAAAAAAZAUAAAAHV0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AAnR4AQAAAAZ2ZXJpZnkAAAAAAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAN0dHgFAAAAByRtYXRjaDAGAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAADc3R4BQAAAAckbWF0Y2gwBgcHR5ju1A==", "chainId": 84, "height": 650086, "spentComplexity": 0 } View: original | compacted Prev: 4qmcCnWVMZvQTufm9pyJ9wWEfX87qxT3TYMtsNQWSAMN Next: GY1d3fNpDDQpDPH6wfFoGwHj9uvXXbbXKQUxkzZi5sGX Diff:
Old | New | Differences | |
---|---|---|---|
82 | 82 | let z = n | |
83 | 83 | toString(z) | |
84 | 84 | } | |
85 | - | else " | |
85 | + | else "undefined" | |
86 | 86 | } | |
87 | 87 | t | |
88 | 88 | } | |
98 | 98 | let G = DataEntry((C + "_balance"), F) | |
99 | 99 | let y = s(D) | |
100 | 100 | let H = x(y, w) | |
101 | - | if ((H == "")) | |
101 | + | if ((H == "undefined")) | |
102 | 102 | then throw("This item not exist") | |
103 | - | else throw( | |
103 | + | else throw((("Новый список айтемов: " + w) + ":2")) | |
104 | 104 | } | |
105 | 105 | ||
106 | 106 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = ((100 * 1000) * 1000) | |
5 | 5 | ||
6 | 6 | let b = ((5 * a) / 1000) | |
7 | 7 | ||
8 | 8 | let c = 10 | |
9 | 9 | ||
10 | 10 | let d = "$DONATE_NUM" | |
11 | 11 | ||
12 | 12 | let e = "$BUY_ITEM" | |
13 | 13 | ||
14 | 14 | let f = (1 * a) | |
15 | 15 | ||
16 | 16 | let g = (5 * a) | |
17 | 17 | ||
18 | 18 | let h = (10 * a) | |
19 | 19 | ||
20 | 20 | let i = (20 * a) | |
21 | 21 | ||
22 | 22 | let j = (50 * a) | |
23 | 23 | ||
24 | 24 | let k = (100 * a) | |
25 | 25 | ||
26 | 26 | func l () = { | |
27 | 27 | let m = { | |
28 | 28 | let n = getInteger(this, d) | |
29 | 29 | if ($isInstanceOf(n, "Int")) | |
30 | 30 | then { | |
31 | 31 | let o = n | |
32 | 32 | o | |
33 | 33 | } | |
34 | 34 | else 0 | |
35 | 35 | } | |
36 | 36 | (m + 1) | |
37 | 37 | } | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func p (q) = { | |
41 | 41 | let r = { | |
42 | 42 | let n = getInteger(this, q) | |
43 | 43 | if ($isInstanceOf(n, "Int")) | |
44 | 44 | then { | |
45 | 45 | let r = n | |
46 | 46 | r | |
47 | 47 | } | |
48 | 48 | else 0 | |
49 | 49 | } | |
50 | 50 | r | |
51 | 51 | } | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func s (q) = { | |
55 | 55 | let t = { | |
56 | 56 | let n = getString(this, q) | |
57 | 57 | if ($isInstanceOf(n, "String")) | |
58 | 58 | then { | |
59 | 59 | let u = n | |
60 | 60 | u | |
61 | 61 | } | |
62 | 62 | else "" | |
63 | 63 | } | |
64 | 64 | t | |
65 | 65 | } | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func v (w) = if ((w == "1")) | |
69 | 69 | then 1 | |
70 | 70 | else if ((w == "2")) | |
71 | 71 | then 4 | |
72 | 72 | else if ((w == "3")) | |
73 | 73 | then 6 | |
74 | 74 | else throw("Неверный ID item") | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func x (y,w) = { | |
78 | 78 | let t = { | |
79 | 79 | let n = indexOf(y, (w + ":")) | |
80 | 80 | if ($isInstanceOf(n, "Int")) | |
81 | 81 | then { | |
82 | 82 | let z = n | |
83 | 83 | toString(z) | |
84 | 84 | } | |
85 | - | else " | |
85 | + | else "undefined" | |
86 | 86 | } | |
87 | 87 | t | |
88 | 88 | } | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | @Callable(A) | |
92 | 92 | func buy (w) = { | |
93 | 93 | let B = toBase58String(A.transactionId) | |
94 | 94 | let C = toString(A.caller) | |
95 | 95 | let D = (C + "_items") | |
96 | 96 | let E = v(w) | |
97 | 97 | let F = (p((C + "_balance")) - E) | |
98 | 98 | let G = DataEntry((C + "_balance"), F) | |
99 | 99 | let y = s(D) | |
100 | 100 | let H = x(y, w) | |
101 | - | if ((H == "")) | |
101 | + | if ((H == "undefined")) | |
102 | 102 | then throw("This item not exist") | |
103 | - | else throw( | |
103 | + | else throw((("Новый список айтемов: " + w) + ":2")) | |
104 | 104 | } | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | ||
108 | 108 | @Callable(A) | |
109 | 109 | func reset () = { | |
110 | 110 | let C = toString(A.caller) | |
111 | 111 | let I = [DataEntry(d, 0), DataEntry((C + "_balance"), 0)] | |
112 | 112 | WriteSet(I) | |
113 | 113 | } | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | ||
117 | 117 | @Callable(A) | |
118 | 118 | func donate () = { | |
119 | 119 | let J = l() | |
120 | 120 | let K = toBase58String(A.transactionId) | |
121 | 121 | let L = extract(A.payment) | |
122 | 122 | let C = toString(A.caller) | |
123 | 123 | let M = isDefined(L.assetId) | |
124 | 124 | let N = isDefined(L.assetId) | |
125 | 125 | let O = L.amount | |
126 | 126 | if (M) | |
127 | 127 | then throw("Bet amount must be in Waves") | |
128 | 128 | else if (N) | |
129 | 129 | then throw("Transaction's fee must be in Waves") | |
130 | 130 | else { | |
131 | 131 | let P = if (if (if (if (if (if ((O == (f + b))) | |
132 | 132 | then true | |
133 | 133 | else (O == (g + b))) | |
134 | 134 | then true | |
135 | 135 | else (O == (h + b))) | |
136 | 136 | then true | |
137 | 137 | else (O == (i + b))) | |
138 | 138 | then true | |
139 | 139 | else (O == (j + b))) | |
140 | 140 | then true | |
141 | 141 | else (O == (k + b))) | |
142 | 142 | then true | |
143 | 143 | else false | |
144 | 144 | if (P) | |
145 | 145 | then { | |
146 | 146 | let Q = ((O - b) / a) | |
147 | 147 | let R = (C + "_balance") | |
148 | 148 | let S = (p(R) + (Q * c)) | |
149 | 149 | let I = [DataEntry(d, J), DataEntry(R, S), DataEntry(K, Q)] | |
150 | 150 | WriteSet(I) | |
151 | 151 | } | |
152 | 152 | else throw("You paid the wrong amount") | |
153 | 153 | } | |
154 | 154 | } | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | @Verifier(T) | |
158 | 158 | func U () = if (sigVerify(T.bodyBytes, T.proofs[0], T.senderPublicKey)) | |
159 | 159 | then { | |
160 | 160 | let n = T | |
161 | 161 | if ($isInstanceOf(n, "TransferTransaction")) | |
162 | 162 | then { | |
163 | 163 | let V = n | |
164 | 164 | true | |
165 | 165 | } | |
166 | 166 | else if ($isInstanceOf(n, "SetScriptTransaction")) | |
167 | 167 | then { | |
168 | 168 | let W = n | |
169 | 169 | true | |
170 | 170 | } | |
171 | 171 | else false | |
172 | 172 | } | |
173 | 173 | else false | |
174 | 174 |
github/deemru/w8io/026f985 27.01 ms ◑