tx · 62C8Dz4zKtZPKEdYXC3deU4CNAf9LP11qhyQoaHAZoTa 3MwwXqqNtNyPD1U9Rov5ygG9bCUGJeJMTy2: -0.05000000 Waves 2023.02.14 22:01 [2449688] smart account 3MwwXqqNtNyPD1U9Rov5ygG9bCUGJeJMTy2 > SELF 0.00000000 Waves
{ "type": 13, "id": "62C8Dz4zKtZPKEdYXC3deU4CNAf9LP11qhyQoaHAZoTa", "fee": 5000000, "feeAssetId": null, "timestamp": 1676401302098, "version": 2, "chainId": 84, "sender": "3MwwXqqNtNyPD1U9Rov5ygG9bCUGJeJMTy2", "senderPublicKey": "GCbdokkxJFr9rj5258VmEVbDP4sQVUmXoiMz5hMRXa9S", "proofs": [ "2Z5GWXi2X7S3f3DnuQgZZQWhNcczYWzhU5WZjKVLGE7xiQPee2G6zfcQTxYcMZ3JXZa9SWX2NkkM9wpRNXZKVJot" ], "script": "base64:AAIFAAAAAAAAABkIAhIECgIYGBIECgIICBIDCgEIEgQKAggIAAAAAAAAAAQAAAABaQEAAAAKc2V0T3B0aW9ucwAAAAIAAAAEb3B0cwAAAAR2YWxzBAAAAAhvcHRfc2l6ZQkAAZAAAAABBQAAAARvcHRzAwkAAGcAAAACAAAAAAAAAABkBQAAAAhvcHRfc2l6ZQQAAAAMb3B0aW9uc19hZGRyCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUQVv4K/YX6iqhy8SK8fvHu7IgYTH+hyDBBAAAAAlhZG1pbkxpc3QEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAMb3B0aW9uc19hZGRyAgAAAAphZG1pbl9saXN0AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAARVbml0AgAAAAV1bnNldAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAF4BQAAAAckbWF0Y2gwBQAAAAF4CQAAAgAAAAECAAAAC01hdGNoIGVycm9yCgEAAAAOYWRkU3RyaW5nRW50cnkAAAACAAAABWFjY3VtAAAACW5leHRWYW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GVzAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAABGhpc3QFAAAAByRtYXRjaDAFAAAABGhpc3QCAAAABXVuc2V0BAAAAAR0VVNEAQAAACCrJEpqtkJG69L843mwYbrDrmlXTVJ6ykUcp0AdEbApDgMJAAAAAAAAAgUAAAANaXNLbm93bkNhbGxlcgIAAAAFdW5zZXQJAAUUAAAAAgkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMFAAAABGRhdGEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyAAAAAAAAD0JABQAAAAR0VVNEBQAAAANuaWwFAAAABHVuaXQJAAACAAAAAQIAAAAVQ2FuIGJlIHVzZWQgb25seSBvbmNlAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V53/Td0g==", "height": 2449688, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: C2j1dbvqcUwAJF7Wz8RLPRRTgAC7YH3ziqHKQVMg6T9U Next: 4sG2WDvTYn8rhHwucNV71xNEdz9hpTE9CVXaxVxubtAB Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | ||
5 | + | ||
6 | + | @Callable(i) | |
7 | + | func setOptions (opts,vals) = { | |
8 | + | let opt_size = size(opts) | |
9 | + | if ((100 >= opt_size)) | |
10 | + | then { | |
11 | + | let options_addr = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6') | |
12 | + | let adminList = match getString(options_addr, "admin_list") { | |
13 | + | case _: Unit => | |
14 | + | "unset" | |
15 | + | case x: String => | |
16 | + | x | |
17 | + | case _ => | |
18 | + | throw("Match error") | |
19 | + | } | |
20 | + | func addStringEntry (accum,nextValue) = { | |
21 | + | let $t0557580 = accum | |
22 | + | let result = $t0557580._1 | |
23 | + | let j = $t0557580._2 | |
24 | + | $Tuple2((result :+ StringEntry(opts[j], nextValue)), (j + 1)) | |
25 | + | } | |
26 | + | ||
27 | + | let r = { | |
28 | + | let $l = vals | |
29 | + | let $s = size($l) | |
30 | + | let $acc0 = $Tuple2(nil, 0) | |
31 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
32 | + | then $a | |
33 | + | else addStringEntry($a, $l[$i]) | |
34 | + | ||
35 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
36 | + | then $a | |
37 | + | else throw("List size exceeds 100") | |
38 | + | ||
39 | + | $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($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), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
40 | + | } | |
41 | + | let callerAddressStr = toString(i.caller) | |
42 | + | if ((adminList != "unset")) | |
43 | + | then { | |
44 | + | let test = getString(addressFromStringValue(adminList), callerAddressStr) | |
45 | + | let isAdmin = match test { | |
46 | + | case x: String => | |
47 | + | x | |
48 | + | case _: Unit => | |
49 | + | "no admin" | |
50 | + | case _ => | |
51 | + | throw("Match error") | |
52 | + | } | |
53 | + | func add_elm (options) = { | |
54 | + | let opt = split(options, "|") | |
55 | + | StringEntry(opt[0], opt[1]) | |
56 | + | } | |
57 | + | ||
58 | + | if ((isAdmin != "no admin")) | |
59 | + | then r | |
60 | + | else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", ")) | |
61 | + | } | |
62 | + | else throw("Unset admin list") | |
63 | + | } | |
64 | + | else throw("The number of list elements must not exceed 100") | |
65 | + | } | |
66 | + | ||
67 | + | ||
68 | + | ||
69 | + | @Callable(i) | |
70 | + | func setOption (variable,value) = { | |
71 | + | let options_addr = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6') | |
72 | + | let adminList = match getString(options_addr, "admin_list") { | |
73 | + | case _: Unit => | |
74 | + | "unset" | |
75 | + | case x: String => | |
76 | + | x | |
77 | + | case _ => | |
78 | + | throw("Match error") | |
79 | + | } | |
80 | + | let callerAddressStr = toString(i.caller) | |
81 | + | if ((adminList != "unset")) | |
82 | + | then { | |
83 | + | let test = getString(addressFromStringValue(adminList), callerAddressStr) | |
84 | + | let isAdmin = match test { | |
85 | + | case x: String => | |
86 | + | x | |
87 | + | case _: Unit => | |
88 | + | "no admin" | |
89 | + | case _ => | |
90 | + | throw("Match error") | |
91 | + | } | |
92 | + | if ((isAdmin != "no admin")) | |
93 | + | then $Tuple2([StringEntry(variable, value)], unit) | |
94 | + | else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", ")) | |
95 | + | } | |
96 | + | else throw("Unset admin list") | |
97 | + | } | |
98 | + | ||
99 | + | ||
100 | + | ||
101 | + | @Callable(i) | |
102 | + | func delOption (variable) = { | |
103 | + | let options_addr = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6') | |
104 | + | let adminList = match getString(options_addr, "admin_list") { | |
105 | + | case _: Unit => | |
106 | + | "unset" | |
107 | + | case x: String => | |
108 | + | x | |
109 | + | case _ => | |
110 | + | throw("Match error") | |
111 | + | } | |
112 | + | let callerAddressStr = toString(i.caller) | |
113 | + | if ((adminList != "unset")) | |
114 | + | then { | |
115 | + | let test = getString(addressFromStringValue(adminList), callerAddressStr) | |
116 | + | let isAdmin = match test { | |
117 | + | case x: String => | |
118 | + | x | |
119 | + | case _: Unit => | |
120 | + | "no admin" | |
121 | + | case _ => | |
122 | + | throw("Match error") | |
123 | + | } | |
124 | + | if ((isAdmin != "no admin")) | |
125 | + | then $Tuple2([DeleteEntry(variable)], unit) | |
126 | + | else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", ")) | |
127 | + | } | |
128 | + | else throw("Unset admin list") | |
129 | + | } | |
130 | + | ||
4 | 131 | ||
5 | 132 | ||
6 | 133 | @Callable(i) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | ||
5 | + | ||
6 | + | @Callable(i) | |
7 | + | func setOptions (opts,vals) = { | |
8 | + | let opt_size = size(opts) | |
9 | + | if ((100 >= opt_size)) | |
10 | + | then { | |
11 | + | let options_addr = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6') | |
12 | + | let adminList = match getString(options_addr, "admin_list") { | |
13 | + | case _: Unit => | |
14 | + | "unset" | |
15 | + | case x: String => | |
16 | + | x | |
17 | + | case _ => | |
18 | + | throw("Match error") | |
19 | + | } | |
20 | + | func addStringEntry (accum,nextValue) = { | |
21 | + | let $t0557580 = accum | |
22 | + | let result = $t0557580._1 | |
23 | + | let j = $t0557580._2 | |
24 | + | $Tuple2((result :+ StringEntry(opts[j], nextValue)), (j + 1)) | |
25 | + | } | |
26 | + | ||
27 | + | let r = { | |
28 | + | let $l = vals | |
29 | + | let $s = size($l) | |
30 | + | let $acc0 = $Tuple2(nil, 0) | |
31 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
32 | + | then $a | |
33 | + | else addStringEntry($a, $l[$i]) | |
34 | + | ||
35 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
36 | + | then $a | |
37 | + | else throw("List size exceeds 100") | |
38 | + | ||
39 | + | $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($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), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
40 | + | } | |
41 | + | let callerAddressStr = toString(i.caller) | |
42 | + | if ((adminList != "unset")) | |
43 | + | then { | |
44 | + | let test = getString(addressFromStringValue(adminList), callerAddressStr) | |
45 | + | let isAdmin = match test { | |
46 | + | case x: String => | |
47 | + | x | |
48 | + | case _: Unit => | |
49 | + | "no admin" | |
50 | + | case _ => | |
51 | + | throw("Match error") | |
52 | + | } | |
53 | + | func add_elm (options) = { | |
54 | + | let opt = split(options, "|") | |
55 | + | StringEntry(opt[0], opt[1]) | |
56 | + | } | |
57 | + | ||
58 | + | if ((isAdmin != "no admin")) | |
59 | + | then r | |
60 | + | else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", ")) | |
61 | + | } | |
62 | + | else throw("Unset admin list") | |
63 | + | } | |
64 | + | else throw("The number of list elements must not exceed 100") | |
65 | + | } | |
66 | + | ||
67 | + | ||
68 | + | ||
69 | + | @Callable(i) | |
70 | + | func setOption (variable,value) = { | |
71 | + | let options_addr = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6') | |
72 | + | let adminList = match getString(options_addr, "admin_list") { | |
73 | + | case _: Unit => | |
74 | + | "unset" | |
75 | + | case x: String => | |
76 | + | x | |
77 | + | case _ => | |
78 | + | throw("Match error") | |
79 | + | } | |
80 | + | let callerAddressStr = toString(i.caller) | |
81 | + | if ((adminList != "unset")) | |
82 | + | then { | |
83 | + | let test = getString(addressFromStringValue(adminList), callerAddressStr) | |
84 | + | let isAdmin = match test { | |
85 | + | case x: String => | |
86 | + | x | |
87 | + | case _: Unit => | |
88 | + | "no admin" | |
89 | + | case _ => | |
90 | + | throw("Match error") | |
91 | + | } | |
92 | + | if ((isAdmin != "no admin")) | |
93 | + | then $Tuple2([StringEntry(variable, value)], unit) | |
94 | + | else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", ")) | |
95 | + | } | |
96 | + | else throw("Unset admin list") | |
97 | + | } | |
98 | + | ||
99 | + | ||
100 | + | ||
101 | + | @Callable(i) | |
102 | + | func delOption (variable) = { | |
103 | + | let options_addr = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6') | |
104 | + | let adminList = match getString(options_addr, "admin_list") { | |
105 | + | case _: Unit => | |
106 | + | "unset" | |
107 | + | case x: String => | |
108 | + | x | |
109 | + | case _ => | |
110 | + | throw("Match error") | |
111 | + | } | |
112 | + | let callerAddressStr = toString(i.caller) | |
113 | + | if ((adminList != "unset")) | |
114 | + | then { | |
115 | + | let test = getString(addressFromStringValue(adminList), callerAddressStr) | |
116 | + | let isAdmin = match test { | |
117 | + | case x: String => | |
118 | + | x | |
119 | + | case _: Unit => | |
120 | + | "no admin" | |
121 | + | case _ => | |
122 | + | throw("Match error") | |
123 | + | } | |
124 | + | if ((isAdmin != "no admin")) | |
125 | + | then $Tuple2([DeleteEntry(variable)], unit) | |
126 | + | else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", ")) | |
127 | + | } | |
128 | + | else throw("Unset admin list") | |
129 | + | } | |
130 | + | ||
4 | 131 | ||
5 | 132 | ||
6 | 133 | @Callable(i) | |
7 | 134 | func regProvider (provider,data) = { | |
8 | 135 | let isKnownCaller = match getString(this, toBase58String(i.caller.bytes)) { | |
9 | 136 | case hist: String => | |
10 | 137 | hist | |
11 | 138 | case _ => | |
12 | 139 | "unset" | |
13 | 140 | } | |
14 | 141 | let tUSD = base58'CX4p6XcuSBUvv44r1avCqYka5PYAVzBK5hSXaT7maU85' | |
15 | 142 | if ((isKnownCaller == "unset")) | |
16 | 143 | then $Tuple2([StringEntry(toBase58String(i.caller.bytes), data), ScriptTransfer(i.caller, 1000000, tUSD)], unit) | |
17 | 144 | else throw("Can be used only once") | |
18 | 145 | } | |
19 | 146 | ||
20 | 147 | ||
21 | 148 | @Verifier(tx) | |
22 | 149 | func verify () = match tx { | |
23 | 150 | case _ => | |
24 | 151 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
25 | 152 | } | |
26 | 153 |
github/deemru/w8io/169f3d6 29.54 ms ◑