tx · 3QC6LXWqgbeGjsau8BkuVdzwmPJ68uZNMKKXXT53qeim 3Mr7HCJPTazuYjJbfbbpRMvZX8xrNTjT1Kx: -0.01000000 Waves 2023.02.17 10:12 [2453296] smart account 3Mr7HCJPTazuYjJbfbbpRMvZX8xrNTjT1Kx > SELF 0.00000000 Waves
{ "type": 13, "id": "3QC6LXWqgbeGjsau8BkuVdzwmPJ68uZNMKKXXT53qeim", "fee": 1000000, "feeAssetId": null, "timestamp": 1676617989215, "version": 2, "chainId": 84, "sender": "3Mr7HCJPTazuYjJbfbbpRMvZX8xrNTjT1Kx", "senderPublicKey": "D35PGQCSSdrp9pvujggj7b2DaCK1BhcU3kho7tikKJYs", "proofs": [ "5TH8m2PYWYbsDUNRUKRdxdT3xpZCtBFBrYGFQstUMPFDWDH9yFz3hirb6mLR6gK2UmQwk2DxEUyyx6ihaHq8F8iT" ], "script": "base64:BgIaCAISABIDCgEBEgQKAhgREgQKAggBEgMKAQgBAAR0VVNEASCrJEpqtkJG69L843mwYbrDrmlXTVJ6ykUcp0AdEbApDgUBaQEHZGVwb3NpdAADCQAAAgkAkAMBCAUBaQhwYXltZW50cwAACQACAQIUUGF5bWVudCBub3QgYXR0YWNoZWQEA3BtdAkAkQMCCQEFdmFsdWUBCAUBaQhwYXltZW50cwAAAwkBAiE9AggFA3BtdAdhc3NldElkBQR0VVNECQACAQIXaG9sZGVkIHBheW1lbnQgbm90IHRVU0QDCQBmAgDoBwgFA3BtdAZhbW91bnQJAAIBAhdob2xkZWQgcGF5bWVudCBub3QgdFVTRAQKY3VycmVudEtleQkA2AQBCAgFAWkGY2FsbGVyBWJ5dGVzBA1jdXJyZW50QW1vdW50BAckbWF0Y2gwCQCaCAIFBHRoaXMFCmN1cnJlbnRLZXkDCQABAgUHJG1hdGNoMAIDSW50BAFhBQckbWF0Y2gwBQFhAAAECW5ld0Ftb3VudAkAZAIFDWN1cnJlbnRBbW91bnQIBQNwbXQGYW1vdW50CQDMCAIJAQxJbnRlZ2V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wgCQACAQIQVW5zZXQgYWRtaW4gbGlzdAECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXnhgmej", "height": 2453296, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4q1xdM2iyqiSDxLytspKghbxdJXXWkhaA3hbPT1wRMqD Next: BkiLHpjdec5nztZ8vBr7DMwfHqynV1tyLS8zMM8NkFeC Diff:
Old | New | Differences | |
---|---|---|---|
10 | 10 | let c = value(b.payments)[0] | |
11 | 11 | if ((c.assetId != a)) | |
12 | 12 | then throw("holded payment not tUSD") | |
13 | - | else { | |
14 | - | let d = toBase58String(b.caller.bytes) | |
15 | - | let e = { | |
16 | - | let f = getInteger(this, d) | |
17 | - | if ($isInstanceOf(f, "Int")) | |
18 | - | then { | |
19 | - | let g = f | |
20 | - | g | |
21 | - | } | |
22 | - | else 0 | |
13 | + | else if ((1000 > c.amount)) | |
14 | + | then throw("holded payment not tUSD") | |
15 | + | else { | |
16 | + | let d = toBase58String(b.caller.bytes) | |
17 | + | let e = { | |
18 | + | let f = getInteger(this, d) | |
19 | + | if ($isInstanceOf(f, "Int")) | |
20 | + | then { | |
21 | + | let g = f | |
22 | + | g | |
23 | + | } | |
24 | + | else 0 | |
25 | + | } | |
26 | + | let h = (e + c.amount) | |
27 | + | [IntegerEntry(d, h)] | |
23 | 28 | } | |
24 | - | let h = (e + c.amount) | |
25 | - | [IntegerEntry(d, h)] | |
26 | - | } | |
27 | 29 | } | |
28 | 30 | ||
29 | 31 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'CX4p6XcuSBUvv44r1avCqYka5PYAVzBK5hSXaT7maU85' | |
5 | 5 | ||
6 | 6 | @Callable(b) | |
7 | 7 | func deposit () = if ((size(b.payments) == 0)) | |
8 | 8 | then throw("Payment not attached") | |
9 | 9 | else { | |
10 | 10 | let c = value(b.payments)[0] | |
11 | 11 | if ((c.assetId != a)) | |
12 | 12 | then throw("holded payment not tUSD") | |
13 | - | else { | |
14 | - | let d = toBase58String(b.caller.bytes) | |
15 | - | let e = { | |
16 | - | let f = getInteger(this, d) | |
17 | - | if ($isInstanceOf(f, "Int")) | |
18 | - | then { | |
19 | - | let g = f | |
20 | - | g | |
21 | - | } | |
22 | - | else 0 | |
13 | + | else if ((1000 > c.amount)) | |
14 | + | then throw("holded payment not tUSD") | |
15 | + | else { | |
16 | + | let d = toBase58String(b.caller.bytes) | |
17 | + | let e = { | |
18 | + | let f = getInteger(this, d) | |
19 | + | if ($isInstanceOf(f, "Int")) | |
20 | + | then { | |
21 | + | let g = f | |
22 | + | g | |
23 | + | } | |
24 | + | else 0 | |
25 | + | } | |
26 | + | let h = (e + c.amount) | |
27 | + | [IntegerEntry(d, h)] | |
23 | 28 | } | |
24 | - | let h = (e + c.amount) | |
25 | - | [IntegerEntry(d, h)] | |
26 | - | } | |
27 | 29 | } | |
28 | 30 | ||
29 | 31 | ||
30 | 32 | ||
31 | 33 | @Callable(b) | |
32 | 34 | func withdraw (i) = { | |
33 | 35 | let d = toBase58String(b.caller.bytes) | |
34 | 36 | let e = { | |
35 | 37 | let f = getInteger(this, d) | |
36 | 38 | if ($isInstanceOf(f, "Int")) | |
37 | 39 | then { | |
38 | 40 | let g = f | |
39 | 41 | g | |
40 | 42 | } | |
41 | 43 | else 0 | |
42 | 44 | } | |
43 | 45 | let h = (e - i) | |
44 | 46 | if ((0 > i)) | |
45 | 47 | then throw("Can't withdraw negative amount") | |
46 | 48 | else if ((0 > h)) | |
47 | 49 | then throw("Not enough balance") | |
48 | 50 | else $Tuple2([IntegerEntry(d, h), ScriptTransfer(b.caller, i, unit)], unit) | |
49 | 51 | } | |
50 | 52 | ||
51 | 53 | ||
52 | 54 | ||
53 | 55 | @Callable(b) | |
54 | 56 | func setOptions (j,k) = { | |
55 | 57 | let l = size(j) | |
56 | 58 | if ((100 >= l)) | |
57 | 59 | then { | |
58 | 60 | let m = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6') | |
59 | 61 | let n = { | |
60 | 62 | let f = getString(m, "admin_list") | |
61 | 63 | if ($isInstanceOf(f, "Unit")) | |
62 | 64 | then "unset" | |
63 | 65 | else if ($isInstanceOf(f, "String")) | |
64 | 66 | then { | |
65 | 67 | let o = f | |
66 | 68 | o | |
67 | 69 | } | |
68 | 70 | else throw("Match error") | |
69 | 71 | } | |
70 | 72 | func p (q,r) = { | |
71 | 73 | let s = q | |
72 | 74 | let t = s._1 | |
73 | 75 | let u = s._2 | |
74 | 76 | $Tuple2((t :+ IntegerEntry(j[u], r)), (u + 1)) | |
75 | 77 | } | |
76 | 78 | ||
77 | 79 | let v = { | |
78 | 80 | let w = k | |
79 | 81 | let x = size(w) | |
80 | 82 | let y = $Tuple2(nil, 0) | |
81 | 83 | func z (A,B) = if ((B >= x)) | |
82 | 84 | then A | |
83 | 85 | else p(A, w[B]) | |
84 | 86 | ||
85 | 87 | func C (A,B) = if ((B >= x)) | |
86 | 88 | then A | |
87 | 89 | else throw("List size exceeds 100") | |
88 | 90 | ||
89 | 91 | C(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(y, 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) | |
90 | 92 | } | |
91 | 93 | let D = toString(b.caller) | |
92 | 94 | if ((n != "unset")) | |
93 | 95 | then { | |
94 | 96 | let E = getString(addressFromStringValue(n), D) | |
95 | 97 | let F = { | |
96 | 98 | let f = E | |
97 | 99 | if ($isInstanceOf(f, "String")) | |
98 | 100 | then { | |
99 | 101 | let o = f | |
100 | 102 | o | |
101 | 103 | } | |
102 | 104 | else if ($isInstanceOf(f, "Unit")) | |
103 | 105 | then "no admin" | |
104 | 106 | else throw("Match error") | |
105 | 107 | } | |
106 | 108 | func G (H) = { | |
107 | 109 | let I = split(H, "|") | |
108 | 110 | StringEntry(I[0], I[1]) | |
109 | 111 | } | |
110 | 112 | ||
111 | 113 | if ((F != "no admin")) | |
112 | 114 | then v | |
113 | 115 | else throw((((((("You not admin: " + n) + ", isAdmin: ") + F) + ", callerAddressStr: ") + D) + ", ")) | |
114 | 116 | } | |
115 | 117 | else throw("Unset admin list") | |
116 | 118 | } | |
117 | 119 | else throw("The number of list elements must not exceed 100") | |
118 | 120 | } | |
119 | 121 | ||
120 | 122 | ||
121 | 123 | ||
122 | 124 | @Callable(b) | |
123 | 125 | func setOption (J,K) = { | |
124 | 126 | let m = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6') | |
125 | 127 | let n = { | |
126 | 128 | let f = getString(m, "admin_list") | |
127 | 129 | if ($isInstanceOf(f, "Unit")) | |
128 | 130 | then "unset" | |
129 | 131 | else if ($isInstanceOf(f, "String")) | |
130 | 132 | then { | |
131 | 133 | let o = f | |
132 | 134 | o | |
133 | 135 | } | |
134 | 136 | else throw("Match error") | |
135 | 137 | } | |
136 | 138 | let D = toString(b.caller) | |
137 | 139 | if ((n != "unset")) | |
138 | 140 | then { | |
139 | 141 | let E = getString(addressFromStringValue(n), D) | |
140 | 142 | let F = { | |
141 | 143 | let f = E | |
142 | 144 | if ($isInstanceOf(f, "String")) | |
143 | 145 | then { | |
144 | 146 | let o = f | |
145 | 147 | o | |
146 | 148 | } | |
147 | 149 | else if ($isInstanceOf(f, "Unit")) | |
148 | 150 | then "no admin" | |
149 | 151 | else throw("Match error") | |
150 | 152 | } | |
151 | 153 | if ((F != "no admin")) | |
152 | 154 | then $Tuple2([IntegerEntry(J, K)], unit) | |
153 | 155 | else throw((((((("You not admin: " + n) + ", isAdmin: ") + F) + ", callerAddressStr: ") + D) + ", ")) | |
154 | 156 | } | |
155 | 157 | else throw("Unset admin list") | |
156 | 158 | } | |
157 | 159 | ||
158 | 160 | ||
159 | 161 | ||
160 | 162 | @Callable(b) | |
161 | 163 | func delOption (J) = { | |
162 | 164 | let m = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6') | |
163 | 165 | let n = { | |
164 | 166 | let f = getString(m, "admin_list") | |
165 | 167 | if ($isInstanceOf(f, "Unit")) | |
166 | 168 | then "unset" | |
167 | 169 | else if ($isInstanceOf(f, "String")) | |
168 | 170 | then { | |
169 | 171 | let o = f | |
170 | 172 | o | |
171 | 173 | } | |
172 | 174 | else throw("Match error") | |
173 | 175 | } | |
174 | 176 | let D = toString(b.caller) | |
175 | 177 | if ((n != "unset")) | |
176 | 178 | then { | |
177 | 179 | let E = getString(addressFromStringValue(n), D) | |
178 | 180 | let F = { | |
179 | 181 | let f = E | |
180 | 182 | if ($isInstanceOf(f, "String")) | |
181 | 183 | then { | |
182 | 184 | let o = f | |
183 | 185 | o | |
184 | 186 | } | |
185 | 187 | else if ($isInstanceOf(f, "Unit")) | |
186 | 188 | then "no admin" | |
187 | 189 | else throw("Match error") | |
188 | 190 | } | |
189 | 191 | if ((F != "no admin")) | |
190 | 192 | then $Tuple2([DeleteEntry(J)], unit) | |
191 | 193 | else throw((((((("You not admin: " + n) + ", isAdmin: ") + F) + ", callerAddressStr: ") + D) + ", ")) | |
192 | 194 | } | |
193 | 195 | else throw("Unset admin list") | |
194 | 196 | } | |
195 | 197 | ||
196 | 198 | ||
197 | 199 | @Verifier(L) | |
198 | 200 | func M () = sigVerify(L.bodyBytes, L.proofs[0], L.senderPublicKey) | |
199 | 201 |
github/deemru/w8io/169f3d6 35.33 ms ◑