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