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:BgIaCAISABIDCgEBEgQKAhgREgQKAggBEgMKAQgBAAR0VVNEASCrJEpqtkJG69L843mwYbrDrmlXTVJ6ykUcp0AdEbApDgUBaQEHZGVwb3NpdAADCQAAAgkAkAMBCAUBaQhwYXltZW50cwAACQACAQIUUGF5bWVudCBub3QgYXR0YWNoZWQEA3BtdAkAkQMCCQEFdmFsdWUBCAUBaQhwYXltZW50cwAAAwkBAiE9AggFA3BtdAdhc3NldElkBQR0VVNECQACAQIXaG9sZGVkIHBheW1lbnQgbm90IHRVU0QDCQBmAgDoBwgFA3BtdAZhbW91bnQJAAIBAhdob2xkZWQgcGF5bWVudCBub3QgdFVTRAQKY3VycmVudEtleQkA2AQBCAgFAWkGY2FsbGVyBWJ5dGVzBA1jdXJyZW50QW1vdW50BAckbWF0Y2gwCQCaCAIFBHRoaXMFCmN1cnJlbnRLZXkDCQABAgUHJG1hdGNoMAIDSW50BAFhBQckbWF0Y2gwBQFhAAAECW5ld0Ftb3VudAkAZAIFDWN1cnJlbnRBbW91bnQIBQNwbXQGYW1vdW50CQDMCAIJAQxJbnRlZ2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iwgCQACAQIQVW5zZXQgYWRtaW4gbGlzdAECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXnhgmej", "height": 2453296, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4q1xdM2iyqiSDxLytspKghbxdJXXWkhaA3hbPT1wRMqD Next: BkiLHpjdec5nztZ8vBr7DMwfHqynV1tyLS8zMM8NkFeC Diff:
OldNewDifferences
1010 let c = value(b.payments)[0]
1111 if ((c.assetId != a))
1212 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)]
2328 }
24- let h = (e + c.amount)
25-[IntegerEntry(d, h)]
26- }
2729 }
2830
2931
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'CX4p6XcuSBUvv44r1avCqYka5PYAVzBK5hSXaT7maU85'
55
66 @Callable(b)
77 func deposit () = if ((size(b.payments) == 0))
88 then throw("Payment not attached")
99 else {
1010 let c = value(b.payments)[0]
1111 if ((c.assetId != a))
1212 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)]
2328 }
24- let h = (e + c.amount)
25-[IntegerEntry(d, h)]
26- }
2729 }
2830
2931
3032
3133 @Callable(b)
3234 func withdraw (i) = {
3335 let d = toBase58String(b.caller.bytes)
3436 let e = {
3537 let f = getInteger(this, d)
3638 if ($isInstanceOf(f, "Int"))
3739 then {
3840 let g = f
3941 g
4042 }
4143 else 0
4244 }
4345 let h = (e - i)
4446 if ((0 > i))
4547 then throw("Can't withdraw negative amount")
4648 else if ((0 > h))
4749 then throw("Not enough balance")
4850 else $Tuple2([IntegerEntry(d, h), ScriptTransfer(b.caller, i, unit)], unit)
4951 }
5052
5153
5254
5355 @Callable(b)
5456 func setOptions (j,k) = {
5557 let l = size(j)
5658 if ((100 >= l))
5759 then {
5860 let m = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6')
5961 let n = {
6062 let f = getString(m, "admin_list")
6163 if ($isInstanceOf(f, "Unit"))
6264 then "unset"
6365 else if ($isInstanceOf(f, "String"))
6466 then {
6567 let o = f
6668 o
6769 }
6870 else throw("Match error")
6971 }
7072 func p (q,r) = {
7173 let s = q
7274 let t = s._1
7375 let u = s._2
7476 $Tuple2((t :+ IntegerEntry(j[u], r)), (u + 1))
7577 }
7678
7779 let v = {
7880 let w = k
7981 let x = size(w)
8082 let y = $Tuple2(nil, 0)
8183 func z (A,B) = if ((B >= x))
8284 then A
8385 else p(A, w[B])
8486
8587 func C (A,B) = if ((B >= x))
8688 then A
8789 else throw("List size exceeds 100")
8890
8991 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)
9092 }
9193 let D = toString(b.caller)
9294 if ((n != "unset"))
9395 then {
9496 let E = getString(addressFromStringValue(n), D)
9597 let F = {
9698 let f = E
9799 if ($isInstanceOf(f, "String"))
98100 then {
99101 let o = f
100102 o
101103 }
102104 else if ($isInstanceOf(f, "Unit"))
103105 then "no admin"
104106 else throw("Match error")
105107 }
106108 func G (H) = {
107109 let I = split(H, "|")
108110 StringEntry(I[0], I[1])
109111 }
110112
111113 if ((F != "no admin"))
112114 then v
113115 else throw((((((("You not admin: " + n) + ", isAdmin: ") + F) + ", callerAddressStr: ") + D) + ", "))
114116 }
115117 else throw("Unset admin list")
116118 }
117119 else throw("The number of list elements must not exceed 100")
118120 }
119121
120122
121123
122124 @Callable(b)
123125 func setOption (J,K) = {
124126 let m = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6')
125127 let n = {
126128 let f = getString(m, "admin_list")
127129 if ($isInstanceOf(f, "Unit"))
128130 then "unset"
129131 else if ($isInstanceOf(f, "String"))
130132 then {
131133 let o = f
132134 o
133135 }
134136 else throw("Match error")
135137 }
136138 let D = toString(b.caller)
137139 if ((n != "unset"))
138140 then {
139141 let E = getString(addressFromStringValue(n), D)
140142 let F = {
141143 let f = E
142144 if ($isInstanceOf(f, "String"))
143145 then {
144146 let o = f
145147 o
146148 }
147149 else if ($isInstanceOf(f, "Unit"))
148150 then "no admin"
149151 else throw("Match error")
150152 }
151153 if ((F != "no admin"))
152154 then $Tuple2([IntegerEntry(J, K)], unit)
153155 else throw((((((("You not admin: " + n) + ", isAdmin: ") + F) + ", callerAddressStr: ") + D) + ", "))
154156 }
155157 else throw("Unset admin list")
156158 }
157159
158160
159161
160162 @Callable(b)
161163 func delOption (J) = {
162164 let m = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6')
163165 let n = {
164166 let f = getString(m, "admin_list")
165167 if ($isInstanceOf(f, "Unit"))
166168 then "unset"
167169 else if ($isInstanceOf(f, "String"))
168170 then {
169171 let o = f
170172 o
171173 }
172174 else throw("Match error")
173175 }
174176 let D = toString(b.caller)
175177 if ((n != "unset"))
176178 then {
177179 let E = getString(addressFromStringValue(n), D)
178180 let F = {
179181 let f = E
180182 if ($isInstanceOf(f, "String"))
181183 then {
182184 let o = f
183185 o
184186 }
185187 else if ($isInstanceOf(f, "Unit"))
186188 then "no admin"
187189 else throw("Match error")
188190 }
189191 if ((F != "no admin"))
190192 then $Tuple2([DeleteEntry(J)], unit)
191193 else throw((((((("You not admin: " + n) + ", isAdmin: ") + F) + ", callerAddressStr: ") + D) + ", "))
192194 }
193195 else throw("Unset admin list")
194196 }
195197
196198
197199 @Verifier(L)
198200 func M () = sigVerify(L.bodyBytes, L.proofs[0], L.senderPublicKey)
199201

github/deemru/w8io/169f3d6 
35.33 ms