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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2V5j3oUnA==", "height": 2459488, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DjNSC2VYkZBcDaDWVf4V42FGMujSeu3vQAVarDSx4K6J Next: A54inJ5zo53K8J7Meo5keDqpwUYAas7K6DhFZNBoJpQC Diff:
OldNewDifferences
2222 case _ =>
2323 throw("Match error")
2424 }
25- let minBillDeposit = (parseIntValue(minBillDepositStr) * 100)
25+ let minBillDeposit = parseIntValue(minBillDepositStr)
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)))
102102 throw("Match error")
103103 }
104104 func addStringEntry (accum,nextValue) = {
105- let $t042094232 = accum
106- let result = $t042094232._1
107- let j = $t042094232._2
105+ let $t042034226 = accum
106+ let result = $t042034226._1
107+ let j = $t042034226._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 =>
1919 "0"
2020 case x: String =>
2121 x
2222 case _ =>
2323 throw("Match error")
2424 }
25- let minBillDeposit = (parseIntValue(minBillDepositStr) * 100)
25+ let minBillDeposit = parseIntValue(minBillDepositStr)
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 $t042094232 = accum
106- let result = $t042094232._1
107- let j = $t042094232._2
105+ let $t042034226 = accum
106+ let result = $t042034226._1
107+ let j = $t042034226._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 
60.63 ms