tx · 2DKr2Yn8WA1WGyyLRdQiHUfaEbSP3uBy5s6tXkPrBKMZ

3MxquWQhzpqXgbqunnFqHFJXTjasEznd1tN:  -0.00300000 Waves

2022.10.10 08:02 [2265789] smart account 3MxquWQhzpqXgbqunnFqHFJXTjasEznd1tN > SELF 0.00000000 Waves

{ "type": 13, "id": "2DKr2Yn8WA1WGyyLRdQiHUfaEbSP3uBy5s6tXkPrBKMZ", "fee": 300000, "feeAssetId": null, "timestamp": 1665378234421, "version": 2, "chainId": 84, "sender": "3MxquWQhzpqXgbqunnFqHFJXTjasEznd1tN", "senderPublicKey": "GDjexdefwEhShjRTvHgazn3gTrDo74eHpJCAz14cAEeh", "proofs": [ "43evbkFN1TKavFNqaaD1rJJ4T3YKZdU43zkZNSpVWk8iWMXMTqvQKQxemA56UuhgNapZSAJp6H31rG6VzR3YdjwM" ], "script": "base64:AAIFAAAAAAAAACQIAhIECgIICBIDCgEIEgQKAggIEgMKAQgSAwoBCBIFCgMICAgAAAASAQAAABBnZXRTdHJpbmdPclRocm93AAAAAgAAAAdhZGRyZXNzAAAAA2tleQkBAAAAE3ZhbHVlT3JFcnJvck1lc3NhZ2UAAAACCQAEHQAAAAIFAAAAB2FkZHJlc3MFAAAAA2tleQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAMQ2FuJ3QgcmVhZCAnBQAAAANrZXkCAAAADScgYXQgYWRkcmVzcyAJAAQlAAAAAQUAAAAHYWRkcmVzcwEAAAARZ2V0SW50ZWdlck9yVGhyb3cAAAACAAAAB2FkZHJlc3MAAAADa2V5CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQaAAAAAgUAAAAHYWRkcmVzcwUAAAADa2V5CQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAxDYW4ndCByZWFkICcFAAAAA2tleQIAAAANJyBhdCBhZGRyZXNzIAkABCUAAAABBQAAAAdhZGRyZXNzAQAAABNwYXJzZUFkZHJlc3NPclRocm93AAAAAQAAAA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bHZlcgkBAAAADV9zZXRDcmVhdGVkQXQAAAACBQAAAARub2RlCAUAAAAJbGFzdEJsb2NrAAAACXRpbWVzdGFtcAAAAAA+BpmU", "height": 2265789, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BRmubh4Q92AmW1tpUFNqioS1MbM8pPkpKjCyJme88h88 Next: CdzFFy7Pjmgb7jj5GCzknGoAqecURz7aT797X5uWZCFy Diff:
OldNewDifferences
1313 func key_entity (name,pk,property) = ((((name + "_") + pk) + "_") + property)
1414
1515
16-func key_Records_owner (node) = key_entity("Records", node, "owner")
16+func key_Name_owner (node) = key_entity("Name", node, "owner")
1717
1818
19-func key_Records_resolver (node) = key_entity("Records", node, "resolver")
19+func key_Name_resolver (node) = key_entity("Name", node, "resolver")
2020
2121
22-func key_Records_ttl (node) = key_entity("Records", node, "ttl")
22+func key_Name_createdAt (node) = key_entity("Name", node, "createdAt")
2323
2424
25-func _getOwner (node) = getString(this, key_Records_owner(node))
25+func _getOwner (node) = getString(this, key_Name_owner(node))
2626
2727
28-func _setOwner (node,owner) = [StringEntry(key_Records_owner(node), owner)]
28+func _setOwner (node,owner) = [StringEntry(key_Name_owner(node), owner)]
2929
3030
31-func _getResolver (node) = getString(this, key_Records_resolver(node))
31+func _getResolver (node) = getString(this, key_Name_resolver(node))
3232
3333
34-func _setResolver (node,resolver) = [StringEntry(key_Records_resolver(node), resolver)]
34+func _setResolver (node,resolver) = [StringEntry(key_Name_resolver(node), resolver)]
35+
36+
37+func _getCreatedAt (node) = getInteger(this, key_Name_createdAt(node))
38+
39+
40+func _setCreatedAt (node,createdAt) = [IntegerEntry(key_Name_createdAt(node), createdAt)]
3541
3642
3743 func isAdmin (inv) = (inv.caller == this)
7682
7783
7884 @Callable(inv)
79-func setRecord (node,owner,resolver) = valueOrElse(modifiers([onlyAdmin(inv)]), (_setOwner(node, owner) ++ _setResolver(node, resolver)))
85+func nameCreated (node) = $Tuple2(nil, _getCreatedAt(node))
86+
87+
88+
89+@Callable(inv)
90+func setRecord (node,owner,resolver) = valueOrElse(modifiers([onlyAdmin(inv)]), ((_setOwner(node, owner) ++ _setResolver(node, resolver)) ++ _setCreatedAt(node, lastBlock.timestamp)))
8091
8192
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
16-func key_Records_owner (node) = key_entity("Records", node, "owner")
16+func key_Name_owner (node) = key_entity("Name", node, "owner")
1717
1818
19-func key_Records_resolver (node) = key_entity("Records", node, "resolver")
19+func key_Name_resolver (node) = key_entity("Name", node, "resolver")
2020
2121
22-func key_Records_ttl (node) = key_entity("Records", node, "ttl")
22+func key_Name_createdAt (node) = key_entity("Name", node, "createdAt")
2323
2424
25-func _getOwner (node) = getString(this, key_Records_owner(node))
25+func _getOwner (node) = getString(this, key_Name_owner(node))
2626
2727
28-func _setOwner (node,owner) = [StringEntry(key_Records_owner(node), owner)]
28+func _setOwner (node,owner) = [StringEntry(key_Name_owner(node), owner)]
2929
3030
31-func _getResolver (node) = getString(this, key_Records_resolver(node))
31+func _getResolver (node) = getString(this, key_Name_resolver(node))
3232
3333
34-func _setResolver (node,resolver) = [StringEntry(key_Records_resolver(node), resolver)]
34+func _setResolver (node,resolver) = [StringEntry(key_Name_resolver(node), resolver)]
35+
36+
37+func _getCreatedAt (node) = getInteger(this, key_Name_createdAt(node))
38+
39+
40+func _setCreatedAt (node,createdAt) = [IntegerEntry(key_Name_createdAt(node), createdAt)]
3541
3642
3743 func isAdmin (inv) = (inv.caller == this)
3844
3945
4046 func isOwner (inv,node) = (toString(inv.caller) == valueOrErrorMessage(_getOwner(node), (("Owner for the `" + node) + "` was not found")))
4147
4248
4349 func modifiers (validations) = unit
4450
4551
4652 func onlyAdmin (inv) = if (isAdmin(inv))
4753 then unit
4854 else throw("Permission denied")
4955
5056
5157 func onlyOwner (inv,node) = if (if (isAdmin(inv))
5258 then true
5359 else isOwner(inv, node))
5460 then unit
5561 else throw("Permission denied")
5662
5763
5864 @Callable(inv)
5965 func setOwner (node,owner) = valueOrElse(modifiers([onlyOwner(inv, node)]), _setOwner(node, owner))
6066
6167
6268
6369 @Callable(inv)
6470 func owner (node) = $Tuple2(nil, _getOwner(node))
6571
6672
6773
6874 @Callable(inv)
6975 func setResolver (node,resolver) = valueOrElse(modifiers([onlyOwner(inv, node)]), _setResolver(node, resolver))
7076
7177
7278
7379 @Callable(inv)
7480 func resolver (node) = $Tuple2(nil, _getResolver(node))
7581
7682
7783
7884 @Callable(inv)
79-func setRecord (node,owner,resolver) = valueOrElse(modifiers([onlyAdmin(inv)]), (_setOwner(node, owner) ++ _setResolver(node, resolver)))
85+func nameCreated (node) = $Tuple2(nil, _getCreatedAt(node))
86+
87+
88+
89+@Callable(inv)
90+func setRecord (node,owner,resolver) = valueOrElse(modifiers([onlyAdmin(inv)]), ((_setOwner(node, owner) ++ _setResolver(node, resolver)) ++ _setCreatedAt(node, lastBlock.timestamp)))
8091
8192

github/deemru/w8io/026f985 
34.08 ms