tx · EZjB6DCz1pJEvRdqxNbLghdv1RAKr7R5EjwkC5Dcntrm 3NAg879tKUJh949h21umkwiaRQhwZftz1BE: -0.05000000 Waves 2019.09.06 14:35 [664144] smart account 3NAg879tKUJh949h21umkwiaRQhwZftz1BE > SELF 0.00000000 Waves
{ "type": 13, "id": "EZjB6DCz1pJEvRdqxNbLghdv1RAKr7R5EjwkC5Dcntrm", "fee": 5000000, "feeAssetId": null, "timestamp": 1567769858634, "version": 1, "sender": "3NAg879tKUJh949h21umkwiaRQhwZftz1BE", "senderPublicKey": "BqY2jhkQCcbidtQdQZu6f9RV3AkFAS8VPToHxwYu1KdJ", "proofs": [ "s6wQ8xx1SkvQMdRgCxV7rfoY54w2JnaPgANFcce7pM54TjoEbg7i9s2NsWkjziG5ekHqwnDqhPcgnw4ucrJLkof" ], "script": "base64:AAIDAAAAAAAAAAAAAAAYAAAAAAN3dnMAAAAAAAX14QAAAAAAGW5vdFN1cHBvcnRlZEN1cnJlbmN5RXJyb3ICAAAAWTwieyJuYW1lIjogIm5vdFN1cHBvcnRlZEN1cnJlbmN5IiwgIm1lc3NhZ2UiOiAiVGhlIHNlcnZpY2UgY2FuIG9ubHkgYmUgcGFpZCBpbiB3YXZlcy4ifSI+AAAAABdpc3N1ZXJBY2Nlc3NSaWdodHNFcnJvcgIAAABePCJ7Im5hbWUiOiAiaXNzdWVyQWNjZXNzUmlnaHRzIiwgIm1lc3NhZ2UiOiAiT25seSBhc3NldCBpc3N1ZXIgY2FuIGFkZC91cGRhdGUgaW5mb3JtYXRpb24uIn0iPgEAAAAVbm90RW5vdWdoUGF5bWVudEVycm9yAAAAAgAAAAZvcHRpb24AAAAPcmVxdWlyZWRQYXltZW50CQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAASjwieyJuYW1lIjogImlzc3VlckFjY2Vzc1JpZ2h0cyIsICJtZXNzYWdlIjogIk5vdCBlbm91Z2ggcGF5bWVudCBmb3IgQXNzZXQgBQAAAAZvcHRp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CQAAAgAAAAEFAAAAGW5vdFN1cHBvcnRlZEN1cnJlbmN5RXJyb3IAAAAAnLSqGA==", "chainId": 84, "height": 664144, "spentComplexity": 0 } View: original | compacted Prev: CUkEBXTs4Rx2rLqrAAMXufrCNygXrcmwzYyE7Fk2YFbS Next: 4tz8FRfnpt8iJi6FJ17T1XgEeSKZC2bj6sx6ZKrCSZsu Diff:
Old | New | Differences | |
---|---|---|---|
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let wvs = 100000000 | |
5 | 5 | ||
6 | - | let notSupportedCurrencyError = "\"{\"name\": \"notSupportedCurrency\", \"message\": \"The service can only be paid in waves.\"}\"" | |
6 | + | let notSupportedCurrencyError = "<\"{\"name\": \"notSupportedCurrency\", \"message\": \"The service can only be paid in waves.\"}\">" | |
7 | 7 | ||
8 | - | let issuerAccessRightsError = "\"{\"name\": \"issuerAccessRights\", \"message\": \"Only asset issuer can add/update information.\"}\"" | |
8 | + | let issuerAccessRightsError = "<\"{\"name\": \"issuerAccessRights\", \"message\": \"Only asset issuer can add/update information.\"}\">" | |
9 | 9 | ||
10 | - | func notEnoughPaymentError (option,requiredPayment) = (((("\"{\"name\": \"issuerAccessRights\", \"message\": \"Not enough payment for Asset " + option) + "ticker update service. Required ") + toString(requiredPayment)) + " waves.\"}\"") | |
10 | + | func notEnoughPaymentError (option,requiredPayment) = (((("<\"{\"name\": \"issuerAccessRights\", \"message\": \"Not enough payment for Asset " + option) + "ticker update service. Required ") + toString(requiredPayment)) + " waves.\"}\">") | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | let descriptionUpdatePrice = (1 * wvs) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let wvs = 100000000 | |
5 | 5 | ||
6 | - | let notSupportedCurrencyError = "\"{\"name\": \"notSupportedCurrency\", \"message\": \"The service can only be paid in waves.\"}\"" | |
6 | + | let notSupportedCurrencyError = "<\"{\"name\": \"notSupportedCurrency\", \"message\": \"The service can only be paid in waves.\"}\">" | |
7 | 7 | ||
8 | - | let issuerAccessRightsError = "\"{\"name\": \"issuerAccessRights\", \"message\": \"Only asset issuer can add/update information.\"}\"" | |
8 | + | let issuerAccessRightsError = "<\"{\"name\": \"issuerAccessRights\", \"message\": \"Only asset issuer can add/update information.\"}\">" | |
9 | 9 | ||
10 | - | func notEnoughPaymentError (option,requiredPayment) = (((("\"{\"name\": \"issuerAccessRights\", \"message\": \"Not enough payment for Asset " + option) + "ticker update service. Required ") + toString(requiredPayment)) + " waves.\"}\"") | |
10 | + | func notEnoughPaymentError (option,requiredPayment) = (((("<\"{\"name\": \"issuerAccessRights\", \"message\": \"Not enough payment for Asset " + option) + "ticker update service. Required ") + toString(requiredPayment)) + " waves.\"}\">") | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | let descriptionUpdatePrice = (1 * wvs) | |
14 | 14 | ||
15 | 15 | let linkUpdatePrice = (1 * wvs) | |
16 | 16 | ||
17 | 17 | let tickerUpdatePrice = (2 * wvs) | |
18 | 18 | ||
19 | 19 | let tickerMinLength = 1 | |
20 | 20 | ||
21 | 21 | let tickerMaxLength = 6 | |
22 | 22 | ||
23 | 23 | let tickerAllowedLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" | |
24 | 24 | ||
25 | 25 | let tickerCatalogueOracleAddress = addressFromStringValue("3MxHxW5VWq4KrWcbhFfxKrafXm4mL6rZHfj") | |
26 | 26 | ||
27 | 27 | let tokenRatingOracleAddress = addressFromStringValue("3NADqHoLMbMTfXdP2TeBBSx5mQXePVj3KZm") | |
28 | 28 | ||
29 | 29 | func getIntegerFromAccount (accountAddress,key) = match getInteger(accountAddress, key) { | |
30 | 30 | case i: Int => | |
31 | 31 | i | |
32 | 32 | case _ => | |
33 | 33 | 0 | |
34 | 34 | } | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func isSubstrExist (str,substr) = match indexOf(str, substr) { | |
38 | 38 | case index: Int => | |
39 | 39 | true | |
40 | 40 | case index: Unit => | |
41 | 41 | false | |
42 | 42 | case _ => | |
43 | 43 | throw() | |
44 | 44 | } | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | func isValidTicker (ticker) = { | |
48 | 48 | let tickerLetters = split(ticker, "") | |
49 | 49 | let tickerLength = size(tickerLetters) | |
50 | 50 | let isLetter1Valid = isSubstrExist(tickerAllowedLetters, tickerLetters[0]) | |
51 | 51 | let isLetter2Valid = isSubstrExist(tickerAllowedLetters, tickerLetters[1]) | |
52 | 52 | let isLetter3Valid = isSubstrExist(tickerAllowedLetters, tickerLetters[2]) | |
53 | 53 | let isLetter4Valid = isSubstrExist(tickerAllowedLetters, tickerLetters[3]) | |
54 | 54 | let isLetter5Valid = isSubstrExist(tickerAllowedLetters, tickerLetters[4]) | |
55 | 55 | let isLetter6Valid = isSubstrExist(tickerAllowedLetters, tickerLetters[5]) | |
56 | 56 | if ((ticker != "")) | |
57 | 57 | then if (if ((tickerLength >= tickerMinLength)) | |
58 | 58 | then (tickerMaxLength >= tickerLength) | |
59 | 59 | else false) | |
60 | 60 | then if ((1 == tickerLength)) | |
61 | 61 | then isLetter1Valid | |
62 | 62 | else if ((2 == tickerLength)) | |
63 | 63 | then if (isLetter1Valid) | |
64 | 64 | then isLetter2Valid | |
65 | 65 | else false | |
66 | 66 | else if ((3 == tickerLength)) | |
67 | 67 | then if (if (isLetter1Valid) | |
68 | 68 | then isLetter2Valid | |
69 | 69 | else false) | |
70 | 70 | then isLetter3Valid | |
71 | 71 | else false | |
72 | 72 | else if ((4 == tickerLength)) | |
73 | 73 | then if (if (if (isLetter1Valid) | |
74 | 74 | then isLetter2Valid | |
75 | 75 | else false) | |
76 | 76 | then isLetter3Valid | |
77 | 77 | else false) | |
78 | 78 | then isLetter4Valid | |
79 | 79 | else false | |
80 | 80 | else if ((5 == tickerLength)) | |
81 | 81 | then if (if (if (if (isLetter1Valid) | |
82 | 82 | then isLetter2Valid | |
83 | 83 | else false) | |
84 | 84 | then isLetter3Valid | |
85 | 85 | else false) | |
86 | 86 | then isLetter4Valid | |
87 | 87 | else false) | |
88 | 88 | then isLetter5Valid | |
89 | 89 | else false | |
90 | 90 | else if ((6 == tickerLength)) | |
91 | 91 | then if (if (if (if (if (isLetter1Valid) | |
92 | 92 | then isLetter2Valid | |
93 | 93 | else false) | |
94 | 94 | then isLetter3Valid | |
95 | 95 | else false) | |
96 | 96 | then isLetter4Valid | |
97 | 97 | else false) | |
98 | 98 | then isLetter5Valid | |
99 | 99 | else false) | |
100 | 100 | then isLetter6Valid | |
101 | 101 | else false | |
102 | 102 | else false | |
103 | 103 | else false | |
104 | 104 | else false | |
105 | 105 | } | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func isAssetUpdateAllowedByRating (assetId) = { | |
109 | 109 | let assetRatingKey = (("assetRating_" + assetId) + "_1") | |
110 | 110 | let assetRatingValue = getIntegerFromAccount(tokenRatingOracleAddress, assetRatingKey) | |
111 | 111 | let assetRatingTreshold = getIntegerFromAccount(tokenRatingOracleAddress, "tickerRating_1") | |
112 | 112 | (assetRatingValue >= assetRatingTreshold) | |
113 | 113 | } | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func isAssetUpdateAllowedByWeight (assetId) = { | |
117 | 117 | let assetWeightKey = "assetWeight" | |
118 | 118 | let assetWeightValue = getIntegerFromAccount(tokenRatingOracleAddress, assetWeightKey) | |
119 | 119 | let assetWeightTreshold = getIntegerFromAccount(tokenRatingOracleAddress, "tickerWeight") | |
120 | 120 | (assetWeightValue >= assetWeightTreshold) | |
121 | 121 | } | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | func isAssetUpdateAllowedByVotes (assetId) = { | |
125 | 125 | let assetVotesKey = "assetVotes" | |
126 | 126 | let assetVotesValue = getIntegerFromAccount(tokenRatingOracleAddress, assetVotesKey) | |
127 | 127 | let assetVotesTreshold = getIntegerFromAccount(tokenRatingOracleAddress, "tickerVotes") | |
128 | 128 | (assetVotesValue >= assetVotesTreshold) | |
129 | 129 | } | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | func isUpdateAllowedByRating (assetId) = if (if (isAssetUpdateAllowedByRating(assetId)) | |
133 | 133 | then isAssetUpdateAllowedByWeight(assetId) | |
134 | 134 | else false) | |
135 | 135 | then isAssetUpdateAllowedByVotes(assetId) | |
136 | 136 | else false | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | func getAssetIssuerAddressFromAssetId (assetId) = toString(valueOrErrorMessage(assetInfo(fromBase58String(assetId)), "error#6. there is no asset with such id").issuer) | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | func getPayment (i) = valueOrErrorMessage(i.payment, "error#8. there is no payment in invocation") | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func isPaymentInWaves (i) = { | |
146 | 146 | let payment = getPayment(i) | |
147 | 147 | if (!(isDefined(payment.assetId))) | |
148 | 148 | then true | |
149 | 149 | else false | |
150 | 150 | } | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func isEnoughPayment (i,requiredPayment) = { | |
154 | 154 | let payment = getPayment(i) | |
155 | 155 | if ((payment.amount >= requiredPayment)) | |
156 | 156 | then true | |
157 | 157 | else false | |
158 | 158 | } | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | func isCallerAssetIssuer (i,assetId) = { | |
162 | 162 | let callerAddress = toBase58String(i.caller.bytes) | |
163 | 163 | let assetIssuerAdress = getAssetIssuerAddressFromAssetId(assetId) | |
164 | 164 | if ((callerAddress == assetIssuerAdress)) | |
165 | 165 | then true | |
166 | 166 | else false | |
167 | 167 | } | |
168 | 168 | ||
169 | 169 | ||
170 | 170 | @Callable(i) | |
171 | 171 | func updateTicker (assetId,ticker) = { | |
172 | 172 | let issuerTickerKey = ((("issuerTicker_" + "<") + assetId) + ">") | |
173 | 173 | let isTickerFree = match getString(tickerCatalogueOracleAddress, ticker) { | |
174 | 174 | case t: String => | |
175 | 175 | false | |
176 | 176 | case t: Unit => | |
177 | 177 | true | |
178 | 178 | case _ => | |
179 | 179 | throw() | |
180 | 180 | } | |
181 | 181 | if (isPaymentInWaves(i)) | |
182 | 182 | then if (isEnoughPayment(i, tickerUpdatePrice)) | |
183 | 183 | then if (isCallerAssetIssuer(i, assetId)) | |
184 | 184 | then if (isUpdateAllowedByRating(assetId)) | |
185 | 185 | then if (isTickerFree) | |
186 | 186 | then if (isValidTicker(ticker)) | |
187 | 187 | then WriteSet([DataEntry(issuerTickerKey, ticker)]) | |
188 | 188 | else throw("error#5. Ticker should consist of 1-6 capital Latin characters.") | |
189 | 189 | else throw("error#4. Asset with such ticker is already exist") | |
190 | 190 | else throw("error#3. Too little rating") | |
191 | 191 | else throw(issuerAccessRightsError) | |
192 | 192 | else throw("error#2. Insufficient payment for asset ticker update service.") | |
193 | 193 | else throw(notSupportedCurrencyError) | |
194 | 194 | } | |
195 | 195 | ||
196 | 196 | ||
197 | 197 | ||
198 | 198 | @Callable(i) | |
199 | 199 | func updateDescription (assetId,description) = { | |
200 | 200 | let issuerDescriptionKey = ((("issuerDescription_" + "<") + assetId) + ">") | |
201 | 201 | if (isPaymentInWaves(i)) | |
202 | 202 | then if (isEnoughPayment(i, descriptionUpdatePrice)) | |
203 | 203 | then if (isCallerAssetIssuer(i, assetId)) | |
204 | 204 | then WriteSet([DataEntry(issuerDescriptionKey, description)]) | |
205 | 205 | else throw(issuerAccessRightsError) | |
206 | 206 | else throw("error#7. Insufficient payment for asset description update service.") | |
207 | 207 | else throw(notSupportedCurrencyError) | |
208 | 208 | } | |
209 | 209 | ||
210 | 210 | ||
211 | 211 | ||
212 | 212 | @Callable(i) | |
213 | 213 | func updateLink (assetId,link) = { | |
214 | 214 | let issuerLinkKey = ((("issuerLink_" + "<") + assetId) + ">") | |
215 | 215 | if (isPaymentInWaves(i)) | |
216 | 216 | then if (isEnoughPayment(i, linkUpdatePrice)) | |
217 | 217 | then if (isCallerAssetIssuer(i, assetId)) | |
218 | 218 | then WriteSet([DataEntry(issuerLinkKey, link)]) | |
219 | 219 | else throw(issuerAccessRightsError) | |
220 | 220 | else throw("error#7. Insufficient payment for asset link update service.") | |
221 | 221 | else throw(notSupportedCurrencyError) | |
222 | 222 | } | |
223 | 223 | ||
224 | 224 |
github/deemru/w8io/169f3d6 52.30 ms ◑