tx · FYbhrQuEAZvTQQFr7sWW5Y4Aks4B7phqBCs9vnCTZym3

3Mr7HCJPTazuYjJbfbbpRMvZX8xrNTjT1Kx:  -0.01000000 Waves

2023.03.02 01:46 [2471624] smart account 3Mr7HCJPTazuYjJbfbbpRMvZX8xrNTjT1Kx > SELF 0.00000000 Waves

{ "type": 13, "id": "FYbhrQuEAZvTQQFr7sWW5Y4Aks4B7phqBCs9vnCTZym3", "fee": 1000000, "feeAssetId": null, "timestamp": 1677710847428, "version": 2, "chainId": 84, "sender": "3Mr7HCJPTazuYjJbfbbpRMvZX8xrNTjT1Kx", "senderPublicKey": "D35PGQCSSdrp9pvujggj7b2DaCK1BhcU3kho7tikKJYs", "proofs": [ "a8UZmCWg1z7keBn78T6iAvJ861fhCaNNj8Fru9F4HGLPbSoLSwBHaS9j6554rn2Azz8r8N1KMqMDc36cMrKz7st" ], "script": "base64:BgIfCAISAwoBARIAEgMKAQESBAoCGBESBAoCCAgSAwoBCAIADG9wdGlvbnNfYWRkcgkBB0FkZHJlc3MBARoBVEFb+Cv2F+oqocvEivH7x7uyIGEx/ocgwQAEdFVTRAEgqyRKarZCRuvS/ON5sGG6w65pV01SespFHKdAHRGwKQ4GAWkBCWlzc3VlQmlsbAEJcHJvdmlkaW5nBApjdXJyZW50S2V5CQDYBAEICAUBaQZjYWxsZXIFYnl0ZXMEDWN1cnJlbnRBbW91bnQEByRtYXRjaDAJAJoIAgUEdGhpcwUKY3VycmVudEtleQMJAAECBQckbWF0Y2gwAgNJbnQEAWEFByRtYXRjaDAFAWEAAAQRbWluQmlsbERlcG9zaXRTdHIEByRtYXRjaDAJAJ0IAgUMb3B0aW9uc19hZGRyAhBtaW5fYmlsbF9kZXBvc2l0AwkAAQIFByRtYXRjaDACBFVuaXQCATADCQABAgUHJG1hdGNoMAIGU3RyaW5nBAF4BQckbWF0Y2gwBQF4CQACAQILTWF0Y2ggZXJyb3IEDm1pbkJpbGxEZXBvc2l0BAckbWF0Y2gwCQC2CQEJAJ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hPQIFCWFkbWluTGlzdAIFdW5zZXQEBHRlc3QJAJ0IAgkBEUBleHRyTmF0aXZlKDEwNjIpAQUJYWRtaW5MaXN0BRBjYWxsZXJBZGRyZXNzU3RyBAdpc0FkbWluBAckbWF0Y2gwBQR0ZXN0AwkAAQIFByRtYXRjaDACBlN0cmluZwQBeAUHJG1hdGNoMAUBeAMJAAECBQckbWF0Y2gwAgRVbml0AghubyBhZG1pbgkAAgECC01hdGNoIGVycm9yAwkBAiE9AgUHaXNBZG1pbgIIbm8gYWRtaW4JAJQKAgkAzAgCCQELRGVsZXRlRW50cnkBBQh2YXJpYWJsZQUDbmlsBQR1bml0CQACAQkArAICCQCsAgIJAKwCAgkArAICCQCsAgIJAKwCAgIPWW91IG5vdCBhZG1pbjogBQlhZG1pbkxpc3QCCywgaXNBZG1pbjogBQdpc0FkbWluAhQsIGNhbGxlckFkZHJlc3NTdHI6IAUQY2FsbGVyQWRkcmVzc1N0cgICLCAJAAIBAhBVbnNldCBhZG1pbiBsaXN0AQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tlec523iA=", "height": 2471624, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 81qmenHvn9stujupSeJn1VUswjzVfcE3eh8oDLg21kaV Next: EJ9nG6iQZ9g1JgfTRFP9AVoNorczwu833p6D7DCChgLh Diff:
OldNewDifferences
167167
168168 @Callable(i)
169169 func setOption (variable,value) = {
170- let adminList = match getString(this, "admin_list") {
170+ let adminList = match getString(options_addr, "admin_list") {
171171 case _: Unit =>
172172 "unset"
173173 case x: String =>
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 }
2525 let minBillDeposit = match parseInt(split(minBillDepositStr, ".")[0]) {
2626 case _: Unit =>
2727 0
2828 case t: Int =>
2929 t
3030 case _ =>
3131 throw("Match error")
3232 }
3333 let newAmount = (currentAmount - providing)
3434 if (((minBillDeposit * 100) > providing))
3535 then throw((((("The security deposit must be more than " + minBillDepositStr) + ". You set the size: ") + toString((providing / 100))) + ".00"))
3636 else if ((0 > newAmount))
3737 then throw("Not enough balance")
3838 else {
3939 let issue = Issue(("bill for:" + toString((providing / 100))), currentKey, 1, 0, false)
4040 let id = calculateAssetId(issue)
4141 $Tuple2([IntegerEntry(currentKey, newAmount), issue, ScriptTransfer(i.caller, 1, id), IntegerEntry(("l_" + toBase58String(id)), providing)], unit)
4242 }
4343 }
4444
4545
4646
4747 @Callable(i)
4848 func deposit () = if ((size(i.payments) == 0))
4949 then throw("Payment not attached")
5050 else {
5151 let pmt = value(i.payments)[0]
5252 let minDepositStr = match getString(options_addr, "min_deposit") {
5353 case _: Unit =>
5454 "0"
5555 case x: String =>
5656 x
5757 case _ =>
5858 throw("Match error")
5959 }
6060 let minDeposit = match parseInt(split(minDepositStr, ".")[0]) {
6161 case _: Unit =>
6262 0
6363 case t: Int =>
6464 t
6565 case _ =>
6666 throw("Match error")
6767 }
6868 if ((pmt.assetId != tUSD))
6969 then throw("holded payment not tUSD")
7070 else if (((minDeposit * 100) > pmt.amount))
7171 then throw((((("You have set the deposit amount to " + toString((pmt.amount / 100))) + ".00, which is less than the minimum (") + minDepositStr) + ")"))
7272 else {
7373 let currentKey = toBase58String(i.caller.bytes)
7474 let currentAmount = match getInteger(this, currentKey) {
7575 case a: Int =>
7676 a
7777 case _ =>
7878 0
7979 }
8080 let newAmount = (currentAmount + pmt.amount)
8181 [IntegerEntry(currentKey, newAmount)]
8282 }
8383 }
8484
8585
8686
8787 @Callable(i)
8888 func withdraw (amount) = {
8989 let currentKey = toBase58String(i.caller.bytes)
9090 let currentAmount = match getInteger(this, currentKey) {
9191 case a: Int =>
9292 a
9393 case _ =>
9494 0
9595 }
9696 let newAmount = (currentAmount - amount)
9797 if ((0 > amount))
9898 then throw("Can't withdraw negative amount")
9999 else if ((0 > newAmount))
100100 then throw("Not enough balance")
101101 else $Tuple2([IntegerEntry(currentKey, newAmount), ScriptTransfer(i.caller, amount, tUSD)], unit)
102102 }
103103
104104
105105
106106 @Callable(i)
107107 func setOptions (opts,vals) = {
108108 let opt_size = size(opts)
109109 if ((100 >= opt_size))
110110 then {
111111 let adminList = match getString(options_addr, "admin_list") {
112112 case _: Unit =>
113113 "unset"
114114 case x: String =>
115115 x
116116 case _ =>
117117 throw("Match error")
118118 }
119119 func addStringEntry (accum,nextValue) = {
120120 let $t046484671 = accum
121121 let result = $t046484671._1
122122 let j = $t046484671._2
123123 $Tuple2((result :+ IntegerEntry(opts[j], nextValue)), (j + 1))
124124 }
125125
126126 let r = {
127127 let $l = vals
128128 let $s = size($l)
129129 let $acc0 = $Tuple2(nil, 0)
130130 func $f0_1 ($a,$i) = if (($i >= $s))
131131 then $a
132132 else addStringEntry($a, $l[$i])
133133
134134 func $f0_2 ($a,$i) = if (($i >= $s))
135135 then $a
136136 else throw("List size exceeds 100")
137137
138138 $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)
139139 }
140140 let callerAddressStr = toString(i.caller)
141141 if ((adminList != "unset"))
142142 then {
143143 let test = getString(addressFromStringValue(adminList), callerAddressStr)
144144 let isAdmin = match test {
145145 case x: String =>
146146 x
147147 case _: Unit =>
148148 "no admin"
149149 case _ =>
150150 throw("Match error")
151151 }
152152 func add_elm (options) = {
153153 let opt = split(options, "|")
154154 StringEntry(opt[0], opt[1])
155155 }
156156
157157 if ((isAdmin != "no admin"))
158158 then r
159159 else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", "))
160160 }
161161 else throw("Unset admin list")
162162 }
163163 else throw("The number of list elements must not exceed 100")
164164 }
165165
166166
167167
168168 @Callable(i)
169169 func setOption (variable,value) = {
170- let adminList = match getString(this, "admin_list") {
170+ let adminList = match getString(options_addr, "admin_list") {
171171 case _: Unit =>
172172 "unset"
173173 case x: String =>
174174 x
175175 case _ =>
176176 throw("Match error")
177177 }
178178 let callerAddressStr = toString(i.caller)
179179 if ((adminList != "unset"))
180180 then {
181181 let test = getString(addressFromStringValue(adminList), callerAddressStr)
182182 let isAdmin = match test {
183183 case x: String =>
184184 x
185185 case _: Unit =>
186186 "no admin"
187187 case _ =>
188188 throw("Match error")
189189 }
190190 if ((isAdmin != "no admin"))
191191 then $Tuple2([StringEntry(variable, value)], unit)
192192 else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", "))
193193 }
194194 else throw("Unset admin list")
195195 }
196196
197197
198198
199199 @Callable(i)
200200 func delOption (variable) = {
201201 let adminList = match getString(options_addr, "admin_list") {
202202 case _: Unit =>
203203 "unset"
204204 case x: String =>
205205 x
206206 case _ =>
207207 throw("Match error")
208208 }
209209 let callerAddressStr = toString(i.caller)
210210 if ((adminList != "unset"))
211211 then {
212212 let test = getString(addressFromStringValue(adminList), callerAddressStr)
213213 let isAdmin = match test {
214214 case x: String =>
215215 x
216216 case _: Unit =>
217217 "no admin"
218218 case _ =>
219219 throw("Match error")
220220 }
221221 if ((isAdmin != "no admin"))
222222 then $Tuple2([DeleteEntry(variable)], unit)
223223 else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", "))
224224 }
225225 else throw("Unset admin list")
226226 }
227227
228228
229229 @Verifier(tx)
230230 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
231231

github/deemru/w8io/169f3d6 
71.25 ms