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