tx · B7XVF8KjpUncmT2XUqohRmvjJtpE7pCJhZQyvHPfW7gc

3Mr7HCJPTazuYjJbfbbpRMvZX8xrNTjT1Kx:  -0.01000000 Waves

2023.02.21 16:31 [2459476] smart account 3Mr7HCJPTazuYjJbfbbpRMvZX8xrNTjT1Kx > SELF 0.00000000 Waves

{ "type": 13, "id": "B7XVF8KjpUncmT2XUqohRmvjJtpE7pCJhZQyvHPfW7gc", "fee": 1000000, "feeAssetId": null, "timestamp": 1676986357368, "version": 2, "chainId": 84, "sender": "3Mr7HCJPTazuYjJbfbbpRMvZX8xrNTjT1Kx", "senderPublicKey": "D35PGQCSSdrp9pvujggj7b2DaCK1BhcU3kho7tikKJYs", "proofs": [ "392SXfBBiYgTqAazx2mL8j6EJZT5qjGDS2qzpZy5cs2Std5GB7hpShW6yhJahsBSdM3xmbg1tE6cuyFWibnpjeyC" ], "script": "base64:BgIfCAISAwoBARIAEgMKAQESBAoCGBESBAoCCAESAwoBCAIADG9wdGlvbnNfYWRkcgkBB0FkZHJlc3MBARoBVEFb+Cv2F+oqocvEivH7x7uyIGEx/ocgwQAEdFVTRAEgqyRKarZCRuvS/ON5sGG6w65pV01SespFHKdAHRGwKQ4GAWkBCWlzc3VlQmlsbAEJcHJvdmlkaW5nBApjdXJyZW50S2V5CQDYBAEICAUBaQZjYWxsZXIFYnl0ZXMEDWN1cnJlbnRBbW91bnQEByRtYXRjaDAJAJoIAgUEdGhpcwUKY3VycmVudEtleQMJAAECBQckbWF0Y2gwAgNJbnQEAWEFByRtYXRjaDAFAWEAAAQRbWluQmlsbERlcG9zaXRTdHIEByRtYXRjaDAJAJ0IAgUMb3B0aW9uc19hZGRyAhBtaW5fYmlsbF9kZXBvc2l0AwkAAQIFByRtYXRjaDACBFVuaXQCBXVuc2V0AwkAAQIFByRtYXRjaDACBlN0cmluZwQBeAUHJG1hdGNoMAUBeAkAAgECC01hdGNoIGVycm9yBA5taW5CaWxsRGVwb3NpdAkAaAIJALEJAQkAmwMBBRFt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d6PQ==", "height": 2459476, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9YkYqa25k7RckNzfJsxKctZFKV7caPAT2tRvJ2hDNbbD Next: GuLjEdb1jRSvvv3sF8BXGGNf9b4iz9pBazRzvKeo3Hff Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let options_addr = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6')
5+
46 let tUSD = base58'CX4p6XcuSBUvv44r1avCqYka5PYAVzBK5hSXaT7maU85'
57
68 @Callable(i)
1214 case _ =>
1315 0
1416 }
17+ let minBillDepositStr = match getString(options_addr, "min_bill_deposit") {
18+ case _: Unit =>
19+ "unset"
20+ case x: String =>
21+ x
22+ case _ =>
23+ throw("Match error")
24+ }
25+ let minBillDeposit = (toInt(toBytes(minBillDepositStr)) * 100)
1526 let newAmount = (currentAmount - providing)
16- if ((10000 > providing))
17- then throw("The security deposit must be more than 100")
27+ if ((minBillDeposit > providing))
28+ then throw(((("The security deposit must be more than " + minBillDepositStr) + ". You set the size: ") + toString(providing)))
1829 else if ((0 > newAmount))
1930 then throw("Not enough balance")
2031 else {
3142 then throw("Payment not attached")
3243 else {
3344 let pmt = value(i.payments)[0]
45+ let adminList = match getString(options_addr, "admin_list") {
46+ case _: Unit =>
47+ "unset"
48+ case x: String =>
49+ x
50+ case _ =>
51+ throw("Match error")
52+ }
3453 if ((pmt.assetId != tUSD))
3554 then throw("holded payment not tUSD")
3655 else if ((1000 > pmt.amount))
7493 let opt_size = size(opts)
7594 if ((100 >= opt_size))
7695 then {
77- let options_addr = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6')
7896 let adminList = match getString(options_addr, "admin_list") {
7997 case _: Unit =>
8098 "unset"
84102 throw("Match error")
85103 }
86104 func addStringEntry (accum,nextValue) = {
87- let $t037803803 = accum
88- let result = $t037803803._1
89- let j = $t037803803._2
105+ let $t042204243 = accum
106+ let result = $t042204243._1
107+ let j = $t042204243._2
90108 $Tuple2((result :+ IntegerEntry(opts[j], nextValue)), (j + 1))
91109 }
92110
134152
135153 @Callable(i)
136154 func setOption (variable,value) = {
137- let options_addr = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6')
138155 let adminList = match getString(options_addr, "admin_list") {
139156 case _: Unit =>
140157 "unset"
166183
167184 @Callable(i)
168185 func delOption (variable) = {
169- let options_addr = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6')
170186 let adminList = match getString(options_addr, "admin_list") {
171187 case _: Unit =>
172188 "unset"
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let options_addr = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6')
5+
46 let tUSD = base58'CX4p6XcuSBUvv44r1avCqYka5PYAVzBK5hSXaT7maU85'
57
68 @Callable(i)
79 func issueBill (providing) = {
810 let currentKey = toBase58String(i.caller.bytes)
911 let currentAmount = match getInteger(this, currentKey) {
1012 case a: Int =>
1113 a
1214 case _ =>
1315 0
1416 }
17+ let minBillDepositStr = match getString(options_addr, "min_bill_deposit") {
18+ case _: Unit =>
19+ "unset"
20+ case x: String =>
21+ x
22+ case _ =>
23+ throw("Match error")
24+ }
25+ let minBillDeposit = (toInt(toBytes(minBillDepositStr)) * 100)
1526 let newAmount = (currentAmount - providing)
16- if ((10000 > providing))
17- then throw("The security deposit must be more than 100")
27+ if ((minBillDeposit > providing))
28+ then throw(((("The security deposit must be more than " + minBillDepositStr) + ". You set the size: ") + toString(providing)))
1829 else if ((0 > newAmount))
1930 then throw("Not enough balance")
2031 else {
2132 let issue = Issue(("bill for:" + toString((providing / 100))), currentKey, 1, 0, false)
2233 let id = calculateAssetId(issue)
2334 $Tuple2([IntegerEntry(currentKey, newAmount), issue, ScriptTransfer(i.caller, 1, id)], unit)
2435 }
2536 }
2637
2738
2839
2940 @Callable(i)
3041 func deposit () = if ((size(i.payments) == 0))
3142 then throw("Payment not attached")
3243 else {
3344 let pmt = value(i.payments)[0]
45+ let adminList = match getString(options_addr, "admin_list") {
46+ case _: Unit =>
47+ "unset"
48+ case x: String =>
49+ x
50+ case _ =>
51+ throw("Match error")
52+ }
3453 if ((pmt.assetId != tUSD))
3554 then throw("holded payment not tUSD")
3655 else if ((1000 > pmt.amount))
3756 then throw("holded payment < 10.00")
3857 else {
3958 let currentKey = toBase58String(i.caller.bytes)
4059 let currentAmount = match getInteger(this, currentKey) {
4160 case a: Int =>
4261 a
4362 case _ =>
4463 0
4564 }
4665 let newAmount = (currentAmount + pmt.amount)
4766 [IntegerEntry(currentKey, newAmount)]
4867 }
4968 }
5069
5170
5271
5372 @Callable(i)
5473 func withdraw (amount) = {
5574 let currentKey = toBase58String(i.caller.bytes)
5675 let currentAmount = match getInteger(this, currentKey) {
5776 case a: Int =>
5877 a
5978 case _ =>
6079 0
6180 }
6281 let newAmount = (currentAmount - amount)
6382 if ((0 > amount))
6483 then throw("Can't withdraw negative amount")
6584 else if ((0 > newAmount))
6685 then throw("Not enough balance")
6786 else $Tuple2([IntegerEntry(currentKey, newAmount), ScriptTransfer(i.caller, amount, tUSD)], unit)
6887 }
6988
7089
7190
7291 @Callable(i)
7392 func setOptions (opts,vals) = {
7493 let opt_size = size(opts)
7594 if ((100 >= opt_size))
7695 then {
77- let options_addr = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6')
7896 let adminList = match getString(options_addr, "admin_list") {
7997 case _: Unit =>
8098 "unset"
8199 case x: String =>
82100 x
83101 case _ =>
84102 throw("Match error")
85103 }
86104 func addStringEntry (accum,nextValue) = {
87- let $t037803803 = accum
88- let result = $t037803803._1
89- let j = $t037803803._2
105+ let $t042204243 = accum
106+ let result = $t042204243._1
107+ let j = $t042204243._2
90108 $Tuple2((result :+ IntegerEntry(opts[j], nextValue)), (j + 1))
91109 }
92110
93111 let r = {
94112 let $l = vals
95113 let $s = size($l)
96114 let $acc0 = $Tuple2(nil, 0)
97115 func $f0_1 ($a,$i) = if (($i >= $s))
98116 then $a
99117 else addStringEntry($a, $l[$i])
100118
101119 func $f0_2 ($a,$i) = if (($i >= $s))
102120 then $a
103121 else throw("List size exceeds 100")
104122
105123 $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)
106124 }
107125 let callerAddressStr = toString(i.caller)
108126 if ((adminList != "unset"))
109127 then {
110128 let test = getString(addressFromStringValue(adminList), callerAddressStr)
111129 let isAdmin = match test {
112130 case x: String =>
113131 x
114132 case _: Unit =>
115133 "no admin"
116134 case _ =>
117135 throw("Match error")
118136 }
119137 func add_elm (options) = {
120138 let opt = split(options, "|")
121139 StringEntry(opt[0], opt[1])
122140 }
123141
124142 if ((isAdmin != "no admin"))
125143 then r
126144 else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", "))
127145 }
128146 else throw("Unset admin list")
129147 }
130148 else throw("The number of list elements must not exceed 100")
131149 }
132150
133151
134152
135153 @Callable(i)
136154 func setOption (variable,value) = {
137- let options_addr = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6')
138155 let adminList = match getString(options_addr, "admin_list") {
139156 case _: Unit =>
140157 "unset"
141158 case x: String =>
142159 x
143160 case _ =>
144161 throw("Match error")
145162 }
146163 let callerAddressStr = toString(i.caller)
147164 if ((adminList != "unset"))
148165 then {
149166 let test = getString(addressFromStringValue(adminList), callerAddressStr)
150167 let isAdmin = match test {
151168 case x: String =>
152169 x
153170 case _: Unit =>
154171 "no admin"
155172 case _ =>
156173 throw("Match error")
157174 }
158175 if ((isAdmin != "no admin"))
159176 then $Tuple2([IntegerEntry(variable, value)], unit)
160177 else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", "))
161178 }
162179 else throw("Unset admin list")
163180 }
164181
165182
166183
167184 @Callable(i)
168185 func delOption (variable) = {
169- let options_addr = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6')
170186 let adminList = match getString(options_addr, "admin_list") {
171187 case _: Unit =>
172188 "unset"
173189 case x: String =>
174190 x
175191 case _ =>
176192 throw("Match error")
177193 }
178194 let callerAddressStr = toString(i.caller)
179195 if ((adminList != "unset"))
180196 then {
181197 let test = getString(addressFromStringValue(adminList), callerAddressStr)
182198 let isAdmin = match test {
183199 case x: String =>
184200 x
185201 case _: Unit =>
186202 "no admin"
187203 case _ =>
188204 throw("Match error")
189205 }
190206 if ((isAdmin != "no admin"))
191207 then $Tuple2([DeleteEntry(variable)], unit)
192208 else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", "))
193209 }
194210 else throw("Unset admin list")
195211 }
196212
197213
198214 @Verifier(tx)
199215 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
200216

github/deemru/w8io/169f3d6 
54.85 ms