tx · 4j575PixthHe3uJ3ydGM91uLNoEx9dUiAWb9Acw7nXqr
3MvVeqqFHW9M6r9ggG3Ma5Que4Rqgb4BjJE: -0.01000000 Waves
2022.10.17 14:29 [2276312] smart account 3MvVeqqFHW9M6r9ggG3Ma5Que4Rqgb4BjJE > SELF 0.00000000 Waves
{
"type": 13,
"id": "4j575PixthHe3uJ3ydGM91uLNoEx9dUiAWb9Acw7nXqr",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1666006171293,
"version": 2,
"chainId": 84,
"sender": "3MvVeqqFHW9M6r9ggG3Ma5Que4Rqgb4BjJE",
"senderPublicKey": "3nPFqmiV1yaNvmSrQdE1QHbTAF8bfJB1GjbegBWbNNCK",
"proofs": [
"pasxZJiKD4qiZKcyGANZMPNYZcLoyVzmPVWLPadngN4mfP6sz23Q74EHETNfo82XVtPJMavvhqGwbDUFpH9rktC"
],
"script": "base64:AAIFAAAAAAAAAB0IAhIDCgEIEgQKAggIEgMKAQgSBAoCCAgSAwoBCAAAAAYBAAAACWtleV9vd25lcgAAAAEAAAAHc3ViTmFtZQkAASwAAAACAgAAAAZvd25lcl8FAAAAB3N1Yk5hbWUBAAAACV9nZXRPd25lcgAAAAEAAAAHc3ViTmFtZQkABB0AAAACBQAAAAR0aGlzCQEAAAAJa2V5X293bmVyAAAAAQUAAAAHc3ViTmFtZQEAAAAJX3NldE93bmVyAAAAAgAAAAdzdWJOYW1lAAAABW93bmVyCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAQAAAAlrZXlfb3duZXIAAAABBQAAAAdzdWJOYW1lBQAAAAVvd25lcgUAAAADbmlsAQAAAAtrZXlfYWRkcmVzcwAAAAEAAAAEbmFtZQkAASwAAAACAgAAAAhhZGRyZXNzXwUAAAAEbmFtZQAAAAAJcmVnaXN0cmFyBQAAAAR0aGlzAQAAAAdpc093bmVyAAAAAgAAAANpbnYAAAAEbmFtZQMJAAAAAAAAAggFAAAAA2ludgAAAAZjYWxsZXIFAAA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AAAARuYW1lCQAFFAAAAAIFAAAAA25pbAkABB0AAAACBQAAAAR0aGlzCQEAAAALa2V5X2FkZHJlc3MAAAABBQAAAARuYW1lAAAAAG/pB40=",
"height": 2276312,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 7T3vQ6rekucZZVuT8UBsCj2rZsJqi1bzpE3wMMwsS7oB
Next: 7Qgzuj2XekvVrfT835ebFy3NbaXpx1oHGd4sY2jrUsNz
Diff:
Old | New | | Differences |
---|
23 | 23 | | case _ => |
---|
24 | 24 | | false |
---|
25 | 25 | | } |
---|
| 26 | + | |
---|
| 27 | + | |
---|
| 28 | + | @Callable(inv) |
---|
| 29 | + | func owner (subName) = $Tuple2(nil, _getOwner(subName)) |
---|
| 30 | + | |
---|
26 | 31 | | |
---|
27 | 32 | | |
---|
28 | 33 | | @Callable(inv) |
---|
Full:
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 _getOwner (subName) = getString(this, key_owner(subName)) |
---|
8 | 8 | | |
---|
9 | 9 | | |
---|
10 | 10 | | func _setOwner (subName,owner) = [StringEntry(key_owner(subName), owner)] |
---|
11 | 11 | | |
---|
12 | 12 | | |
---|
13 | 13 | | func key_address (name) = ("address_" + name) |
---|
14 | 14 | | |
---|
15 | 15 | | |
---|
16 | 16 | | let registrar = this |
---|
17 | 17 | | |
---|
18 | 18 | | func isOwner (inv,name) = if ((inv.caller == this)) |
---|
19 | 19 | | then true |
---|
20 | 20 | | else match invoke(registrar, "owner", [name], nil) { |
---|
21 | 21 | | case owner: String => |
---|
22 | 22 | | (owner == toString(inv.caller)) |
---|
23 | 23 | | case _ => |
---|
24 | 24 | | false |
---|
25 | 25 | | } |
---|
| 26 | + | |
---|
| 27 | + | |
---|
| 28 | + | @Callable(inv) |
---|
| 29 | + | func owner (subName) = $Tuple2(nil, _getOwner(subName)) |
---|
| 30 | + | |
---|
26 | 31 | | |
---|
27 | 32 | | |
---|
28 | 33 | | @Callable(inv) |
---|
29 | 34 | | func register (subName,owner) = { |
---|
30 | 35 | | let currentOwner = _getOwner(subName) |
---|
31 | 36 | | if (isDefined(currentOwner)) |
---|
32 | 37 | | then throw((("`" + subName) + "` already registered")) |
---|
33 | 38 | | else _setOwner(subName, owner) |
---|
34 | 39 | | } |
---|
35 | 40 | | |
---|
36 | 41 | | |
---|
37 | 42 | | |
---|
38 | 43 | | @Callable(inv) |
---|
39 | 44 | | func supportsInterface (interfaceId) = $Tuple2(nil, (interfaceId == "addr")) |
---|
40 | 45 | | |
---|
41 | 46 | | |
---|
42 | 47 | | |
---|
43 | 48 | | @Callable(inv) |
---|
44 | 49 | | func setAddr (name,address) = if (!(isOwner(inv, name))) |
---|
45 | 50 | | then throw("Permission denied") |
---|
46 | 51 | | else [StringEntry(key_address(name), address)] |
---|
47 | 52 | | |
---|
48 | 53 | | |
---|
49 | 54 | | |
---|
50 | 55 | | @Callable(inv) |
---|
51 | 56 | | func addr (name) = $Tuple2(nil, getString(this, key_address(name))) |
---|
52 | 57 | | |
---|
53 | 58 | | |
---|