| 279 | } |
| 280 | |
| 281 | bytes importCode(json_spirit::mObject& _o) |
| 282 | { |
| 283 | bytes code; |
| 284 | if (_o["code"].type() == json_spirit::str_type) |
| 285 | if (_o["code"].get_str().find("0x") != 0) |
| 286 | code = fromHex(compileLLL(_o["code"].get_str())); |
| 287 | else |
| 288 | code = fromHex(_o["code"].get_str().substr(2)); |
| 289 | else if (_o["code"].type() == UniValue_type) |
| 290 | { |
| 291 | code.clear(); |
| 292 | for (auto const& j: _o["code"].get_array()) |
| 293 | code.push_back(toByte(j)); |
| 294 | } |
| 295 | return code; |
| 296 | } |
| 297 | |
| 298 | LogEntries importLog(json_spirit::mArray& _a) |
| 299 | { |