tx · 9xyoS8H774DZGPkVHA71QPsCMvX9FEbB4FA5ficYmXte

3MuCaUNMwF6Up9a2bgJmwZji896xptmJitt:  -0.05000000 Waves

2019.09.08 15:56 [667123] smart account 3MuCaUNMwF6Up9a2bgJmwZji896xptmJitt > SELF 0.00000000 Waves

{ "type": 13, "id": "9xyoS8H774DZGPkVHA71QPsCMvX9FEbB4FA5ficYmXte", "fee": 5000000, "feeAssetId": null, "timestamp": 1567947379559, "version": 1, "sender": "3MuCaUNMwF6Up9a2bgJmwZji896xptmJitt", "senderPublicKey": "Dr5rkXFsvqufZYic16XVb2EVmT7rkp5douPdCEvLYYu7", "proofs": [ "3bRWBu8R1TMmso2aotFuvmPYZqPUsyJY4yVYwcphKGs2HspWAZ4PAGxMUQpXSv5yi8yQd39jhnDB8vrm95RRXCu1" ], "script": "base64:AAIDAAAAAAAAAAAAAAAdAAAAAAN3dnMAAAAAAAX14QAAAAAAGW5vdFN1cHBvcnRlZEN1cnJlbmN5RXJyb3ICAAAAGzxub3RTdXBwb3J0ZWRDdXJyZW5jeUVycm9yPgAAAAAXaXNzdWVyQWNjZXNzRGVuaWVkRXJyb3ICAAAAGTxpc3N1ZXJBY2Nlc3NEZW5pZWRFcnJvcj4AAAAAFW5vdEVub3VnaFBheW1lbnRFcnJvcgIAAAAXPG5vdEVub3VnaFBheW1lbnRFcnJvcj4AAAAAJHRpY2tlclZhbGlkYXRpb25Ob3RFbm91Z2hSYXRpbmdFcnJvcgIAAAAmPHRpY2tlclZhbGlkYXRpb25Ob3RFbm91Z2hSYXRpbmdFcnJvcj4AAAAAInRpY2tlclZhbGlkYXRpb25UaWNrZXJJc0V4aXN0RXJyb3ICAAAAJDx0aWNrZXJWYWxpZGF0aW9uVGlja2VySXNFeGlzdEVycm9yPgAAAAAgdGlja2VyVmFsaWRhdGlvbldyb25nRm9ybWF0RXJyb3ICAAAAIjx0aWNrZXJWYWxpZGF0aW9uV3JvbmdGb3JtYXRFcnJvcj4AAAAAFW5vbkV4aX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AAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAABRpc3N1ZXJEZXNjcmlwdGlvbktleQUAAAALZGVzY3JpcHRpb24FAAAAA25pbAkAAAIAAAABBQAAABdpc3N1ZXJBY2Nlc3NEZW5pZWRFcnJvcgkAAAIAAAABBQAAABVub3RFbm91Z2hQYXltZW50RXJyb3IJAAACAAAAAQUAAAAZbm90U3VwcG9ydGVkQ3VycmVuY3lFcnJvcgAAAAFpAQAAAAp1cGRhdGVMaW5rAAAAAgAAAAdhc3NldElkAAAABGxpbmsEAAAADWlzc3VlckxpbmtLZXkJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAAC2lzc3VlckxpbmtfAgAAAAE8BQAAAAdhc3NldElkAgAAAAE+AwkBAAAAEGlzUGF5bWVudEluV2F2ZXMAAAABBQAAAAFpAwkBAAAAD2lzRW5vdWdoUGF5bWVudAAAAAIFAAAAAWkFAAAAD2xpbmtVcGRhdGVQcmljZQMJAQAAABNpc0NhbGxlckFzc2V0SXNzdWVyAAAAAgUAAAABaQUAAAAHYXNzZXRJZAkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAANaXNzdWVyTGlua0tleQUAAAAEbGluawUAAAADbmlsCQAAAgAAAAEFAAAAF2lzc3VlckFjY2Vzc0RlbmllZEVycm9yCQAAAgAAAAEFAAAAFW5vdEVub3VnaFBheW1lbnRFcnJvcgkAAAIAAAABBQAAABlub3RTdXBwb3J0ZWRDdXJyZW5jeUVycm9yAAAAALjUxA0=", "chainId": 84, "height": 667123, "spentComplexity": 0 } View: original | compacted Prev: Cg4xLieSWhZCHgdi4Yv8YFv3GE5eRuaPxTwJmTPBUceF Next: none Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let wvs = 100000000
45
6+let notSupportedCurrencyError = "<notSupportedCurrencyError>"
7+
8+let issuerAccessDeniedError = "<issuerAccessDeniedError>"
9+
10+let notEnoughPaymentError = "<notEnoughPaymentError>"
11+
12+let tickerValidationNotEnoughRatingError = "<tickerValidationNotEnoughRatingError>"
13+
14+let tickerValidationTickerIsExistError = "<tickerValidationTickerIsExistError>"
15+
16+let tickerValidationWrongFormatError = "<tickerValidationWrongFormatError>"
17+
18+let nonExistentAssetError = "<nonExistentAssetError>"
19+
20+let noPaymentError = "<noPaymentError>"
21+
22+let descriptionUpdatePrice = (1 * wvs)
23+
24+let linkUpdatePrice = (1 * wvs)
25+
26+let tickerUpdatePrice = (2 * wvs)
27+
28+let tickerMinLength = 1
29+
30+let tickerMaxLength = 6
31+
32+let tickerAllowedLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
33+
34+let tickerCatalogueOracleAddress = addressFromStringValue("3MxHxW5VWq4KrWcbhFfxKrafXm4mL6rZHfj")
35+
36+let tokenRatingOracleAddress = addressFromStringValue("3NADqHoLMbMTfXdP2TeBBSx5mQXePVj3KZm")
37+
38+func getIntegerFromAccount (accountAddress,key) = match getInteger(accountAddress, key) {
39+ case i: Int =>
40+ i
41+ case _ =>
42+ 0
43+}
44+
45+
46+func isSubstrExist (str,substr) = match indexOf(str, substr) {
47+ case index: Int =>
48+ true
49+ case index: Unit =>
50+ false
51+ case _ =>
52+ throw()
53+}
54+
55+
56+func isValidTicker (ticker) = {
57+ let tickerLetters = split(ticker, "")
58+ let tickerLength = size(tickerLetters)
59+ let isLetter1Valid = isSubstrExist(tickerAllowedLetters, tickerLetters[0])
60+ let isLetter2Valid = isSubstrExist(tickerAllowedLetters, tickerLetters[1])
61+ let isLetter3Valid = isSubstrExist(tickerAllowedLetters, tickerLetters[2])
62+ let isLetter4Valid = isSubstrExist(tickerAllowedLetters, tickerLetters[3])
63+ let isLetter5Valid = isSubstrExist(tickerAllowedLetters, tickerLetters[4])
64+ let isLetter6Valid = isSubstrExist(tickerAllowedLetters, tickerLetters[5])
65+ if ((ticker != ""))
66+ then if (if ((tickerLength >= tickerMinLength))
67+ then (tickerMaxLength >= tickerLength)
68+ else false)
69+ then if ((1 == tickerLength))
70+ then isLetter1Valid
71+ else if ((2 == tickerLength))
72+ then if (isLetter1Valid)
73+ then isLetter2Valid
74+ else false
75+ else if ((3 == tickerLength))
76+ then if (if (isLetter1Valid)
77+ then isLetter2Valid
78+ else false)
79+ then isLetter3Valid
80+ else false
81+ else if ((4 == tickerLength))
82+ then if (if (if (isLetter1Valid)
83+ then isLetter2Valid
84+ else false)
85+ then isLetter3Valid
86+ else false)
87+ then isLetter4Valid
88+ else false
89+ else if ((5 == tickerLength))
90+ then if (if (if (if (isLetter1Valid)
91+ then isLetter2Valid
92+ else false)
93+ then isLetter3Valid
94+ else false)
95+ then isLetter4Valid
96+ else false)
97+ then isLetter5Valid
98+ else false
99+ else if ((6 == tickerLength))
100+ then if (if (if (if (if (isLetter1Valid)
101+ then isLetter2Valid
102+ else false)
103+ then isLetter3Valid
104+ else false)
105+ then isLetter4Valid
106+ else false)
107+ then isLetter5Valid
108+ else false)
109+ then isLetter6Valid
110+ else false
111+ else false
112+ else false
113+ else false
114+ }
115+
116+
117+func isAssetUpdateAllowedByRating (assetId) = {
118+ let assetRatingKey = (("assetRating_" + assetId) + "_1")
119+ let assetRatingValue = getIntegerFromAccount(tokenRatingOracleAddress, assetRatingKey)
120+ let assetRatingTreshold = getIntegerFromAccount(tokenRatingOracleAddress, "tickerRating_1")
121+ (assetRatingValue >= assetRatingTreshold)
122+ }
123+
124+
125+func isAssetUpdateAllowedByWeight (assetId) = {
126+ let assetWeightKey = "assetWeight"
127+ let assetWeightValue = getIntegerFromAccount(tokenRatingOracleAddress, assetWeightKey)
128+ let assetWeightTreshold = getIntegerFromAccount(tokenRatingOracleAddress, "tickerWeight")
129+ (assetWeightValue >= assetWeightTreshold)
130+ }
131+
132+
133+func isAssetUpdateAllowedByVotes (assetId) = {
134+ let assetVotesKey = "assetVotes"
135+ let assetVotesValue = getIntegerFromAccount(tokenRatingOracleAddress, assetVotesKey)
136+ let assetVotesTreshold = getIntegerFromAccount(tokenRatingOracleAddress, "tickerVotes")
137+ (assetVotesValue >= assetVotesTreshold)
138+ }
139+
140+
141+func isUpdateAllowedByRating (assetId) = if (if (isAssetUpdateAllowedByRating(assetId))
142+ then isAssetUpdateAllowedByWeight(assetId)
143+ else false)
144+ then isAssetUpdateAllowedByVotes(assetId)
145+ else false
146+
147+
148+func getAssetIssuerAddressFromAssetId (assetId) = toString(valueOrErrorMessage(assetInfo(fromBase58String(assetId)), nonExistentAssetError).issuer)
149+
150+
151+func getPayment (i) = valueOrErrorMessage(i.payment, noPaymentError)
152+
153+
154+func isPaymentInWaves (i) = {
155+ let payment = getPayment(i)
156+ if (!(isDefined(payment.assetId)))
157+ then true
158+ else false
159+ }
160+
161+
162+func isEnoughPayment (i,requiredPayment) = {
163+ let payment = getPayment(i)
164+ if ((payment.amount >= requiredPayment))
165+ then true
166+ else false
167+ }
168+
169+
170+func isCallerAssetIssuer (i,assetId) = {
171+ let callerAddress = toBase58String(i.caller.bytes)
172+ let assetIssuerAdress = getAssetIssuerAddressFromAssetId(assetId)
173+ if ((callerAddress == assetIssuerAdress))
174+ then true
175+ else false
176+ }
177+
178+
179+@Callable(i)
180+func updateTicker (assetId,ticker) = {
181+ let issuerTickerKey = ((("issuerTicker_" + "<") + assetId) + ">")
182+ let isTickerFree = match getString(tickerCatalogueOracleAddress, ticker) {
183+ case t: String =>
184+ false
185+ case t: Unit =>
186+ true
187+ case _ =>
188+ throw()
189+ }
190+ if (isPaymentInWaves(i))
191+ then if (isEnoughPayment(i, tickerUpdatePrice))
192+ then if (isCallerAssetIssuer(i, assetId))
193+ then if (isUpdateAllowedByRating(assetId))
194+ then if (isTickerFree)
195+ then if (isValidTicker(ticker))
196+ then WriteSet([DataEntry(issuerTickerKey, ticker)])
197+ else throw(tickerValidationWrongFormatError)
198+ else throw(tickerValidationTickerIsExistError)
199+ else throw(tickerValidationNotEnoughRatingError)
200+ else throw(issuerAccessDeniedError)
201+ else throw(notEnoughPaymentError)
202+ else throw(notSupportedCurrencyError)
203+ }
204+
205+
206+
207+@Callable(i)
208+func updateDescription (assetId,description) = {
209+ let issuerDescriptionKey = ((("issuerDescription_" + "<") + assetId) + ">")
210+ if (isPaymentInWaves(i))
211+ then if (isEnoughPayment(i, descriptionUpdatePrice))
212+ then if (isCallerAssetIssuer(i, assetId))
213+ then WriteSet([DataEntry(issuerDescriptionKey, description)])
214+ else throw(issuerAccessDeniedError)
215+ else throw(notEnoughPaymentError)
216+ else throw(notSupportedCurrencyError)
217+ }
218+
219+
220+
221+@Callable(i)
222+func updateLink (assetId,link) = {
223+ let issuerLinkKey = ((("issuerLink_" + "<") + assetId) + ">")
224+ if (isPaymentInWaves(i))
225+ then if (isEnoughPayment(i, linkUpdatePrice))
226+ then if (isCallerAssetIssuer(i, assetId))
227+ then WriteSet([DataEntry(issuerLinkKey, link)])
228+ else throw(issuerAccessDeniedError)
229+ else throw(notEnoughPaymentError)
230+ else throw(notSupportedCurrencyError)
231+ }
5232
6233

github/deemru/w8io/169f3d6 
32.94 ms