tx · GuLjEdb1jRSvvv3sF8BXGGNf9b4iz9pBazRzvKeo3Hff

3Mr7HCJPTazuYjJbfbbpRMvZX8xrNTjT1Kx:  -0.01000000 Waves

2023.02.21 16:34 [2459478] smart account 3Mr7HCJPTazuYjJbfbbpRMvZX8xrNTjT1Kx > SELF 0.00000000 Waves

{ "type": 13, "id": "GuLjEdb1jRSvvv3sF8BXGGNf9b4iz9pBazRzvKeo3Hff", "fee": 1000000, "feeAssetId": null, "timestamp": 1676986496038, "version": 2, "chainId": 84, "sender": "3Mr7HCJPTazuYjJbfbbpRMvZX8xrNTjT1Kx", "senderPublicKey": "D35PGQCSSdrp9pvujggj7b2DaCK1BhcU3kho7tikKJYs", "proofs": [ "2C1S5oXciau7TKF4hKefte9nuM3AM1ijjs9qvnnFNAhzYy4Xuo7ysyCvwGg5sb34FTubFuEncrc3TdvVuGNoCutj" ], "script": "base64:BgIfCAISAwoBARIAEgMKAQESBAoCGBESBAoCCAESAwoBCAIADG9wdGlvbnNfYWRkcgkBB0FkZHJlc3MBARoBVEFb+Cv2F+oqocvEivH7x7uyIGEx/ocgwQAEdFVTRAEgqyRKarZCRuvS/ON5sGG6w65pV01SespFHKdAHRGwKQ4GAWkBCWlzc3VlQmlsbAEJcHJvdmlkaW5nBApjdXJyZW50S2V5CQDYBAEICAUBaQZjYWxsZXIFYnl0ZXMEDWN1cnJlbnRBbW91bnQEByRtYXRjaDAJAJoIAgUEdGhpcwUKY3VycmVudEtleQMJAAECBQckbWF0Y2gwAgNJbnQEAWEFByRtYXRjaDAFAWEAAAQRbWluQmlsbERlcG9zaXRTdHIEByRtYXRjaDAJAJ0IAgUMb3B0aW9uc19hZGRyAhBtaW5fYmlsbF9kZXBvc2l0AwkAAQIFByRtYXRjaDACBFVuaXQCATADCQABAgUHJG1hdGNoMAIGU3RyaW5nBAF4BQckbWF0Y2gwBQF4CQACAQILTWF0Y2ggZXJyb3IEDm1pbkJpbGxEZXBvc2l0CQBoAgkAsQkBCQCbAwEFEW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5zZXQgYWRtaW4gbGlzdAECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXlc5pYk", "height": 2459478, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: B7XVF8KjpUncmT2XUqohRmvjJtpE7pCJhZQyvHPfW7gc Next: DjNSC2VYkZBcDaDWVf4V42FGMujSeu3vQAVarDSx4K6J Diff:
OldNewDifferences
1616 }
1717 let minBillDepositStr = match getString(options_addr, "min_bill_deposit") {
1818 case _: Unit =>
19- "unset"
19+ "0"
2020 case x: String =>
2121 x
2222 case _ =>
102102 throw("Match error")
103103 }
104104 func addStringEntry (accum,nextValue) = {
105- let $t042204243 = accum
106- let result = $t042204243._1
107- let j = $t042204243._2
105+ let $t042164239 = accum
106+ let result = $t042164239._1
107+ let j = $t042164239._2
108108 $Tuple2((result :+ IntegerEntry(opts[j], nextValue)), (j + 1))
109109 }
110110
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let options_addr = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6')
55
66 let tUSD = base58'CX4p6XcuSBUvv44r1avCqYka5PYAVzBK5hSXaT7maU85'
77
88 @Callable(i)
99 func issueBill (providing) = {
1010 let currentKey = toBase58String(i.caller.bytes)
1111 let currentAmount = match getInteger(this, currentKey) {
1212 case a: Int =>
1313 a
1414 case _ =>
1515 0
1616 }
1717 let minBillDepositStr = match getString(options_addr, "min_bill_deposit") {
1818 case _: Unit =>
19- "unset"
19+ "0"
2020 case x: String =>
2121 x
2222 case _ =>
2323 throw("Match error")
2424 }
2525 let minBillDeposit = (toInt(toBytes(minBillDepositStr)) * 100)
2626 let newAmount = (currentAmount - providing)
2727 if ((minBillDeposit > providing))
2828 then throw(((("The security deposit must be more than " + minBillDepositStr) + ". You set the size: ") + toString(providing)))
2929 else if ((0 > newAmount))
3030 then throw("Not enough balance")
3131 else {
3232 let issue = Issue(("bill for:" + toString((providing / 100))), currentKey, 1, 0, false)
3333 let id = calculateAssetId(issue)
3434 $Tuple2([IntegerEntry(currentKey, newAmount), issue, ScriptTransfer(i.caller, 1, id)], unit)
3535 }
3636 }
3737
3838
3939
4040 @Callable(i)
4141 func deposit () = if ((size(i.payments) == 0))
4242 then throw("Payment not attached")
4343 else {
4444 let pmt = value(i.payments)[0]
4545 let adminList = match getString(options_addr, "admin_list") {
4646 case _: Unit =>
4747 "unset"
4848 case x: String =>
4949 x
5050 case _ =>
5151 throw("Match error")
5252 }
5353 if ((pmt.assetId != tUSD))
5454 then throw("holded payment not tUSD")
5555 else if ((1000 > pmt.amount))
5656 then throw("holded payment < 10.00")
5757 else {
5858 let currentKey = toBase58String(i.caller.bytes)
5959 let currentAmount = match getInteger(this, currentKey) {
6060 case a: Int =>
6161 a
6262 case _ =>
6363 0
6464 }
6565 let newAmount = (currentAmount + pmt.amount)
6666 [IntegerEntry(currentKey, newAmount)]
6767 }
6868 }
6969
7070
7171
7272 @Callable(i)
7373 func withdraw (amount) = {
7474 let currentKey = toBase58String(i.caller.bytes)
7575 let currentAmount = match getInteger(this, currentKey) {
7676 case a: Int =>
7777 a
7878 case _ =>
7979 0
8080 }
8181 let newAmount = (currentAmount - amount)
8282 if ((0 > amount))
8383 then throw("Can't withdraw negative amount")
8484 else if ((0 > newAmount))
8585 then throw("Not enough balance")
8686 else $Tuple2([IntegerEntry(currentKey, newAmount), ScriptTransfer(i.caller, amount, tUSD)], unit)
8787 }
8888
8989
9090
9191 @Callable(i)
9292 func setOptions (opts,vals) = {
9393 let opt_size = size(opts)
9494 if ((100 >= opt_size))
9595 then {
9696 let adminList = match getString(options_addr, "admin_list") {
9797 case _: Unit =>
9898 "unset"
9999 case x: String =>
100100 x
101101 case _ =>
102102 throw("Match error")
103103 }
104104 func addStringEntry (accum,nextValue) = {
105- let $t042204243 = accum
106- let result = $t042204243._1
107- let j = $t042204243._2
105+ let $t042164239 = accum
106+ let result = $t042164239._1
107+ let j = $t042164239._2
108108 $Tuple2((result :+ IntegerEntry(opts[j], nextValue)), (j + 1))
109109 }
110110
111111 let r = {
112112 let $l = vals
113113 let $s = size($l)
114114 let $acc0 = $Tuple2(nil, 0)
115115 func $f0_1 ($a,$i) = if (($i >= $s))
116116 then $a
117117 else addStringEntry($a, $l[$i])
118118
119119 func $f0_2 ($a,$i) = if (($i >= $s))
120120 then $a
121121 else throw("List size exceeds 100")
122122
123123 $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)
124124 }
125125 let callerAddressStr = toString(i.caller)
126126 if ((adminList != "unset"))
127127 then {
128128 let test = getString(addressFromStringValue(adminList), callerAddressStr)
129129 let isAdmin = match test {
130130 case x: String =>
131131 x
132132 case _: Unit =>
133133 "no admin"
134134 case _ =>
135135 throw("Match error")
136136 }
137137 func add_elm (options) = {
138138 let opt = split(options, "|")
139139 StringEntry(opt[0], opt[1])
140140 }
141141
142142 if ((isAdmin != "no admin"))
143143 then r
144144 else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", "))
145145 }
146146 else throw("Unset admin list")
147147 }
148148 else throw("The number of list elements must not exceed 100")
149149 }
150150
151151
152152
153153 @Callable(i)
154154 func setOption (variable,value) = {
155155 let adminList = match getString(options_addr, "admin_list") {
156156 case _: Unit =>
157157 "unset"
158158 case x: String =>
159159 x
160160 case _ =>
161161 throw("Match error")
162162 }
163163 let callerAddressStr = toString(i.caller)
164164 if ((adminList != "unset"))
165165 then {
166166 let test = getString(addressFromStringValue(adminList), callerAddressStr)
167167 let isAdmin = match test {
168168 case x: String =>
169169 x
170170 case _: Unit =>
171171 "no admin"
172172 case _ =>
173173 throw("Match error")
174174 }
175175 if ((isAdmin != "no admin"))
176176 then $Tuple2([IntegerEntry(variable, value)], unit)
177177 else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", "))
178178 }
179179 else throw("Unset admin list")
180180 }
181181
182182
183183
184184 @Callable(i)
185185 func delOption (variable) = {
186186 let adminList = match getString(options_addr, "admin_list") {
187187 case _: Unit =>
188188 "unset"
189189 case x: String =>
190190 x
191191 case _ =>
192192 throw("Match error")
193193 }
194194 let callerAddressStr = toString(i.caller)
195195 if ((adminList != "unset"))
196196 then {
197197 let test = getString(addressFromStringValue(adminList), callerAddressStr)
198198 let isAdmin = match test {
199199 case x: String =>
200200 x
201201 case _: Unit =>
202202 "no admin"
203203 case _ =>
204204 throw("Match error")
205205 }
206206 if ((isAdmin != "no admin"))
207207 then $Tuple2([DeleteEntry(variable)], unit)
208208 else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", "))
209209 }
210210 else throw("Unset admin list")
211211 }
212212
213213
214214 @Verifier(tx)
215215 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
216216

github/deemru/w8io/169f3d6 
38.59 ms