tx · 7SBUdGTcTy5aP7Zf2txRxBg8hxP5Hp3i9H72y2ntiHFF

3MxVYj6ScMArhAamy7nB6b342kh1Pso1LTn:  -0.00400000 Waves

2023.03.21 17:25 [2499889] smart account 3MxVYj6ScMArhAamy7nB6b342kh1Pso1LTn > SELF 0.00000000 Waves

{ "type": 13, "id": "7SBUdGTcTy5aP7Zf2txRxBg8hxP5Hp3i9H72y2ntiHFF", "fee": 400000, "feeAssetId": null, "timestamp": 1679408706175, "version": 2, "chainId": 84, "sender": "3MxVYj6ScMArhAamy7nB6b342kh1Pso1LTn", "senderPublicKey": "CZeucjRLCKrkiP9zuj9KbLe23Wv9DywFzHBqNDnte51B", "proofs": [ "2bviMnQTJW53soSGUHXfrqxmMZgUZ6QAH7QRopmBhNguACEXTbfGoNn5TpkMy5BkckqiYcRKd9yfRV6JZKLeiuK6" ], "script": "base64:BgIjCAISBAoCCAgSBAoCCAESBgoECAgICBIDCgEIEgYKBAgBAQEMAA5jb2xsZWN0aW9uTmFtZQkBEUBleHRyTmF0aXZlKDEwNTgpAQIOY29sbGVjdGlvbk5hbWUABnN5bWJvbAkBEUBleHRyTmF0aXZlKDEwNTgpAQIGc3ltYm9sAAtkZXNjcmlwdGlvbgkBEUBleHRyTmF0aXZlKDEwNTgpAQILZGVzY3JpcHRpb24AC3RvdGFsQW1vdW50CQERQGV4dHJOYXRpdmUoMTA1NSkBAgt0b3RhbEFtb3VudAAHYmFzZVVSSQkBEUBleHRyTmF0aXZlKDEwNTgpAQIHYmFzZVVSSQAIZEFwcEpzb24JAQdBZGRyZXNzAQkA2QQBAiMzTXJHYVpWUmhrbkVHZkhKMTl0dFVQTm5EUm9GcWNIaFZONwAJbGVuZENvdW50CQERQGV4dHJOYXRpdmUoMTA1NSkBAglsZW5kQ291bnQBDG9ubHlJbnRlcm5hbAEGY2FsbGVyAwkAAAIFBmNhbGxlcgUEdGhpcwUEdW5pdAkAAgECEk9ubHkgaW50ZXJuYWwgY2FsbAENdHJhbnNmZXJ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FACQACAQkArAICCQADAQUBQAIbIGNvdWxkbid0IGJlIGNhc3QgdG8gU3RyaW5nAwkAAAIFCGxlbmRKc29uBQhsZW5kSnNvbgQGbGVuZElkCQCkAwEFCWxlbmRDb3VudAkAzAgCCQEMSW50ZWdlckVudHJ5AgIJbGVuZENvdW50CQBkAgUJbGVuZENvdW50AAEJAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgIPbGVuZC1yZW50Q291bnQtBQZsZW5kSWQAAAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgICBWxlbmQtBQZsZW5kSWQFCGxlbmRKc29uBQNuaWwJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AbhN5yA==", "height": 2499889, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 26WaF8hpDe22Bmq9WaiBZcHf1AGwCy85d9MrKxSRe4sC Next: Dabb2uMH21wocLT6hQAngkFCmJCDPpAMs12BAuKToafF Diff:
OldNewDifferences
1313
1414 let f = Address(fromBase58String("3MrGaZVRhknEGfHJ19ttUPNnDRoFqcHhVN7"))
1515
16-func g (h) = if ((h == this))
16+let g = getIntegerValue("lendCount")
17+
18+func h (i) = if ((i == this))
1719 then unit
1820 else throw("Only internal call")
1921
2022
21-func i (j,k) = if ((j == this))
23+func j (k,l) = if ((k == this))
2224 then StringEntry("smth", "smth")
23- else ScriptTransfer(j, 1, k)
25+ else ScriptTransfer(k, 1, l)
2426
2527
26-@Callable(l)
27-func setString (m,n) = [StringEntry(m, n)]
28+func m (l) = valueOrErrorMessage(assetInfo(fromBase58String(l)), "Can't find asset by asset id")
29+
30+
31+func n (i,l) = if ((assetBalance(i, fromBase58String(l)) == 1))
32+ then unit
33+ else throw("Only asset owner")
34+
35+
36+func o (p) = {
37+ let q = toString(p)
38+ getIntegerValue((("lend-" + q) + "-rents"))
39+ }
40+
41+
42+@Callable(r)
43+func setString (s,t) = [StringEntry(s, t)]
2844
2945
3046
31-@Callable(l)
32-func setInt (m,n) = [IntegerEntry(m, n)]
47+@Callable(r)
48+func setInt (s,t) = [IntegerEntry(s, t)]
3349
3450
3551
36-@Callable(l)
37-func init (o,p,q,r) = valueOrElse(g(l.caller), [StringEntry("collectionName", o), StringEntry("symbol", p), StringEntry("description", q), IntegerEntry("totalAmount", 0), StringEntry("baseURI", r)])
52+@Callable(r)
53+func init (u,v,w,x) = valueOrElse(h(r.caller), [StringEntry("collectionName", u), StringEntry("symbol", v), StringEntry("description", w), IntegerEntry("totalAmount", 0), StringEntry("baseURI", x)])
3854
3955
4056
41-@Callable(l)
42-func mint (j) = {
43- let s = (d + 1)
44- let t = toString(s)
45- let u = ((b + "#") + t)
46- let v = if ((16 >= size(u)))
47- then u
48- else t
49- let w = (e + t)
50- let x = {
51- let y = invoke(f, "makeJSON", [["tokenURI"], [w]], nil)
52- if ($isInstanceOf(y, "String"))
53- then y
54- else throw(($getType(y) + " couldn't be cast to String"))
57+@Callable(r)
58+func mint (k) = {
59+ let y = (d + 1)
60+ let z = toString(y)
61+ let A = ((b + "#") + z)
62+ let B = if ((16 >= size(A)))
63+ then A
64+ else z
65+ let C = (e + z)
66+ let D = {
67+ let E = invoke(f, "makeJSON", [["tokenURI"], [C]], nil)
68+ if ($isInstanceOf(E, "String"))
69+ then E
70+ else throw(($getType(E) + " couldn't be cast to String"))
5571 }
56- let z = Issue(v, x, 1, 0, false, unit, height)
57- let k = calculateAssetId(z)
58- let A = Address(fromBase58String(j))
59- let B = i(A, k)
60- if ((B == B))
61- then [z, B, IntegerEntry("totalAmount", s), StringEntry(v, w)]
72+ let F = Issue(B, D, 1, 0, false, unit, height)
73+ let l = calculateAssetId(F)
74+ let G = Address(fromBase58String(k))
75+ let H = j(G, l)
76+ if ((H == H))
77+ then [F, H, IntegerEntry("totalAmount", y), StringEntry(B, C)]
6278 else throw("Strict value is not equal to itself.")
6379 }
80+
81+
82+
83+@Callable(r)
84+func initLend (l,I,J,K) = valueOrElse(n(r.caller, l), {
85+ let F = m(l)
86+ let C = {
87+ let E = invoke(f, "readByJSONKey", [F.description, "tokenURI"], nil)
88+ if ($isInstanceOf(E, "String"))
89+ then E
90+ else throw(($getType(E) + " couldn't be cast to String"))
91+ }
92+ if ((C == C))
93+ then {
94+ let L = {
95+ let E = invoke(f, "makeJSON", [["supportedInterface", "assetdId", "tokenURI", "owner", "timeUnitSeconds", "timeUnitPrice", "timeUnitCount", "startTimestamp", "endTimestamp", "deposit", "claimed"], ["0", l, C, toString(r.caller), toString(I), toString(J), toString(K), toString(lastBlock.timestamp), toString((lastBlock.timestamp + (I * K))), "0", "0"]], nil)
96+ if ($isInstanceOf(E, "String"))
97+ then E
98+ else throw(($getType(E) + " couldn't be cast to String"))
99+ }
100+ if ((L == L))
101+ then {
102+ let p = toString(g)
103+[IntegerEntry("lendCount", (g + 1)), IntegerEntry(("lend-rentCount-" + p), 0), StringEntry(("lend-" + p), L)]
104+ }
105+ else throw("Strict value is not equal to itself.")
106+ }
107+ else throw("Strict value is not equal to itself.")
108+ })
64109
65110
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
16-func g (h) = if ((h == this))
16+let g = getIntegerValue("lendCount")
17+
18+func h (i) = if ((i == this))
1719 then unit
1820 else throw("Only internal call")
1921
2022
21-func i (j,k) = if ((j == this))
23+func j (k,l) = if ((k == this))
2224 then StringEntry("smth", "smth")
23- else ScriptTransfer(j, 1, k)
25+ else ScriptTransfer(k, 1, l)
2426
2527
26-@Callable(l)
27-func setString (m,n) = [StringEntry(m, n)]
28+func m (l) = valueOrErrorMessage(assetInfo(fromBase58String(l)), "Can't find asset by asset id")
29+
30+
31+func n (i,l) = if ((assetBalance(i, fromBase58String(l)) == 1))
32+ then unit
33+ else throw("Only asset owner")
34+
35+
36+func o (p) = {
37+ let q = toString(p)
38+ getIntegerValue((("lend-" + q) + "-rents"))
39+ }
40+
41+
42+@Callable(r)
43+func setString (s,t) = [StringEntry(s, t)]
2844
2945
3046
31-@Callable(l)
32-func setInt (m,n) = [IntegerEntry(m, n)]
47+@Callable(r)
48+func setInt (s,t) = [IntegerEntry(s, t)]
3349
3450
3551
36-@Callable(l)
37-func init (o,p,q,r) = valueOrElse(g(l.caller), [StringEntry("collectionName", o), StringEntry("symbol", p), StringEntry("description", q), IntegerEntry("totalAmount", 0), StringEntry("baseURI", r)])
52+@Callable(r)
53+func init (u,v,w,x) = valueOrElse(h(r.caller), [StringEntry("collectionName", u), StringEntry("symbol", v), StringEntry("description", w), IntegerEntry("totalAmount", 0), StringEntry("baseURI", x)])
3854
3955
4056
41-@Callable(l)
42-func mint (j) = {
43- let s = (d + 1)
44- let t = toString(s)
45- let u = ((b + "#") + t)
46- let v = if ((16 >= size(u)))
47- then u
48- else t
49- let w = (e + t)
50- let x = {
51- let y = invoke(f, "makeJSON", [["tokenURI"], [w]], nil)
52- if ($isInstanceOf(y, "String"))
53- then y
54- else throw(($getType(y) + " couldn't be cast to String"))
57+@Callable(r)
58+func mint (k) = {
59+ let y = (d + 1)
60+ let z = toString(y)
61+ let A = ((b + "#") + z)
62+ let B = if ((16 >= size(A)))
63+ then A
64+ else z
65+ let C = (e + z)
66+ let D = {
67+ let E = invoke(f, "makeJSON", [["tokenURI"], [C]], nil)
68+ if ($isInstanceOf(E, "String"))
69+ then E
70+ else throw(($getType(E) + " couldn't be cast to String"))
5571 }
56- let z = Issue(v, x, 1, 0, false, unit, height)
57- let k = calculateAssetId(z)
58- let A = Address(fromBase58String(j))
59- let B = i(A, k)
60- if ((B == B))
61- then [z, B, IntegerEntry("totalAmount", s), StringEntry(v, w)]
72+ let F = Issue(B, D, 1, 0, false, unit, height)
73+ let l = calculateAssetId(F)
74+ let G = Address(fromBase58String(k))
75+ let H = j(G, l)
76+ if ((H == H))
77+ then [F, H, IntegerEntry("totalAmount", y), StringEntry(B, C)]
6278 else throw("Strict value is not equal to itself.")
6379 }
80+
81+
82+
83+@Callable(r)
84+func initLend (l,I,J,K) = valueOrElse(n(r.caller, l), {
85+ let F = m(l)
86+ let C = {
87+ let E = invoke(f, "readByJSONKey", [F.description, "tokenURI"], nil)
88+ if ($isInstanceOf(E, "String"))
89+ then E
90+ else throw(($getType(E) + " couldn't be cast to String"))
91+ }
92+ if ((C == C))
93+ then {
94+ let L = {
95+ let E = invoke(f, "makeJSON", [["supportedInterface", "assetdId", "tokenURI", "owner", "timeUnitSeconds", "timeUnitPrice", "timeUnitCount", "startTimestamp", "endTimestamp", "deposit", "claimed"], ["0", l, C, toString(r.caller), toString(I), toString(J), toString(K), toString(lastBlock.timestamp), toString((lastBlock.timestamp + (I * K))), "0", "0"]], nil)
96+ if ($isInstanceOf(E, "String"))
97+ then E
98+ else throw(($getType(E) + " couldn't be cast to String"))
99+ }
100+ if ((L == L))
101+ then {
102+ let p = toString(g)
103+[IntegerEntry("lendCount", (g + 1)), IntegerEntry(("lend-rentCount-" + p), 0), StringEntry(("lend-" + p), L)]
104+ }
105+ else throw("Strict value is not equal to itself.")
106+ }
107+ else throw("Strict value is not equal to itself.")
108+ })
64109
65110

github/deemru/w8io/169f3d6 
38.74 ms