tx · 6zcV3u2C5MRvwQSRvRLFGoHPKD3VyG1hz8RHSxocFiJ7 3MxVYj6ScMArhAamy7nB6b342kh1Pso1LTn: -0.00800000 Waves 2023.03.22 19:42 [2501473] smart account 3MxVYj6ScMArhAamy7nB6b342kh1Pso1LTn > SELF 0.00000000 Waves
{ "type": 13, "id": "6zcV3u2C5MRvwQSRvRLFGoHPKD3VyG1hz8RHSxocFiJ7", "fee": 800000, "feeAssetId": null, "timestamp": 1679503361914, "version": 2, "chainId": 84, "sender": "3MxVYj6ScMArhAamy7nB6b342kh1Pso1LTn", "senderPublicKey": "CZeucjRLCKrkiP9zuj9KbLe23Wv9DywFzHBqNDnte51B", "proofs": [ "4dhyK71CM69Pi6vEaHQDxc4rk1tMNNphZq6JKvUDsswhVuLNkMHdRba7fZ6wCvBxrfWYkDC1eeHVnuEt4sQkBYog" ], "script": "base64:BgJKCAISBAoCCAgSBAoCCAESAwoBCBIGCgQICAgIEgUKAwgICBIDCgECEgQKAggBEgMKAQgSBgoECAEBARIECgIBARIDCgEBEgMKAQEXAA5jb2xsZWN0aW9uTmFtZQkBEUBleHRyTmF0aXZlKDEwNTgpAQIOY29sbGVjdGlvbk5hbWUABnN5bWJvbAkBEUBleHRyTmF0aXZlKDEwNTgpAQIGc3ltYm9sAAtkZXNjcmlwdGlvbgkBEUBleHRyTmF0aXZlKDEwNTgpAQILZGVzY3JpcHRpb24AC3RvdGFsQW1vdW50CQERQGV4dHJOYXRpdmUoMTA1NSkBAgt0b3RhbEFtb3VudAAHYmFzZVVSSQkBEUBleHRyTmF0aXZlKDEwNTgpAQIHYmFzZVVSSQAIZEFwcEpzb24JAQdBZGRyZXNzAQkA2QQBAiMzTXJHYVpWUmhrbkVHZkhKMTl0dFVQTm5EUm9GcWNIaFZONwAMdG9rZW5QYXltZW50CQERQGV4dHJOYXRpdmUoMTA1NykBAgx0b2tlblBheW1lbnQAEXRva2VuUGF5bWVudEFzc2V0CQETdmFsdWVPckVycm9yTWVzc2FnZQIJ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2dldExlbmRDb3N0AQUGbGVuZElkBQNuaWwAWMz1/g==", "height": 2501473, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8AiSkdmrXgbmFcy87nQZf8UaMohXacCJ1xcW8T94VV8v Next: JE2iVTtWZxEePjgtizVPrBdSnUnHnmznA1d9xw22Lh5J Diff:
Old | New | Differences | |
---|---|---|---|
66 | 66 | } | |
67 | 67 | ||
68 | 68 | ||
69 | - | func getLendCost (lendId) = valueOrElse( | |
69 | + | func getLendCost (lendId) = valueOrElse(getInteger(("lend-cost-" + toString(lendId))), 0) | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func onlyInternal (caller) = if ((caller == this)) | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func reducerGetDeleteEntry (accum,next) = { | |
78 | - | let $ | |
79 | - | let deletions = $ | |
80 | - | let current = $ | |
81 | - | let maxCount = $ | |
82 | - | let lendId = $ | |
78 | + | let $t021592209 = accum | |
79 | + | let deletions = $t021592209._1 | |
80 | + | let current = $t021592209._2 | |
81 | + | let maxCount = $t021592209._3 | |
82 | + | let lendId = $t021592209._4 | |
83 | 83 | if ((maxCount > current)) | |
84 | 84 | then $Tuple3((deletions :+ DeleteEntry(((("lend-rent-" + lendId) + "-") + toString(current)))), (current + 1), maxCount) | |
85 | 85 | else accum |
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 | - | func getLendCost (lendId) = valueOrElse( | |
69 | + | func getLendCost (lendId) = valueOrElse(getInteger(("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 | 75 | ||
76 | 76 | ||
77 | 77 | func reducerGetDeleteEntry (accum,next) = { | |
78 | - | let $ | |
79 | - | let deletions = $ | |
80 | - | let current = $ | |
81 | - | let maxCount = $ | |
82 | - | let lendId = $ | |
78 | + | let $t021592209 = accum | |
79 | + | let deletions = $t021592209._1 | |
80 | + | let current = $t021592209._2 | |
81 | + | let maxCount = $t021592209._3 | |
82 | + | let lendId = $t021592209._4 | |
83 | 83 | if ((maxCount > current)) | |
84 | 84 | then $Tuple3((deletions :+ DeleteEntry(((("lend-rent-" + lendId) + "-") + toString(current)))), (current + 1), maxCount) | |
85 | 85 | else accum | |
86 | 86 | } | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func checkAssetOwner (caller,assetId) = if ((assetBalance(caller, fromBase58String(assetId)) == 1)) | |
90 | 90 | then unit | |
91 | 91 | else throw("Only asset owner") | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func checkPayment (payments,amount) = if ((payments[0].amount >= amount)) | |
95 | 95 | then unit | |
96 | 96 | else throw("amount less then need") | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func checkAssetExists (assetId) = if (valueOrElse(getBoolean(assetId), false)) | |
100 | 100 | then throw("this token already use") | |
101 | 101 | else unit | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func checkLendOwner (caller,lendId) = if ((getKey(getLendJson(lendId), "owner") != toString(caller))) | |
105 | 105 | then throw("you haven't perms") | |
106 | 106 | else unit | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | @Callable(i) | |
110 | 110 | func setString (_key,_value) = valueOrElse(onlyInternal(i.caller), [StringEntry(_key, _value)]) | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | ||
114 | 114 | @Callable(i) | |
115 | 115 | func setInt (_key,_value) = valueOrElse(onlyInternal(i.caller), [IntegerEntry(_key, _value)]) | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | ||
119 | 119 | @Callable(i) | |
120 | 120 | func deleteEntry (_key) = valueOrElse(onlyInternal(i.caller), [DeleteEntry(_key)]) | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | ||
124 | 124 | @Callable(i) | |
125 | 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)]) | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | ||
129 | 129 | @Callable(i) | |
130 | 130 | func setUser (assetId,user,expires) = { | |
131 | 131 | let res = invoke(dAppJson, "makeJSON", [["user", "expires"], [user, expires]], nil) | |
132 | 132 | if ((res == res)) | |
133 | 133 | then $Tuple2([StringEntry(("userOf-" + assetId), { | |
134 | 134 | let @ = res | |
135 | 135 | if ($isInstanceOf(@, "String")) | |
136 | 136 | then @ | |
137 | 137 | else throw(($getType(@) + " couldn't be cast to String")) | |
138 | 138 | })], res) | |
139 | 139 | else throw("Strict value is not equal to itself.") | |
140 | 140 | } | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | ||
144 | 144 | @Callable(i) | |
145 | 145 | func setTokenPayment (assetBinary) = valueOrElse(onlyInternal(i.caller), [BinaryEntry("tokenPayment", assetBinary)]) | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | ||
149 | 149 | @Callable(i) | |
150 | 150 | func mintTokens (to,amount) = { | |
151 | 151 | let reisue = Reissue(tokenPayment, amount, true) | |
152 | 152 | let toAddress = Address(fromBase58String(to)) | |
153 | 153 | let transfer = transferOrNot(toAddress, amount, tokenPayment) | |
154 | 154 | if ((transfer == transfer)) | |
155 | 155 | then [transfer, reisue] | |
156 | 156 | else throw("Strict value is not equal to itself.") | |
157 | 157 | } | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | ||
161 | 161 | @Callable(i) | |
162 | 162 | func mintNFT (to) = { | |
163 | 163 | let tokenId = (totalAmount + 1) | |
164 | 164 | let tokenIdString = toString(tokenId) | |
165 | 165 | let preName = ((symbol + "#") + tokenIdString) | |
166 | 166 | let name = if ((16 >= size(preName))) | |
167 | 167 | then preName | |
168 | 168 | else tokenIdString | |
169 | 169 | let tokenURI = (baseURI + tokenIdString) | |
170 | 170 | let json = { | |
171 | 171 | let @ = invoke(dAppJson, "makeJSON", [["tokenURI"], [tokenURI]], nil) | |
172 | 172 | if ($isInstanceOf(@, "String")) | |
173 | 173 | then @ | |
174 | 174 | else throw(($getType(@) + " couldn't be cast to String")) | |
175 | 175 | } | |
176 | 176 | let asset = Issue(name, json, 1, 0, false, unit, height) | |
177 | 177 | let assetId = calculateAssetId(asset) | |
178 | 178 | let toAddress = Address(fromBase58String(to)) | |
179 | 179 | let transfer = transferOrNot(toAddress, 1, assetId) | |
180 | 180 | if ((transfer == transfer)) | |
181 | 181 | then [asset, transfer, IntegerEntry("totalAmount", tokenId), StringEntry(name, tokenURI)] | |
182 | 182 | else throw("Strict value is not equal to itself.") | |
183 | 183 | } | |
184 | 184 | ||
185 | 185 | ||
186 | 186 | ||
187 | 187 | @Callable(i) | |
188 | 188 | func initLend (assetId,timeUnitSeconds,timeUnitPrice,timeUnitCount) = valueOrElse(checkAssetOwner(i.caller, assetId), valueOrElse(checkAssetExists(assetId), { | |
189 | 189 | let asset = parseIdtoAsset(assetId) | |
190 | 190 | let tokenURI = { | |
191 | 191 | let @ = invoke(dAppJson, "readByJSONKey", [asset.description, "tokenURI"], nil) | |
192 | 192 | if ($isInstanceOf(@, "String")) | |
193 | 193 | then @ | |
194 | 194 | else throw(($getType(@) + " couldn't be cast to String")) | |
195 | 195 | } | |
196 | 196 | if ((tokenURI == tokenURI)) | |
197 | 197 | then { | |
198 | 198 | let lendJson = { | |
199 | 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) | |
200 | 200 | if ($isInstanceOf(@, "String")) | |
201 | 201 | then @ | |
202 | 202 | else throw(($getType(@) + " couldn't be cast to String")) | |
203 | 203 | } | |
204 | 204 | if ((lendJson == lendJson)) | |
205 | 205 | then { | |
206 | 206 | let lendIdString = toString(lendCount) | |
207 | 207 | [IntegerEntry("lendCount", (lendCount + 1)), IntegerEntry("lendCurrentCount", (lendCurrentCount + 1)), IntegerEntry(("lend-rentCount-" + lendIdString), 0), StringEntry(("lend-" + lendIdString), lendJson), BooleanEntry(assetId, true)] | |
208 | 208 | } | |
209 | 209 | else throw("Strict value is not equal to itself.") | |
210 | 210 | } | |
211 | 211 | else throw("Strict value is not equal to itself.") | |
212 | 212 | })) | |
213 | 213 | ||
214 | 214 | ||
215 | 215 | ||
216 | 216 | @Callable(i) | |
217 | 217 | func initRent (lendId,timeUnitCount) = valueOrElse(checkPayment(i.payments, calcLendCost(lendId, timeUnitCount)), { | |
218 | 218 | let lendIdString = toString(lendId) | |
219 | 219 | let lendJson = getStringValue(("lend-" + lendIdString)) | |
220 | 220 | let rentId = getRentCount(lendId) | |
221 | 221 | let rentIdString = toString(rentId) | |
222 | 222 | let timeUnitSeconds = { | |
223 | 223 | let @ = invoke(dAppJson, "readByJSONKey", [lendJson, "timeUnitSeconds"], nil) | |
224 | 224 | if ($isInstanceOf(@, "String")) | |
225 | 225 | then @ | |
226 | 226 | else throw(($getType(@) + " couldn't be cast to String")) | |
227 | 227 | } | |
228 | 228 | if ((timeUnitSeconds == timeUnitSeconds)) | |
229 | 229 | then { | |
230 | 230 | let timeUnitSecondsInt = parseIntValue(timeUnitSeconds) | |
231 | 231 | if ((timeUnitSecondsInt == timeUnitSecondsInt)) | |
232 | 232 | then { | |
233 | 233 | let rentJson = { | |
234 | 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) | |
235 | 235 | if ($isInstanceOf(@, "String")) | |
236 | 236 | then @ | |
237 | 237 | else throw(($getType(@) + " couldn't be cast to String")) | |
238 | 238 | } | |
239 | 239 | if ((rentJson == rentJson)) | |
240 | 240 | then [IntegerEntry(("lend-rentCount-" + lendIdString), (rentId + 1)), StringEntry(((("lend-rent-" + lendIdString) + "-") + rentIdString), rentJson), IntegerEntry(("lend-cost-" + lendIdString), (calcLendCost(lendId, timeUnitCount) + getLendCost(lendId)))] | |
241 | 241 | else throw("Strict value is not equal to itself.") | |
242 | 242 | } | |
243 | 243 | else throw("Strict value is not equal to itself.") | |
244 | 244 | } | |
245 | 245 | else throw("Strict value is not equal to itself.") | |
246 | 246 | }) | |
247 | 247 | ||
248 | 248 | ||
249 | 249 | ||
250 | 250 | @Callable(i) | |
251 | 251 | func closeLend (lendId) = valueOrElse(checkLendOwner(i.caller, lendId), { | |
252 | 252 | let lendIdString = toString(lendId) | |
253 | 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 | 254 | txListRaw | |
255 | 255 | }) | |
256 | 256 | ||
257 | 257 | ||
258 | 258 | ||
259 | 259 | @Callable(i) | |
260 | 260 | func test (lendId) = [IntegerEntry("Debug", getLendCost(lendId))] | |
261 | 261 | ||
262 | 262 |
github/deemru/w8io/169f3d6 39.46 ms ◑