tx · C2hc99UQQvsSa1kNPUao8NaMtvoJwspCXEYGbq83Lr2v
3NAg879tKUJh949h21umkwiaRQhwZftz1BE: -0.05000000 Waves
2019.09.06 16:42 [664274] smart account 3NAg879tKUJh949h21umkwiaRQhwZftz1BE > SELF 0.00000000 Waves
{
"type": 13,
"id": "C2hc99UQQvsSa1kNPUao8NaMtvoJwspCXEYGbq83Lr2v",
"fee": 5000000,
"feeAssetId": null,
"timestamp": 1567777329604,
"version": 1,
"sender": "3NAg879tKUJh949h21umkwiaRQhwZftz1BE",
"senderPublicKey": "BqY2jhkQCcbidtQdQZu6f9RV3AkFAS8VPToHxwYu1KdJ",
"proofs": [
"2mrJmMMJjhRaHpxe7annhz9i2nWxV2CyRovzoJHzoGXBQjXtkdJ6AbzDn8SDttCD8S1bF9qs1T8GyFh1oFfpJjBB"
],
"script": "base64:AAIDAAAAAAAAAAAAAAAdAAAAAAN3dnMAAAAAAAX14QAAAAAAGW5vdFN1cHBvcnRlZEN1cnJlbmN5RXJyb3ICAAAAGzxub3RTdXBwb3J0ZWRDdXJyZW5jeUVycm9yPgAAAAAXaXNzdWVyQWNjZXNzRGVuaWVkRXJyb3ICAAAAGTxpc3N1ZXJBY2Nlc3NEZW5pZWRFcnJvcj4AAAAAFW5vdEVub3VnaFBheW1lbnRFcnJvcgIAAAAXPG5vdEVub3VnaFBheW1lbnRFcnJvcj4AAAAAJHRpY2tlclZhbGlkYXRpb25Ob3RFbm91Z2hSYXRpbmdFcnJvcgIAAAAmPHRpY2tlclZhbGlkYXRpb25Ob3RFbm91Z2hSYXRpbmdFcnJvcj4AAAAAInRpY2tlclZhbGlkYXRpb25UaWNrZXJJc0V4aXN0RXJyb3ICAAAAJDx0aWNrZXJWYWxpZGF0aW9uVGlja2VySXNFeGlzdEVycm9yPgAAAAAgdGlja2VyVmFsaWRhdGlvbldyb25nRm9ybWF0RXJyb3ICAAAAIjx0aWNrZXJWYWxpZGF0aW9uV3JvbmdGb3JtYXRFcnJvcj4AAAAA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AAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAABRpc3N1ZXJEZXNjcmlwdGlvbktleQUAAAALZGVzY3JpcHRpb24FAAAAA25pbAkAAAIAAAABBQAAABdpc3N1ZXJBY2Nlc3NEZW5pZWRFcnJvcgkAAAIAAAABBQAAABVub3RFbm91Z2hQYXltZW50RXJyb3IJAAACAAAAAQUAAAAZbm90U3VwcG9ydGVkQ3VycmVuY3lFcnJvcgAAAAFpAQAAAAp1cGRhdGVMaW5rAAAAAgAAAAdhc3NldElkAAAABGxpbmsEAAAADWlzc3VlckxpbmtLZXkJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAAC2lzc3VlckxpbmtfAgAAAAE8BQAAAAdhc3NldElkAgAAAAE+AwkBAAAAEGlzUGF5bWVudEluV2F2ZXMAAAABBQAAAAFpAwkBAAAAD2lzRW5vdWdoUGF5bWVudAAAAAIFAAAAAWkFAAAAD2xpbmtVcGRhdGVQcmljZQMJAQAAABNpc0NhbGxlckFzc2V0SXNzdWVyAAAAAgUAAAABaQUAAAAHYXNzZXRJZAkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAANaXNzdWVyTGlua0tleQUAAAAEbGluawUAAAADbmlsCQAAAgAAAAEFAAAAF2lzc3VlckFjY2Vzc0RlbmllZEVycm9yCQAAAgAAAAEFAAAAFW5vdEVub3VnaFBheW1lbnRFcnJvcgkAAAIAAAABBQAAABlub3RTdXBwb3J0ZWRDdXJyZW5jeUVycm9yAAAAALjUxA0=",
"chainId": 84,
"height": 664274,
"spentComplexity": 0
}
View: original | compacted
Prev: 4tz8FRfnpt8iJi6FJ17T1XgEeSKZC2bj6sx6ZKrCSZsu
Next: 72S48YsSEKC7urFci1L8py3koXBs3DudgdUdt49PVyx6
Diff:
Old | New | | Differences |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = 100000000 |
---|
5 | 5 | | |
---|
6 | | - | let b = "<\"{\"name\": \"notSupportedCurrency\", \"message\": \"The service can only be paid in waves.\"}\">" |
---|
| 6 | + | let b = "<notSupportedCurrencyError>" |
---|
7 | 7 | | |
---|
8 | | - | let c = "<\"{\"name\": \"issuerAccessRights\", \"message\": \"Only asset issuer can add/update information.\"}\">" |
---|
| 8 | + | let c = "<issuerAccessDeniedError>" |
---|
9 | 9 | | |
---|
10 | | - | func d (e,f) = (((("<\"{\"name\": \"issuerAccessRights\", \"message\": \"Not enough payment for Asset " + e) + "ticker update service. Required ") + toString(f)) + " waves.\"}\">") |
---|
| 10 | + | let d = "<notEnoughPaymentError>" |
---|
11 | 11 | | |
---|
| 12 | + | let e = "<tickerValidationNotEnoughRatingError>" |
---|
12 | 13 | | |
---|
13 | | - | let g = (1 * a) |
---|
| 14 | + | let f = "<tickerValidationTickerIsExistError>" |
---|
14 | 15 | | |
---|
15 | | - | let h = (1 * a) |
---|
| 16 | + | let g = "<tickerValidationWrongFormatError>" |
---|
16 | 17 | | |
---|
17 | | - | let i = (2 * a) |
---|
| 18 | + | let h = "<nonExistentAssetError>" |
---|
18 | 19 | | |
---|
19 | | - | let j = 1 |
---|
| 20 | + | let i = "<noPaymentError>" |
---|
20 | 21 | | |
---|
21 | | - | let k = 6 |
---|
| 22 | + | let j = (1 * a) |
---|
22 | 23 | | |
---|
23 | | - | let l = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" |
---|
| 24 | + | let k = (1 * a) |
---|
24 | 25 | | |
---|
25 | | - | let m = addressFromStringValue("3MxHxW5VWq4KrWcbhFfxKrafXm4mL6rZHfj") |
---|
| 26 | + | let l = (2 * a) |
---|
26 | 27 | | |
---|
27 | | - | let n = addressFromStringValue("3NADqHoLMbMTfXdP2TeBBSx5mQXePVj3KZm") |
---|
| 28 | + | let m = 1 |
---|
28 | 29 | | |
---|
29 | | - | func o (p,q) = { |
---|
30 | | - | let r = getInteger(p, q) |
---|
31 | | - | if ($isInstanceOf(r, "Int")) |
---|
| 30 | + | let n = 6 |
---|
| 31 | + | |
---|
| 32 | + | let o = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" |
---|
| 33 | + | |
---|
| 34 | + | let p = addressFromStringValue("3MxHxW5VWq4KrWcbhFfxKrafXm4mL6rZHfj") |
---|
| 35 | + | |
---|
| 36 | + | let q = addressFromStringValue("3NADqHoLMbMTfXdP2TeBBSx5mQXePVj3KZm") |
---|
| 37 | + | |
---|
| 38 | + | func r (s,t) = { |
---|
| 39 | + | let u = getInteger(s, t) |
---|
| 40 | + | if ($isInstanceOf(u, "Int")) |
---|
32 | 41 | | then { |
---|
33 | | - | let s = r |
---|
34 | | - | s |
---|
| 42 | + | let v = u |
---|
| 43 | + | v |
---|
35 | 44 | | } |
---|
36 | 45 | | else 0 |
---|
37 | 46 | | } |
---|
38 | 47 | | |
---|
39 | 48 | | |
---|
40 | | - | func t (u,v) = { |
---|
41 | | - | let r = indexOf(u, v) |
---|
42 | | - | if ($isInstanceOf(r, "Int")) |
---|
| 49 | + | func w (x,y) = { |
---|
| 50 | + | let u = indexOf(x, y) |
---|
| 51 | + | if ($isInstanceOf(u, "Int")) |
---|
43 | 52 | | then { |
---|
44 | | - | let w = r |
---|
| 53 | + | let z = u |
---|
45 | 54 | | true |
---|
46 | 55 | | } |
---|
47 | | - | else if ($isInstanceOf(r, "Unit")) |
---|
| 56 | + | else if ($isInstanceOf(u, "Unit")) |
---|
48 | 57 | | then { |
---|
49 | | - | let w = r |
---|
| 58 | + | let z = u |
---|
50 | 59 | | false |
---|
51 | 60 | | } |
---|
52 | 61 | | else throw() |
---|
53 | 62 | | } |
---|
54 | 63 | | |
---|
55 | 64 | | |
---|
56 | | - | func x (y) = { |
---|
57 | | - | let z = split(y, "") |
---|
58 | | - | let A = size(z) |
---|
59 | | - | let B = t(l, z[0]) |
---|
60 | | - | let C = t(l, z[1]) |
---|
61 | | - | let D = t(l, z[2]) |
---|
62 | | - | let E = t(l, z[3]) |
---|
63 | | - | let F = t(l, z[4]) |
---|
64 | | - | let G = t(l, z[5]) |
---|
65 | | - | if ((y != "")) |
---|
66 | | - | then if (if ((A >= j)) |
---|
67 | | - | then (k >= A) |
---|
| 65 | + | func A (B) = { |
---|
| 66 | + | let C = split(B, "") |
---|
| 67 | + | let D = size(C) |
---|
| 68 | + | let E = w(o, C[0]) |
---|
| 69 | + | let F = w(o, C[1]) |
---|
| 70 | + | let G = w(o, C[2]) |
---|
| 71 | + | let H = w(o, C[3]) |
---|
| 72 | + | let I = w(o, C[4]) |
---|
| 73 | + | let J = w(o, C[5]) |
---|
| 74 | + | if ((B != "")) |
---|
| 75 | + | then if (if ((D >= m)) |
---|
| 76 | + | then (n >= D) |
---|
68 | 77 | | else false) |
---|
69 | | - | then if ((1 == A)) |
---|
70 | | - | then B |
---|
71 | | - | else if ((2 == A)) |
---|
72 | | - | then if (B) |
---|
73 | | - | then C |
---|
| 78 | + | then if ((1 == D)) |
---|
| 79 | + | then E |
---|
| 80 | + | else if ((2 == D)) |
---|
| 81 | + | then if (E) |
---|
| 82 | + | then F |
---|
74 | 83 | | else false |
---|
75 | | - | else if ((3 == A)) |
---|
76 | | - | then if (if (B) |
---|
77 | | - | then C |
---|
| 84 | + | else if ((3 == D)) |
---|
| 85 | + | then if (if (E) |
---|
| 86 | + | then F |
---|
78 | 87 | | else false) |
---|
79 | | - | then D |
---|
| 88 | + | then G |
---|
80 | 89 | | else false |
---|
81 | | - | else if ((4 == A)) |
---|
82 | | - | then if (if (if (B) |
---|
83 | | - | then C |
---|
| 90 | + | else if ((4 == D)) |
---|
| 91 | + | then if (if (if (E) |
---|
| 92 | + | then F |
---|
84 | 93 | | else false) |
---|
85 | | - | then D |
---|
| 94 | + | then G |
---|
86 | 95 | | else false) |
---|
87 | | - | then E |
---|
| 96 | + | then H |
---|
88 | 97 | | else false |
---|
89 | | - | else if ((5 == A)) |
---|
90 | | - | then if (if (if (if (B) |
---|
91 | | - | then C |
---|
| 98 | + | else if ((5 == D)) |
---|
| 99 | + | then if (if (if (if (E) |
---|
| 100 | + | then F |
---|
92 | 101 | | else false) |
---|
93 | | - | then D |
---|
| 102 | + | then G |
---|
94 | 103 | | else false) |
---|
95 | | - | then E |
---|
| 104 | + | then H |
---|
96 | 105 | | else false) |
---|
97 | | - | then F |
---|
| 106 | + | then I |
---|
98 | 107 | | else false |
---|
99 | | - | else if ((6 == A)) |
---|
100 | | - | then if (if (if (if (if (B) |
---|
101 | | - | then C |
---|
102 | | - | else false) |
---|
103 | | - | then D |
---|
104 | | - | else false) |
---|
105 | | - | then E |
---|
106 | | - | else false) |
---|
| 108 | + | else if ((6 == D)) |
---|
| 109 | + | then if (if (if (if (if (E) |
---|
107 | 110 | | then F |
---|
108 | 111 | | else false) |
---|
109 | 112 | | then G |
---|
| 113 | + | else false) |
---|
| 114 | + | then H |
---|
| 115 | + | else false) |
---|
| 116 | + | then I |
---|
| 117 | + | else false) |
---|
| 118 | + | then J |
---|
110 | 119 | | else false |
---|
111 | 120 | | else false |
---|
112 | 121 | | else false |
---|
|
114 | 123 | | } |
---|
115 | 124 | | |
---|
116 | 125 | | |
---|
117 | | - | func H (I) = { |
---|
118 | | - | let J = (("assetRating_" + I) + "_1") |
---|
119 | | - | let K = o(n, J) |
---|
120 | | - | let L = o(n, "tickerRating_1") |
---|
121 | | - | (K >= L) |
---|
| 126 | + | func K (L) = { |
---|
| 127 | + | let M = (("assetRating_" + L) + "_1") |
---|
| 128 | + | let N = r(q, M) |
---|
| 129 | + | let O = r(q, "tickerRating_1") |
---|
| 130 | + | (N >= O) |
---|
122 | 131 | | } |
---|
123 | 132 | | |
---|
124 | 133 | | |
---|
125 | | - | func M (I) = { |
---|
126 | | - | let N = "assetWeight" |
---|
127 | | - | let O = o(n, N) |
---|
128 | | - | let P = o(n, "tickerWeight") |
---|
129 | | - | (O >= P) |
---|
| 134 | + | func P (L) = { |
---|
| 135 | + | let Q = "assetWeight" |
---|
| 136 | + | let R = r(q, Q) |
---|
| 137 | + | let S = r(q, "tickerWeight") |
---|
| 138 | + | (R >= S) |
---|
130 | 139 | | } |
---|
131 | 140 | | |
---|
132 | 141 | | |
---|
133 | | - | func Q (I) = { |
---|
134 | | - | let R = "assetVotes" |
---|
135 | | - | let S = o(n, R) |
---|
136 | | - | let T = o(n, "tickerVotes") |
---|
137 | | - | (S >= T) |
---|
| 142 | + | func T (L) = { |
---|
| 143 | + | let U = "assetVotes" |
---|
| 144 | + | let V = r(q, U) |
---|
| 145 | + | let W = r(q, "tickerVotes") |
---|
| 146 | + | (V >= W) |
---|
138 | 147 | | } |
---|
139 | 148 | | |
---|
140 | 149 | | |
---|
141 | | - | func U (I) = if (if (H(I)) |
---|
142 | | - | then M(I) |
---|
| 150 | + | func X (L) = if (if (K(L)) |
---|
| 151 | + | then P(L) |
---|
143 | 152 | | else false) |
---|
144 | | - | then Q(I) |
---|
| 153 | + | then T(L) |
---|
145 | 154 | | else false |
---|
146 | 155 | | |
---|
147 | 156 | | |
---|
148 | | - | func V (I) = toString(valueOrErrorMessage(assetInfo(fromBase58String(I)), "error#6. there is no asset with such id").issuer) |
---|
| 157 | + | func Y (L) = toString(valueOrErrorMessage(assetInfo(fromBase58String(L)), h).issuer) |
---|
149 | 158 | | |
---|
150 | 159 | | |
---|
151 | | - | func W (s) = valueOrErrorMessage(s.payment, "error#8. there is no payment in invocation") |
---|
| 160 | + | func Z (v) = valueOrErrorMessage(v.payment, i) |
---|
152 | 161 | | |
---|
153 | 162 | | |
---|
154 | | - | func X (s) = { |
---|
155 | | - | let Y = W(s) |
---|
156 | | - | if (!(isDefined(Y.assetId))) |
---|
| 163 | + | func aa (v) = { |
---|
| 164 | + | let ab = Z(v) |
---|
| 165 | + | if (!(isDefined(ab.assetId))) |
---|
157 | 166 | | then true |
---|
158 | 167 | | else false |
---|
159 | 168 | | } |
---|
160 | 169 | | |
---|
161 | 170 | | |
---|
162 | | - | func Z (s,f) = { |
---|
163 | | - | let Y = W(s) |
---|
164 | | - | if ((Y.amount >= f)) |
---|
| 171 | + | func ac (v,ad) = { |
---|
| 172 | + | let ab = Z(v) |
---|
| 173 | + | if ((ab.amount >= ad)) |
---|
165 | 174 | | then true |
---|
166 | 175 | | else false |
---|
167 | 176 | | } |
---|
168 | 177 | | |
---|
169 | 178 | | |
---|
170 | | - | func aa (s,I) = { |
---|
171 | | - | let ab = toBase58String(s.caller.bytes) |
---|
172 | | - | let ac = V(I) |
---|
173 | | - | if ((ab == ac)) |
---|
| 179 | + | func ae (v,L) = { |
---|
| 180 | + | let af = toBase58String(v.caller.bytes) |
---|
| 181 | + | let ag = Y(L) |
---|
| 182 | + | if ((af == ag)) |
---|
174 | 183 | | then true |
---|
175 | 184 | | else false |
---|
176 | 185 | | } |
---|
177 | 186 | | |
---|
178 | 187 | | |
---|
179 | | - | @Callable(s) |
---|
180 | | - | func updateTicker (I,y) = { |
---|
181 | | - | let ad = ((("issuerTicker_" + "<") + I) + ">") |
---|
182 | | - | let ae = { |
---|
183 | | - | let r = getString(m, y) |
---|
184 | | - | if ($isInstanceOf(r, "String")) |
---|
| 188 | + | @Callable(v) |
---|
| 189 | + | func updateTicker (L,B) = { |
---|
| 190 | + | let ah = ((("issuerTicker_" + "<") + L) + ">") |
---|
| 191 | + | let ai = { |
---|
| 192 | + | let u = getString(p, B) |
---|
| 193 | + | if ($isInstanceOf(u, "String")) |
---|
185 | 194 | | then { |
---|
186 | | - | let af = r |
---|
| 195 | + | let aj = u |
---|
187 | 196 | | false |
---|
188 | 197 | | } |
---|
189 | | - | else if ($isInstanceOf(r, "Unit")) |
---|
| 198 | + | else if ($isInstanceOf(u, "Unit")) |
---|
190 | 199 | | then { |
---|
191 | | - | let af = r |
---|
| 200 | + | let aj = u |
---|
192 | 201 | | true |
---|
193 | 202 | | } |
---|
194 | 203 | | else throw() |
---|
195 | 204 | | } |
---|
196 | | - | if (X(s)) |
---|
197 | | - | then if (Z(s, i)) |
---|
198 | | - | then if (aa(s, I)) |
---|
199 | | - | then if (U(I)) |
---|
200 | | - | then if (ae) |
---|
201 | | - | then if (x(y)) |
---|
202 | | - | then WriteSet([DataEntry(ad, y)]) |
---|
203 | | - | else throw("error#5. Ticker should consist of 1-6 capital Latin characters.") |
---|
204 | | - | else throw("error#4. Asset with such ticker is already exist") |
---|
205 | | - | else throw("error#3. Too little rating") |
---|
| 205 | + | if (aa(v)) |
---|
| 206 | + | then if (ac(v, l)) |
---|
| 207 | + | then if (ae(v, L)) |
---|
| 208 | + | then if (X(L)) |
---|
| 209 | + | then if (ai) |
---|
| 210 | + | then if (A(B)) |
---|
| 211 | + | then WriteSet([DataEntry(ah, B)]) |
---|
| 212 | + | else throw(g) |
---|
| 213 | + | else throw(f) |
---|
| 214 | + | else throw(e) |
---|
206 | 215 | | else throw(c) |
---|
207 | | - | else throw("error#2. Insufficient payment for asset ticker update service.") |
---|
| 216 | + | else throw(d) |
---|
208 | 217 | | else throw(b) |
---|
209 | 218 | | } |
---|
210 | 219 | | |
---|
211 | 220 | | |
---|
212 | 221 | | |
---|
213 | | - | @Callable(s) |
---|
214 | | - | func updateDescription (I,ag) = { |
---|
215 | | - | let ah = ((("issuerDescription_" + "<") + I) + ">") |
---|
216 | | - | if (X(s)) |
---|
217 | | - | then if (Z(s, g)) |
---|
218 | | - | then if (aa(s, I)) |
---|
219 | | - | then WriteSet([DataEntry(ah, ag)]) |
---|
| 222 | + | @Callable(v) |
---|
| 223 | + | func updateDescription (L,ak) = { |
---|
| 224 | + | let al = ((("issuerDescription_" + "<") + L) + ">") |
---|
| 225 | + | if (aa(v)) |
---|
| 226 | + | then if (ac(v, j)) |
---|
| 227 | + | then if (ae(v, L)) |
---|
| 228 | + | then WriteSet([DataEntry(al, ak)]) |
---|
220 | 229 | | else throw(c) |
---|
221 | | - | else throw("error#7. Insufficient payment for asset description update service.") |
---|
| 230 | + | else throw(d) |
---|
222 | 231 | | else throw(b) |
---|
223 | 232 | | } |
---|
224 | 233 | | |
---|
225 | 234 | | |
---|
226 | 235 | | |
---|
227 | | - | @Callable(s) |
---|
228 | | - | func updateLink (I,ai) = { |
---|
229 | | - | let aj = ((("issuerLink_" + "<") + I) + ">") |
---|
230 | | - | if (X(s)) |
---|
231 | | - | then if (Z(s, h)) |
---|
232 | | - | then if (aa(s, I)) |
---|
233 | | - | then WriteSet([DataEntry(aj, ai)]) |
---|
| 236 | + | @Callable(v) |
---|
| 237 | + | func updateLink (L,am) = { |
---|
| 238 | + | let an = ((("issuerLink_" + "<") + L) + ">") |
---|
| 239 | + | if (aa(v)) |
---|
| 240 | + | then if (ac(v, k)) |
---|
| 241 | + | then if (ae(v, L)) |
---|
| 242 | + | then WriteSet([DataEntry(an, am)]) |
---|
234 | 243 | | else throw(c) |
---|
235 | | - | else throw("error#7. Insufficient payment for asset link update service.") |
---|
| 244 | + | else throw(d) |
---|
236 | 245 | | else throw(b) |
---|
237 | 246 | | } |
---|
238 | 247 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = 100000000 |
---|
5 | 5 | | |
---|
6 | | - | let b = "<\"{\"name\": \"notSupportedCurrency\", \"message\": \"The service can only be paid in waves.\"}\">" |
---|
| 6 | + | let b = "<notSupportedCurrencyError>" |
---|
7 | 7 | | |
---|
8 | | - | let c = "<\"{\"name\": \"issuerAccessRights\", \"message\": \"Only asset issuer can add/update information.\"}\">" |
---|
| 8 | + | let c = "<issuerAccessDeniedError>" |
---|
9 | 9 | | |
---|
10 | | - | func d (e,f) = (((("<\"{\"name\": \"issuerAccessRights\", \"message\": \"Not enough payment for Asset " + e) + "ticker update service. Required ") + toString(f)) + " waves.\"}\">") |
---|
| 10 | + | let d = "<notEnoughPaymentError>" |
---|
11 | 11 | | |
---|
| 12 | + | let e = "<tickerValidationNotEnoughRatingError>" |
---|
12 | 13 | | |
---|
13 | | - | let g = (1 * a) |
---|
| 14 | + | let f = "<tickerValidationTickerIsExistError>" |
---|
14 | 15 | | |
---|
15 | | - | let h = (1 * a) |
---|
| 16 | + | let g = "<tickerValidationWrongFormatError>" |
---|
16 | 17 | | |
---|
17 | | - | let i = (2 * a) |
---|
| 18 | + | let h = "<nonExistentAssetError>" |
---|
18 | 19 | | |
---|
19 | | - | let j = 1 |
---|
| 20 | + | let i = "<noPaymentError>" |
---|
20 | 21 | | |
---|
21 | | - | let k = 6 |
---|
| 22 | + | let j = (1 * a) |
---|
22 | 23 | | |
---|
23 | | - | let l = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" |
---|
| 24 | + | let k = (1 * a) |
---|
24 | 25 | | |
---|
25 | | - | let m = addressFromStringValue("3MxHxW5VWq4KrWcbhFfxKrafXm4mL6rZHfj") |
---|
| 26 | + | let l = (2 * a) |
---|
26 | 27 | | |
---|
27 | | - | let n = addressFromStringValue("3NADqHoLMbMTfXdP2TeBBSx5mQXePVj3KZm") |
---|
| 28 | + | let m = 1 |
---|
28 | 29 | | |
---|
29 | | - | func o (p,q) = { |
---|
30 | | - | let r = getInteger(p, q) |
---|
31 | | - | if ($isInstanceOf(r, "Int")) |
---|
| 30 | + | let n = 6 |
---|
| 31 | + | |
---|
| 32 | + | let o = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" |
---|
| 33 | + | |
---|
| 34 | + | let p = addressFromStringValue("3MxHxW5VWq4KrWcbhFfxKrafXm4mL6rZHfj") |
---|
| 35 | + | |
---|
| 36 | + | let q = addressFromStringValue("3NADqHoLMbMTfXdP2TeBBSx5mQXePVj3KZm") |
---|
| 37 | + | |
---|
| 38 | + | func r (s,t) = { |
---|
| 39 | + | let u = getInteger(s, t) |
---|
| 40 | + | if ($isInstanceOf(u, "Int")) |
---|
32 | 41 | | then { |
---|
33 | | - | let s = r |
---|
34 | | - | s |
---|
| 42 | + | let v = u |
---|
| 43 | + | v |
---|
35 | 44 | | } |
---|
36 | 45 | | else 0 |
---|
37 | 46 | | } |
---|
38 | 47 | | |
---|
39 | 48 | | |
---|
40 | | - | func t (u,v) = { |
---|
41 | | - | let r = indexOf(u, v) |
---|
42 | | - | if ($isInstanceOf(r, "Int")) |
---|
| 49 | + | func w (x,y) = { |
---|
| 50 | + | let u = indexOf(x, y) |
---|
| 51 | + | if ($isInstanceOf(u, "Int")) |
---|
43 | 52 | | then { |
---|
44 | | - | let w = r |
---|
| 53 | + | let z = u |
---|
45 | 54 | | true |
---|
46 | 55 | | } |
---|
47 | | - | else if ($isInstanceOf(r, "Unit")) |
---|
| 56 | + | else if ($isInstanceOf(u, "Unit")) |
---|
48 | 57 | | then { |
---|
49 | | - | let w = r |
---|
| 58 | + | let z = u |
---|
50 | 59 | | false |
---|
51 | 60 | | } |
---|
52 | 61 | | else throw() |
---|
53 | 62 | | } |
---|
54 | 63 | | |
---|
55 | 64 | | |
---|
56 | | - | func x (y) = { |
---|
57 | | - | let z = split(y, "") |
---|
58 | | - | let A = size(z) |
---|
59 | | - | let B = t(l, z[0]) |
---|
60 | | - | let C = t(l, z[1]) |
---|
61 | | - | let D = t(l, z[2]) |
---|
62 | | - | let E = t(l, z[3]) |
---|
63 | | - | let F = t(l, z[4]) |
---|
64 | | - | let G = t(l, z[5]) |
---|
65 | | - | if ((y != "")) |
---|
66 | | - | then if (if ((A >= j)) |
---|
67 | | - | then (k >= A) |
---|
| 65 | + | func A (B) = { |
---|
| 66 | + | let C = split(B, "") |
---|
| 67 | + | let D = size(C) |
---|
| 68 | + | let E = w(o, C[0]) |
---|
| 69 | + | let F = w(o, C[1]) |
---|
| 70 | + | let G = w(o, C[2]) |
---|
| 71 | + | let H = w(o, C[3]) |
---|
| 72 | + | let I = w(o, C[4]) |
---|
| 73 | + | let J = w(o, C[5]) |
---|
| 74 | + | if ((B != "")) |
---|
| 75 | + | then if (if ((D >= m)) |
---|
| 76 | + | then (n >= D) |
---|
68 | 77 | | else false) |
---|
69 | | - | then if ((1 == A)) |
---|
70 | | - | then B |
---|
71 | | - | else if ((2 == A)) |
---|
72 | | - | then if (B) |
---|
73 | | - | then C |
---|
| 78 | + | then if ((1 == D)) |
---|
| 79 | + | then E |
---|
| 80 | + | else if ((2 == D)) |
---|
| 81 | + | then if (E) |
---|
| 82 | + | then F |
---|
74 | 83 | | else false |
---|
75 | | - | else if ((3 == A)) |
---|
76 | | - | then if (if (B) |
---|
77 | | - | then C |
---|
| 84 | + | else if ((3 == D)) |
---|
| 85 | + | then if (if (E) |
---|
| 86 | + | then F |
---|
78 | 87 | | else false) |
---|
79 | | - | then D |
---|
| 88 | + | then G |
---|
80 | 89 | | else false |
---|
81 | | - | else if ((4 == A)) |
---|
82 | | - | then if (if (if (B) |
---|
83 | | - | then C |
---|
| 90 | + | else if ((4 == D)) |
---|
| 91 | + | then if (if (if (E) |
---|
| 92 | + | then F |
---|
84 | 93 | | else false) |
---|
85 | | - | then D |
---|
| 94 | + | then G |
---|
86 | 95 | | else false) |
---|
87 | | - | then E |
---|
| 96 | + | then H |
---|
88 | 97 | | else false |
---|
89 | | - | else if ((5 == A)) |
---|
90 | | - | then if (if (if (if (B) |
---|
91 | | - | then C |
---|
| 98 | + | else if ((5 == D)) |
---|
| 99 | + | then if (if (if (if (E) |
---|
| 100 | + | then F |
---|
92 | 101 | | else false) |
---|
93 | | - | then D |
---|
| 102 | + | then G |
---|
94 | 103 | | else false) |
---|
95 | | - | then E |
---|
| 104 | + | then H |
---|
96 | 105 | | else false) |
---|
97 | | - | then F |
---|
| 106 | + | then I |
---|
98 | 107 | | else false |
---|
99 | | - | else if ((6 == A)) |
---|
100 | | - | then if (if (if (if (if (B) |
---|
101 | | - | then C |
---|
102 | | - | else false) |
---|
103 | | - | then D |
---|
104 | | - | else false) |
---|
105 | | - | then E |
---|
106 | | - | else false) |
---|
| 108 | + | else if ((6 == D)) |
---|
| 109 | + | then if (if (if (if (if (E) |
---|
107 | 110 | | then F |
---|
108 | 111 | | else false) |
---|
109 | 112 | | then G |
---|
| 113 | + | else false) |
---|
| 114 | + | then H |
---|
| 115 | + | else false) |
---|
| 116 | + | then I |
---|
| 117 | + | else false) |
---|
| 118 | + | then J |
---|
110 | 119 | | else false |
---|
111 | 120 | | else false |
---|
112 | 121 | | else false |
---|
113 | 122 | | else false |
---|
114 | 123 | | } |
---|
115 | 124 | | |
---|
116 | 125 | | |
---|
117 | | - | func H (I) = { |
---|
118 | | - | let J = (("assetRating_" + I) + "_1") |
---|
119 | | - | let K = o(n, J) |
---|
120 | | - | let L = o(n, "tickerRating_1") |
---|
121 | | - | (K >= L) |
---|
| 126 | + | func K (L) = { |
---|
| 127 | + | let M = (("assetRating_" + L) + "_1") |
---|
| 128 | + | let N = r(q, M) |
---|
| 129 | + | let O = r(q, "tickerRating_1") |
---|
| 130 | + | (N >= O) |
---|
122 | 131 | | } |
---|
123 | 132 | | |
---|
124 | 133 | | |
---|
125 | | - | func M (I) = { |
---|
126 | | - | let N = "assetWeight" |
---|
127 | | - | let O = o(n, N) |
---|
128 | | - | let P = o(n, "tickerWeight") |
---|
129 | | - | (O >= P) |
---|
| 134 | + | func P (L) = { |
---|
| 135 | + | let Q = "assetWeight" |
---|
| 136 | + | let R = r(q, Q) |
---|
| 137 | + | let S = r(q, "tickerWeight") |
---|
| 138 | + | (R >= S) |
---|
130 | 139 | | } |
---|
131 | 140 | | |
---|
132 | 141 | | |
---|
133 | | - | func Q (I) = { |
---|
134 | | - | let R = "assetVotes" |
---|
135 | | - | let S = o(n, R) |
---|
136 | | - | let T = o(n, "tickerVotes") |
---|
137 | | - | (S >= T) |
---|
| 142 | + | func T (L) = { |
---|
| 143 | + | let U = "assetVotes" |
---|
| 144 | + | let V = r(q, U) |
---|
| 145 | + | let W = r(q, "tickerVotes") |
---|
| 146 | + | (V >= W) |
---|
138 | 147 | | } |
---|
139 | 148 | | |
---|
140 | 149 | | |
---|
141 | | - | func U (I) = if (if (H(I)) |
---|
142 | | - | then M(I) |
---|
| 150 | + | func X (L) = if (if (K(L)) |
---|
| 151 | + | then P(L) |
---|
143 | 152 | | else false) |
---|
144 | | - | then Q(I) |
---|
| 153 | + | then T(L) |
---|
145 | 154 | | else false |
---|
146 | 155 | | |
---|
147 | 156 | | |
---|
148 | | - | func V (I) = toString(valueOrErrorMessage(assetInfo(fromBase58String(I)), "error#6. there is no asset with such id").issuer) |
---|
| 157 | + | func Y (L) = toString(valueOrErrorMessage(assetInfo(fromBase58String(L)), h).issuer) |
---|
149 | 158 | | |
---|
150 | 159 | | |
---|
151 | | - | func W (s) = valueOrErrorMessage(s.payment, "error#8. there is no payment in invocation") |
---|
| 160 | + | func Z (v) = valueOrErrorMessage(v.payment, i) |
---|
152 | 161 | | |
---|
153 | 162 | | |
---|
154 | | - | func X (s) = { |
---|
155 | | - | let Y = W(s) |
---|
156 | | - | if (!(isDefined(Y.assetId))) |
---|
| 163 | + | func aa (v) = { |
---|
| 164 | + | let ab = Z(v) |
---|
| 165 | + | if (!(isDefined(ab.assetId))) |
---|
157 | 166 | | then true |
---|
158 | 167 | | else false |
---|
159 | 168 | | } |
---|
160 | 169 | | |
---|
161 | 170 | | |
---|
162 | | - | func Z (s,f) = { |
---|
163 | | - | let Y = W(s) |
---|
164 | | - | if ((Y.amount >= f)) |
---|
| 171 | + | func ac (v,ad) = { |
---|
| 172 | + | let ab = Z(v) |
---|
| 173 | + | if ((ab.amount >= ad)) |
---|
165 | 174 | | then true |
---|
166 | 175 | | else false |
---|
167 | 176 | | } |
---|
168 | 177 | | |
---|
169 | 178 | | |
---|
170 | | - | func aa (s,I) = { |
---|
171 | | - | let ab = toBase58String(s.caller.bytes) |
---|
172 | | - | let ac = V(I) |
---|
173 | | - | if ((ab == ac)) |
---|
| 179 | + | func ae (v,L) = { |
---|
| 180 | + | let af = toBase58String(v.caller.bytes) |
---|
| 181 | + | let ag = Y(L) |
---|
| 182 | + | if ((af == ag)) |
---|
174 | 183 | | then true |
---|
175 | 184 | | else false |
---|
176 | 185 | | } |
---|
177 | 186 | | |
---|
178 | 187 | | |
---|
179 | | - | @Callable(s) |
---|
180 | | - | func updateTicker (I,y) = { |
---|
181 | | - | let ad = ((("issuerTicker_" + "<") + I) + ">") |
---|
182 | | - | let ae = { |
---|
183 | | - | let r = getString(m, y) |
---|
184 | | - | if ($isInstanceOf(r, "String")) |
---|
| 188 | + | @Callable(v) |
---|
| 189 | + | func updateTicker (L,B) = { |
---|
| 190 | + | let ah = ((("issuerTicker_" + "<") + L) + ">") |
---|
| 191 | + | let ai = { |
---|
| 192 | + | let u = getString(p, B) |
---|
| 193 | + | if ($isInstanceOf(u, "String")) |
---|
185 | 194 | | then { |
---|
186 | | - | let af = r |
---|
| 195 | + | let aj = u |
---|
187 | 196 | | false |
---|
188 | 197 | | } |
---|
189 | | - | else if ($isInstanceOf(r, "Unit")) |
---|
| 198 | + | else if ($isInstanceOf(u, "Unit")) |
---|
190 | 199 | | then { |
---|
191 | | - | let af = r |
---|
| 200 | + | let aj = u |
---|
192 | 201 | | true |
---|
193 | 202 | | } |
---|
194 | 203 | | else throw() |
---|
195 | 204 | | } |
---|
196 | | - | if (X(s)) |
---|
197 | | - | then if (Z(s, i)) |
---|
198 | | - | then if (aa(s, I)) |
---|
199 | | - | then if (U(I)) |
---|
200 | | - | then if (ae) |
---|
201 | | - | then if (x(y)) |
---|
202 | | - | then WriteSet([DataEntry(ad, y)]) |
---|
203 | | - | else throw("error#5. Ticker should consist of 1-6 capital Latin characters.") |
---|
204 | | - | else throw("error#4. Asset with such ticker is already exist") |
---|
205 | | - | else throw("error#3. Too little rating") |
---|
| 205 | + | if (aa(v)) |
---|
| 206 | + | then if (ac(v, l)) |
---|
| 207 | + | then if (ae(v, L)) |
---|
| 208 | + | then if (X(L)) |
---|
| 209 | + | then if (ai) |
---|
| 210 | + | then if (A(B)) |
---|
| 211 | + | then WriteSet([DataEntry(ah, B)]) |
---|
| 212 | + | else throw(g) |
---|
| 213 | + | else throw(f) |
---|
| 214 | + | else throw(e) |
---|
206 | 215 | | else throw(c) |
---|
207 | | - | else throw("error#2. Insufficient payment for asset ticker update service.") |
---|
| 216 | + | else throw(d) |
---|
208 | 217 | | else throw(b) |
---|
209 | 218 | | } |
---|
210 | 219 | | |
---|
211 | 220 | | |
---|
212 | 221 | | |
---|
213 | | - | @Callable(s) |
---|
214 | | - | func updateDescription (I,ag) = { |
---|
215 | | - | let ah = ((("issuerDescription_" + "<") + I) + ">") |
---|
216 | | - | if (X(s)) |
---|
217 | | - | then if (Z(s, g)) |
---|
218 | | - | then if (aa(s, I)) |
---|
219 | | - | then WriteSet([DataEntry(ah, ag)]) |
---|
| 222 | + | @Callable(v) |
---|
| 223 | + | func updateDescription (L,ak) = { |
---|
| 224 | + | let al = ((("issuerDescription_" + "<") + L) + ">") |
---|
| 225 | + | if (aa(v)) |
---|
| 226 | + | then if (ac(v, j)) |
---|
| 227 | + | then if (ae(v, L)) |
---|
| 228 | + | then WriteSet([DataEntry(al, ak)]) |
---|
220 | 229 | | else throw(c) |
---|
221 | | - | else throw("error#7. Insufficient payment for asset description update service.") |
---|
| 230 | + | else throw(d) |
---|
222 | 231 | | else throw(b) |
---|
223 | 232 | | } |
---|
224 | 233 | | |
---|
225 | 234 | | |
---|
226 | 235 | | |
---|
227 | | - | @Callable(s) |
---|
228 | | - | func updateLink (I,ai) = { |
---|
229 | | - | let aj = ((("issuerLink_" + "<") + I) + ">") |
---|
230 | | - | if (X(s)) |
---|
231 | | - | then if (Z(s, h)) |
---|
232 | | - | then if (aa(s, I)) |
---|
233 | | - | then WriteSet([DataEntry(aj, ai)]) |
---|
| 236 | + | @Callable(v) |
---|
| 237 | + | func updateLink (L,am) = { |
---|
| 238 | + | let an = ((("issuerLink_" + "<") + L) + ">") |
---|
| 239 | + | if (aa(v)) |
---|
| 240 | + | then if (ac(v, k)) |
---|
| 241 | + | then if (ae(v, L)) |
---|
| 242 | + | then WriteSet([DataEntry(an, am)]) |
---|
234 | 243 | | else throw(c) |
---|
235 | | - | else throw("error#7. Insufficient payment for asset link update service.") |
---|
| 244 | + | else throw(d) |
---|
236 | 245 | | else throw(b) |
---|
237 | 246 | | } |
---|
238 | 247 | | |
---|
239 | 248 | | |
---|