tx · FjE5JJbWxMTsPpPz76mLSwg6ZpbRrPLEsu3XBXiGvTnq 3MuKEDU6qPggcs65swNH6JcUbS7hB6jVzrA: -0.01000000 Waves 2023.09.18 21:43 [2761212] smart account 3MuKEDU6qPggcs65swNH6JcUbS7hB6jVzrA > SELF 0.00000000 Waves
{ "type": 13, "id": "FjE5JJbWxMTsPpPz76mLSwg6ZpbRrPLEsu3XBXiGvTnq", "fee": 1000000, "feeAssetId": null, "timestamp": 1695062652392, "version": 2, "chainId": 84, "sender": "3MuKEDU6qPggcs65swNH6JcUbS7hB6jVzrA", "senderPublicKey": "GkZtgtQPEtE9JoxK1tzKc1t7uw12vz6aqKhDcBi136yV", "proofs": [ "58SnxVtjHfxvV7wfdLa9REG15htkU9p2wY1CsjbU5cD3HkU34b8GP2iN3Hz1YuAdefZDSiS6YwbXnV827drsgdGz" ], "script": "base64:BgIVCAISABIDCgEBEgQKAgICEgQKAgEEEQADU0VQAgJfXwAPcmVwdXRhdGlvbkFzc2V0ASBp6x+DcpBVAG0dTZ5QIAuA7CaS8wuiEOK6KQOBSERbTgAMcHJvcG9zYWxUaW1lCQBoAgkAaAIJAGgCCQBoAgDoBwA8ADwAGAADARFjb3VudFByb3Bvc2Fsc0tleQACAmNwAQtwcm9wb3NhbEtleQEKcHJvcG9zYWxJZAkAuQkCCQDMCAICAXAJAMwIAgkApAMBBQpwcm9wb3NhbElkBQNuaWwFA1NFUAESdW5sb2NrVGltZXN0YW1wS2V5AQR1c2VyCQC5CQIJAMwIAgICdXQJAMwIAgkA2AQBCAUEdXNlcgVieXRlcwUDbmlsBQNTRVABEHVzZXJEZXBvc2l0ZWRLZXkBBHVzZXIJALkJAgkAzAgCAgJ1ZAkAzAgCCQDYBAEIBQR1c2VyBWJ5dGVzBQNuaWwFA1NFUAETdXNlclByb3Bvc2FsVm90ZUtleQIKcHJvcG9zYWxJZAR1c2VyCQC5CQIJAMwIAgICdXAJAMwIAgkApAMBBQpwcm9wb3NhbElkCQDMCAIJANg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UHJvcG9zYWxzS2V5AAkAZAIFBWNvdW50AAEFA25pbAFpAQR2b3RlAgJpZAR2b3RlAwkBASEBCQEPaXNQcm9wb3NhbEFsaXZlAQUCaWQJAAIBAhBwcm9wb3NhbE5vdEFsaXZlBAhwcm9wb3NhbAkBC2dldFByb3Bvc2FsAQUCaWQECnVubG9ja1RpbWUJAJYDAQkAzAgCCQBkAggFCHByb3Bvc2FsAl80BQxwcm9wb3NhbFRpbWUJAMwIAgkBEmdldFVubG9ja1RpbWVzdGFtcAEIBQFpBmNhbGxlcgUDbmlsBAtwcmV2aXVzVm90ZQkBC2dldFVzZXJWb3RlAgUCaWQIBQFpBmNhbGxlcgQJdm90ZVBvd2VyCQEcdXNlckRlcG9zaXRlZFJlcHV0YXRpb25Bc3NldAEIBQFpBmNhbGxlcgkAzAgCCQELc2V0UHJvcG9zYWwHBQJpZAgFCHByb3Bvc2FsAl8xCAUIcHJvcG9zYWwCXzIIBQhwcm9wb3NhbAJfMwgFCHByb3Bvc2FsAl80CQBlAggFCHByb3Bvc2FsAl81AwkAZgIFC3ByZXZpdXNWb3RlAAAFC3ByZXZpdXNWb3RlCQBkAgAAAwUEdm90ZQUJdm90ZVBvd2VyAAAJAGUCCAUIcHJvcG9zYWwCXzYDCQBmAgAABQtwcmV2aXVzVm90ZQULcHJldml1c1ZvdGUJAGQCAAADBQR2b3RlAAAFCXZvdGVQb3dlcgUDbmlsAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleQDvb2c=", "height": 2761212, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 59gAqqiQUDxnxCFaQLR6hVhyrHyZDRQXqPqFVZq4QmC7 Next: 6RZpiTJPRtkgsntoX7mnj6h8jSZ92mrgRgEWx6AqnC6v Diff:
Old | New | Differences | |
---|---|---|---|
49 | 49 | } | |
50 | 50 | else throw("proposal not found") | |
51 | 51 | }, a) | |
52 | - | $Tuple6( | |
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 |
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'88Tkdpqchhiqc9tNNG3SWQ2gfhZB4rBJKhMNS5Xmxhqw' | |
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) = StringEntry(j(f, h), toString(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 | - | $Tuple6( | |
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 = toBase58String(o.caller.bytes) | |
109 | 109 | let I = E(o.caller) | |
110 | 110 | let J = (I + o.payments[0].amount) | |
111 | 111 | [IntegerEntry(H, J)] | |
112 | 112 | } | |
113 | 113 | else throw("onlyReputationAsset") | |
114 | 114 | } | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | ||
118 | 118 | @Callable(o) | |
119 | 119 | func withdraw (K) = { | |
120 | 120 | let H = toBase58String(o.caller.bytes) | |
121 | 121 | let I = { | |
122 | 122 | let n = getInteger(this, H) | |
123 | 123 | if ($isInstanceOf(n, "Int")) | |
124 | 124 | then { | |
125 | 125 | let C = n | |
126 | 126 | C | |
127 | 127 | } | |
128 | 128 | else 0 | |
129 | 129 | } | |
130 | 130 | let J = (I - K) | |
131 | 131 | if ((0 > K)) | |
132 | 132 | then throw("Can't withdraw negative amount") | |
133 | 133 | else if ((B(o.caller) > lastBlock.timestamp)) | |
134 | 134 | then throw("Locked") | |
135 | 135 | else if ((0 > J)) | |
136 | 136 | then throw("Not enough balance") | |
137 | 137 | else [IntegerEntry(H, J), ScriptTransfer(o.caller, K, b)] | |
138 | 138 | } | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | ||
142 | 142 | @Callable(o) | |
143 | 143 | func createProposal (s,t) = { | |
144 | 144 | let L = D() | |
145 | 145 | [p(L, o.caller, toBase16String(s), toBase16String(t), lastBlock.timestamp, 0, 0), IntegerEntry(d(), (L + 1))] | |
146 | 146 | } | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | ||
150 | 150 | @Callable(o) | |
151 | 151 | func vote (q,M) = if (!(F(q))) | |
152 | 152 | then throw("proposalNotAlive") | |
153 | 153 | else { | |
154 | 154 | let N = x(q) | |
155 | 155 | let O = max([(N._4 + c), B(o.caller)]) | |
156 | 156 | let P = m(q, o.caller) | |
157 | 157 | let l = E(o.caller) | |
158 | 158 | [p(q, N._1, N._2, N._3, N._4, (N._5 - (if ((P > 0)) | |
159 | 159 | then P | |
160 | 160 | else (0 + (if (M) | |
161 | 161 | then l | |
162 | 162 | else 0)))), (N._6 - (if ((0 > P)) | |
163 | 163 | then P | |
164 | 164 | else (0 + (if (M) | |
165 | 165 | then 0 | |
166 | 166 | else l)))))] | |
167 | 167 | } | |
168 | 168 | ||
169 | 169 | ||
170 | 170 | @Verifier(Q) | |
171 | 171 | func R () = sigVerify(Q.bodyBytes, Q.proofs[0], Q.senderPublicKey) | |
172 | 172 |
github/deemru/w8io/026f985 47.24 ms ◑