tx · CiKFybD3ZJj3pgfziLH4yRBuPUiEVueWuyMRNJHh69XU

3MvVeqqFHW9M6r9ggG3Ma5Que4Rqgb4BjJE:  -0.01500000 Waves

2022.10.20 10:43 [2280437] smart account 3MvVeqqFHW9M6r9ggG3Ma5Que4Rqgb4BjJE > SELF 0.00000000 Waves

{ "type": 13, "id": "CiKFybD3ZJj3pgfziLH4yRBuPUiEVueWuyMRNJHh69XU", "fee": 1500000, "feeAssetId": null, "timestamp": 1666251786116, "version": 2, "chainId": 84, "sender": "3MvVeqqFHW9M6r9ggG3Ma5Que4Rqgb4BjJE", "senderPublicKey": "3nPFqmiV1yaNvmSrQdE1QHbTAF8bfJB1GjbegBWbNNCK", "proofs": [ "2b6kzUnojihrYMqqvZNdXVK4quDaZ2AAg8W1RZ9TUDuBAyW1dDfdCvsmCTQp6suZwPqwfUnWeWMJV3aLeLuXyMdj" ], "script": "base64:AAIFAAAAAAAAAFEIAhIDCgEBEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSBAoCCAgSAwoBCBIECgIICBIDCgEIEgMKAQgSBQoDCAgBEgMKAQgAAAAtAQAAABBnZXRTdHJpbmdPclRocm93AAAAAgAAAAdhZGRyZXNzAAAAA2tleQkBAAAAE3ZhbHVlT3JFcnJvck1lc3NhZ2UAAAACCQAEHQAAAAIFAAAAB2FkZHJlc3MFAAAAA2tleQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAMQ2FuJ3QgcmVhZCAnBQAAAANrZXkCAAAADScgYXQgYWRkcmVzcyAJAAQlAAAAAQUAAAAHYWRkcmVzcwEAAAARZ2V0SW50ZWdlck9yVGhyb3cAAAACAAAAB2FkZHJlc3MAAAADa2V5CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQaAAAAAgUAAAAHYWRkcmVzcwUAAAADa2V5CQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAxDYW4ndCByZWFkICcFAAAAA2tleQIAAAANJ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ACBQAAAAtuZXdUb2tlblN0cgUAAAAPbmV3T3duZXJBZGRyZXNzCQAETgAAAAIJAAROAAAAAgUAAAANaXNzdWVOZXdUb2tlbgUAAAAXcmVzdG9yZU5hbWVXaXRoTmV3VG9rZW4FAAAAF3RyYW5zZmVyTmV3VG9rZW5Ub093bmVyAwMFAAAADGlzVG9rZW5Pd25lcgUAAAAIaGFzVG9rZW4HCQAAAgAAAAECAAAAHFlvdSBhbHJlYWR5IG93biBhIG5hbWUgdG9rZW4DCQEAAAABIQAAAAEFAAAACGhhc1Rva2VuCQAAAgAAAAECAAAAG1lvdSBkb24ndCBoYXZlIGEgbmFtZSB0b2tlbgkBAAAACV9zZXRPd25lcgAAAAIFAAAABG5hbWUFAAAAD25ld093bmVyQWRkcmVzcwAAAAC6P0yM", "height": 2280437, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7fTgMY2W5gvix1Vayp6sAWv96kdWxc7SUTAvFZ7u2XWN Next: CorkydggfCmBCN27ZCPPnvKKUCaPtMGpsY5auhDQHYAB Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-func key_owner (subName) = ("owner_" + subName)
4+func getStringOrThrow (address,key) = valueOrErrorMessage(getString(address, key), ((("Can't read '" + key) + "' at address ") + toString(address)))
55
66
7-func key_registrar (subName) = ("registrar_" + subName)
7+func getIntegerOrThrow (address,key) = valueOrErrorMessage(getInteger(address, key), ((("Can't read '" + key) + "' at address ") + toString(address)))
88
99
10-func _getOwner (subName) = getString(this, key_owner(subName))
10+func parseAddressOrThrow (maybeAddress) = valueOrErrorMessage(addressFromString(maybeAddress), (("Can't parse address from '" + maybeAddress) + "'"))
1111
1212
13-func _setOwner (subName,owner) = [StringEntry(key_owner(subName), owner)]
13+func key_entity (name,pk,property) = ((((name + "_") + pk) + "_") + property)
1414
1515
16-func _getRegistrar (subName) = getString(this, key_registrar(subName))
16+func key_Token_name (tokenId) = key_entity("Token", tokenId, "name")
1717
1818
19-func _setRegistrar (subName,registrar) = [StringEntry(key_registrar(subName), registrar)]
19+func key_Name_token (name) = key_entity("Name", name, "token")
2020
2121
22-func key_address (name) = ("address_" + name)
22+func key_Name_owner (name) = key_entity("Name", name, "owner")
2323
2424
25-let registry = this
25+func key_Name_registrar (name) = key_entity("Name", name, "registrar")
2626
27-func isOwner (inv,name) = if ((inv.caller == this))
28- then true
29- else match invoke(registry, "owner", [name], nil) {
30- case owner: String =>
31- (owner == toString(inv.caller))
32- case _ =>
33- false
27+
28+func key_Name_resolver (name) = key_entity("Name", name, "resolver")
29+
30+
31+func key_Name_expiresAt (name) = key_entity("Name", name, "expiresAt")
32+
33+
34+func key_Name_createdAt (name) = key_entity("Name", name, "createdAt")
35+
36+
37+let key_nameTTL = "nameTTL"
38+
39+let key_controllers = "controllers"
40+
41+func _setOwner (name,owner) = [StringEntry(key_Name_owner(name), owner)]
42+
43+
44+func _getOwner (name) = getString(this, key_Name_owner(name))
45+
46+
47+func _setRegistrar (name,registrar) = [StringEntry(key_Name_registrar(name), registrar)]
48+
49+
50+func _getRegistrar (name) = getString(this, key_Name_registrar(name))
51+
52+
53+func _setResolver (name,resolver) = [StringEntry(key_Name_resolver(name), resolver)]
54+
55+
56+func _getResolver (name) = getString(this, key_Name_resolver(name))
57+
58+
59+func _getToken (name) = getString(this, key_Name_token(name))
60+
61+
62+func _getCreatedAt (name) = getInteger(this, key_Name_createdAt(name))
63+
64+
65+func _getExpiresAt (name) = getInteger(this, key_Name_expiresAt(name))
66+
67+
68+func _getControllers () = getString(this, key_controllers)
69+
70+
71+let controllers = match _getControllers() {
72+ case repr: String =>
73+ split(repr, ",")
74+ case _ =>
75+ nil
76+}
77+
78+let nameTTL = getIntegerOrThrow(this, key_nameTTL)
79+
80+func isRegisteredName (name) = isDefined(getString(this, key_Name_token(name)))
81+
82+
83+func isCreatedName (name) = isDefined(_getCreatedAt(name))
84+
85+
86+func isExpiredName (name) = match _getExpiresAt(name) {
87+ case expiresAt: Int =>
88+ (lastBlock.timestamp > expiresAt)
89+ case _ =>
90+ false
91+}
92+
93+
94+func isActiveName (name) = if (if (isRegisteredName(name))
95+ then isCreatedName(name)
96+ else false)
97+ then !(isExpiredName(name))
98+ else false
99+
100+
101+func isValidName (name) = {
102+ let symbols = "abcdefghijklmnopqrstuvwxyz1234567890-"
103+ func validateChars (isValid,char) = if (isValid)
104+ then contains(symbols, char)
105+ else false
106+
107+ if (if (if (if (if ((size(name) > 0))
108+ then (63 >= size(name))
109+ else false)
110+ then (indexOf(name, "--") != 2)
111+ else false)
112+ then (indexOf(name, "-") != 0)
113+ else false)
114+ then (lastIndexOf(name, "-") != (size(name) - 1))
115+ else false)
116+ then {
117+ let $l = split(name, "")
118+ let $s = size($l)
119+ let $acc0 = true
120+ func $f0_1 ($a,$i) = if (($i >= $s))
121+ then $a
122+ else validateChars($a, $l[$i])
123+
124+ func $f0_2 ($a,$i) = if (($i >= $s))
125+ then $a
126+ else throw("List size exceeds 63")
127+
128+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63)
129+ }
130+ else false
34131 }
35132
36133
134+func isAvailableName (name) = if (isValidName(name))
135+ then if (!(isRegisteredName(name)))
136+ then true
137+ else isExpiredName(name)
138+ else false
139+
140+
141+func isValidAddress (maybeAddress) = isDefined(addressFromString(maybeAddress))
142+
143+
144+func isAdmin (inv) = (inv.caller == this)
145+
146+
147+func isOwner (inv,name) = (toString(inv.caller) == valueOrElse(_getOwner(name), ""))
148+
149+
150+func isController (address) = containsElement(controllers, address)
151+
152+
153+func _splitLastLabel (name) = {
154+ let labels = split(name, ".")
155+ let lastIndex = (size(labels) - 1)
156+ let lastLabel = labels[lastIndex]
157+ let restLabels = makeString(removeByIndex(labels, lastIndex), ".")
158+ $Tuple2(lastLabel, restLabels)
159+ }
160+
161+
162+func _issueNameToken (name) = [Issue(if ((size(name) > 16))
163+ then (take(name, 15) + "~")
164+ else take(name, 16), (name + ".waves"), 1, 0, false)]
165+
166+
167+func _registerNameWithToken (name,tokenId,createdAt) = [StringEntry(key_Name_token(name), tokenId), StringEntry(key_Token_name(tokenId), name), IntegerEntry(key_Name_createdAt(name), createdAt), IntegerEntry(key_Name_expiresAt(name), (createdAt + nameTTL))]
168+
169+
170+func _restoreNameWithToken (name,tokenId) = [StringEntry(key_Name_token(name), tokenId), StringEntry(key_Token_name(tokenId), name)]
171+
172+
173+func _transferTokenToOwner (tokenId,owner) = [ScriptTransfer(parseAddressOrThrow(owner), 1, fromBase58String(tokenId))]
174+
175+
176+func modifiers (validations) = unit
177+
178+
179+func onlyAdmin (inv) = if (isAdmin(inv))
180+ then unit
181+ else throw("Permission denied")
182+
183+
184+func onlyController (inv) = if (if (isAdmin(inv))
185+ then true
186+ else isController(toString(inv.caller)))
187+ then unit
188+ else throw("Permission denied")
189+
190+
191+func onlyOwner (inv,name) = if (if (isAdmin(inv))
192+ then true
193+ else isOwner(inv, name))
194+ then unit
195+ else throw("Permission denied")
196+
197+
198+func _callSupportedInterface (registrant,interfaceId,restLabels) = match invoke(registrant, "supportsInterface", [interfaceId], nil) {
199+ case supportsInterface: Boolean =>
200+ if (!(supportsInterface))
201+ then unit
202+ else match invoke(registrant, interfaceId, [restLabels], nil) {
203+ case maybeString: String =>
204+ maybeString
205+ case maybeInt: Int =>
206+ maybeInt
207+ case _ =>
208+ unit
209+ }
210+ case _ =>
211+ unit
212+}
213+
214+
37215 @Callable(inv)
38-func owner (subName) = $Tuple2(nil, _getOwner(subName))
216+func init (nameTTL) = valueOrElse(modifiers([onlyAdmin(inv), if ((nameTTL > 0))
217+ then unit
218+ else throw("TTL cannot be negative")]), [IntegerEntry(key_nameTTL, nameTTL)])
39219
40220
41221
42222 @Callable(inv)
43-func registrar (subName) = $Tuple2(nil, _getRegistrar(subName))
223+func supportsInterface (interfaceId) = $Tuple2(nil, containsElement(["owner", "registrar", "resolver", "nameCreated", "nameExpires"], interfaceId))
44224
45225
46226
47227 @Callable(inv)
48-func register (subName,owner) = {
49- let currentOwner = _getOwner(subName)
50- if (isDefined(currentOwner))
51- then throw((("`" + subName) + "` already registered"))
52- else _setOwner(subName, owner)
228+func addController (address) = valueOrElse(modifiers([onlyAdmin(inv), if (isValidAddress(address))
229+ then unit
230+ else throw("Controller must be a valid address"), if (!(isController(address)))
231+ then unit
232+ else throw((("Controller `" + address) + "` is already registered"))]), [StringEntry(key_controllers, makeString((controllers :+ address), ","))])
233+
234+
235+
236+@Callable(inv)
237+func removeController (address) = valueOrElse(modifiers([onlyAdmin(inv), if (isController(address))
238+ then unit
239+ else throw((("Controller `" + address) + "` is not registered"))]), {
240+ let controllerIndex = value(indexOf(controllers, address))
241+[StringEntry(key_controllers, makeString(removeByIndex(controllers, controllerIndex), ","))]
242+ })
243+
244+
245+
246+@Callable(inv)
247+func validate (name) = $Tuple2(nil, isValidName(name))
248+
249+
250+
251+@Callable(inv)
252+func available (name) = $Tuple2(nil, isAvailableName(name))
253+
254+
255+
256+@Callable(inv)
257+func owner (name) = {
258+ let $t079157962 = _splitLastLabel(name)
259+ let label = $t079157962._1
260+ let restLabels = $t079157962._2
261+ let ownerAddress = _getOwner(label)
262+ let registrarAddress = _getRegistrar(label)
263+ let registrar = value(addressFromString(value(registrarAddress)))
264+ $Tuple2(nil, if (if ((size(restLabels) == 0))
265+ then true
266+ else !(isDefined(registrarAddress)))
267+ then ownerAddress
268+ else match _callSupportedInterface(registrar, "owner", restLabels) {
269+ case maybeOwner: String =>
270+ if (isValidAddress(maybeOwner))
271+ then maybeOwner
272+ else unit
273+ case _ =>
274+ unit
275+ })
53276 }
54277
55278
56279
57280 @Callable(inv)
58-func supportsInterface (interfaceId) = $Tuple2(nil, containsElement(["addr", "owner", "registrar"], interfaceId))
281+func registrar (name) = {
282+ let $t085918638 = _splitLastLabel(name)
283+ let label = $t085918638._1
284+ let restLabels = $t085918638._2
285+ let registrarAddress = match _getRegistrar(label) {
286+ case maybeRegistrar: String =>
287+ if (isValidAddress(maybeRegistrar))
288+ then maybeRegistrar
289+ else unit
290+ case _ =>
291+ unit
292+ }
293+ let registrar = value(addressFromString(value(registrarAddress)))
294+ $Tuple2(nil, if (if ((size(restLabels) == 0))
295+ then true
296+ else !(isDefined(registrarAddress)))
297+ then registrarAddress
298+ else match _callSupportedInterface(registrar, "registrar", restLabels) {
299+ case maybeRegistrar: String =>
300+ if (isValidAddress(maybeRegistrar))
301+ then maybeRegistrar
302+ else unit
303+ case _ =>
304+ unit
305+ })
306+ }
59307
60308
61309
62310 @Callable(inv)
63-func setAddr (name,address) = if (!(isOwner(inv, name)))
64- then throw("Permission denied")
65- else [StringEntry(key_address(name), address)]
311+func setRegistrar (name,registrar) = valueOrElse(modifiers([if (isActiveName(name))
312+ then unit
313+ else throw("Name expired or not registered"), onlyOwner(inv, name), if (isValidAddress(registrar))
314+ then unit
315+ else throw("Registrar must be a valid contract address")]), _setRegistrar(name, registrar))
66316
67317
68318
69319 @Callable(inv)
70-func addr (name) = $Tuple2(nil, getString(this, key_address(name)))
320+func resolver (name) = $Tuple2(nil, _getResolver(_splitLastLabel(name)._1))
321+
322+
323+
324+@Callable(inv)
325+func setResolver (name,resolver) = valueOrElse(modifiers([if (isActiveName(name))
326+ then unit
327+ else throw("Name expired or not registered"), onlyOwner(inv, name), if (isValidAddress(resolver))
328+ then unit
329+ else throw("Resolver must be a valid contract address")]), _setResolver(name, resolver))
330+
331+
332+
333+@Callable(inv)
334+func nameCreated (name) = $Tuple2(nil, _getCreatedAt(_splitLastLabel(name)._1))
335+
336+
337+
338+@Callable(inv)
339+func nameExpires (name) = $Tuple2(nil, _getExpiresAt(_splitLastLabel(name)._1))
340+
341+
342+
343+@Callable(inv)
344+func register (name,owner,createdAt) = valueOrElse(modifiers([onlyController(inv), if (isAvailableName(name))
345+ then unit
346+ else throw((("`" + name) + "` cannot be registered")), if (isValidAddress(owner))
347+ then unit
348+ else throw("Owner must be a valid address"), if ((createdAt > 0))
349+ then unit
350+ else throw("CreatedAt cannot be negative"), if ((lastBlock.timestamp >= createdAt))
351+ then unit
352+ else throw("CreatedAt cannot be in the future")]), {
353+ let issueNameToken = _issueNameToken(name)
354+ let tokenId = calculateAssetId(issueNameToken[0])
355+ let tokenStr = toBase58String(tokenId)
356+ let registerNameWithToken = _registerNameWithToken(name, tokenStr, createdAt)
357+ let transferTokenToOwner = _transferTokenToOwner(tokenStr, owner)
358+ let setOwnership = _setOwner(name, owner)
359+ (((issueNameToken ++ registerNameWithToken) ++ transferTokenToOwner) ++ setOwnership)
360+ })
361+
362+
363+
364+@Callable(inv)
365+func reclaim (name) = valueOrElse(modifiers([if (isActiveName(name))
366+ then unit
367+ else throw((("`" + name) + "` is not active"))]), {
368+ let newOwner = inv.caller
369+ let newOwnerAddress = toString(newOwner)
370+ let tokenStr = valueOrErrorMessage(_getToken(name), (("No token is issued for `" + name) + "`"))
371+ let tokenId = fromBase58String(tokenStr)
372+ let hasToken = (assetBalance(newOwner, tokenId) == 1)
373+ let isTokenOwner = isOwner(inv, name)
374+ let isTokenExists = match assetInfo(tokenId) {
375+ case token: Asset =>
376+ (token.quantity == 1)
377+ case _ =>
378+ false
379+ }
380+ if (if (isTokenOwner)
381+ then !(isTokenExists)
382+ else false)
383+ then {
384+ let issueNewToken = _issueNameToken(name)
385+ let newTokenId = calculateAssetId(issueNewToken[0])
386+ let newTokenStr = toBase58String(newTokenId)
387+ let restoreNameWithNewToken = _restoreNameWithToken(name, newTokenStr)
388+ let transferNewTokenToOwner = _transferTokenToOwner(newTokenStr, newOwnerAddress)
389+ ((issueNewToken ++ restoreNameWithNewToken) ++ transferNewTokenToOwner)
390+ }
391+ else if (if (isTokenOwner)
392+ then hasToken
393+ else false)
394+ then throw("You already own a name token")
395+ else if (!(hasToken))
396+ then throw("You don't have a name token")
397+ else _setOwner(name, newOwnerAddress)
398+ })
71399
72400

github/deemru/w8io/169f3d6 
64.32 ms