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:BgJKCAISBAoCCAgSBAoCCAESAwoBCBIGCgQICAgIEgUKAwgICBIDCgECEgQKAggBEgMKAQgSBgoECAEBARIECgIBARIDCgEBEgMKAQEXAA5jb2xsZWN0aW9uTmFtZQkBEUBleHRyTmF0aXZlKDEwNTgpAQIOY29sbGVjdGlvbk5hbWUABnN5bWJvbAkBEUBleHRyTmF0aXZlKDEwNTgpAQIGc3ltYm9sAAtkZXNjcmlwdGlvbgkBEUBleHRyTmF0aXZlKDEwNTgpAQILZGVzY3JpcHRpb24AC3RvdGFsQW1vdW50CQERQGV4dHJOYXRpdmUoMTA1NSkBAgt0b3RhbEFtb3VudAAHYmFzZVVSSQkBEUBleHRyTmF0aXZlKDEwNTgpAQIHYmFzZVVSSQAIZEFwcEpzb24JAQdBZGRyZXNzAQkA2QQBAiMzTXJHYVpWUmhrbkVHZkhKMTl0dFVQTm5EUm9GcWNIaFZONwAMdG9rZW5QYXltZW50CQERQGV4dHJOYXRpdmUoMTA1NykBAgx0b2tlblBheW1lbnQAEXRva2VuUGF5bWVudEFzc2V0CQETdmFsdWVPckVycm9yTWVzc2FnZQIJAOwHAQ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c3QBBmxlbmRJZAkAzAgCCQEMSW50ZWdlckVudHJ5AgIFRGVidWcJAQtnZXRMZW5kQ29zdAEFBmxlbmRJZAUDbmlsAM2TVls=", "height": 2501472, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CfkyJcb6xH9p9VRwqPKcLhfkoBsyqZRsFWRqF6VaZZJE Next: 6zcV3u2C5MRvwQSRvRLFGoHPKD3VyG1hz8RHSxocFiJ7 Diff:
Old | New | Differences | |
---|---|---|---|
72 | 72 | func onlyInternal (caller) = if ((caller == this)) | |
73 | 73 | then unit | |
74 | 74 | 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 | + | } | |
75 | 87 | ||
76 | 88 | ||
77 | 89 | func checkAssetOwner (caller,assetId) = if ((assetBalance(caller, fromBase58String(assetId)) == 1)) | |
238 | 250 | @Callable(i) | |
239 | 251 | func closeLend (lendId) = valueOrElse(checkLendOwner(i.caller, lendId), { | |
240 | 252 | 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 | |
242 | 255 | }) | |
243 | 256 | ||
244 | 257 | ||
245 | 258 | ||
246 | 259 | @Callable(i) | |
247 | - | func test (lendId) = [ | |
260 | + | func test (lendId) = [IntegerEntry("Debug", getLendCost(lendId))] | |
248 | 261 | ||
249 | 262 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let collectionName = getStringValue("collectionName") | |
5 | 5 | ||
6 | 6 | let symbol = getStringValue("symbol") | |
7 | 7 | ||
8 | 8 | let description = getStringValue("description") | |
9 | 9 | ||
10 | 10 | let totalAmount = getIntegerValue("totalAmount") | |
11 | 11 | ||
12 | 12 | let baseURI = getStringValue("baseURI") | |
13 | 13 | ||
14 | 14 | let dAppJson = Address(fromBase58String("3MrGaZVRhknEGfHJ19ttUPNnDRoFqcHhVN7")) | |
15 | 15 | ||
16 | 16 | let tokenPayment = getBinaryValue("tokenPayment") | |
17 | 17 | ||
18 | 18 | let tokenPaymentAsset = valueOrErrorMessage(assetInfo(getBinaryValue("tokenPayment")), "token payment asset doesn't connect") | |
19 | 19 | ||
20 | 20 | let lendCount = getIntegerValue("lendCount") | |
21 | 21 | ||
22 | 22 | let lendCurrentCount = getIntegerValue("lendCurrentCount") | |
23 | 23 | ||
24 | 24 | func parseIdtoAsset (assetId) = valueOrErrorMessage(assetInfo(fromBase58String(assetId)), "Can't find asset by asset id") | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func transferOrNot (to,amount,assetId) = if ((to == this)) | |
28 | 28 | then StringEntry("smth", "smth") | |
29 | 29 | else ScriptTransfer(to, amount, assetId) | |
30 | 30 | ||
31 | 31 | ||
32 | 32 | func getLendJson (lendId) = { | |
33 | 33 | let lendIdString = toString(lendId) | |
34 | 34 | getStringValue(("lend-" + lendIdString)) | |
35 | 35 | } | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | func getKey (lendJson,key) = { | |
39 | 39 | let timeUnitSeconds = { | |
40 | 40 | let @ = invoke(dAppJson, "readByJSONKey", [lendJson, key], nil) | |
41 | 41 | if ($isInstanceOf(@, "String")) | |
42 | 42 | then @ | |
43 | 43 | else throw(($getType(@) + " couldn't be cast to String")) | |
44 | 44 | } | |
45 | 45 | if ((timeUnitSeconds == timeUnitSeconds)) | |
46 | 46 | then timeUnitSeconds | |
47 | 47 | else throw("Strict value is not equal to itself.") | |
48 | 48 | } | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func getRentCount (lendId) = { | |
52 | 52 | let lendIdString = toString(lendId) | |
53 | 53 | getIntegerValue(("lend-rentCount-" + lendIdString)) | |
54 | 54 | } | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func calcLendCost (lendId,timeUnitSeconds) = { | |
58 | 58 | let lendJson = getLendJson(lendId) | |
59 | 59 | let timeUnitPriceString = getKey(lendJson, "timeUnitPrice") | |
60 | 60 | if ((timeUnitPriceString == timeUnitPriceString)) | |
61 | 61 | then { | |
62 | 62 | let timeUnitPrice = parseIntValue(timeUnitPriceString) | |
63 | 63 | (timeUnitSeconds * timeUnitPrice) | |
64 | 64 | } | |
65 | 65 | else throw("Strict value is not equal to itself.") | |
66 | 66 | } | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func getLendCost (lendId) = valueOrElse(getIntegerValue(("lend-cost-" + toString(lendId))), 0) | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func onlyInternal (caller) = if ((caller == this)) | |
73 | 73 | then unit | |
74 | 74 | 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 | + | } | |
75 | 87 | ||
76 | 88 | ||
77 | 89 | func checkAssetOwner (caller,assetId) = if ((assetBalance(caller, fromBase58String(assetId)) == 1)) | |
78 | 90 | then unit | |
79 | 91 | else throw("Only asset owner") | |
80 | 92 | ||
81 | 93 | ||
82 | 94 | func checkPayment (payments,amount) = if ((payments[0].amount >= amount)) | |
83 | 95 | then unit | |
84 | 96 | else throw("amount less then need") | |
85 | 97 | ||
86 | 98 | ||
87 | 99 | func checkAssetExists (assetId) = if (valueOrElse(getBoolean(assetId), false)) | |
88 | 100 | then throw("this token already use") | |
89 | 101 | else unit | |
90 | 102 | ||
91 | 103 | ||
92 | 104 | func checkLendOwner (caller,lendId) = if ((getKey(getLendJson(lendId), "owner") != toString(caller))) | |
93 | 105 | then throw("you haven't perms") | |
94 | 106 | else unit | |
95 | 107 | ||
96 | 108 | ||
97 | 109 | @Callable(i) | |
98 | 110 | func setString (_key,_value) = valueOrElse(onlyInternal(i.caller), [StringEntry(_key, _value)]) | |
99 | 111 | ||
100 | 112 | ||
101 | 113 | ||
102 | 114 | @Callable(i) | |
103 | 115 | func setInt (_key,_value) = valueOrElse(onlyInternal(i.caller), [IntegerEntry(_key, _value)]) | |
104 | 116 | ||
105 | 117 | ||
106 | 118 | ||
107 | 119 | @Callable(i) | |
108 | 120 | func deleteEntry (_key) = valueOrElse(onlyInternal(i.caller), [DeleteEntry(_key)]) | |
109 | 121 | ||
110 | 122 | ||
111 | 123 | ||
112 | 124 | @Callable(i) | |
113 | 125 | 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)]) | |
114 | 126 | ||
115 | 127 | ||
116 | 128 | ||
117 | 129 | @Callable(i) | |
118 | 130 | func setUser (assetId,user,expires) = { | |
119 | 131 | let res = invoke(dAppJson, "makeJSON", [["user", "expires"], [user, expires]], nil) | |
120 | 132 | if ((res == res)) | |
121 | 133 | then $Tuple2([StringEntry(("userOf-" + assetId), { | |
122 | 134 | let @ = res | |
123 | 135 | if ($isInstanceOf(@, "String")) | |
124 | 136 | then @ | |
125 | 137 | else throw(($getType(@) + " couldn't be cast to String")) | |
126 | 138 | })], res) | |
127 | 139 | else throw("Strict value is not equal to itself.") | |
128 | 140 | } | |
129 | 141 | ||
130 | 142 | ||
131 | 143 | ||
132 | 144 | @Callable(i) | |
133 | 145 | func setTokenPayment (assetBinary) = valueOrElse(onlyInternal(i.caller), [BinaryEntry("tokenPayment", assetBinary)]) | |
134 | 146 | ||
135 | 147 | ||
136 | 148 | ||
137 | 149 | @Callable(i) | |
138 | 150 | func mintTokens (to,amount) = { | |
139 | 151 | let reisue = Reissue(tokenPayment, amount, true) | |
140 | 152 | let toAddress = Address(fromBase58String(to)) | |
141 | 153 | let transfer = transferOrNot(toAddress, amount, tokenPayment) | |
142 | 154 | if ((transfer == transfer)) | |
143 | 155 | then [transfer, reisue] | |
144 | 156 | else throw("Strict value is not equal to itself.") | |
145 | 157 | } | |
146 | 158 | ||
147 | 159 | ||
148 | 160 | ||
149 | 161 | @Callable(i) | |
150 | 162 | func mintNFT (to) = { | |
151 | 163 | let tokenId = (totalAmount + 1) | |
152 | 164 | let tokenIdString = toString(tokenId) | |
153 | 165 | let preName = ((symbol + "#") + tokenIdString) | |
154 | 166 | let name = if ((16 >= size(preName))) | |
155 | 167 | then preName | |
156 | 168 | else tokenIdString | |
157 | 169 | let tokenURI = (baseURI + tokenIdString) | |
158 | 170 | let json = { | |
159 | 171 | let @ = invoke(dAppJson, "makeJSON", [["tokenURI"], [tokenURI]], nil) | |
160 | 172 | if ($isInstanceOf(@, "String")) | |
161 | 173 | then @ | |
162 | 174 | else throw(($getType(@) + " couldn't be cast to String")) | |
163 | 175 | } | |
164 | 176 | let asset = Issue(name, json, 1, 0, false, unit, height) | |
165 | 177 | let assetId = calculateAssetId(asset) | |
166 | 178 | let toAddress = Address(fromBase58String(to)) | |
167 | 179 | let transfer = transferOrNot(toAddress, 1, assetId) | |
168 | 180 | if ((transfer == transfer)) | |
169 | 181 | then [asset, transfer, IntegerEntry("totalAmount", tokenId), StringEntry(name, tokenURI)] | |
170 | 182 | else throw("Strict value is not equal to itself.") | |
171 | 183 | } | |
172 | 184 | ||
173 | 185 | ||
174 | 186 | ||
175 | 187 | @Callable(i) | |
176 | 188 | func initLend (assetId,timeUnitSeconds,timeUnitPrice,timeUnitCount) = valueOrElse(checkAssetOwner(i.caller, assetId), valueOrElse(checkAssetExists(assetId), { | |
177 | 189 | let asset = parseIdtoAsset(assetId) | |
178 | 190 | let tokenURI = { | |
179 | 191 | let @ = invoke(dAppJson, "readByJSONKey", [asset.description, "tokenURI"], nil) | |
180 | 192 | if ($isInstanceOf(@, "String")) | |
181 | 193 | then @ | |
182 | 194 | else throw(($getType(@) + " couldn't be cast to String")) | |
183 | 195 | } | |
184 | 196 | if ((tokenURI == tokenURI)) | |
185 | 197 | then { | |
186 | 198 | let lendJson = { | |
187 | 199 | 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) | |
188 | 200 | if ($isInstanceOf(@, "String")) | |
189 | 201 | then @ | |
190 | 202 | else throw(($getType(@) + " couldn't be cast to String")) | |
191 | 203 | } | |
192 | 204 | if ((lendJson == lendJson)) | |
193 | 205 | then { | |
194 | 206 | let lendIdString = toString(lendCount) | |
195 | 207 | [IntegerEntry("lendCount", (lendCount + 1)), IntegerEntry("lendCurrentCount", (lendCurrentCount + 1)), IntegerEntry(("lend-rentCount-" + lendIdString), 0), StringEntry(("lend-" + lendIdString), lendJson), BooleanEntry(assetId, true)] | |
196 | 208 | } | |
197 | 209 | else throw("Strict value is not equal to itself.") | |
198 | 210 | } | |
199 | 211 | else throw("Strict value is not equal to itself.") | |
200 | 212 | })) | |
201 | 213 | ||
202 | 214 | ||
203 | 215 | ||
204 | 216 | @Callable(i) | |
205 | 217 | func initRent (lendId,timeUnitCount) = valueOrElse(checkPayment(i.payments, calcLendCost(lendId, timeUnitCount)), { | |
206 | 218 | let lendIdString = toString(lendId) | |
207 | 219 | let lendJson = getStringValue(("lend-" + lendIdString)) | |
208 | 220 | let rentId = getRentCount(lendId) | |
209 | 221 | let rentIdString = toString(rentId) | |
210 | 222 | let timeUnitSeconds = { | |
211 | 223 | let @ = invoke(dAppJson, "readByJSONKey", [lendJson, "timeUnitSeconds"], nil) | |
212 | 224 | if ($isInstanceOf(@, "String")) | |
213 | 225 | then @ | |
214 | 226 | else throw(($getType(@) + " couldn't be cast to String")) | |
215 | 227 | } | |
216 | 228 | if ((timeUnitSeconds == timeUnitSeconds)) | |
217 | 229 | then { | |
218 | 230 | let timeUnitSecondsInt = parseIntValue(timeUnitSeconds) | |
219 | 231 | if ((timeUnitSecondsInt == timeUnitSecondsInt)) | |
220 | 232 | then { | |
221 | 233 | let rentJson = { | |
222 | 234 | let @ = invoke(dAppJson, "makeJSON", [["customer", "timeUnitCount", "startTimestamp", "endTimestamp", "closed"], [toString(i.caller), toString(timeUnitCount), toString(lastBlock.timestamp), toString((lastBlock.timestamp + (timeUnitSecondsInt * timeUnitCount))), "0"]], nil) | |
223 | 235 | if ($isInstanceOf(@, "String")) | |
224 | 236 | then @ | |
225 | 237 | else throw(($getType(@) + " couldn't be cast to String")) | |
226 | 238 | } | |
227 | 239 | if ((rentJson == rentJson)) | |
228 | 240 | then [IntegerEntry(("lend-rentCount-" + lendIdString), (rentId + 1)), StringEntry(((("lend-rent-" + lendIdString) + "-") + rentIdString), rentJson), IntegerEntry(("lend-cost-" + lendIdString), (calcLendCost(lendId, timeUnitCount) + getLendCost(lendId)))] | |
229 | 241 | else throw("Strict value is not equal to itself.") | |
230 | 242 | } | |
231 | 243 | else throw("Strict value is not equal to itself.") | |
232 | 244 | } | |
233 | 245 | else throw("Strict value is not equal to itself.") | |
234 | 246 | }) | |
235 | 247 | ||
236 | 248 | ||
237 | 249 | ||
238 | 250 | @Callable(i) | |
239 | 251 | func closeLend (lendId) = valueOrElse(checkLendOwner(i.caller, lendId), { | |
240 | 252 | 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 | |
242 | 255 | }) | |
243 | 256 | ||
244 | 257 | ||
245 | 258 | ||
246 | 259 | @Callable(i) | |
247 | - | func test (lendId) = [ | |
260 | + | func test (lendId) = [IntegerEntry("Debug", getLendCost(lendId))] | |
248 | 261 | ||
249 | 262 |
github/deemru/w8io/169f3d6 42.39 ms ◑