| 174 | } |
| 175 | |
| 176 | json_spirit::mArray exportLog(eth::LogEntries _logs) |
| 177 | { |
| 178 | json_spirit::mArray ret; |
| 179 | if (_logs.size() == 0) return ret; |
| 180 | for (LogEntry const& l: _logs) |
| 181 | { |
| 182 | json_spirit::mObject o; |
| 183 | o["address"] = toString(l.address); |
| 184 | json_spirit::mArray topics; |
| 185 | for (auto const& t: l.topics) |
| 186 | topics.push_back(toString(t)); |
| 187 | o["topics"] = topics; |
| 188 | o["data"] = toHex(l.data, 2, HexPrefix::Add); |
| 189 | o["bloom"] = toString(l.bloom()); |
| 190 | ret.push_back(o); |
| 191 | } |
| 192 | return ret; |
| 193 | } |
| 194 | |
| 195 | u256 toInt(json_spirit::mValue const& _v) |
| 196 | { |