tx · GBeJ1L9rCZjwps4Wj8VmifAWSKqHiTeKXW7cDryaC14D 3N3sjhLSBU5duySKvnNuKe5S2YNebk2Pxye: -0.01300000 Waves 2023.05.10 13:07 [2571648] smart account 3N3sjhLSBU5duySKvnNuKe5S2YNebk2Pxye > SELF 0.00000000 Waves
{ "type": 13, "id": "GBeJ1L9rCZjwps4Wj8VmifAWSKqHiTeKXW7cDryaC14D", "fee": 1300000, "feeAssetId": null, "timestamp": 1683713318316, "version": 2, "chainId": 84, "sender": "3N3sjhLSBU5duySKvnNuKe5S2YNebk2Pxye", "senderPublicKey": "Cm17BFEPG286HnXKy3BbrJ8QYz8AbCqoWfUi8rKwHo12", "proofs": [ "2Q1JU4Q2eynXXDRRYCPZvq1tsXP7bRqigFapn4Q6CbebGEyf32thueZb3T5r3gEPYR7Q8CgGp3y7hiE5fWEo43gn" ], "script": "base64:BgIECAISAA0BE2tleUludmVzdFd4WHRuRGVsYXkAAhMlX19pbnZlc3RXeFh0bkRlbGF5ARdrZXlJbnZlc3RXeFh0bkFtb3VudFh0bgACFyVfX2ludmVzdFd4WHRuQW1vdW50WHRuAQxrZXlXeFh0blBvb2wAAgwlX193eFh0blBvb2wBDWtleVh0bkFzc2V0SWQAAg0lX194dG5Bc3NldElkAQprZXlXeFh0bkxwAAIKJV9fd3hYdG5McAEOa2V5THBUb0FkZHJlc3MAAg4lX19scFRvQWRkcmVzcwETa2V5TWFuYWdlclB1YmxpY0tleQACFCVzX19tYW5hZ2VyUHVibGljS2V5ARZrZXlNYW5hZ2VyVmF1bHRBZGRyZXNzAAIXJXNfX21hbmFnZXJWYXVsdEFkZHJlc3MBGGtleUludmVzdFd4WHRuTGFzdEhlaWdodAACGCVfX2ludmVzdFd4WHRuTGFzdEhlaWdodAEcZ2V0TWFuYWdlclZhdWx0QWRkcmVzc09yVGhpcwAEByRtYXRjaDAJAKIIAQkBFmtleU1hbmFnZXJWYXVsdEFkZHJlc3MAAwkAAQIFByRtYXRjaDACBlN0cmluZwQ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U3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJ0eAEGdmVyaWZ5AAQPdGFyZ2V0UHVibGljS2V5BAckbWF0Y2gwCQEWbWFuYWdlclB1YmxpY0tleU9yVW5pdAADCQABAgUHJG1hdGNoMAIKQnl0ZVZlY3RvcgQCcGsFByRtYXRjaDAFAnBrAwkAAQIFByRtYXRjaDACBFVuaXQIBQJ0eA9zZW5kZXJQdWJsaWNLZXkJAAIBAgtNYXRjaCBlcnJvcgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUPdGFyZ2V0UHVibGljS2V5fPlqYg==", "height": 2571648, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BYkD7ugUjVNmjnuadJaYqbnrfExy6gwx8FpUW9xNPwUp Next: none Diff:
Old | New | Differences | |
---|---|---|---|
28 | 28 | func i () = "%__investWxXtnLastHeight" | |
29 | 29 | ||
30 | 30 | ||
31 | - | func j () = addressFromStringValue(getStringValue(h())) | |
31 | + | func j () = { | |
32 | + | let k = getString(h()) | |
33 | + | if ($isInstanceOf(k, "String")) | |
34 | + | then { | |
35 | + | let l = k | |
36 | + | addressFromStringValue(l) | |
37 | + | } | |
38 | + | else this | |
39 | + | } | |
32 | 40 | ||
33 | 41 | ||
34 | - | func | |
35 | - | let | |
36 | - | let | |
37 | - | if ($isInstanceOf( | |
42 | + | func m () = { | |
43 | + | let n = j() | |
44 | + | let k = getString(n, g()) | |
45 | + | if ($isInstanceOf(k, "String")) | |
38 | 46 | then { | |
39 | - | let | |
40 | - | fromBase58String( | |
47 | + | let l = k | |
48 | + | fromBase58String(l) | |
41 | 49 | } | |
42 | - | else if ($isInstanceOf( | |
50 | + | else if ($isInstanceOf(k, "Unit")) | |
43 | 51 | then unit | |
44 | 52 | else throw("Match error") | |
45 | 53 | } | |
50 | 58 | ||
51 | 59 | func q (r) = { | |
52 | 60 | let s = o("permission denied") | |
53 | - | let | |
54 | - | if ($isInstanceOf( | |
61 | + | let k = m() | |
62 | + | if ($isInstanceOf(k, "ByteVector")) | |
55 | 63 | then { | |
56 | - | let t = | |
64 | + | let t = k | |
57 | 65 | if ((r.callerPublicKey == t)) | |
58 | 66 | then true | |
59 | 67 | else s | |
60 | 68 | } | |
61 | - | else if ($isInstanceOf( | |
69 | + | else if ($isInstanceOf(k, "Unit")) | |
62 | 70 | then if ((r.caller == this)) | |
63 | 71 | then true | |
64 | 72 | else s | |
111 | 119 | @Verifier(E) | |
112 | 120 | func F () = { | |
113 | 121 | let G = { | |
114 | - | let | |
115 | - | if ($isInstanceOf( | |
122 | + | let k = m() | |
123 | + | if ($isInstanceOf(k, "ByteVector")) | |
116 | 124 | then { | |
117 | - | let t = | |
125 | + | let t = k | |
118 | 126 | t | |
119 | 127 | } | |
120 | - | else if ($isInstanceOf( | |
128 | + | else if ($isInstanceOf(k, "Unit")) | |
121 | 129 | then E.senderPublicKey | |
122 | 130 | else throw("Match error") | |
123 | 131 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a () = "%__investWxXtnDelay" | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | func b () = "%__investWxXtnAmountXtn" | |
8 | 8 | ||
9 | 9 | ||
10 | 10 | func c () = "%__wxXtnPool" | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | func d () = "%__xtnAssetId" | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func e () = "%__wxXtnLp" | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func f () = "%__lpToAddress" | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func g () = "%s__managerPublicKey" | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func h () = "%s__managerVaultAddress" | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func i () = "%__investWxXtnLastHeight" | |
29 | 29 | ||
30 | 30 | ||
31 | - | func j () = addressFromStringValue(getStringValue(h())) | |
31 | + | func j () = { | |
32 | + | let k = getString(h()) | |
33 | + | if ($isInstanceOf(k, "String")) | |
34 | + | then { | |
35 | + | let l = k | |
36 | + | addressFromStringValue(l) | |
37 | + | } | |
38 | + | else this | |
39 | + | } | |
32 | 40 | ||
33 | 41 | ||
34 | - | func | |
35 | - | let | |
36 | - | let | |
37 | - | if ($isInstanceOf( | |
42 | + | func m () = { | |
43 | + | let n = j() | |
44 | + | let k = getString(n, g()) | |
45 | + | if ($isInstanceOf(k, "String")) | |
38 | 46 | then { | |
39 | - | let | |
40 | - | fromBase58String( | |
47 | + | let l = k | |
48 | + | fromBase58String(l) | |
41 | 49 | } | |
42 | - | else if ($isInstanceOf( | |
50 | + | else if ($isInstanceOf(k, "Unit")) | |
43 | 51 | then unit | |
44 | 52 | else throw("Match error") | |
45 | 53 | } | |
46 | 54 | ||
47 | 55 | ||
48 | 56 | func o (p) = throw(makeString(["investor.ride:", p], " ")) | |
49 | 57 | ||
50 | 58 | ||
51 | 59 | func q (r) = { | |
52 | 60 | let s = o("permission denied") | |
53 | - | let | |
54 | - | if ($isInstanceOf( | |
61 | + | let k = m() | |
62 | + | if ($isInstanceOf(k, "ByteVector")) | |
55 | 63 | then { | |
56 | - | let t = | |
64 | + | let t = k | |
57 | 65 | if ((r.callerPublicKey == t)) | |
58 | 66 | then true | |
59 | 67 | else s | |
60 | 68 | } | |
61 | - | else if ($isInstanceOf( | |
69 | + | else if ($isInstanceOf(k, "Unit")) | |
62 | 70 | then if ((r.caller == this)) | |
63 | 71 | then true | |
64 | 72 | else s | |
65 | 73 | else throw("Match error") | |
66 | 74 | } | |
67 | 75 | ||
68 | 76 | ||
69 | 77 | @Callable(r) | |
70 | 78 | func investWxXtn () = { | |
71 | 79 | let u = q(r) | |
72 | 80 | if ((u == u)) | |
73 | 81 | then { | |
74 | 82 | let v = valueOrElse(getInteger(i()), 0) | |
75 | 83 | let w = getIntegerValue(a()) | |
76 | 84 | let x = [if ((height > (v + w))) | |
77 | 85 | then true | |
78 | 86 | else o("wait to invest")] | |
79 | 87 | if ((x == x)) | |
80 | 88 | then { | |
81 | 89 | let y = fromBase58String(getStringValue(e())) | |
82 | 90 | let z = assetBalance(this, y) | |
83 | 91 | if ((z == z)) | |
84 | 92 | then { | |
85 | 93 | let A = invoke(addressFromStringValue(getStringValue(c())), "putOneTkn", [0, false], [AttachedPayment(fromBase58String(getStringValue(d())), getIntegerValue(b()))]) | |
86 | 94 | if ((A == A)) | |
87 | 95 | then { | |
88 | 96 | let B = assetBalance(this, y) | |
89 | 97 | if ((B == B)) | |
90 | 98 | then { | |
91 | 99 | let C = (B - z) | |
92 | 100 | let D = if ((C == 0)) | |
93 | 101 | then o("lp to get is zero") | |
94 | 102 | else unit | |
95 | 103 | if ((D == D)) | |
96 | 104 | then [IntegerEntry(i(), height), ScriptTransfer(addressFromStringValue(getStringValue(f())), C, y)] | |
97 | 105 | else throw("Strict value is not equal to itself.") | |
98 | 106 | } | |
99 | 107 | else throw("Strict value is not equal to itself.") | |
100 | 108 | } | |
101 | 109 | else throw("Strict value is not equal to itself.") | |
102 | 110 | } | |
103 | 111 | else throw("Strict value is not equal to itself.") | |
104 | 112 | } | |
105 | 113 | else throw("Strict value is not equal to itself.") | |
106 | 114 | } | |
107 | 115 | else throw("Strict value is not equal to itself.") | |
108 | 116 | } | |
109 | 117 | ||
110 | 118 | ||
111 | 119 | @Verifier(E) | |
112 | 120 | func F () = { | |
113 | 121 | let G = { | |
114 | - | let | |
115 | - | if ($isInstanceOf( | |
122 | + | let k = m() | |
123 | + | if ($isInstanceOf(k, "ByteVector")) | |
116 | 124 | then { | |
117 | - | let t = | |
125 | + | let t = k | |
118 | 126 | t | |
119 | 127 | } | |
120 | - | else if ($isInstanceOf( | |
128 | + | else if ($isInstanceOf(k, "Unit")) | |
121 | 129 | then E.senderPublicKey | |
122 | 130 | else throw("Match error") | |
123 | 131 | } | |
124 | 132 | sigVerify(E.bodyBytes, E.proofs[0], G) | |
125 | 133 | } | |
126 | 134 |
github/deemru/w8io/169f3d6 31.69 ms ◑