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