tx · 8AiSkdmrXgbmFcy87nQZf8UaMohXacCJ1xcW8T94VV8v

3MxVYj6ScMArhAamy7nB6b342kh1Pso1LTn:  -0.00800000 Waves

2023.03.22 19:41 [2501472] smart account 3MxVYj6ScMArhAamy7nB6b342kh1Pso1LTn > SELF 0.00000000 Waves

{ "type": 13, "id": "8AiSkdmrXgbmFcy87nQZf8UaMohXacCJ1xcW8T94VV8v", "fee": 800000, "feeAssetId": null, "timestamp": 1679503306594, "version": 2, "chainId": 84, "sender": "3MxVYj6ScMArhAamy7nB6b342kh1Pso1LTn", "senderPublicKey": "CZeucjRLCKrkiP9zuj9KbLe23Wv9DywFzHBqNDnte51B", "proofs": [ "4RX4cECUSGu57qLFZfFhmcChvW2KKgyF3ZfeYqhVaMmxhEhyvydtc4ZpxStcN8m4E4HH7HfghNqMk1B9mQsSk2hK" ], "script": "base64:BgJKCAISBAoCCAgSBAoCCAESAwoBCBIGCgQICAgIEgUKAwgICBIDCgECEgQKAggBEgMKAQgSBgoECAEBARIECgIBARIDCgEBEgMKAQEXAA5jb2xsZWN0aW9uTmFtZQkBEUBleHRyTmF0aXZlKDEwNTgpAQIOY29sbGVjdGlvbk5hbWUABnN5bWJvbAkBEUBleHRyTmF0aXZlKDEwNTgpAQIGc3ltYm9sAAtkZXNjcmlwdGlvbgkBEUBleHRyTmF0aXZlKDEwNTgpAQILZGVzY3JpcHRpb24AC3RvdGFsQW1vdW50CQERQGV4dHJOYXRpdmUoMTA1NSkBAgt0b3RhbEFtb3VudAAHYmFzZVVSSQkBEUBleHRyTmF0aXZlKDEwNTgpAQIHYmFzZVVSSQAIZEFwcEpzb24JAQdBZGRyZXNzAQkA2QQBAiMzTXJHYVpWUmhrbkVHZkhKMTl0dFVQTm5EUm9GcWNIaFZONwAMdG9rZW5QYXltZW50CQERQGV4dHJOYXRpdmUoMTA1NykBAgx0b2tlblBheW1lbnQAEXRva2VuUGF5bWVudEFzc2V0CQETdmFsdWVPckVycm9yTWVzc2FnZQIJAOwHA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lc3QBBmxlbmRJZAkAzAgCCQEMSW50ZWdlckVudHJ5AgIFRGVidWcJAQtnZXRMZW5kQ29zdAEFBmxlbmRJZAUDbmlsAM2TVls=", "height": 2501472, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CfkyJcb6xH9p9VRwqPKcLhfkoBsyqZRsFWRqF6VaZZJE Next: 6zcV3u2C5MRvwQSRvRLFGoHPKD3VyG1hz8RHSxocFiJ7 Diff:
OldNewDifferences
7272 func onlyInternal (caller) = if ((caller == this))
7373 then unit
7474 else throw("Only internal call")
75+
76+
77+func reducerGetDeleteEntry (accum,next) = {
78+ let $t021642214 = accum
79+ let deletions = $t021642214._1
80+ let current = $t021642214._2
81+ let maxCount = $t021642214._3
82+ let lendId = $t021642214._4
83+ if ((maxCount > current))
84+ then $Tuple3((deletions :+ DeleteEntry(((("lend-rent-" + lendId) + "-") + toString(current)))), (current + 1), maxCount)
85+ else accum
86+ }
7587
7688
7789 func checkAssetOwner (caller,assetId) = if ((assetBalance(caller, fromBase58String(assetId)) == 1))
238250 @Callable(i)
239251 func closeLend (lendId) = valueOrElse(checkLendOwner(i.caller, lendId), {
240252 let lendIdString = toString(lendId)
241-[DeleteEntry(("lend-" + lendIdString)), DeleteEntry(("lend-rentCount-" + lendIdString)), IntegerEntry("lendCurrentCount", (lendCurrentCount - 1)), DeleteEntry(("lend-cost-" + lendIdString)), ScriptTransfer(i.caller, getLendCost(lendId), tokenPayment)]
253+ let txListRaw = [DeleteEntry(("lend-" + lendIdString)), DeleteEntry(("lend-rentCount-" + lendIdString)), IntegerEntry("lendCurrentCount", (lendCurrentCount - 1)), DeleteEntry(("lend-cost-" + lendIdString)), ScriptTransfer(i.caller, getLendCost(lendId), tokenPayment)]
254+ txListRaw
242255 })
243256
244257
245258
246259 @Callable(i)
247-func test (lendId) = [StringEntry("Debug", getKey(getLendJson(lendId), "owner"))]
260+func test (lendId) = [IntegerEntry("Debug", getLendCost(lendId))]
248261
249262
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let collectionName = getStringValue("collectionName")
55
66 let symbol = getStringValue("symbol")
77
88 let description = getStringValue("description")
99
1010 let totalAmount = getIntegerValue("totalAmount")
1111
1212 let baseURI = getStringValue("baseURI")
1313
1414 let dAppJson = Address(fromBase58String("3MrGaZVRhknEGfHJ19ttUPNnDRoFqcHhVN7"))
1515
1616 let tokenPayment = getBinaryValue("tokenPayment")
1717
1818 let tokenPaymentAsset = valueOrErrorMessage(assetInfo(getBinaryValue("tokenPayment")), "token payment asset doesn't connect")
1919
2020 let lendCount = getIntegerValue("lendCount")
2121
2222 let lendCurrentCount = getIntegerValue("lendCurrentCount")
2323
2424 func parseIdtoAsset (assetId) = valueOrErrorMessage(assetInfo(fromBase58String(assetId)), "Can't find asset by asset id")
2525
2626
2727 func transferOrNot (to,amount,assetId) = if ((to == this))
2828 then StringEntry("smth", "smth")
2929 else ScriptTransfer(to, amount, assetId)
3030
3131
3232 func getLendJson (lendId) = {
3333 let lendIdString = toString(lendId)
3434 getStringValue(("lend-" + lendIdString))
3535 }
3636
3737
3838 func getKey (lendJson,key) = {
3939 let timeUnitSeconds = {
4040 let @ = invoke(dAppJson, "readByJSONKey", [lendJson, key], nil)
4141 if ($isInstanceOf(@, "String"))
4242 then @
4343 else throw(($getType(@) + " couldn't be cast to String"))
4444 }
4545 if ((timeUnitSeconds == timeUnitSeconds))
4646 then timeUnitSeconds
4747 else throw("Strict value is not equal to itself.")
4848 }
4949
5050
5151 func getRentCount (lendId) = {
5252 let lendIdString = toString(lendId)
5353 getIntegerValue(("lend-rentCount-" + lendIdString))
5454 }
5555
5656
5757 func calcLendCost (lendId,timeUnitSeconds) = {
5858 let lendJson = getLendJson(lendId)
5959 let timeUnitPriceString = getKey(lendJson, "timeUnitPrice")
6060 if ((timeUnitPriceString == timeUnitPriceString))
6161 then {
6262 let timeUnitPrice = parseIntValue(timeUnitPriceString)
6363 (timeUnitSeconds * timeUnitPrice)
6464 }
6565 else throw("Strict value is not equal to itself.")
6666 }
6767
6868
6969 func getLendCost (lendId) = valueOrElse(getIntegerValue(("lend-cost-" + toString(lendId))), 0)
7070
7171
7272 func onlyInternal (caller) = if ((caller == this))
7373 then unit
7474 else throw("Only internal call")
75+
76+
77+func reducerGetDeleteEntry (accum,next) = {
78+ let $t021642214 = accum
79+ let deletions = $t021642214._1
80+ let current = $t021642214._2
81+ let maxCount = $t021642214._3
82+ let lendId = $t021642214._4
83+ if ((maxCount > current))
84+ then $Tuple3((deletions :+ DeleteEntry(((("lend-rent-" + lendId) + "-") + toString(current)))), (current + 1), maxCount)
85+ else accum
86+ }
7587
7688
7789 func checkAssetOwner (caller,assetId) = if ((assetBalance(caller, fromBase58String(assetId)) == 1))
7890 then unit
7991 else throw("Only asset owner")
8092
8193
8294 func checkPayment (payments,amount) = if ((payments[0].amount >= amount))
8395 then unit
8496 else throw("amount less then need")
8597
8698
8799 func checkAssetExists (assetId) = if (valueOrElse(getBoolean(assetId), false))
88100 then throw("this token already use")
89101 else unit
90102
91103
92104 func checkLendOwner (caller,lendId) = if ((getKey(getLendJson(lendId), "owner") != toString(caller)))
93105 then throw("you haven't perms")
94106 else unit
95107
96108
97109 @Callable(i)
98110 func setString (_key,_value) = valueOrElse(onlyInternal(i.caller), [StringEntry(_key, _value)])
99111
100112
101113
102114 @Callable(i)
103115 func setInt (_key,_value) = valueOrElse(onlyInternal(i.caller), [IntegerEntry(_key, _value)])
104116
105117
106118
107119 @Callable(i)
108120 func deleteEntry (_key) = valueOrElse(onlyInternal(i.caller), [DeleteEntry(_key)])
109121
110122
111123
112124 @Callable(i)
113125 func init (_collectionName,_symbol,_description,_baseURI) = valueOrElse(onlyInternal(i.caller), [StringEntry("collectionName", _collectionName), StringEntry("symbol", _symbol), StringEntry("description", _description), IntegerEntry("totalAmount", 0), StringEntry("baseURI", _baseURI)])
114126
115127
116128
117129 @Callable(i)
118130 func setUser (assetId,user,expires) = {
119131 let res = invoke(dAppJson, "makeJSON", [["user", "expires"], [user, expires]], nil)
120132 if ((res == res))
121133 then $Tuple2([StringEntry(("userOf-" + assetId), {
122134 let @ = res
123135 if ($isInstanceOf(@, "String"))
124136 then @
125137 else throw(($getType(@) + " couldn't be cast to String"))
126138 })], res)
127139 else throw("Strict value is not equal to itself.")
128140 }
129141
130142
131143
132144 @Callable(i)
133145 func setTokenPayment (assetBinary) = valueOrElse(onlyInternal(i.caller), [BinaryEntry("tokenPayment", assetBinary)])
134146
135147
136148
137149 @Callable(i)
138150 func mintTokens (to,amount) = {
139151 let reisue = Reissue(tokenPayment, amount, true)
140152 let toAddress = Address(fromBase58String(to))
141153 let transfer = transferOrNot(toAddress, amount, tokenPayment)
142154 if ((transfer == transfer))
143155 then [transfer, reisue]
144156 else throw("Strict value is not equal to itself.")
145157 }
146158
147159
148160
149161 @Callable(i)
150162 func mintNFT (to) = {
151163 let tokenId = (totalAmount + 1)
152164 let tokenIdString = toString(tokenId)
153165 let preName = ((symbol + "#") + tokenIdString)
154166 let name = if ((16 >= size(preName)))
155167 then preName
156168 else tokenIdString
157169 let tokenURI = (baseURI + tokenIdString)
158170 let json = {
159171 let @ = invoke(dAppJson, "makeJSON", [["tokenURI"], [tokenURI]], nil)
160172 if ($isInstanceOf(@, "String"))
161173 then @
162174 else throw(($getType(@) + " couldn't be cast to String"))
163175 }
164176 let asset = Issue(name, json, 1, 0, false, unit, height)
165177 let assetId = calculateAssetId(asset)
166178 let toAddress = Address(fromBase58String(to))
167179 let transfer = transferOrNot(toAddress, 1, assetId)
168180 if ((transfer == transfer))
169181 then [asset, transfer, IntegerEntry("totalAmount", tokenId), StringEntry(name, tokenURI)]
170182 else throw("Strict value is not equal to itself.")
171183 }
172184
173185
174186
175187 @Callable(i)
176188 func initLend (assetId,timeUnitSeconds,timeUnitPrice,timeUnitCount) = valueOrElse(checkAssetOwner(i.caller, assetId), valueOrElse(checkAssetExists(assetId), {
177189 let asset = parseIdtoAsset(assetId)
178190 let tokenURI = {
179191 let @ = invoke(dAppJson, "readByJSONKey", [asset.description, "tokenURI"], nil)
180192 if ($isInstanceOf(@, "String"))
181193 then @
182194 else throw(($getType(@) + " couldn't be cast to String"))
183195 }
184196 if ((tokenURI == tokenURI))
185197 then {
186198 let lendJson = {
187199 let @ = invoke(dAppJson, "makeJSON", [["supportedInterface", "assetdId", "tokenURI", "owner", "timeUnitSeconds", "timeUnitPrice", "timeUnitCount", "startTimestamp", "endTimestamp", "deposit", "claimed"], ["0", assetId, tokenURI, toString(i.caller), toString(timeUnitSeconds), toString(timeUnitPrice), toString(timeUnitCount), toString(lastBlock.timestamp), toString((lastBlock.timestamp + (timeUnitSeconds * timeUnitCount))), "0", "0"]], nil)
188200 if ($isInstanceOf(@, "String"))
189201 then @
190202 else throw(($getType(@) + " couldn't be cast to String"))
191203 }
192204 if ((lendJson == lendJson))
193205 then {
194206 let lendIdString = toString(lendCount)
195207 [IntegerEntry("lendCount", (lendCount + 1)), IntegerEntry("lendCurrentCount", (lendCurrentCount + 1)), IntegerEntry(("lend-rentCount-" + lendIdString), 0), StringEntry(("lend-" + lendIdString), lendJson), BooleanEntry(assetId, true)]
196208 }
197209 else throw("Strict value is not equal to itself.")
198210 }
199211 else throw("Strict value is not equal to itself.")
200212 }))
201213
202214
203215
204216 @Callable(i)
205217 func initRent (lendId,timeUnitCount) = valueOrElse(checkPayment(i.payments, calcLendCost(lendId, timeUnitCount)), {
206218 let lendIdString = toString(lendId)
207219 let lendJson = getStringValue(("lend-" + lendIdString))
208220 let rentId = getRentCount(lendId)
209221 let rentIdString = toString(rentId)
210222 let timeUnitSeconds = {
211223 let @ = invoke(dAppJson, "readByJSONKey", [lendJson, "timeUnitSeconds"], nil)
212224 if ($isInstanceOf(@, "String"))
213225 then @
214226 else throw(($getType(@) + " couldn't be cast to String"))
215227 }
216228 if ((timeUnitSeconds == timeUnitSeconds))
217229 then {
218230 let timeUnitSecondsInt = parseIntValue(timeUnitSeconds)
219231 if ((timeUnitSecondsInt == timeUnitSecondsInt))
220232 then {
221233 let rentJson = {
222234 let @ = invoke(dAppJson, "makeJSON", [["customer", "timeUnitCount", "startTimestamp", "endTimestamp", "closed"], [toString(i.caller), toString(timeUnitCount), toString(lastBlock.timestamp), toString((lastBlock.timestamp + (timeUnitSecondsInt * timeUnitCount))), "0"]], nil)
223235 if ($isInstanceOf(@, "String"))
224236 then @
225237 else throw(($getType(@) + " couldn't be cast to String"))
226238 }
227239 if ((rentJson == rentJson))
228240 then [IntegerEntry(("lend-rentCount-" + lendIdString), (rentId + 1)), StringEntry(((("lend-rent-" + lendIdString) + "-") + rentIdString), rentJson), IntegerEntry(("lend-cost-" + lendIdString), (calcLendCost(lendId, timeUnitCount) + getLendCost(lendId)))]
229241 else throw("Strict value is not equal to itself.")
230242 }
231243 else throw("Strict value is not equal to itself.")
232244 }
233245 else throw("Strict value is not equal to itself.")
234246 })
235247
236248
237249
238250 @Callable(i)
239251 func closeLend (lendId) = valueOrElse(checkLendOwner(i.caller, lendId), {
240252 let lendIdString = toString(lendId)
241-[DeleteEntry(("lend-" + lendIdString)), DeleteEntry(("lend-rentCount-" + lendIdString)), IntegerEntry("lendCurrentCount", (lendCurrentCount - 1)), DeleteEntry(("lend-cost-" + lendIdString)), ScriptTransfer(i.caller, getLendCost(lendId), tokenPayment)]
253+ let txListRaw = [DeleteEntry(("lend-" + lendIdString)), DeleteEntry(("lend-rentCount-" + lendIdString)), IntegerEntry("lendCurrentCount", (lendCurrentCount - 1)), DeleteEntry(("lend-cost-" + lendIdString)), ScriptTransfer(i.caller, getLendCost(lendId), tokenPayment)]
254+ txListRaw
242255 })
243256
244257
245258
246259 @Callable(i)
247-func test (lendId) = [StringEntry("Debug", getKey(getLendJson(lendId), "owner"))]
260+func test (lendId) = [IntegerEntry("Debug", getLendCost(lendId))]
248261
249262

github/deemru/w8io/169f3d6 
42.39 ms