tx · AenfRYX7bf7LxMKrWuj3kyEXfW2EfiuMZKBWyuFVSnBG 3MxVYj6ScMArhAamy7nB6b342kh1Pso1LTn: -0.00400000 Waves 2023.03.21 17:43 [2499909] smart account 3MxVYj6ScMArhAamy7nB6b342kh1Pso1LTn > SELF 0.00000000 Waves
{ "type": 13, "id": "AenfRYX7bf7LxMKrWuj3kyEXfW2EfiuMZKBWyuFVSnBG", "fee": 400000, "feeAssetId": null, "timestamp": 1679409875017, "version": 2, "chainId": 84, "sender": "3MxVYj6ScMArhAamy7nB6b342kh1Pso1LTn", "senderPublicKey": "CZeucjRLCKrkiP9zuj9KbLe23Wv9DywFzHBqNDnte51B", "proofs": [ "2PezxBfwrbddnf2f5BbvSiRpbSm7bnLAdrQ837zR7Znqq2SMWaRdNadXyZ336JY2zU5yaoe71e6EfYGTWasrYKr3" ], "script": "base64:BgIpCAISBAoCCAgSBAoCCAESBgoECAgICBIDCgEIEgYKBAgBAQESBAoCAQEMAA5jb2xsZWN0aW9uTmFtZQkBEUBleHRyTmF0aXZlKDEwNTgpAQIOY29sbGVjdGlvbk5hbWUABnN5bWJvbAkBEUBleHRyTmF0aXZlKDEwNTgpAQIGc3ltYm9sAAtkZXNjcmlwdGlvbgkBEUBleHRyTmF0aXZlKDEwNTgpAQILZGVzY3JpcHRpb24AC3RvdGFsQW1vdW50CQERQGV4dHJOYXRpdmUoMTA1NSkBAgt0b3RhbEFtb3VudAAHYmFzZVVSSQkBEUBleHRyTmF0aXZlKDEwNTgpAQIHYmFzZVVSSQAIZEFwcEpzb24JAQdBZGRyZXNzAQkA2QQBAiMzTXJHYVpWUmhrbkVHZkhKMTl0dFVQTm5EUm9GcWNIaFZONwAJbGVuZENvdW50CQERQGV4dHJOYXRpdmUoMTA1NSkBAglsZW5kQ291bnQBDG9ubHlJbnRlcm5hbAEGY2FsbGVyAwkAAAIFBmNhbGxlcgUEdGhpcwUEdW5pdAkAAgECEk9ubHkgaW50ZXJuYWwgY2FsbAENdHJhbnNmZ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FACQACAQkArAICCQADAQUBQAIbIGNvdWxkbid0IGJlIGNhc3QgdG8gU3RyaW5nAwkAAAIFCGxlbmRKc29uBQhsZW5kSnNvbgQMbGVuZElkU3RyaW5nCQCkAwEFCWxlbmRDb3VudAkAzAgCCQEMSW50ZWdlckVudHJ5AgIJbGVuZENvdW50CQBkAgUJbGVuZENvdW50AAEJAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgIPbGVuZC1yZW50Q291bnQtBQxsZW5kSWRTdHJpbmcAAAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgICBWxlbmQtBQxsZW5kSWRTdHJpbmcFCGxlbmRKc29uBQNuaWwJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BaQEIaW5pdFJlbnQCBmxlbmRJZA10aW1lVW5pdENvdW50BAxsZW5kSWRTdHJpbmcJAKQDAQUGbGVuZElkBAhsZW5kSnNvbgkBEUBleHRyTmF0aXZlKDEwNTgpAQkArAICAgVsZW5kLQUMbGVuZElkU3RyaW5nBAZyZW50SWQJAQxnZXRSZW50Q291bnQBBQZsZW5kSWQEDHJlbnRJZFN0cmluZwkApAMBBQZyZW50SWQFA25pbADe5gsV", "height": 2499909, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8UiMVePqJm4ALSkmLfHV82qvU5gydmC6XoUjwnPHaKxd Next: CVBdkDABpciGSfextYZNwqaxkVEfLxi3rYB8TSw97goP Diff:
Old | New | Differences | |
---|---|---|---|
115 | 115 | let L = getStringValue(("lend-" + q)) | |
116 | 116 | let M = o(p) | |
117 | 117 | let N = toString(M) | |
118 | - | let I = parseIntValue({ | |
119 | - | let E = invoke(f, "readByJSONKey", [L, "timeUnitSeconds"], nil) | |
120 | - | if ($isInstanceOf(E, "String")) | |
121 | - | then E | |
122 | - | else throw(($getType(E) + " couldn't be cast to String")) | |
123 | - | }) | |
124 | - | if ((I == I)) | |
125 | - | then nil | |
126 | - | else throw("Strict value is not equal to itself.") | |
118 | + | nil | |
127 | 119 | } | |
128 | 120 | ||
129 | 121 |
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 = getIntegerValue("lendCount") | |
17 | 17 | ||
18 | 18 | func h (i) = if ((i == this)) | |
19 | 19 | then unit | |
20 | 20 | else throw("Only internal call") | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func j (k,l) = if ((k == this)) | |
24 | 24 | then StringEntry("smth", "smth") | |
25 | 25 | else ScriptTransfer(k, 1, l) | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func m (l) = valueOrErrorMessage(assetInfo(fromBase58String(l)), "Can't find asset by asset id") | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | func n (i,l) = if ((assetBalance(i, fromBase58String(l)) == 1)) | |
32 | 32 | then unit | |
33 | 33 | else throw("Only asset owner") | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func o (p) = { | |
37 | 37 | let q = toString(p) | |
38 | 38 | getIntegerValue(("lend-rentCount-" + q)) | |
39 | 39 | } | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | @Callable(r) | |
43 | 43 | func setString (s,t) = [StringEntry(s, t)] | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | ||
47 | 47 | @Callable(r) | |
48 | 48 | func setInt (s,t) = [IntegerEntry(s, t)] | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | ||
52 | 52 | @Callable(r) | |
53 | 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)]) | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | ||
57 | 57 | @Callable(r) | |
58 | 58 | func mint (k) = { | |
59 | 59 | let y = (d + 1) | |
60 | 60 | let z = toString(y) | |
61 | 61 | let A = ((b + "#") + z) | |
62 | 62 | let B = if ((16 >= size(A))) | |
63 | 63 | then A | |
64 | 64 | else z | |
65 | 65 | let C = (e + z) | |
66 | 66 | let D = { | |
67 | 67 | let E = invoke(f, "makeJSON", [["tokenURI"], [C]], nil) | |
68 | 68 | if ($isInstanceOf(E, "String")) | |
69 | 69 | then E | |
70 | 70 | else throw(($getType(E) + " couldn't be cast to String")) | |
71 | 71 | } | |
72 | 72 | let F = Issue(B, D, 1, 0, false, unit, height) | |
73 | 73 | let l = calculateAssetId(F) | |
74 | 74 | let G = Address(fromBase58String(k)) | |
75 | 75 | let H = j(G, l) | |
76 | 76 | if ((H == H)) | |
77 | 77 | then [F, H, IntegerEntry("totalAmount", y), StringEntry(B, C)] | |
78 | 78 | else throw("Strict value is not equal to itself.") | |
79 | 79 | } | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | ||
83 | 83 | @Callable(r) | |
84 | 84 | func initLend (l,I,J,K) = valueOrElse(n(r.caller, l), { | |
85 | 85 | let F = m(l) | |
86 | 86 | let C = { | |
87 | 87 | let E = invoke(f, "readByJSONKey", [F.description, "tokenURI"], nil) | |
88 | 88 | if ($isInstanceOf(E, "String")) | |
89 | 89 | then E | |
90 | 90 | else throw(($getType(E) + " couldn't be cast to String")) | |
91 | 91 | } | |
92 | 92 | if ((C == C)) | |
93 | 93 | then { | |
94 | 94 | let L = { | |
95 | 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 | 96 | if ($isInstanceOf(E, "String")) | |
97 | 97 | then E | |
98 | 98 | else throw(($getType(E) + " couldn't be cast to String")) | |
99 | 99 | } | |
100 | 100 | if ((L == L)) | |
101 | 101 | then { | |
102 | 102 | let q = toString(g) | |
103 | 103 | [IntegerEntry("lendCount", (g + 1)), IntegerEntry(("lend-rentCount-" + q), 0), StringEntry(("lend-" + q), L)] | |
104 | 104 | } | |
105 | 105 | else throw("Strict value is not equal to itself.") | |
106 | 106 | } | |
107 | 107 | else throw("Strict value is not equal to itself.") | |
108 | 108 | }) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | ||
112 | 112 | @Callable(r) | |
113 | 113 | func initRent (p,K) = { | |
114 | 114 | let q = toString(p) | |
115 | 115 | let L = getStringValue(("lend-" + q)) | |
116 | 116 | let M = o(p) | |
117 | 117 | let N = toString(M) | |
118 | - | let I = parseIntValue({ | |
119 | - | let E = invoke(f, "readByJSONKey", [L, "timeUnitSeconds"], nil) | |
120 | - | if ($isInstanceOf(E, "String")) | |
121 | - | then E | |
122 | - | else throw(($getType(E) + " couldn't be cast to String")) | |
123 | - | }) | |
124 | - | if ((I == I)) | |
125 | - | then nil | |
126 | - | else throw("Strict value is not equal to itself.") | |
118 | + | nil | |
127 | 119 | } | |
128 | 120 | ||
129 | 121 |
github/deemru/w8io/169f3d6 33.56 ms ◑