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:AAIFAAAAAAAAACMIAhIECgIIARIDCgEIEgMKAQgSAwoBCBIFCgMICAESAwoBCAAAACUBAAAAEGdldFN0cmluZ09yVGhyb3cAAAACAAAAB2FkZHJlc3MAAAADa2V5CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQdAAAAAgUAAAAHYWRkcmVzcwUAAAADa2V5CQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAxDYW4ndCByZWFkICcFAAAAA2tleQIAAAANJyBhdCBhZGRyZXNzIAkABCUAAAABBQAAAAdhZGRyZXNzAQAAABFnZXRJbnRlZ2VyT3JUaHJvdwAAAAIAAAAHYWRkcmVzcwAAAANrZXkJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABBoAAAACBQAAAAdhZGRyZXNzBQAAAANrZXkJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAADENhbid0IHJlYWQgJwUAAAADa2V5AgAAAA0nIGF0IGFkZHJlc3MgCQAEJQAAAAEFAAAAB2FkZHJlc3MBAAAAE3BhcnNlQWRkcmVzc09yVGhyb3cAAAABAA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rva2VuVG9Pd25lcgkBAAAAFV90cmFuc2ZlclRva2VuVG9Pd25lcgAAAAIFAAAAC25ld1Rva2VuU3RyBQAAAA9uZXdPd25lckFkZHJlc3MJAAROAAAAAgkABE4AAAACBQAAAA1pc3N1ZU5ld1Rva2VuBQAAABdyZXN0b3JlTmFtZVdpdGhOZXdUb2tlbgUAAAAXdHJhbnNmZXJOZXdUb2tlblRvT3duZXIDCQAAAAAAAAIJAAPwAAAAAgUAAAAIbmV3T3duZXIFAAAAB3Rva2VuSWQAAAAAAAAAAAAJAAACAAAAAQIAAAAdWW91IGRvbid0IGhhdmUgYSBuYW1lZCB0b2tlbi4JAQAAAAlfc2V0T3duZXIAAAACBQAAAARuYW1lBQAAAA9uZXdPd25lckFkZHJlc3MAAAAAC8dSdg==", "height": 2264463, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5ELoHWebzRac8CgcFWYNDKLmG6GK4GwWc8AYdoBQc4sW Next: 42o9LQ6YmpZcRPoiNR8cGjxzjtvzSEYCJjsaY1yt4cyq Diff:
OldNewDifferences
216216 let token = assetInfo(tokenId)
217217 if (isOwner(inv, name))
218218 then if (isDefined(token))
219- then throw(if ((assetBalance(newOwner, tokenId) == 0))
219+ then throw(if ((assetBalance(newOwner, tokenId) == 1))
220220 then "You already own a name token"
221221 else "Another user owns a name token")
222222 else {
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func getStringOrThrow (address,key) = valueOrErrorMessage(getString(address, key), ((("Can't read '" + key) + "' at address ") + toString(address)))
55
66
77 func getIntegerOrThrow (address,key) = valueOrErrorMessage(getInteger(address, key), ((("Can't read '" + key) + "' at address ") + toString(address)))
88
99
1010 func parseAddressOrThrow (maybeAddress) = valueOrErrorMessage(addressFromString(maybeAddress), (("Can't parse address from '" + maybeAddress) + "'"))
1111
1212
1313 func key_entity (name,pk,property) = ((((name + "_") + pk) + "_") + property)
1414
1515
1616 func key_Token_name (tokenId) = key_entity("Token", tokenId, "name")
1717
1818
1919 func key_Name_token (name) = key_entity("Name", name, "token")
2020
2121
2222 func key_Name_owner (name) = key_entity("Name", name, "owner")
2323
2424
2525 func key_Name_expiresAt (name) = key_entity("Name", name, "expiresAt")
2626
2727
2828 func key_Name_createdAt (name) = key_entity("Name", name, "createdAt")
2929
3030
3131 let key_rootAddress = "rootAddress"
3232
3333 let key_nameTTL = "nameTTL"
3434
3535 let key_controllers = "controllers"
3636
3737 func _setOwner (name,owner) = [StringEntry(key_Name_owner(name), owner)]
3838
3939
4040 func _getOwner (name) = getString(this, key_Name_owner(name))
4141
4242
4343 func _getToken (name) = getString(this, key_Name_token(name))
4444
4545
4646 func _getCreatedAt (name) = getInteger(this, key_Name_createdAt(name))
4747
4848
4949 func _getExpiresAt (name) = getInteger(this, key_Name_expiresAt(name))
5050
5151
5252 func _getControllers () = getString(this, key_controllers)
5353
5454
5555 let rootAddress = getStringOrThrow(this, key_rootAddress)
5656
5757 let root = parseAddressOrThrow(rootAddress)
5858
5959 let controllers = match _getControllers() {
6060 case repr: String =>
6161 split(repr, ",")
6262 case _ =>
6363 nil
6464 }
6565
6666 let nameTTL = getIntegerOrThrow(this, key_nameTTL)
6767
6868 func isRegisteredName (name) = isDefined(getString(this, key_Name_token(name)))
6969
7070
7171 func isCreatedName (name) = isDefined(_getCreatedAt(name))
7272
7373
7474 func isExpiredName (name) = match _getExpiresAt(name) {
7575 case expiresAt: Int =>
7676 (lastBlock.timestamp > expiresAt)
7777 case _ =>
7878 false
7979 }
8080
8181
8282 func isActiveName (name) = if (if (isRegisteredName(name))
8383 then isCreatedName(name)
8484 else false)
8585 then !(isExpiredName(name))
8686 else false
8787
8888
8989 func isAvailableName (name) = {
9090 let symbols = "abcdefghijklmnopqrstuvwxyz1234567890-"
9191 func validateChars (isValid,char) = if (isValid)
9292 then contains(symbols, char)
9393 else false
9494
9595 let isValidName = if (if (if (if ((size(name) > 0))
9696 then (63 >= size(name))
9797 else false)
9898 then (indexOf(name, "-") != 0)
9999 else false)
100100 then (lastIndexOf(name, "-") != (size(name) - 1))
101101 else false)
102102 then {
103103 let $l = split(name, "")
104104 let $s = size($l)
105105 let $acc0 = true
106106 func $f0_1 ($a,$i) = if (($i >= $s))
107107 then $a
108108 else validateChars($a, $l[$i])
109109
110110 func $f0_2 ($a,$i) = if (($i >= $s))
111111 then $a
112112 else throw("List size exceeds 63")
113113
114114 $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)
115115 }
116116 else false
117117 let inUse = if (isRegisteredName(name))
118118 then !(isExpiredName(name))
119119 else false
120120 if (!(inUse))
121121 then isValidName
122122 else false
123123 }
124124
125125
126126 func isAdmin (inv) = (inv.caller == this)
127127
128128
129129 func isOwner (inv,name) = (toString(inv.caller) == valueOrErrorMessage(_getOwner(name), (("Owner for `" + name) + "` is not found")))
130130
131131
132132 func isController (address) = containsElement(controllers, address)
133133
134134
135135 func _issueNameToken (name) = [Issue(if ((size(name) > 16))
136136 then (take(name, 15) + "~")
137137 else take(name, 16), name, 1, 0, false)]
138138
139139
140140 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))]
141141
142142
143143 func _restoreNameWithToken (name,tokenId) = [StringEntry(key_Name_token(name), tokenId), StringEntry(key_Token_name(tokenId), name)]
144144
145145
146146 func _transferTokenToOwner (tokenId,owner) = [ScriptTransfer(parseAddressOrThrow(owner), 1, fromBase58String(tokenId))]
147147
148148
149149 func modifiers (validations) = unit
150150
151151
152152 func onlyAdmin (inv) = if (isAdmin(inv))
153153 then unit
154154 else throw("Permission denied")
155155
156156
157157 func onlyController (inv) = if (if (isAdmin(inv))
158158 then true
159159 else isController(toString(inv.caller)))
160160 then unit
161161 else throw("Permission denied")
162162
163163
164164 @Callable(inv)
165165 func init (rootAddress,nameTTL) = valueOrElse(modifiers([onlyAdmin(inv)]), [StringEntry(key_rootAddress, rootAddress), IntegerEntry(key_nameTTL, nameTTL)])
166166
167167
168168
169169 @Callable(inv)
170170 func addController (address) = valueOrElse(modifiers([onlyAdmin(inv), if (!(isController(address)))
171171 then unit
172172 else throw((("Controller `" + address) + "` is already registered"))]), [StringEntry(key_controllers, makeString((controllers :+ address), ","))])
173173
174174
175175
176176 @Callable(inv)
177177 func removeController (address) = valueOrElse(modifiers([onlyAdmin(inv), if (isController(address))
178178 then unit
179179 else throw((("Controller `" + address) + "` is not registered"))]), {
180180 let controllerIndex = value(indexOf(controllers, address))
181181 [StringEntry(key_controllers, makeString(removeByIndex(controllers, controllerIndex), ","))]
182182 })
183183
184184
185185
186186 @Callable(inv)
187187 func available (name) = $Tuple2(nil, isAvailableName(name))
188188
189189
190190
191191 @Callable(inv)
192192 func register (name,owner,createdAt) = valueOrElse(modifiers([onlyController(inv), if (isAvailableName(name))
193193 then unit
194194 else throw((("`" + name) + "` cannot be registered")), if ((lastBlock.timestamp >= createdAt))
195195 then unit
196196 else throw("createdAt cannot be in the future")]), {
197197 let issueNameToken = _issueNameToken(name)
198198 let tokenId = calculateAssetId(issueNameToken[0])
199199 let tokenStr = toBase58String(tokenId)
200200 let registerNameWithToken = _registerNameWithToken(name, tokenStr, createdAt)
201201 let transferTokenToOwner = _transferTokenToOwner(tokenStr, owner)
202202 let setOwnership = _setOwner(name, owner)
203203 (((issueNameToken ++ registerNameWithToken) ++ transferTokenToOwner) ++ setOwnership)
204204 })
205205
206206
207207
208208 @Callable(inv)
209209 func reclaim (name) = valueOrElse(modifiers([if (isActiveName(name))
210210 then unit
211211 else throw((("`" + name) + "` is not active"))]), {
212212 let newOwner = inv.caller
213213 let newOwnerAddress = toString(newOwner)
214214 let tokenStr = valueOrErrorMessage(_getToken(name), (("No token is issued for `" + name) + "`"))
215215 let tokenId = fromBase58String(tokenStr)
216216 let token = assetInfo(tokenId)
217217 if (isOwner(inv, name))
218218 then if (isDefined(token))
219- then throw(if ((assetBalance(newOwner, tokenId) == 0))
219+ then throw(if ((assetBalance(newOwner, tokenId) == 1))
220220 then "You already own a name token"
221221 else "Another user owns a name token")
222222 else {
223223 let issueNewToken = _issueNameToken(name)
224224 let newTokenId = calculateAssetId(issueNewToken[0])
225225 let newTokenStr = toBase58String(newTokenId)
226226 let restoreNameWithNewToken = _restoreNameWithToken(name, newTokenStr)
227227 let transferNewTokenToOwner = _transferTokenToOwner(newTokenStr, newOwnerAddress)
228228 ((issueNewToken ++ restoreNameWithNewToken) ++ transferNewTokenToOwner)
229229 }
230230 else if ((assetBalance(newOwner, tokenId) == 0))
231231 then throw("You don't have a named token.")
232232 else _setOwner(name, newOwnerAddress)
233233 })
234234
235235

github/deemru/w8io/026f985 
45.11 ms