tx · GqvEGRiopGZ44JcdFrNx3qUcZt6RHTG5wvdbogwNZn1T 3MvVeqqFHW9M6r9ggG3Ma5Que4Rqgb4BjJE: -0.01000000 Waves 2022.10.20 09:50 [2280373] smart account 3MvVeqqFHW9M6r9ggG3Ma5Que4Rqgb4BjJE > SELF 0.00000000 Waves
{ "type": 13, "id": "GqvEGRiopGZ44JcdFrNx3qUcZt6RHTG5wvdbogwNZn1T", "fee": 1000000, "feeAssetId": null, "timestamp": 1666248640856, "version": 2, "chainId": 84, "sender": "3MvVeqqFHW9M6r9ggG3Ma5Que4Rqgb4BjJE", "senderPublicKey": "3nPFqmiV1yaNvmSrQdE1QHbTAF8bfJB1GjbegBWbNNCK", "proofs": [ "PYSHroGjHuyLkbmuH2BcDJUhk55EMTqbGvUBE8xHgHTpxBFjHvGN51doHozwNG7JJxo3Y5XmU3PpFfW24fJvwRa" ], "script": "base64:AAIFAAAAAAAAACIIAhIDCgEIEgMKAQgSBAoCCAgSAwoBCBIECgIICBIDCgEIAAAACQEAAAAJa2V5X293bmVyAAAAAQAAAAdzdWJOYW1lCQABLAAAAAICAAAABm93bmVyXwUAAAAHc3ViTmFtZQEAAAANa2V5X3JlZ2lzdHJhcgAAAAEAAAAHc3ViTmFtZQkAASwAAAACAgAAAApyZWdpc3RyYXJfBQAAAAdzdWJOYW1lAQAAAAlfZ2V0T3duZXIAAAABAAAAB3N1Yk5hbWUJAAQdAAAAAgUAAAAEdGhpcwkBAAAACWtleV9vd25lcgAAAAEFAAAAB3N1Yk5hbWUBAAAACV9zZXRPd25lcgAAAAIAAAAHc3ViTmFtZQAAAAVvd25lcgkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQEAAAAJa2V5X293bmVyAAAAAQUAAAAHc3ViTmFtZQUAAAAFb3duZXIFAAAAA25pbAEAAAANX2dldFJlZ2lzdHJhcgAAAAEAAAAHc3ViTmFtZQkABB0AAAACBQAAAAR0aGlzCQEAAAANa2V5X3JlZ2lzdHJhcgAAAAEF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5hbWUCAAAAFGAgYWxyZWFkeSByZWdpc3RlcmVkCQEAAAAJX3NldE93bmVyAAAAAgUAAAAHc3ViTmFtZQUAAAAFb3duZXIAAAADaW52AQAAABFzdXBwb3J0c0ludGVyZmFjZQAAAAEAAAALaW50ZXJmYWNlSWQJAAUUAAAAAgUAAAADbmlsCQEAAAAPY29udGFpbnNFbGVtZW50AAAAAgkABEwAAAACAgAAAARhZGRyCQAETAAAAAICAAAABW93bmVyBQAAAANuaWwFAAAAC2ludGVyZmFjZUlkAAAAA2ludgEAAAAHc2V0QWRkcgAAAAIAAAAEbmFtZQAAAAdhZGRyZXNzAwkBAAAAASEAAAABCQEAAAAHaXNPd25lcgAAAAIFAAAAA2ludgUAAAAEbmFtZQkAAAIAAAABAgAAABFQZXJtaXNzaW9uIGRlbmllZAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQEAAAALa2V5X2FkZHJlc3MAAAABBQAAAARuYW1lBQAAAAdhZGRyZXNzBQAAAANuaWwAAAADaW52AQAAAARhZGRyAAAAAQAAAARuYW1lCQAFFAAAAAIFAAAAA25pbAkABB0AAAACBQAAAAR0aGlzCQEAAAALa2V5X2FkZHJlc3MAAAABBQAAAARuYW1lAAAAAIXu98Q=", "height": 2280373, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 83XR9igMH8K8pQfcZ9TNQ6GtsLDBAhxzgwgDEiAXKtA4 Next: 7fTgMY2W5gvix1Vayp6sAWv96kdWxc7SUTAvFZ7u2XWN Diff:
Old | New | Differences | |
---|---|---|---|
55 | 55 | ||
56 | 56 | ||
57 | 57 | @Callable(inv) | |
58 | - | func supportsInterface (interfaceId) = $Tuple2(nil, containsElement(["addr", "owner" | |
58 | + | func supportsInterface (interfaceId) = $Tuple2(nil, containsElement(["addr", "owner"], interfaceId)) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func key_owner (subName) = ("owner_" + subName) | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | func key_registrar (subName) = ("registrar_" + subName) | |
8 | 8 | ||
9 | 9 | ||
10 | 10 | func _getOwner (subName) = getString(this, key_owner(subName)) | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | func _setOwner (subName,owner) = [StringEntry(key_owner(subName), owner)] | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func _getRegistrar (subName) = getString(this, key_registrar(subName)) | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func _setRegistrar (subName,registrar) = [StringEntry(key_registrar(subName), registrar)] | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func key_address (name) = ("address_" + name) | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | let registry = this | |
26 | 26 | ||
27 | 27 | func isOwner (inv,name) = if ((inv.caller == this)) | |
28 | 28 | then true | |
29 | 29 | else match invoke(registry, "owner", [name], nil) { | |
30 | 30 | case owner: String => | |
31 | 31 | (owner == toString(inv.caller)) | |
32 | 32 | case _ => | |
33 | 33 | false | |
34 | 34 | } | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | @Callable(inv) | |
38 | 38 | func owner (subName) = $Tuple2(nil, _getOwner(subName)) | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | ||
42 | 42 | @Callable(inv) | |
43 | 43 | func registrar (subName) = $Tuple2(nil, _getRegistrar(subName)) | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | ||
47 | 47 | @Callable(inv) | |
48 | 48 | func register (subName,owner) = { | |
49 | 49 | let currentOwner = _getOwner(subName) | |
50 | 50 | if (isDefined(currentOwner)) | |
51 | 51 | then throw((("`" + subName) + "` already registered")) | |
52 | 52 | else _setOwner(subName, owner) | |
53 | 53 | } | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | ||
57 | 57 | @Callable(inv) | |
58 | - | func supportsInterface (interfaceId) = $Tuple2(nil, containsElement(["addr", "owner" | |
58 | + | func supportsInterface (interfaceId) = $Tuple2(nil, containsElement(["addr", "owner"], interfaceId)) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | ||
62 | 62 | @Callable(inv) | |
63 | 63 | func setAddr (name,address) = if (!(isOwner(inv, name))) | |
64 | 64 | then throw("Permission denied") | |
65 | 65 | else [StringEntry(key_address(name), address)] | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | ||
69 | 69 | @Callable(inv) | |
70 | 70 | func addr (name) = $Tuple2(nil, getString(this, key_address(name))) | |
71 | 71 | ||
72 | 72 |
github/deemru/w8io/169f3d6 37.81 ms ◑