tx · 92rS1K9D8PFPHGBwYBtD5rQc5bWvTCckzSREn3grWZUu 3MuKEDU6qPggcs65swNH6JcUbS7hB6jVzrA: -0.01000000 Waves 2023.09.19 17:28 [2762384] smart account 3MuKEDU6qPggcs65swNH6JcUbS7hB6jVzrA > SELF 0.00000000 Waves
{ "type": 13, "id": "92rS1K9D8PFPHGBwYBtD5rQc5bWvTCckzSREn3grWZUu", "fee": 1000000, "feeAssetId": null, "timestamp": 1695133743051, "version": 2, "chainId": 84, "sender": "3MuKEDU6qPggcs65swNH6JcUbS7hB6jVzrA", "senderPublicKey": "GkZtgtQPEtE9JoxK1tzKc1t7uw12vz6aqKhDcBi136yV", "proofs": [ "3fmCkWSuSYb6vr252kcqfhTNh5BY4fbymN4Ykx1fkCBK5oiHj7pyGD4CKCNp44EXziukcuh6qBz3NVsS68mwwqrX" ], "script": "base64:BgIVCAISABIDCgEBEgQKAgICEgQKAgEEEQADU0VQAgJfXwAPcmVwdXRhdGlvbkFzc2V0ASBxggycON8pyCFInplKujKGtzqQhMOf+vAbfdt6zmK1aAAMcHJvcG9zYWxUaW1lCQBoAgkAaAIJAGgCCQBoAgDoBwA8ADwAGAADARFjb3VudFByb3Bvc2Fsc0tleQACAmNwAQtwcm9wb3NhbEtleQEKcHJvcG9zYWxJZAkAuQkCCQDMCAICAXAJAMwIAgkApAMBBQpwcm9wb3NhbElkBQNuaWwFA1NFUAESdW5sb2NrVGltZXN0YW1wS2V5AQR1c2VyCQC5CQIJAMwIAgICdXQJAMwIAgkA2AQBCAUEdXNlcgVieXRlcwUDbmlsBQNTRVABEHVzZXJEZXBvc2l0ZWRLZXkBBHVzZXIJALkJAgkAzAgCAgJ1ZAkAzAgCCQDYBAEIBQR1c2VyBWJ5dGVzBQNuaWwFA1NFUAETdXNlclByb3Bvc2FsVm90ZUtleQIKcHJvcG9zYWxJZAR1c2VyCQC5CQIJAMwIAgICdXAJAMwIAgkApAMBBQpwcm9wb3NhbElkCQDMCAIJANgEAQgFBHVzZX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m9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tledwpBLE=", "height": 2762384, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: ErFjhyvLFTXt87jxA11UEXFmp3H866ksP12rZSc9Dmzc Next: 4pjT18sgChf2DJkc191M5De7FN2JCyC39avJ3EJUUyPg Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | 6 | let b = base58'8e65zYSAcGfmQnVX462UEMWf6PmHgtckyGcrEMXKZZaF' | |
7 | 7 | ||
8 | 8 | let c = ((((1000 * 60) * 60) * 24) * 3) | |
9 | 9 | ||
10 | 10 | func d () = "cp" | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | func e (f) = makeString(["p", toString(f)], a) | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func g (h) = makeString(["ut", toBase58String(h.bytes)], a) | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func i (h) = makeString(["ud", toBase58String(h.bytes)], a) | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func j (f,h) = makeString(["up", toString(f), toBase58String(h.bytes)], a) | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func k (f,h,l) = IntegerEntry(j(f, h), l) | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func m (f,h) = { | |
29 | 29 | let n = getInteger(j(f, h)) | |
30 | 30 | if ($isInstanceOf(n, "Int")) | |
31 | 31 | then { | |
32 | 32 | let o = n | |
33 | 33 | o | |
34 | 34 | } | |
35 | 35 | else 0 | |
36 | 36 | } | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func p (q,r,s,t,u,v,w) = StringEntry(e(q), makeString_11C([toBase16String(r.bytes), s, t, toString(u), toString(v), toString(w)], a)) | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func x (q) = { | |
43 | 43 | let y = split({ | |
44 | 44 | let n = getString(this, e(q)) | |
45 | 45 | if ($isInstanceOf(n, "String")) | |
46 | 46 | then { | |
47 | 47 | let z = n | |
48 | 48 | z | |
49 | 49 | } | |
50 | 50 | else throw("proposal not found") | |
51 | 51 | }, a) | |
52 | 52 | $Tuple6(Address(fromBase16String(y[0])), y[1], y[2], parseIntValue(y[3]), parseIntValue(y[4]), parseIntValue(y[5])) | |
53 | 53 | } | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | func A (o) = if ((size(o.payments) == 1)) | |
57 | 57 | then if ((o.payments[0].assetId == b)) | |
58 | 58 | then true | |
59 | 59 | else throw("only reputation assets") | |
60 | 60 | else throw("only 1 payment") | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func B (h) = { | |
64 | 64 | let n = getInteger(this, g(h)) | |
65 | 65 | if ($isInstanceOf(n, "Int")) | |
66 | 66 | then { | |
67 | 67 | let C = n | |
68 | 68 | C | |
69 | 69 | } | |
70 | 70 | else 0 | |
71 | 71 | } | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func D () = { | |
75 | 75 | let n = getInteger(this, d()) | |
76 | 76 | if ($isInstanceOf(n, "Int")) | |
77 | 77 | then { | |
78 | 78 | let C = n | |
79 | 79 | C | |
80 | 80 | } | |
81 | 81 | else 0 | |
82 | 82 | } | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func E (h) = { | |
86 | 86 | let n = getInteger(this, i(h)) | |
87 | 87 | if ($isInstanceOf(n, "Int")) | |
88 | 88 | then { | |
89 | 89 | let C = n | |
90 | 90 | C | |
91 | 91 | } | |
92 | 92 | else 0 | |
93 | 93 | } | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func F (q) = if (if ((D() > q)) | |
97 | 97 | then ((x(q)._4 + c) > lastBlock.timestamp) | |
98 | 98 | else false) | |
99 | 99 | then true | |
100 | 100 | else throw("proposal not alive") | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | @Callable(o) | |
104 | 104 | func deposit () = { | |
105 | 105 | let G = [A(o)] | |
106 | 106 | if ((G == G)) | |
107 | 107 | then { | |
108 | 108 | let H = E(o.caller) | |
109 | 109 | let I = (H + o.payments[0].amount) | |
110 | 110 | [IntegerEntry(i(o.caller), I)] | |
111 | 111 | } | |
112 | 112 | else throw("onlyReputationAsset") | |
113 | 113 | } | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | ||
117 | 117 | @Callable(o) | |
118 | 118 | func withdraw (J) = { | |
119 | 119 | let K = toBase58String(o.caller.bytes) | |
120 | 120 | let H = { | |
121 | 121 | let n = getInteger(this, K) | |
122 | 122 | if ($isInstanceOf(n, "Int")) | |
123 | 123 | then { | |
124 | 124 | let C = n | |
125 | 125 | C | |
126 | 126 | } | |
127 | 127 | else 0 | |
128 | 128 | } | |
129 | 129 | let I = (H - J) | |
130 | 130 | if ((0 > J)) | |
131 | 131 | then throw("Can't withdraw negative amount") | |
132 | 132 | else if ((B(o.caller) > lastBlock.timestamp)) | |
133 | 133 | then throw("Locked") | |
134 | 134 | else if ((0 > I)) | |
135 | 135 | then throw("Not enough balance") | |
136 | 136 | else [IntegerEntry(K, I), ScriptTransfer(o.caller, J, b)] | |
137 | 137 | } | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | ||
141 | 141 | @Callable(o) | |
142 | 142 | func createProposal (s,t) = { | |
143 | 143 | let L = D() | |
144 | 144 | [p(L, o.caller, toBase16String(s), toBase16String(t), lastBlock.timestamp, 0, 0), IntegerEntry(d(), (L + 1))] | |
145 | 145 | } | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | ||
149 | 149 | @Callable(o) | |
150 | 150 | func vote (f,M) = if (!(F(f))) | |
151 | 151 | then throw("proposalNotAlive") | |
152 | 152 | else { | |
153 | 153 | let N = x(f) | |
154 | 154 | let O = max([(N._4 + c), B(o.caller)]) | |
155 | 155 | let P = m(f, o.caller) | |
156 | 156 | let l = E(o.caller) | |
157 | 157 | let Q = if ((P > 0)) | |
158 | 158 | then P | |
159 | 159 | else 0 | |
160 | 160 | let R = if ((0 > P)) | |
161 | 161 | then -(P) | |
162 | 162 | else 0 | |
163 | 163 | let S = if ((M == true)) | |
164 | 164 | then l | |
165 | 165 | else 0 | |
166 | 166 | let T = if ((M == false)) | |
167 | 167 | then l | |
168 | 168 | else 0 | |
169 | 169 | [p(f, N._1, N._2, N._3, N._4, ((N._5 - Q) + S), ((N._6 - R) + T)), k(f, o.caller, if (M) | |
170 | 170 | then l | |
171 | 171 | else -(l))] | |
172 | 172 | } | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | @Verifier(U) | |
176 | 176 | func V () = sigVerify(U.bodyBytes, U.proofs[0], U.senderPublicKey) | |
177 | 177 |
github/deemru/w8io/169f3d6 55.60 ms ◑