tx · BkiLHpjdec5nztZ8vBr7DMwfHqynV1tyLS8zMM8NkFeC

3Mr7HCJPTazuYjJbfbbpRMvZX8xrNTjT1Kx:  -0.01000000 Waves

2023.02.17 10:14 [2453298] smart account 3Mr7HCJPTazuYjJbfbbpRMvZX8xrNTjT1Kx > SELF 0.00000000 Waves

{ "type": 13, "id": "BkiLHpjdec5nztZ8vBr7DMwfHqynV1tyLS8zMM8NkFeC", "fee": 1000000, "feeAssetId": null, "timestamp": 1676618061555, "version": 2, "chainId": 84, "sender": "3Mr7HCJPTazuYjJbfbbpRMvZX8xrNTjT1Kx", "senderPublicKey": "D35PGQCSSdrp9pvujggj7b2DaCK1BhcU3kho7tikKJYs", "proofs": [ "RiNvbfuKZKhqKqJeUGuMjFLLEwgRt7SgiH62DJSpCrRUgEig57Jv2r5VQp3HiMCTfnDdf1vq3Vn4uGHzJMidDo2" ], "script": "base64:BgIaCAISABIDCgEBEgQKAhgREgQKAggBEgMKAQgBAAR0VVNEASCrJEpqtkJG69L843mwYbrDrmlXTVJ6ykUcp0AdEbApDgUBaQEHZGVwb3NpdAADCQAAAgkAkAMBCAUBaQhwYXltZW50cwAACQACAQIUUGF5bWVudCBub3QgYXR0YWNoZWQEA3BtdAkAkQMCCQEFdmFsdWUBCAUBaQhwYXltZW50cwAAAwkBAiE9AggFA3BtdAdhc3NldElkBQR0VVNECQACAQIXaG9sZGVkIHBheW1lbnQgbm90IHRVU0QDCQBmAgDoBwgFA3BtdAZhbW91bnQJAAIBAhZob2xkZWQgcGF5bWVudCA8IDEwLjAwBApjdXJyZW50S2V5CQDYBAEICAUBaQZjYWxsZXIFYnl0ZXMEDWN1cnJlbnRBbW91bnQEByRtYXRjaDAJAJoIAgUEdGhpcwUKY3VycmVudEtleQMJAAECBQckbWF0Y2gwAgNJbnQEAWEFByRtYXRjaDAFAWEAAAQJbmV3QW1vdW50CQBkAgUNY3VycmVudEFtb3VudAgFA3BtdAZhbW91bnQJAMwIAgkBDEludGVnZXJFbnRye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mxpY0tleeN7OqA=", "height": 2453298, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3QC6LXWqgbeGjsau8BkuVdzwmPJ68uZNMKKXXT53qeim Next: 9z4fuKP2rKKt7NUaTNMkRma1h24tyU7QvRyTViZKxgTp Diff:
OldNewDifferences
1111 if ((pmt.assetId != tUSD))
1212 then throw("holded payment not tUSD")
1313 else if ((1000 > pmt.amount))
14- then throw("holded payment not tUSD")
14+ then throw("holded payment < 10.00")
1515 else {
1616 let currentKey = toBase58String(i.caller.bytes)
1717 let currentAmount = match getInteger(this, currentKey) {
6161 throw("Match error")
6262 }
6363 func addStringEntry (accum,nextValue) = {
64- let $t027042727 = accum
65- let result = $t027042727._1
66- let j = $t027042727._2
64+ let $t027032726 = accum
65+ let result = $t027032726._1
66+ let j = $t027032726._2
6767 $Tuple2((result :+ IntegerEntry(opts[j], nextValue)), (j + 1))
6868 }
6969
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let tUSD = base58'CX4p6XcuSBUvv44r1avCqYka5PYAVzBK5hSXaT7maU85'
55
66 @Callable(i)
77 func deposit () = if ((size(i.payments) == 0))
88 then throw("Payment not attached")
99 else {
1010 let pmt = value(i.payments)[0]
1111 if ((pmt.assetId != tUSD))
1212 then throw("holded payment not tUSD")
1313 else if ((1000 > pmt.amount))
14- then throw("holded payment not tUSD")
14+ then throw("holded payment < 10.00")
1515 else {
1616 let currentKey = toBase58String(i.caller.bytes)
1717 let currentAmount = match getInteger(this, currentKey) {
1818 case a: Int =>
1919 a
2020 case _ =>
2121 0
2222 }
2323 let newAmount = (currentAmount + pmt.amount)
2424 [IntegerEntry(currentKey, newAmount)]
2525 }
2626 }
2727
2828
2929
3030 @Callable(i)
3131 func withdraw (amount) = {
3232 let currentKey = toBase58String(i.caller.bytes)
3333 let currentAmount = match getInteger(this, currentKey) {
3434 case a: Int =>
3535 a
3636 case _ =>
3737 0
3838 }
3939 let newAmount = (currentAmount - amount)
4040 if ((0 > amount))
4141 then throw("Can't withdraw negative amount")
4242 else if ((0 > newAmount))
4343 then throw("Not enough balance")
4444 else $Tuple2([IntegerEntry(currentKey, newAmount), ScriptTransfer(i.caller, amount, unit)], unit)
4545 }
4646
4747
4848
4949 @Callable(i)
5050 func setOptions (opts,vals) = {
5151 let opt_size = size(opts)
5252 if ((100 >= opt_size))
5353 then {
5454 let options_addr = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6')
5555 let adminList = match getString(options_addr, "admin_list") {
5656 case _: Unit =>
5757 "unset"
5858 case x: String =>
5959 x
6060 case _ =>
6161 throw("Match error")
6262 }
6363 func addStringEntry (accum,nextValue) = {
64- let $t027042727 = accum
65- let result = $t027042727._1
66- let j = $t027042727._2
64+ let $t027032726 = accum
65+ let result = $t027032726._1
66+ let j = $t027032726._2
6767 $Tuple2((result :+ IntegerEntry(opts[j], nextValue)), (j + 1))
6868 }
6969
7070 let r = {
7171 let $l = vals
7272 let $s = size($l)
7373 let $acc0 = $Tuple2(nil, 0)
7474 func $f0_1 ($a,$i) = if (($i >= $s))
7575 then $a
7676 else addStringEntry($a, $l[$i])
7777
7878 func $f0_2 ($a,$i) = if (($i >= $s))
7979 then $a
8080 else throw("List size exceeds 100")
8181
8282 $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)
8383 }
8484 let callerAddressStr = toString(i.caller)
8585 if ((adminList != "unset"))
8686 then {
8787 let test = getString(addressFromStringValue(adminList), callerAddressStr)
8888 let isAdmin = match test {
8989 case x: String =>
9090 x
9191 case _: Unit =>
9292 "no admin"
9393 case _ =>
9494 throw("Match error")
9595 }
9696 func add_elm (options) = {
9797 let opt = split(options, "|")
9898 StringEntry(opt[0], opt[1])
9999 }
100100
101101 if ((isAdmin != "no admin"))
102102 then r
103103 else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", "))
104104 }
105105 else throw("Unset admin list")
106106 }
107107 else throw("The number of list elements must not exceed 100")
108108 }
109109
110110
111111
112112 @Callable(i)
113113 func setOption (variable,value) = {
114114 let options_addr = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6')
115115 let adminList = match getString(options_addr, "admin_list") {
116116 case _: Unit =>
117117 "unset"
118118 case x: String =>
119119 x
120120 case _ =>
121121 throw("Match error")
122122 }
123123 let callerAddressStr = toString(i.caller)
124124 if ((adminList != "unset"))
125125 then {
126126 let test = getString(addressFromStringValue(adminList), callerAddressStr)
127127 let isAdmin = match test {
128128 case x: String =>
129129 x
130130 case _: Unit =>
131131 "no admin"
132132 case _ =>
133133 throw("Match error")
134134 }
135135 if ((isAdmin != "no admin"))
136136 then $Tuple2([IntegerEntry(variable, value)], unit)
137137 else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", "))
138138 }
139139 else throw("Unset admin list")
140140 }
141141
142142
143143
144144 @Callable(i)
145145 func delOption (variable) = {
146146 let options_addr = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6')
147147 let adminList = match getString(options_addr, "admin_list") {
148148 case _: Unit =>
149149 "unset"
150150 case x: String =>
151151 x
152152 case _ =>
153153 throw("Match error")
154154 }
155155 let callerAddressStr = toString(i.caller)
156156 if ((adminList != "unset"))
157157 then {
158158 let test = getString(addressFromStringValue(adminList), callerAddressStr)
159159 let isAdmin = match test {
160160 case x: String =>
161161 x
162162 case _: Unit =>
163163 "no admin"
164164 case _ =>
165165 throw("Match error")
166166 }
167167 if ((isAdmin != "no admin"))
168168 then $Tuple2([DeleteEntry(variable)], unit)
169169 else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", "))
170170 }
171171 else throw("Unset admin list")
172172 }
173173
174174
175175 @Verifier(tx)
176176 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
177177

github/deemru/w8io/169f3d6 
33.96 ms