tx · 81rWUd3rZHg1natpxT6EA79HKERTPQ24S51G2mZb9xj4 3MvrXJVzDMDcshazxn88FybxHV2JvWQBxTc: -0.01000000 Waves 2022.10.09 09:47 [2264440] smart account 3MvrXJVzDMDcshazxn88FybxHV2JvWQBxTc > SELF 0.00000000 Waves
{ "type": 13, "id": "81rWUd3rZHg1natpxT6EA79HKERTPQ24S51G2mZb9xj4", "fee": 1000000, "feeAssetId": null, "timestamp": 1665298103287, "version": 2, "chainId": 84, "sender": "3MvrXJVzDMDcshazxn88FybxHV2JvWQBxTc", "senderPublicKey": "Fq8P5ctrS7PNTX37bWWxvnwoB7C2FaNySZWnRmgPUaDH", "proofs": [ "2yoMT1tDVUJF2pcuvqALgXZo3TknjS8NXUeMvzojfW1pUv4PK8byJe5cNmsYKcdzJFXnURbKdie5VoyyqDtRANfq" ], "script": "base64:AAIFAAAAAAAAACMIAhIECgIIARIDCgEIEgMKAQgSAwoBCBIFCgMICAESAwoBCAAAACQBAAAAEGdldFN0cmluZ09yVGhyb3cAAAACAAAAB2FkZHJlc3MAAAADa2V5CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQdAAAAAgUAAAAHYWRkcmVzcwUAAAADa2V5CQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAxDYW4ndCByZWFkICcFAAAAA2tleQIAAAANJyBhdCBhZGRyZXNzIAkABCUAAAABBQAAAAdhZGRyZXNzAQAAABFnZXRJbnRlZ2VyT3JUaHJvdwAAAAIAAAAHYWRkcmVzcwAAAANrZXkJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABBoAAAACBQAAAAdhZGRyZXNzBQAAAANrZXkJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAADENhbid0IHJlYWQgJwUAAAADa2V5AgAAAA0nIGF0IGFkZHJlc3MgCQAEJQAAAAEFAAAAB2FkZHJlc3MBAAAAE3BhcnNlQWRkcmVzc09yVGhyb3cAAAABAAAADG1heWJlQWRkcmVz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AAHdG9rZW5JZAAAAAAAAAAAAAkAAAIAAAABAgAAAB1Zb3UgZG9uJ3QgaGF2ZSBhIG5hbWVkIHRva2VuLgkBAAAACV9zZXRPd25lcgAAAAIFAAAABG5hbWUFAAAAD25ld093bmVyQWRkcmVzcwAAAABpCaaJ", "height": 2264440, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CPccZRMsg6kJddMEQnAXbkb1krVvweFYotnnthjuWaSL Next: 5XbWcH66GaCnyLkV5T8ySyWJ1Z3PTjFs3Dr9ZajmcCQS Diff:
Old | New | Differences | |
---|---|---|---|
38 | 38 | ||
39 | 39 | let root = parseAddressOrThrow(rootAddress) | |
40 | 40 | ||
41 | - | let controllers = split( | |
41 | + | let controllers = split(valueOrElse(getString(this, key_controllers), ""), ",") | |
42 | 42 | ||
43 | 43 | let nameTTL = getIntegerOrThrow(this, key_nameTTL) | |
44 | 44 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func getStringOrThrow (address,key) = valueOrErrorMessage(getString(address, key), ((("Can't read '" + key) + "' at address ") + toString(address))) | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | func getIntegerOrThrow (address,key) = valueOrErrorMessage(getInteger(address, key), ((("Can't read '" + key) + "' at address ") + toString(address))) | |
8 | 8 | ||
9 | 9 | ||
10 | 10 | func parseAddressOrThrow (maybeAddress) = valueOrErrorMessage(addressFromString(maybeAddress), (("Can't parse address from '" + maybeAddress) + "'")) | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | func key_entity (name,pk,property) = ((((name + "_") + pk) + "_") + property) | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func key_Token_name (tokenId) = key_entity("Token", tokenId, "name") | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func key_Name_token (name) = key_entity("Name", name, "token") | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func key_Name_owner (name) = key_entity("Name", name, "owner") | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func key_Name_expiresAt (name) = key_entity("Name", name, "expiresAt") | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func key_Name_createdAt (name) = key_entity("Name", name, "createdAt") | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | let key_rootAddress = "rootAddress" | |
32 | 32 | ||
33 | 33 | let key_nameTTL = "nameTTL" | |
34 | 34 | ||
35 | 35 | let key_controllers = "controllers" | |
36 | 36 | ||
37 | 37 | let rootAddress = getStringOrThrow(this, key_rootAddress) | |
38 | 38 | ||
39 | 39 | let root = parseAddressOrThrow(rootAddress) | |
40 | 40 | ||
41 | - | let controllers = split( | |
41 | + | let controllers = split(valueOrElse(getString(this, key_controllers), ""), ",") | |
42 | 42 | ||
43 | 43 | let nameTTL = getIntegerOrThrow(this, key_nameTTL) | |
44 | 44 | ||
45 | 45 | func _setOwner (name,owner) = [StringEntry(key_Name_owner(name), owner)] | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func _getOwner (name) = getString(this, key_Name_owner(name)) | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func _getToken (name) = getString(this, key_Name_token(name)) | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func _getCreatedAt (name) = getInteger(this, key_Name_createdAt(name)) | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func _getExpiresAt (name) = getInteger(this, key_Name_expiresAt(name)) | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func isRegisteredName (name) = isDefined(getString(this, key_Name_token(name))) | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func isCreatedName (name) = isDefined(_getCreatedAt(name)) | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func isExpiredName (name) = match _getExpiresAt(name) { | |
67 | 67 | case expiresAt: Int => | |
68 | 68 | (lastBlock.timestamp > expiresAt) | |
69 | 69 | case _ => | |
70 | 70 | false | |
71 | 71 | } | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func isActiveName (name) = if (if (isRegisteredName(name)) | |
75 | 75 | then isCreatedName(name) | |
76 | 76 | else false) | |
77 | 77 | then !(isExpiredName(name)) | |
78 | 78 | else false | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func isAvailableName (name) = { | |
82 | 82 | let symbols = "abcdefghijklmnopqrstuvwxyz1234567890-" | |
83 | 83 | func validateChars (isValid,char) = if (isValid) | |
84 | 84 | then contains(symbols, char) | |
85 | 85 | else false | |
86 | 86 | ||
87 | 87 | let isValidName = if (if (if (if ((size(name) > 0)) | |
88 | 88 | then (63 >= size(name)) | |
89 | 89 | else false) | |
90 | 90 | then (indexOf(name, "-") != 0) | |
91 | 91 | else false) | |
92 | 92 | then (lastIndexOf(name, "-") != (size(name) - 1)) | |
93 | 93 | else false) | |
94 | 94 | then { | |
95 | 95 | let $l = split(name, "") | |
96 | 96 | let $s = size($l) | |
97 | 97 | let $acc0 = true | |
98 | 98 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
99 | 99 | then $a | |
100 | 100 | else validateChars($a, $l[$i]) | |
101 | 101 | ||
102 | 102 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
103 | 103 | then $a | |
104 | 104 | else throw("List size exceeds 63") | |
105 | 105 | ||
106 | 106 | $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) | |
107 | 107 | } | |
108 | 108 | else false | |
109 | 109 | let inUse = if (isRegisteredName(name)) | |
110 | 110 | then !(isExpiredName(name)) | |
111 | 111 | else false | |
112 | 112 | if (!(inUse)) | |
113 | 113 | then isValidName | |
114 | 114 | else false | |
115 | 115 | } | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | func isAdmin (inv) = (inv.caller == this) | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | func isOwner (inv,name) = (toString(inv.caller) == valueOrErrorMessage(_getOwner(name), (("Owner for `" + name) + "` is not found"))) | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | func isController (address) = containsElement(controllers, address) | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func _issueNameToken (name) = [Issue(if ((size(name) > 16)) | |
128 | 128 | then (take(name, 15) + "~") | |
129 | 129 | else take(name, 16), name, 1, 0, false)] | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | 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))] | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func _restoreNameWithToken (name,tokenId) = [StringEntry(key_Name_token(name), tokenId), StringEntry(key_Token_name(tokenId), name)] | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func _transferTokenToOwner (tokenId,owner) = [ScriptTransfer(parseAddressOrThrow(owner), 1, fromBase58String(tokenId))] | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func modifiers (validations) = unit | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func onlyAdmin (inv) = if (isAdmin(inv)) | |
145 | 145 | then unit | |
146 | 146 | else throw("Permission denied") | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | func onlyController (inv) = if (if (isAdmin(inv)) | |
150 | 150 | then true | |
151 | 151 | else isController(toString(inv.caller))) | |
152 | 152 | then unit | |
153 | 153 | else throw("Permission denied") | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | @Callable(inv) | |
157 | 157 | func init (rootAddress,nameTTL) = valueOrElse(modifiers([onlyAdmin(inv)]), [StringEntry(key_rootAddress, rootAddress), IntegerEntry(key_nameTTL, nameTTL)]) | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | ||
161 | 161 | @Callable(inv) | |
162 | 162 | func addController (address) = valueOrElse(modifiers([onlyAdmin(inv), if (!(isController(address))) | |
163 | 163 | then unit | |
164 | 164 | else throw((("Controller `" + address) + "` is already registered"))]), [StringEntry(key_controllers, makeString((controllers :+ address), ","))]) | |
165 | 165 | ||
166 | 166 | ||
167 | 167 | ||
168 | 168 | @Callable(inv) | |
169 | 169 | func removeController (address) = valueOrElse(modifiers([onlyAdmin(inv), if (isController(address)) | |
170 | 170 | then unit | |
171 | 171 | else throw((("Controller `" + address) + "` is not registered"))]), { | |
172 | 172 | let controllerIndex = value(indexOf(controllers, address)) | |
173 | 173 | [StringEntry(key_controllers, makeString(removeByIndex(controllers, controllerIndex), ","))] | |
174 | 174 | }) | |
175 | 175 | ||
176 | 176 | ||
177 | 177 | ||
178 | 178 | @Callable(inv) | |
179 | 179 | func available (name) = $Tuple2(nil, isAvailableName(name)) | |
180 | 180 | ||
181 | 181 | ||
182 | 182 | ||
183 | 183 | @Callable(inv) | |
184 | 184 | func register (name,owner,createdAt) = valueOrElse(modifiers([onlyController(inv), if (isAvailableName(name)) | |
185 | 185 | then unit | |
186 | 186 | else throw((("`" + name) + "` cannot be registered")), if ((lastBlock.timestamp >= createdAt)) | |
187 | 187 | then unit | |
188 | 188 | else throw("createdAt cannot be in the future")]), { | |
189 | 189 | let issueNameToken = _issueNameToken(name) | |
190 | 190 | let tokenId = calculateAssetId(issueNameToken[0]) | |
191 | 191 | let tokenStr = toBase58String(tokenId) | |
192 | 192 | let registerNameWithToken = _registerNameWithToken(name, tokenStr, createdAt) | |
193 | 193 | let transferTokenToOwner = _transferTokenToOwner(tokenStr, owner) | |
194 | 194 | let setOwnership = _setOwner(name, owner) | |
195 | 195 | (((issueNameToken ++ registerNameWithToken) ++ transferTokenToOwner) ++ setOwnership) | |
196 | 196 | }) | |
197 | 197 | ||
198 | 198 | ||
199 | 199 | ||
200 | 200 | @Callable(inv) | |
201 | 201 | func reclaim (name) = valueOrElse(modifiers([if (isActiveName(name)) | |
202 | 202 | then unit | |
203 | 203 | else throw((("`" + name) + "` is not active"))]), { | |
204 | 204 | let newOwner = inv.caller | |
205 | 205 | let newOwnerAddress = toString(newOwner) | |
206 | 206 | let tokenStr = valueOrErrorMessage(_getToken(name), (("No token is issued for `" + name) + "`")) | |
207 | 207 | let tokenId = fromBase58String(tokenStr) | |
208 | 208 | let token = assetInfo(tokenId) | |
209 | 209 | if (isOwner(inv, name)) | |
210 | 210 | then if (isDefined(token)) | |
211 | 211 | then throw("You can only restore a burned token") | |
212 | 212 | else { | |
213 | 213 | let issueNewToken = _issueNameToken(name) | |
214 | 214 | let newTokenId = calculateAssetId(issueNewToken[0]) | |
215 | 215 | let newTokenStr = toBase58String(newTokenId) | |
216 | 216 | let restoreNameWithNewToken = _restoreNameWithToken(name, newTokenStr) | |
217 | 217 | let transferNewTokenToOwner = _transferTokenToOwner(newTokenStr, newOwnerAddress) | |
218 | 218 | ((issueNewToken ++ restoreNameWithNewToken) ++ transferNewTokenToOwner) | |
219 | 219 | } | |
220 | 220 | else if ((assetBalance(newOwner, tokenId) == 0)) | |
221 | 221 | then throw("You don't have a named token.") | |
222 | 222 | else _setOwner(name, newOwnerAddress) | |
223 | 223 | }) | |
224 | 224 | ||
225 | 225 |
github/deemru/w8io/026f985 60.55 ms ◑