tx · 9fZKAZMJLyTURLbyvdJWT3Br8rzswsYW7emxNiQ4YGwi

3MxVYj6ScMArhAamy7nB6b342kh1Pso1LTn:  -0.00700000 Waves

2023.03.21 21:55 [2500163] smart account 3MxVYj6ScMArhAamy7nB6b342kh1Pso1LTn > SELF 0.00000000 Waves

{ "type": 13, "id": "9fZKAZMJLyTURLbyvdJWT3Br8rzswsYW7emxNiQ4YGwi", "fee": 700000, "feeAssetId": null, "timestamp": 1679424976687, "version": 2, "chainId": 84, "sender": "3MxVYj6ScMArhAamy7nB6b342kh1Pso1LTn", "senderPublicKey": "CZeucjRLCKrkiP9zuj9KbLe23Wv9DywFzHBqNDnte51B", "proofs": [ "sDJ7fpF6iooHk55Tz7TDjPUN8qAY6JVB5zU384zkzV8F9ARZBWD4ZasPDeDWC4q3uJQQXQvku7Lbk5JVfs5ogHv" ], "script": "base64:BgJECAISBAoCCAgSBAoCCAESAwoBCBIGCgQICAgIEgUKAwgICBIDCgECEgMKAQgSBgoECAEBARIECgIBARIDCgEBEgMKAQEWAA5jb2xsZWN0aW9uTmFtZQkBEUBleHRyTmF0aXZlKDEwNTgpAQIOY29sbGVjdGlvbk5hbWUABnN5bWJvbAkBEUBleHRyTmF0aXZlKDEwNTgpAQIGc3ltYm9sAAtkZXNjcmlwdGlvbgkBEUBleHRyTmF0aXZlKDEwNTgpAQILZGVzY3JpcHRpb24AC3RvdGFsQW1vdW50CQERQGV4dHJOYXRpdmUoMTA1NSkBAgt0b3RhbEFtb3VudAAHYmFzZVVSSQkBEUBleHRyTmF0aXZlKDEwNTgpAQIHYmFzZVVSSQAIZEFwcEpzb24JAQdBZGRyZXNzAQkA2QQBAiMzTXJHYVpWUmhrbkVHZkhKMTl0dFVQTm5EUm9GcWNIaFZONwAMdG9rZW5QYXltZW50CQERQGV4dHJOYXRpdmUoMTA1NykBAgx0b2tlblBheW1lbnQAEXRva2VuUGF5bWVudEFzc2V0CQETdmFsdWVPckVycm9yTWVzc2FnZQIJAOwHAQkBEU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AkAZQIFEGxlbmRDdXJyZW50Q291bnQAAQkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCAUBaQZjYWxsZXIJAQtnZXRMZW5kQ29zdAEFBmxlbmRJZAUMdG9rZW5QYXltZW50BQNuaWwBaQEEdGVzdAEGbGVuZElkCQDMCAIJAQtTdHJpbmdFbnRyeQICBURlYnVnCQEGZ2V0S2V5AgkBC2dldExlbmRKc29uAQUGbGVuZElkAgVvd25lcgUDbmlsAMXPoNY=", "height": 2500163, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2yDSbohKjDR9Eok1ngCVzy8CvuzKxNiGBhcCXiX9ZY6e Next: Hoj3MygE6WA8z5r5zCeE5Agm1KMYykuCbKaT8kGP3jpN Diff:
OldNewDifferences
2424 func k (l) = valueOrErrorMessage(assetInfo(fromBase58String(l)), "Can't find asset by asset id")
2525
2626
27-func m (n) = if ((n == this))
28- then unit
29- else throw("Only internal call")
27+func m (n,l) = if ((n == this))
28+ then StringEntry("smth", "smth")
29+ else ScriptTransfer(n, 1, l)
3030
3131
32-func o (p,l) = if ((p == this))
33- then StringEntry("smth", "smth")
34- else ScriptTransfer(p, 1, l)
35-
36-
37-func q (n,l) = if ((assetBalance(n, fromBase58String(l)) == 1))
38- then unit
39- else throw("Only asset owner")
40-
41-
42-func r (s,t) = if ((s[0].amount >= t))
43- then unit
44- else throw("amount less then need")
45-
46-
47-func u (l) = if (valueOrElse(getBoolean(l), false))
48- then throw("this token already use")
49- else unit
50-
51-
52-func v (w) = {
53- let x = toString(w)
54- getStringValue(("lend-" + x))
32+func o (p) = {
33+ let q = toString(p)
34+ getStringValue(("lend-" + q))
5535 }
5636
5737
58-func y (z,A) = {
59- let B = {
60- let C = invoke(f, "readByJSONKey", [z, A], nil)
61- if ($isInstanceOf(C, "String"))
62- then C
63- else throw(($getType(C) + " couldn't be cast to String"))
38+func r (s,t) = {
39+ let u = {
40+ let v = invoke(f, "readByJSONKey", [s, t], nil)
41+ if ($isInstanceOf(v, "String"))
42+ then v
43+ else throw(($getType(v) + " couldn't be cast to String"))
6444 }
65- if ((B == B))
66- then B
45+ if ((u == u))
46+ then u
6747 else throw("Strict value is not equal to itself.")
6848 }
6949
7050
71-func D (w) = {
72- let x = toString(w)
73- getIntegerValue(("lend-rentCount-" + x))
51+func w (p) = {
52+ let q = toString(p)
53+ getIntegerValue(("lend-rentCount-" + q))
7454 }
7555
7656
77-func E (w,B) = {
78- let z = v(w)
79- let F = y(z, "timeUnitPrice")
80- if ((F == F))
57+func x (p,u) = {
58+ let s = o(p)
59+ let y = r(s, "timeUnitPrice")
60+ if ((y == y))
8161 then {
82- let G = parseIntValue(F)
83- (B * G)
62+ let z = parseIntValue(y)
63+ (u * z)
8464 }
8565 else throw("Strict value is not equal to itself.")
8666 }
8767
8868
89-@Callable(H)
90-func setString (I,J) = valueOrElse(m(H.caller), [StringEntry(I, J)])
69+func A (p) = valueOrElse(parseInt(r(o(p), "owner")), 0)
70+
71+
72+func B (C) = if ((C == this))
73+ then unit
74+ else throw("Only internal call")
75+
76+
77+func D (C,l) = if ((assetBalance(C, fromBase58String(l)) == 1))
78+ then unit
79+ else throw("Only asset owner")
80+
81+
82+func E (F,G) = if ((F[0].amount >= G))
83+ then unit
84+ else throw("amount less then need")
85+
86+
87+func H (l) = if (valueOrElse(getBoolean(l), false))
88+ then throw("this token already use")
89+ else unit
90+
91+
92+func I (C,p) = if ((r(o(p), "owner") != toString(C)))
93+ then throw("you haven't perms")
94+ else unit
95+
96+
97+@Callable(J)
98+func setString (K,L) = valueOrElse(B(J.caller), [StringEntry(K, L)])
9199
92100
93101
94-@Callable(H)
95-func setInt (I,J) = valueOrElse(m(H.caller), [IntegerEntry(I, J)])
102+@Callable(J)
103+func setInt (K,L) = valueOrElse(B(J.caller), [IntegerEntry(K, L)])
96104
97105
98106
99-@Callable(H)
100-func deleteEntry (I) = valueOrElse(m(H.caller), [DeleteEntry(I)])
107+@Callable(J)
108+func deleteEntry (K) = valueOrElse(B(J.caller), [DeleteEntry(K)])
101109
102110
103111
104-@Callable(H)
105-func init (K,L,M,N) = valueOrElse(m(H.caller), [StringEntry("collectionName", K), StringEntry("symbol", L), StringEntry("description", M), IntegerEntry("totalAmount", 0), StringEntry("baseURI", N)])
112+@Callable(J)
113+func init (M,N,O,P) = valueOrElse(B(J.caller), [StringEntry("collectionName", M), StringEntry("symbol", N), StringEntry("description", O), IntegerEntry("totalAmount", 0), StringEntry("baseURI", P)])
106114
107115
108116
109-@Callable(H)
110-func setUser (l,O,P) = {
111- let Q = invoke(f, "makeJSON", [["user", "expires"], [O, P]], nil)
112- if ((Q == Q))
117+@Callable(J)
118+func setUser (l,Q,R) = {
119+ let S = invoke(f, "makeJSON", [["user", "expires"], [Q, R]], nil)
120+ if ((S == S))
113121 then $Tuple2([StringEntry(("userOf-" + l), {
114- let C = Q
115- if ($isInstanceOf(C, "String"))
116- then C
117- else throw(($getType(C) + " couldn't be cast to String"))
118- })], Q)
122+ let v = S
123+ if ($isInstanceOf(v, "String"))
124+ then v
125+ else throw(($getType(v) + " couldn't be cast to String"))
126+ })], S)
119127 else throw("Strict value is not equal to itself.")
120128 }
121129
122130
123131
124-@Callable(H)
125-func setTokenPayment (R) = valueOrElse(m(H.caller), [BinaryEntry("tokenPayment", R)])
132+@Callable(J)
133+func setTokenPayment (T) = valueOrElse(B(J.caller), [BinaryEntry("tokenPayment", T)])
126134
127135
128136
129-@Callable(H)
130-func mint (p) = {
131- let S = (d + 1)
132- let T = toString(S)
133- let U = ((b + "#") + T)
134- let V = if ((16 >= size(U)))
135- then U
136- else T
137- let W = (e + T)
138- let X = {
139- let C = invoke(f, "makeJSON", [["tokenURI"], [W]], nil)
140- if ($isInstanceOf(C, "String"))
141- then C
142- else throw(($getType(C) + " couldn't be cast to String"))
137+@Callable(J)
138+func mint (n) = {
139+ let U = (d + 1)
140+ let V = toString(U)
141+ let W = ((b + "#") + V)
142+ let X = if ((16 >= size(W)))
143+ then W
144+ else V
145+ let Y = (e + V)
146+ let Z = {
147+ let v = invoke(f, "makeJSON", [["tokenURI"], [Y]], nil)
148+ if ($isInstanceOf(v, "String"))
149+ then v
150+ else throw(($getType(v) + " couldn't be cast to String"))
143151 }
144- let Y = Issue(V, X, 1, 0, false, unit, height)
145- let l = calculateAssetId(Y)
146- let Z = Address(fromBase58String(p))
147- let aa = o(Z, l)
148- if ((aa == aa))
149- then [Y, aa, IntegerEntry("totalAmount", S), StringEntry(V, W)]
152+ let aa = Issue(X, Z, 1, 0, false, unit, height)
153+ let l = calculateAssetId(aa)
154+ let ab = Address(fromBase58String(n))
155+ let ac = m(ab, l)
156+ if ((ac == ac))
157+ then [aa, ac, IntegerEntry("totalAmount", U), StringEntry(X, Y)]
150158 else throw("Strict value is not equal to itself.")
151159 }
152160
153161
154162
155-@Callable(H)
156-func initLend (l,B,G,ab) = valueOrElse(q(H.caller, l), valueOrElse(u(l), {
157- let Y = k(l)
158- let W = {
159- let C = invoke(f, "readByJSONKey", [Y.description, "tokenURI"], nil)
160- if ($isInstanceOf(C, "String"))
161- then C
162- else throw(($getType(C) + " couldn't be cast to String"))
163+@Callable(J)
164+func initLend (l,u,z,ad) = valueOrElse(D(J.caller, l), valueOrElse(H(l), {
165+ let aa = k(l)
166+ let Y = {
167+ let v = invoke(f, "readByJSONKey", [aa.description, "tokenURI"], nil)
168+ if ($isInstanceOf(v, "String"))
169+ then v
170+ else throw(($getType(v) + " couldn't be cast to String"))
163171 }
164- if ((W == W))
172+ if ((Y == Y))
165173 then {
166- let z = {
167- let C = invoke(f, "makeJSON", [["supportedInterface", "assetdId", "tokenURI", "owner", "timeUnitSeconds", "timeUnitPrice", "timeUnitCount", "startTimestamp", "endTimestamp", "deposit", "claimed"], ["0", l, W, toString(H.caller), toString(B), toString(G), toString(ab), toString(lastBlock.timestamp), toString((lastBlock.timestamp + (B * ab))), "0", "0"]], nil)
168- if ($isInstanceOf(C, "String"))
169- then C
170- else throw(($getType(C) + " couldn't be cast to String"))
174+ let s = {
175+ let v = invoke(f, "makeJSON", [["supportedInterface", "assetdId", "tokenURI", "owner", "timeUnitSeconds", "timeUnitPrice", "timeUnitCount", "startTimestamp", "endTimestamp", "deposit", "claimed"], ["0", l, Y, toString(J.caller), toString(u), toString(z), toString(ad), toString(lastBlock.timestamp), toString((lastBlock.timestamp + (u * ad))), "0", "0"]], nil)
176+ if ($isInstanceOf(v, "String"))
177+ then v
178+ else throw(($getType(v) + " couldn't be cast to String"))
171179 }
172- if ((z == z))
180+ if ((s == s))
173181 then {
174- let x = toString(i)
175-[IntegerEntry("lendCount", (i + 1)), IntegerEntry("lendCurrentCount", (j + 1)), IntegerEntry(("lend-rentCount-" + x), 0), StringEntry(("lend-" + x), z), BooleanEntry(l, true)]
182+ let q = toString(i)
183+[IntegerEntry("lendCount", (i + 1)), IntegerEntry("lendCurrentCount", (j + 1)), IntegerEntry(("lend-rentCount-" + q), 0), StringEntry(("lend-" + q), s), BooleanEntry(l, true)]
176184 }
177185 else throw("Strict value is not equal to itself.")
178186 }
181189
182190
183191
184-@Callable(H)
185-func initRent (w,ab) = valueOrElse(r(H.payments, E(w, ab)), {
186- let x = toString(w)
187- let z = getStringValue(("lend-" + x))
188- let ac = D(w)
189- let ad = toString(ac)
190- let B = {
191- let C = invoke(f, "readByJSONKey", [z, "timeUnitSeconds"], nil)
192- if ($isInstanceOf(C, "String"))
193- then C
194- else throw(($getType(C) + " couldn't be cast to String"))
192+@Callable(J)
193+func initRent (p,ad) = valueOrElse(E(J.payments, x(p, ad)), {
194+ let q = toString(p)
195+ let s = getStringValue(("lend-" + q))
196+ let ae = w(p)
197+ let af = toString(ae)
198+ let u = {
199+ let v = invoke(f, "readByJSONKey", [s, "timeUnitSeconds"], nil)
200+ if ($isInstanceOf(v, "String"))
201+ then v
202+ else throw(($getType(v) + " couldn't be cast to String"))
195203 }
196- if ((B == B))
204+ if ((u == u))
197205 then {
198- let ae = parseIntValue(B)
199- if ((ae == ae))
206+ let ag = parseIntValue(u)
207+ if ((ag == ag))
200208 then {
201- let af = {
202- let C = invoke(f, "makeJSON", [["customer", "timeUnitCount", "startTimestamp", "endTimestamp", "closed"], [toString(H.caller), toString(ab), toString(lastBlock.timestamp), toString((lastBlock.timestamp + (ae * ab))), "0"]], nil)
203- if ($isInstanceOf(C, "String"))
204- then C
205- else throw(($getType(C) + " couldn't be cast to String"))
209+ let ah = {
210+ let v = invoke(f, "makeJSON", [["customer", "timeUnitCount", "startTimestamp", "endTimestamp", "closed"], [toString(J.caller), toString(ad), toString(lastBlock.timestamp), toString((lastBlock.timestamp + (ag * ad))), "0"]], nil)
211+ if ($isInstanceOf(v, "String"))
212+ then v
213+ else throw(($getType(v) + " couldn't be cast to String"))
206214 }
207- if ((af == af))
208- then [IntegerEntry(("lend-rentCount-" + x), (ac + 1)), StringEntry(((("lend-rent-" + x) + "-") + ad), af)]
215+ if ((ah == ah))
216+ then [IntegerEntry(("lend-rentCount-" + q), (ae + 1)), StringEntry(((("lend-rent-" + q) + "-") + af), ah), IntegerEntry(("lend-cost-" + q), (x(p, ad) + A(p)))]
209217 else throw("Strict value is not equal to itself.")
210218 }
211219 else throw("Strict value is not equal to itself.")
214222 })
215223
216224
225+
226+@Callable(J)
227+func closeLend (p) = valueOrElse(I(J.caller, p), {
228+ let q = toString(p)
229+[DeleteEntry(("lend-" + q)), DeleteEntry(("lend-rentCount" + q)), IntegerEntry("lendCurrentCount", (j - 1)), ScriptTransfer(J.caller, A(p), g)]
230+ })
231+
232+
233+
234+@Callable(J)
235+func test (p) = [StringEntry("Debug", r(o(p), "owner"))]
236+
237+
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = getStringValue("collectionName")
55
66 let b = getStringValue("symbol")
77
88 let c = getStringValue("description")
99
1010 let d = getIntegerValue("totalAmount")
1111
1212 let e = getStringValue("baseURI")
1313
1414 let f = Address(fromBase58String("3MrGaZVRhknEGfHJ19ttUPNnDRoFqcHhVN7"))
1515
1616 let g = getBinaryValue("tokenPayment")
1717
1818 let h = valueOrErrorMessage(assetInfo(getBinaryValue("tokenPayment")), "token payment asset doesn't connect")
1919
2020 let i = getIntegerValue("lendCount")
2121
2222 let j = getIntegerValue("lendCurrentCount")
2323
2424 func k (l) = valueOrErrorMessage(assetInfo(fromBase58String(l)), "Can't find asset by asset id")
2525
2626
27-func m (n) = if ((n == this))
28- then unit
29- else throw("Only internal call")
27+func m (n,l) = if ((n == this))
28+ then StringEntry("smth", "smth")
29+ else ScriptTransfer(n, 1, l)
3030
3131
32-func o (p,l) = if ((p == this))
33- then StringEntry("smth", "smth")
34- else ScriptTransfer(p, 1, l)
35-
36-
37-func q (n,l) = if ((assetBalance(n, fromBase58String(l)) == 1))
38- then unit
39- else throw("Only asset owner")
40-
41-
42-func r (s,t) = if ((s[0].amount >= t))
43- then unit
44- else throw("amount less then need")
45-
46-
47-func u (l) = if (valueOrElse(getBoolean(l), false))
48- then throw("this token already use")
49- else unit
50-
51-
52-func v (w) = {
53- let x = toString(w)
54- getStringValue(("lend-" + x))
32+func o (p) = {
33+ let q = toString(p)
34+ getStringValue(("lend-" + q))
5535 }
5636
5737
58-func y (z,A) = {
59- let B = {
60- let C = invoke(f, "readByJSONKey", [z, A], nil)
61- if ($isInstanceOf(C, "String"))
62- then C
63- else throw(($getType(C) + " couldn't be cast to String"))
38+func r (s,t) = {
39+ let u = {
40+ let v = invoke(f, "readByJSONKey", [s, t], nil)
41+ if ($isInstanceOf(v, "String"))
42+ then v
43+ else throw(($getType(v) + " couldn't be cast to String"))
6444 }
65- if ((B == B))
66- then B
45+ if ((u == u))
46+ then u
6747 else throw("Strict value is not equal to itself.")
6848 }
6949
7050
71-func D (w) = {
72- let x = toString(w)
73- getIntegerValue(("lend-rentCount-" + x))
51+func w (p) = {
52+ let q = toString(p)
53+ getIntegerValue(("lend-rentCount-" + q))
7454 }
7555
7656
77-func E (w,B) = {
78- let z = v(w)
79- let F = y(z, "timeUnitPrice")
80- if ((F == F))
57+func x (p,u) = {
58+ let s = o(p)
59+ let y = r(s, "timeUnitPrice")
60+ if ((y == y))
8161 then {
82- let G = parseIntValue(F)
83- (B * G)
62+ let z = parseIntValue(y)
63+ (u * z)
8464 }
8565 else throw("Strict value is not equal to itself.")
8666 }
8767
8868
89-@Callable(H)
90-func setString (I,J) = valueOrElse(m(H.caller), [StringEntry(I, J)])
69+func A (p) = valueOrElse(parseInt(r(o(p), "owner")), 0)
70+
71+
72+func B (C) = if ((C == this))
73+ then unit
74+ else throw("Only internal call")
75+
76+
77+func D (C,l) = if ((assetBalance(C, fromBase58String(l)) == 1))
78+ then unit
79+ else throw("Only asset owner")
80+
81+
82+func E (F,G) = if ((F[0].amount >= G))
83+ then unit
84+ else throw("amount less then need")
85+
86+
87+func H (l) = if (valueOrElse(getBoolean(l), false))
88+ then throw("this token already use")
89+ else unit
90+
91+
92+func I (C,p) = if ((r(o(p), "owner") != toString(C)))
93+ then throw("you haven't perms")
94+ else unit
95+
96+
97+@Callable(J)
98+func setString (K,L) = valueOrElse(B(J.caller), [StringEntry(K, L)])
9199
92100
93101
94-@Callable(H)
95-func setInt (I,J) = valueOrElse(m(H.caller), [IntegerEntry(I, J)])
102+@Callable(J)
103+func setInt (K,L) = valueOrElse(B(J.caller), [IntegerEntry(K, L)])
96104
97105
98106
99-@Callable(H)
100-func deleteEntry (I) = valueOrElse(m(H.caller), [DeleteEntry(I)])
107+@Callable(J)
108+func deleteEntry (K) = valueOrElse(B(J.caller), [DeleteEntry(K)])
101109
102110
103111
104-@Callable(H)
105-func init (K,L,M,N) = valueOrElse(m(H.caller), [StringEntry("collectionName", K), StringEntry("symbol", L), StringEntry("description", M), IntegerEntry("totalAmount", 0), StringEntry("baseURI", N)])
112+@Callable(J)
113+func init (M,N,O,P) = valueOrElse(B(J.caller), [StringEntry("collectionName", M), StringEntry("symbol", N), StringEntry("description", O), IntegerEntry("totalAmount", 0), StringEntry("baseURI", P)])
106114
107115
108116
109-@Callable(H)
110-func setUser (l,O,P) = {
111- let Q = invoke(f, "makeJSON", [["user", "expires"], [O, P]], nil)
112- if ((Q == Q))
117+@Callable(J)
118+func setUser (l,Q,R) = {
119+ let S = invoke(f, "makeJSON", [["user", "expires"], [Q, R]], nil)
120+ if ((S == S))
113121 then $Tuple2([StringEntry(("userOf-" + l), {
114- let C = Q
115- if ($isInstanceOf(C, "String"))
116- then C
117- else throw(($getType(C) + " couldn't be cast to String"))
118- })], Q)
122+ let v = S
123+ if ($isInstanceOf(v, "String"))
124+ then v
125+ else throw(($getType(v) + " couldn't be cast to String"))
126+ })], S)
119127 else throw("Strict value is not equal to itself.")
120128 }
121129
122130
123131
124-@Callable(H)
125-func setTokenPayment (R) = valueOrElse(m(H.caller), [BinaryEntry("tokenPayment", R)])
132+@Callable(J)
133+func setTokenPayment (T) = valueOrElse(B(J.caller), [BinaryEntry("tokenPayment", T)])
126134
127135
128136
129-@Callable(H)
130-func mint (p) = {
131- let S = (d + 1)
132- let T = toString(S)
133- let U = ((b + "#") + T)
134- let V = if ((16 >= size(U)))
135- then U
136- else T
137- let W = (e + T)
138- let X = {
139- let C = invoke(f, "makeJSON", [["tokenURI"], [W]], nil)
140- if ($isInstanceOf(C, "String"))
141- then C
142- else throw(($getType(C) + " couldn't be cast to String"))
137+@Callable(J)
138+func mint (n) = {
139+ let U = (d + 1)
140+ let V = toString(U)
141+ let W = ((b + "#") + V)
142+ let X = if ((16 >= size(W)))
143+ then W
144+ else V
145+ let Y = (e + V)
146+ let Z = {
147+ let v = invoke(f, "makeJSON", [["tokenURI"], [Y]], nil)
148+ if ($isInstanceOf(v, "String"))
149+ then v
150+ else throw(($getType(v) + " couldn't be cast to String"))
143151 }
144- let Y = Issue(V, X, 1, 0, false, unit, height)
145- let l = calculateAssetId(Y)
146- let Z = Address(fromBase58String(p))
147- let aa = o(Z, l)
148- if ((aa == aa))
149- then [Y, aa, IntegerEntry("totalAmount", S), StringEntry(V, W)]
152+ let aa = Issue(X, Z, 1, 0, false, unit, height)
153+ let l = calculateAssetId(aa)
154+ let ab = Address(fromBase58String(n))
155+ let ac = m(ab, l)
156+ if ((ac == ac))
157+ then [aa, ac, IntegerEntry("totalAmount", U), StringEntry(X, Y)]
150158 else throw("Strict value is not equal to itself.")
151159 }
152160
153161
154162
155-@Callable(H)
156-func initLend (l,B,G,ab) = valueOrElse(q(H.caller, l), valueOrElse(u(l), {
157- let Y = k(l)
158- let W = {
159- let C = invoke(f, "readByJSONKey", [Y.description, "tokenURI"], nil)
160- if ($isInstanceOf(C, "String"))
161- then C
162- else throw(($getType(C) + " couldn't be cast to String"))
163+@Callable(J)
164+func initLend (l,u,z,ad) = valueOrElse(D(J.caller, l), valueOrElse(H(l), {
165+ let aa = k(l)
166+ let Y = {
167+ let v = invoke(f, "readByJSONKey", [aa.description, "tokenURI"], nil)
168+ if ($isInstanceOf(v, "String"))
169+ then v
170+ else throw(($getType(v) + " couldn't be cast to String"))
163171 }
164- if ((W == W))
172+ if ((Y == Y))
165173 then {
166- let z = {
167- let C = invoke(f, "makeJSON", [["supportedInterface", "assetdId", "tokenURI", "owner", "timeUnitSeconds", "timeUnitPrice", "timeUnitCount", "startTimestamp", "endTimestamp", "deposit", "claimed"], ["0", l, W, toString(H.caller), toString(B), toString(G), toString(ab), toString(lastBlock.timestamp), toString((lastBlock.timestamp + (B * ab))), "0", "0"]], nil)
168- if ($isInstanceOf(C, "String"))
169- then C
170- else throw(($getType(C) + " couldn't be cast to String"))
174+ let s = {
175+ let v = invoke(f, "makeJSON", [["supportedInterface", "assetdId", "tokenURI", "owner", "timeUnitSeconds", "timeUnitPrice", "timeUnitCount", "startTimestamp", "endTimestamp", "deposit", "claimed"], ["0", l, Y, toString(J.caller), toString(u), toString(z), toString(ad), toString(lastBlock.timestamp), toString((lastBlock.timestamp + (u * ad))), "0", "0"]], nil)
176+ if ($isInstanceOf(v, "String"))
177+ then v
178+ else throw(($getType(v) + " couldn't be cast to String"))
171179 }
172- if ((z == z))
180+ if ((s == s))
173181 then {
174- let x = toString(i)
175-[IntegerEntry("lendCount", (i + 1)), IntegerEntry("lendCurrentCount", (j + 1)), IntegerEntry(("lend-rentCount-" + x), 0), StringEntry(("lend-" + x), z), BooleanEntry(l, true)]
182+ let q = toString(i)
183+[IntegerEntry("lendCount", (i + 1)), IntegerEntry("lendCurrentCount", (j + 1)), IntegerEntry(("lend-rentCount-" + q), 0), StringEntry(("lend-" + q), s), BooleanEntry(l, true)]
176184 }
177185 else throw("Strict value is not equal to itself.")
178186 }
179187 else throw("Strict value is not equal to itself.")
180188 }))
181189
182190
183191
184-@Callable(H)
185-func initRent (w,ab) = valueOrElse(r(H.payments, E(w, ab)), {
186- let x = toString(w)
187- let z = getStringValue(("lend-" + x))
188- let ac = D(w)
189- let ad = toString(ac)
190- let B = {
191- let C = invoke(f, "readByJSONKey", [z, "timeUnitSeconds"], nil)
192- if ($isInstanceOf(C, "String"))
193- then C
194- else throw(($getType(C) + " couldn't be cast to String"))
192+@Callable(J)
193+func initRent (p,ad) = valueOrElse(E(J.payments, x(p, ad)), {
194+ let q = toString(p)
195+ let s = getStringValue(("lend-" + q))
196+ let ae = w(p)
197+ let af = toString(ae)
198+ let u = {
199+ let v = invoke(f, "readByJSONKey", [s, "timeUnitSeconds"], nil)
200+ if ($isInstanceOf(v, "String"))
201+ then v
202+ else throw(($getType(v) + " couldn't be cast to String"))
195203 }
196- if ((B == B))
204+ if ((u == u))
197205 then {
198- let ae = parseIntValue(B)
199- if ((ae == ae))
206+ let ag = parseIntValue(u)
207+ if ((ag == ag))
200208 then {
201- let af = {
202- let C = invoke(f, "makeJSON", [["customer", "timeUnitCount", "startTimestamp", "endTimestamp", "closed"], [toString(H.caller), toString(ab), toString(lastBlock.timestamp), toString((lastBlock.timestamp + (ae * ab))), "0"]], nil)
203- if ($isInstanceOf(C, "String"))
204- then C
205- else throw(($getType(C) + " couldn't be cast to String"))
209+ let ah = {
210+ let v = invoke(f, "makeJSON", [["customer", "timeUnitCount", "startTimestamp", "endTimestamp", "closed"], [toString(J.caller), toString(ad), toString(lastBlock.timestamp), toString((lastBlock.timestamp + (ag * ad))), "0"]], nil)
211+ if ($isInstanceOf(v, "String"))
212+ then v
213+ else throw(($getType(v) + " couldn't be cast to String"))
206214 }
207- if ((af == af))
208- then [IntegerEntry(("lend-rentCount-" + x), (ac + 1)), StringEntry(((("lend-rent-" + x) + "-") + ad), af)]
215+ if ((ah == ah))
216+ then [IntegerEntry(("lend-rentCount-" + q), (ae + 1)), StringEntry(((("lend-rent-" + q) + "-") + af), ah), IntegerEntry(("lend-cost-" + q), (x(p, ad) + A(p)))]
209217 else throw("Strict value is not equal to itself.")
210218 }
211219 else throw("Strict value is not equal to itself.")
212220 }
213221 else throw("Strict value is not equal to itself.")
214222 })
215223
216224
225+
226+@Callable(J)
227+func closeLend (p) = valueOrElse(I(J.caller, p), {
228+ let q = toString(p)
229+[DeleteEntry(("lend-" + q)), DeleteEntry(("lend-rentCount" + q)), IntegerEntry("lendCurrentCount", (j - 1)), ScriptTransfer(J.caller, A(p), g)]
230+ })
231+
232+
233+
234+@Callable(J)
235+func test (p) = [StringEntry("Debug", r(o(p), "owner"))]
236+
237+

github/deemru/w8io/169f3d6 
72.61 ms