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 | |
---|---|---|---|
74 | 74 | else throw("Only internal call") | |
75 | 75 | ||
76 | 76 | ||
77 | - | func E (D,l) = if ((assetBalance(D, fromBase58String(l)) == 1)) | |
77 | + | func E (F,G) = { | |
78 | + | let H = F | |
79 | + | let I = H._1 | |
80 | + | let J = H._2 | |
81 | + | let K = H._3 | |
82 | + | let q = H._4 | |
83 | + | if ((K > J)) | |
84 | + | then $Tuple3((I :+ DeleteEntry(((("lend-rent-" + q) + "-") + toString(J)))), (J + 1), K) | |
85 | + | else F | |
86 | + | } | |
87 | + | ||
88 | + | ||
89 | + | func L (D,l) = if ((assetBalance(D, fromBase58String(l)) == 1)) | |
78 | 90 | then unit | |
79 | 91 | else throw("Only asset owner") | |
80 | 92 | ||
81 | 93 | ||
82 | - | func | |
94 | + | func M (N,o) = if ((N[0].amount >= o)) | |
83 | 95 | then unit | |
84 | 96 | else throw("amount less then need") | |
85 | 97 | ||
86 | 98 | ||
87 | - | func | |
99 | + | func O (l) = if (valueOrElse(getBoolean(l), false)) | |
88 | 100 | then throw("this token already use") | |
89 | 101 | else unit | |
90 | 102 | ||
91 | 103 | ||
92 | - | func | |
104 | + | func P (D,q) = if ((s(p(q), "owner") != toString(D))) | |
93 | 105 | then throw("you haven't perms") | |
94 | 106 | else unit | |
95 | 107 | ||
96 | 108 | ||
97 | - | @Callable( | |
98 | - | func setString ( | |
109 | + | @Callable(Q) | |
110 | + | func setString (R,S) = valueOrElse(C(Q.caller), [StringEntry(R, S)]) | |
99 | 111 | ||
100 | 112 | ||
101 | 113 | ||
102 | - | @Callable( | |
103 | - | func setInt ( | |
114 | + | @Callable(Q) | |
115 | + | func setInt (R,S) = valueOrElse(C(Q.caller), [IntegerEntry(R, S)]) | |
104 | 116 | ||
105 | 117 | ||
106 | 118 | ||
107 | - | @Callable( | |
108 | - | func deleteEntry ( | |
119 | + | @Callable(Q) | |
120 | + | func deleteEntry (R) = valueOrElse(C(Q.caller), [DeleteEntry(R)]) | |
109 | 121 | ||
110 | 122 | ||
111 | 123 | ||
112 | - | @Callable( | |
113 | - | func init ( | |
124 | + | @Callable(Q) | |
125 | + | func init (T,U,V,W) = valueOrElse(C(Q.caller), [StringEntry("collectionName", T), StringEntry("symbol", U), StringEntry("description", V), IntegerEntry("totalAmount", 0), StringEntry("baseURI", W)]) | |
114 | 126 | ||
115 | 127 | ||
116 | 128 | ||
117 | - | @Callable( | |
118 | - | func setUser (l, | |
119 | - | let | |
120 | - | if (( | |
129 | + | @Callable(Q) | |
130 | + | func setUser (l,X,Y) = { | |
131 | + | let Z = invoke(f, "makeJSON", [["user", "expires"], [X, Y]], nil) | |
132 | + | if ((Z == Z)) | |
121 | 133 | then $Tuple2([StringEntry(("userOf-" + l), { | |
122 | - | let w = | |
134 | + | let w = Z | |
123 | 135 | if ($isInstanceOf(w, "String")) | |
124 | 136 | then w | |
125 | 137 | else throw(($getType(w) + " couldn't be cast to String")) | |
126 | - | })], | |
138 | + | })], Z) | |
127 | 139 | else throw("Strict value is not equal to itself.") | |
128 | 140 | } | |
129 | 141 | ||
130 | 142 | ||
131 | 143 | ||
132 | - | @Callable( | |
133 | - | func setTokenPayment ( | |
144 | + | @Callable(Q) | |
145 | + | func setTokenPayment (aa) = valueOrElse(C(Q.caller), [BinaryEntry("tokenPayment", aa)]) | |
134 | 146 | ||
135 | 147 | ||
136 | 148 | ||
137 | - | @Callable( | |
149 | + | @Callable(Q) | |
138 | 150 | func mintTokens (n,o) = { | |
139 | - | let | |
140 | - | let | |
141 | - | let | |
142 | - | if (( | |
143 | - | then [ | |
151 | + | let ab = Reissue(g, o, true) | |
152 | + | let ac = Address(fromBase58String(n)) | |
153 | + | let ad = m(ac, o, g) | |
154 | + | if ((ad == ad)) | |
155 | + | then [ad, ab] | |
144 | 156 | else throw("Strict value is not equal to itself.") | |
145 | 157 | } | |
146 | 158 | ||
147 | 159 | ||
148 | 160 | ||
149 | - | @Callable( | |
161 | + | @Callable(Q) | |
150 | 162 | func mintNFT (n) = { | |
151 | - | let | |
152 | - | let | |
153 | - | let | |
154 | - | let | |
155 | - | then | |
156 | - | else | |
157 | - | let | |
158 | - | let | |
159 | - | let w = invoke(f, "makeJSON", [["tokenURI"], [ | |
163 | + | let ae = (d + 1) | |
164 | + | let af = toString(ae) | |
165 | + | let ag = ((b + "#") + af) | |
166 | + | let ah = if ((16 >= size(ag))) | |
167 | + | then ag | |
168 | + | else af | |
169 | + | let ai = (e + af) | |
170 | + | let aj = { | |
171 | + | let w = invoke(f, "makeJSON", [["tokenURI"], [ai]], nil) | |
160 | 172 | if ($isInstanceOf(w, "String")) | |
161 | 173 | then w | |
162 | 174 | else throw(($getType(w) + " couldn't be cast to String")) | |
163 | 175 | } | |
164 | - | let | |
165 | - | let l = calculateAssetId( | |
166 | - | let | |
167 | - | let | |
168 | - | if (( | |
169 | - | then [ | |
176 | + | let ak = Issue(ah, aj, 1, 0, false, unit, height) | |
177 | + | let l = calculateAssetId(ak) | |
178 | + | let ac = Address(fromBase58String(n)) | |
179 | + | let ad = m(ac, 1, l) | |
180 | + | if ((ad == ad)) | |
181 | + | then [ak, ad, IntegerEntry("totalAmount", ae), StringEntry(ah, ai)] | |
170 | 182 | else throw("Strict value is not equal to itself.") | |
171 | 183 | } | |
172 | 184 | ||
173 | 185 | ||
174 | 186 | ||
175 | - | @Callable( | |
176 | - | func initLend (l,v,A, | |
177 | - | let | |
178 | - | let | |
179 | - | let w = invoke(f, "readByJSONKey", [ | |
187 | + | @Callable(Q) | |
188 | + | func initLend (l,v,A,al) = valueOrElse(L(Q.caller, l), valueOrElse(O(l), { | |
189 | + | let ak = k(l) | |
190 | + | let ai = { | |
191 | + | let w = invoke(f, "readByJSONKey", [ak.description, "tokenURI"], nil) | |
180 | 192 | if ($isInstanceOf(w, "String")) | |
181 | 193 | then w | |
182 | 194 | else throw(($getType(w) + " couldn't be cast to String")) | |
183 | 195 | } | |
184 | - | if (( | |
196 | + | if ((ai == ai)) | |
185 | 197 | then { | |
186 | 198 | let t = { | |
187 | - | let w = invoke(f, "makeJSON", [["supportedInterface", "assetdId", "tokenURI", "owner", "timeUnitSeconds", "timeUnitPrice", "timeUnitCount", "startTimestamp", "endTimestamp", "deposit", "claimed"], ["0", l, | |
199 | + | let w = invoke(f, "makeJSON", [["supportedInterface", "assetdId", "tokenURI", "owner", "timeUnitSeconds", "timeUnitPrice", "timeUnitCount", "startTimestamp", "endTimestamp", "deposit", "claimed"], ["0", l, ai, toString(Q.caller), toString(v), toString(A), toString(al), toString(lastBlock.timestamp), toString((lastBlock.timestamp + (v * al))), "0", "0"]], nil) | |
188 | 200 | if ($isInstanceOf(w, "String")) | |
189 | 201 | then w | |
190 | 202 | else throw(($getType(w) + " couldn't be cast to String")) | |
201 | 213 | ||
202 | 214 | ||
203 | 215 | ||
204 | - | @Callable( | |
205 | - | func initRent (q, | |
216 | + | @Callable(Q) | |
217 | + | func initRent (q,al) = valueOrElse(M(Q.payments, y(q, al)), { | |
206 | 218 | let r = toString(q) | |
207 | 219 | let t = getStringValue(("lend-" + r)) | |
208 | - | let | |
209 | - | let | |
220 | + | let am = x(q) | |
221 | + | let an = toString(am) | |
210 | 222 | let v = { | |
211 | 223 | let w = invoke(f, "readByJSONKey", [t, "timeUnitSeconds"], nil) | |
212 | 224 | if ($isInstanceOf(w, "String")) | |
215 | 227 | } | |
216 | 228 | if ((v == v)) | |
217 | 229 | then { | |
218 | - | let | |
219 | - | if (( | |
230 | + | let ao = parseIntValue(v) | |
231 | + | if ((ao == ao)) | |
220 | 232 | then { | |
221 | - | let | |
222 | - | let w = invoke(f, "makeJSON", [["customer", "timeUnitCount", "startTimestamp", "endTimestamp", "closed"], [toString( | |
233 | + | let ap = { | |
234 | + | let w = invoke(f, "makeJSON", [["customer", "timeUnitCount", "startTimestamp", "endTimestamp", "closed"], [toString(Q.caller), toString(al), toString(lastBlock.timestamp), toString((lastBlock.timestamp + (ao * al))), "0"]], nil) | |
223 | 235 | if ($isInstanceOf(w, "String")) | |
224 | 236 | then w | |
225 | 237 | else throw(($getType(w) + " couldn't be cast to String")) | |
226 | 238 | } | |
227 | - | if (( | |
228 | - | then [IntegerEntry(("lend-rentCount-" + r), ( | |
239 | + | if ((ap == ap)) | |
240 | + | then [IntegerEntry(("lend-rentCount-" + r), (am + 1)), StringEntry(((("lend-rent-" + r) + "-") + an), ap), IntegerEntry(("lend-cost-" + r), (y(q, al) + B(q)))] | |
229 | 241 | else throw("Strict value is not equal to itself.") | |
230 | 242 | } | |
231 | 243 | else throw("Strict value is not equal to itself.") | |
235 | 247 | ||
236 | 248 | ||
237 | 249 | ||
238 | - | @Callable( | |
239 | - | func closeLend (q) = valueOrElse( | |
250 | + | @Callable(Q) | |
251 | + | func closeLend (q) = valueOrElse(P(Q.caller, q), { | |
240 | 252 | let r = toString(q) | |
241 | - | [DeleteEntry(("lend-" + r)), DeleteEntry(("lend-rentCount-" + r)), IntegerEntry("lendCurrentCount", (j - 1)), DeleteEntry(("lend-cost-" + r)), ScriptTransfer(J.caller, B(q), g)] | |
253 | + | let aq = [DeleteEntry(("lend-" + r)), DeleteEntry(("lend-rentCount-" + r)), IntegerEntry("lendCurrentCount", (j - 1)), DeleteEntry(("lend-cost-" + r)), ScriptTransfer(Q.caller, B(q), g)] | |
254 | + | aq | |
242 | 255 | }) | |
243 | 256 | ||
244 | 257 | ||
245 | 258 | ||
246 | - | @Callable( | |
247 | - | func test (q) = [ | |
259 | + | @Callable(Q) | |
260 | + | func test (q) = [IntegerEntry("Debug", B(q))] | |
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 a = getStringValue("collectionName") | |
5 | 5 | ||
6 | 6 | let b = getStringValue("symbol") | |
7 | 7 | ||
8 | 8 | let c = getStringValue("description") | |
9 | 9 | ||
10 | 10 | let d = getIntegerValue("totalAmount") | |
11 | 11 | ||
12 | 12 | let e = getStringValue("baseURI") | |
13 | 13 | ||
14 | 14 | let f = Address(fromBase58String("3MrGaZVRhknEGfHJ19ttUPNnDRoFqcHhVN7")) | |
15 | 15 | ||
16 | 16 | let g = getBinaryValue("tokenPayment") | |
17 | 17 | ||
18 | 18 | let h = valueOrErrorMessage(assetInfo(getBinaryValue("tokenPayment")), "token payment asset doesn't connect") | |
19 | 19 | ||
20 | 20 | let i = getIntegerValue("lendCount") | |
21 | 21 | ||
22 | 22 | let j = getIntegerValue("lendCurrentCount") | |
23 | 23 | ||
24 | 24 | func k (l) = valueOrErrorMessage(assetInfo(fromBase58String(l)), "Can't find asset by asset id") | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func m (n,o,l) = if ((n == this)) | |
28 | 28 | then StringEntry("smth", "smth") | |
29 | 29 | else ScriptTransfer(n, o, l) | |
30 | 30 | ||
31 | 31 | ||
32 | 32 | func p (q) = { | |
33 | 33 | let r = toString(q) | |
34 | 34 | getStringValue(("lend-" + r)) | |
35 | 35 | } | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | func s (t,u) = { | |
39 | 39 | let v = { | |
40 | 40 | let w = invoke(f, "readByJSONKey", [t, u], nil) | |
41 | 41 | if ($isInstanceOf(w, "String")) | |
42 | 42 | then w | |
43 | 43 | else throw(($getType(w) + " couldn't be cast to String")) | |
44 | 44 | } | |
45 | 45 | if ((v == v)) | |
46 | 46 | then v | |
47 | 47 | else throw("Strict value is not equal to itself.") | |
48 | 48 | } | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func x (q) = { | |
52 | 52 | let r = toString(q) | |
53 | 53 | getIntegerValue(("lend-rentCount-" + r)) | |
54 | 54 | } | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func y (q,v) = { | |
58 | 58 | let t = p(q) | |
59 | 59 | let z = s(t, "timeUnitPrice") | |
60 | 60 | if ((z == z)) | |
61 | 61 | then { | |
62 | 62 | let A = parseIntValue(z) | |
63 | 63 | (v * A) | |
64 | 64 | } | |
65 | 65 | else throw("Strict value is not equal to itself.") | |
66 | 66 | } | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func B (q) = valueOrElse(getIntegerValue(("lend-cost-" + toString(q))), 0) | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func C (D) = if ((D == this)) | |
73 | 73 | then unit | |
74 | 74 | else throw("Only internal call") | |
75 | 75 | ||
76 | 76 | ||
77 | - | func E (D,l) = if ((assetBalance(D, fromBase58String(l)) == 1)) | |
77 | + | func E (F,G) = { | |
78 | + | let H = F | |
79 | + | let I = H._1 | |
80 | + | let J = H._2 | |
81 | + | let K = H._3 | |
82 | + | let q = H._4 | |
83 | + | if ((K > J)) | |
84 | + | then $Tuple3((I :+ DeleteEntry(((("lend-rent-" + q) + "-") + toString(J)))), (J + 1), K) | |
85 | + | else F | |
86 | + | } | |
87 | + | ||
88 | + | ||
89 | + | func L (D,l) = if ((assetBalance(D, fromBase58String(l)) == 1)) | |
78 | 90 | then unit | |
79 | 91 | else throw("Only asset owner") | |
80 | 92 | ||
81 | 93 | ||
82 | - | func | |
94 | + | func M (N,o) = if ((N[0].amount >= o)) | |
83 | 95 | then unit | |
84 | 96 | else throw("amount less then need") | |
85 | 97 | ||
86 | 98 | ||
87 | - | func | |
99 | + | func O (l) = if (valueOrElse(getBoolean(l), false)) | |
88 | 100 | then throw("this token already use") | |
89 | 101 | else unit | |
90 | 102 | ||
91 | 103 | ||
92 | - | func | |
104 | + | func P (D,q) = if ((s(p(q), "owner") != toString(D))) | |
93 | 105 | then throw("you haven't perms") | |
94 | 106 | else unit | |
95 | 107 | ||
96 | 108 | ||
97 | - | @Callable( | |
98 | - | func setString ( | |
109 | + | @Callable(Q) | |
110 | + | func setString (R,S) = valueOrElse(C(Q.caller), [StringEntry(R, S)]) | |
99 | 111 | ||
100 | 112 | ||
101 | 113 | ||
102 | - | @Callable( | |
103 | - | func setInt ( | |
114 | + | @Callable(Q) | |
115 | + | func setInt (R,S) = valueOrElse(C(Q.caller), [IntegerEntry(R, S)]) | |
104 | 116 | ||
105 | 117 | ||
106 | 118 | ||
107 | - | @Callable( | |
108 | - | func deleteEntry ( | |
119 | + | @Callable(Q) | |
120 | + | func deleteEntry (R) = valueOrElse(C(Q.caller), [DeleteEntry(R)]) | |
109 | 121 | ||
110 | 122 | ||
111 | 123 | ||
112 | - | @Callable( | |
113 | - | func init ( | |
124 | + | @Callable(Q) | |
125 | + | func init (T,U,V,W) = valueOrElse(C(Q.caller), [StringEntry("collectionName", T), StringEntry("symbol", U), StringEntry("description", V), IntegerEntry("totalAmount", 0), StringEntry("baseURI", W)]) | |
114 | 126 | ||
115 | 127 | ||
116 | 128 | ||
117 | - | @Callable( | |
118 | - | func setUser (l, | |
119 | - | let | |
120 | - | if (( | |
129 | + | @Callable(Q) | |
130 | + | func setUser (l,X,Y) = { | |
131 | + | let Z = invoke(f, "makeJSON", [["user", "expires"], [X, Y]], nil) | |
132 | + | if ((Z == Z)) | |
121 | 133 | then $Tuple2([StringEntry(("userOf-" + l), { | |
122 | - | let w = | |
134 | + | let w = Z | |
123 | 135 | if ($isInstanceOf(w, "String")) | |
124 | 136 | then w | |
125 | 137 | else throw(($getType(w) + " couldn't be cast to String")) | |
126 | - | })], | |
138 | + | })], Z) | |
127 | 139 | else throw("Strict value is not equal to itself.") | |
128 | 140 | } | |
129 | 141 | ||
130 | 142 | ||
131 | 143 | ||
132 | - | @Callable( | |
133 | - | func setTokenPayment ( | |
144 | + | @Callable(Q) | |
145 | + | func setTokenPayment (aa) = valueOrElse(C(Q.caller), [BinaryEntry("tokenPayment", aa)]) | |
134 | 146 | ||
135 | 147 | ||
136 | 148 | ||
137 | - | @Callable( | |
149 | + | @Callable(Q) | |
138 | 150 | func mintTokens (n,o) = { | |
139 | - | let | |
140 | - | let | |
141 | - | let | |
142 | - | if (( | |
143 | - | then [ | |
151 | + | let ab = Reissue(g, o, true) | |
152 | + | let ac = Address(fromBase58String(n)) | |
153 | + | let ad = m(ac, o, g) | |
154 | + | if ((ad == ad)) | |
155 | + | then [ad, ab] | |
144 | 156 | else throw("Strict value is not equal to itself.") | |
145 | 157 | } | |
146 | 158 | ||
147 | 159 | ||
148 | 160 | ||
149 | - | @Callable( | |
161 | + | @Callable(Q) | |
150 | 162 | func mintNFT (n) = { | |
151 | - | let | |
152 | - | let | |
153 | - | let | |
154 | - | let | |
155 | - | then | |
156 | - | else | |
157 | - | let | |
158 | - | let | |
159 | - | let w = invoke(f, "makeJSON", [["tokenURI"], [ | |
163 | + | let ae = (d + 1) | |
164 | + | let af = toString(ae) | |
165 | + | let ag = ((b + "#") + af) | |
166 | + | let ah = if ((16 >= size(ag))) | |
167 | + | then ag | |
168 | + | else af | |
169 | + | let ai = (e + af) | |
170 | + | let aj = { | |
171 | + | let w = invoke(f, "makeJSON", [["tokenURI"], [ai]], nil) | |
160 | 172 | if ($isInstanceOf(w, "String")) | |
161 | 173 | then w | |
162 | 174 | else throw(($getType(w) + " couldn't be cast to String")) | |
163 | 175 | } | |
164 | - | let | |
165 | - | let l = calculateAssetId( | |
166 | - | let | |
167 | - | let | |
168 | - | if (( | |
169 | - | then [ | |
176 | + | let ak = Issue(ah, aj, 1, 0, false, unit, height) | |
177 | + | let l = calculateAssetId(ak) | |
178 | + | let ac = Address(fromBase58String(n)) | |
179 | + | let ad = m(ac, 1, l) | |
180 | + | if ((ad == ad)) | |
181 | + | then [ak, ad, IntegerEntry("totalAmount", ae), StringEntry(ah, ai)] | |
170 | 182 | else throw("Strict value is not equal to itself.") | |
171 | 183 | } | |
172 | 184 | ||
173 | 185 | ||
174 | 186 | ||
175 | - | @Callable( | |
176 | - | func initLend (l,v,A, | |
177 | - | let | |
178 | - | let | |
179 | - | let w = invoke(f, "readByJSONKey", [ | |
187 | + | @Callable(Q) | |
188 | + | func initLend (l,v,A,al) = valueOrElse(L(Q.caller, l), valueOrElse(O(l), { | |
189 | + | let ak = k(l) | |
190 | + | let ai = { | |
191 | + | let w = invoke(f, "readByJSONKey", [ak.description, "tokenURI"], nil) | |
180 | 192 | if ($isInstanceOf(w, "String")) | |
181 | 193 | then w | |
182 | 194 | else throw(($getType(w) + " couldn't be cast to String")) | |
183 | 195 | } | |
184 | - | if (( | |
196 | + | if ((ai == ai)) | |
185 | 197 | then { | |
186 | 198 | let t = { | |
187 | - | let w = invoke(f, "makeJSON", [["supportedInterface", "assetdId", "tokenURI", "owner", "timeUnitSeconds", "timeUnitPrice", "timeUnitCount", "startTimestamp", "endTimestamp", "deposit", "claimed"], ["0", l, | |
199 | + | let w = invoke(f, "makeJSON", [["supportedInterface", "assetdId", "tokenURI", "owner", "timeUnitSeconds", "timeUnitPrice", "timeUnitCount", "startTimestamp", "endTimestamp", "deposit", "claimed"], ["0", l, ai, toString(Q.caller), toString(v), toString(A), toString(al), toString(lastBlock.timestamp), toString((lastBlock.timestamp + (v * al))), "0", "0"]], nil) | |
188 | 200 | if ($isInstanceOf(w, "String")) | |
189 | 201 | then w | |
190 | 202 | else throw(($getType(w) + " couldn't be cast to String")) | |
191 | 203 | } | |
192 | 204 | if ((t == t)) | |
193 | 205 | then { | |
194 | 206 | let r = toString(i) | |
195 | 207 | [IntegerEntry("lendCount", (i + 1)), IntegerEntry("lendCurrentCount", (j + 1)), IntegerEntry(("lend-rentCount-" + r), 0), StringEntry(("lend-" + r), t), BooleanEntry(l, 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 | - | @Callable( | |
205 | - | func initRent (q, | |
216 | + | @Callable(Q) | |
217 | + | func initRent (q,al) = valueOrElse(M(Q.payments, y(q, al)), { | |
206 | 218 | let r = toString(q) | |
207 | 219 | let t = getStringValue(("lend-" + r)) | |
208 | - | let | |
209 | - | let | |
220 | + | let am = x(q) | |
221 | + | let an = toString(am) | |
210 | 222 | let v = { | |
211 | 223 | let w = invoke(f, "readByJSONKey", [t, "timeUnitSeconds"], nil) | |
212 | 224 | if ($isInstanceOf(w, "String")) | |
213 | 225 | then w | |
214 | 226 | else throw(($getType(w) + " couldn't be cast to String")) | |
215 | 227 | } | |
216 | 228 | if ((v == v)) | |
217 | 229 | then { | |
218 | - | let | |
219 | - | if (( | |
230 | + | let ao = parseIntValue(v) | |
231 | + | if ((ao == ao)) | |
220 | 232 | then { | |
221 | - | let | |
222 | - | let w = invoke(f, "makeJSON", [["customer", "timeUnitCount", "startTimestamp", "endTimestamp", "closed"], [toString( | |
233 | + | let ap = { | |
234 | + | let w = invoke(f, "makeJSON", [["customer", "timeUnitCount", "startTimestamp", "endTimestamp", "closed"], [toString(Q.caller), toString(al), toString(lastBlock.timestamp), toString((lastBlock.timestamp + (ao * al))), "0"]], nil) | |
223 | 235 | if ($isInstanceOf(w, "String")) | |
224 | 236 | then w | |
225 | 237 | else throw(($getType(w) + " couldn't be cast to String")) | |
226 | 238 | } | |
227 | - | if (( | |
228 | - | then [IntegerEntry(("lend-rentCount-" + r), ( | |
239 | + | if ((ap == ap)) | |
240 | + | then [IntegerEntry(("lend-rentCount-" + r), (am + 1)), StringEntry(((("lend-rent-" + r) + "-") + an), ap), IntegerEntry(("lend-cost-" + r), (y(q, al) + B(q)))] | |
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 | - | @Callable( | |
239 | - | func closeLend (q) = valueOrElse( | |
250 | + | @Callable(Q) | |
251 | + | func closeLend (q) = valueOrElse(P(Q.caller, q), { | |
240 | 252 | let r = toString(q) | |
241 | - | [DeleteEntry(("lend-" + r)), DeleteEntry(("lend-rentCount-" + r)), IntegerEntry("lendCurrentCount", (j - 1)), DeleteEntry(("lend-cost-" + r)), ScriptTransfer(J.caller, B(q), g)] | |
253 | + | let aq = [DeleteEntry(("lend-" + r)), DeleteEntry(("lend-rentCount-" + r)), IntegerEntry("lendCurrentCount", (j - 1)), DeleteEntry(("lend-cost-" + r)), ScriptTransfer(Q.caller, B(q), g)] | |
254 | + | aq | |
242 | 255 | }) | |
243 | 256 | ||
244 | 257 | ||
245 | 258 | ||
246 | - | @Callable( | |
247 | - | func test (q) = [ | |
259 | + | @Callable(Q) | |
260 | + | func test (q) = [IntegerEntry("Debug", B(q))] | |
248 | 261 | ||
249 | 262 |
github/deemru/w8io/169f3d6 75.89 ms ◑