38 std::shared_ptr<broker::interface> broker,
39 std::shared_ptr<logging::log> log,
48 auto init() ->
bool override;
56 std::unique_ptr<server_type> m_srv;
58 enum error_code :
int {
59 wallet_not_supported = -32001,
60 mining_not_supported = -32002,
61 time_travel_not_supported = -32003,
62 compiler_not_supported = -32004,
63 coinbase_not_supported = -32005,
64 uncles_not_supported = -32006,
65 unknown_method = -32099,
66 internal_error = -32603,
68 invalid_address = -32015,
69 invalid_topic = -32016,
70 from_block_after_to = -32022,
71 invalid_block_parameter = -32017,
72 block_range_too_large = -32024,
73 invalid_transaction_index = -32018,
74 invalid_block_identifier = -32019,
75 execution_error = -32088,
78 auto request_handler(
const std::string& method,
79 const Json::Value& params,
83 auto handle_send_raw_transaction(
87 auto handle_get_transaction_count(
92 handle_chain_id(
const Json::Value& params,
96 auto handle_call(Json::Value params,
100 auto handle_send_transaction(
105 handle_estimate_gas(
const Json::Value& params,
109 static auto handle_client_version(
110 const Json::Value& params,
113 handle_gas_price(
const Json::Value& params,
117 auto handle_get_code(Json::Value params,
121 handle_get_balance(Json::Value params,
125 handle_accounts(
const Json::Value& params,
129 auto handle_get_transaction_by_hash(
133 auto handle_get_transaction_receipt(
138 handle_not_supported(Json::Value params,
143 handle_block_number(
const Json::Value& params,
147 handle_get_block(Json::Value params,
150 auto handle_get_block_txcount(
154 handle_get_block_tx(Json::Value params,
158 handle_fee_history(Json::Value params,
161 auto handle_get_logs(Json::Value params,
164 auto handle_get_storage_at(
168 auto handle_sha3(Json::Value params,
173 handle_error(
const Json::Value& params,
176 const std::string& message) -> bool;
179 handle_number(
const Json::Value& params,
181 uint64_t number) -> bool;
184 handle_boolean(
const Json::Value& params,
186 bool result) -> bool;
188 auto handle_decode_raw_transaction(
193 parse_evm_log_query(
const Json::Value& params,
195 -> std::optional<parsec::agent::runner::evm_log_query>;
197 auto fetch_block(Json::Value params,
207 bool is_readonly_run,
209 res_success_cb) -> bool;
212 handle_unsupported(
const std::string& method,
213 const Json::Value& params,
218 handle_supported(
const std::string& method,
219 const Json::Value& params,
221 -> std::optional<bool>;
223 auto handle_static(
const std::string& method,
224 const Json::Value& params,
226 -> std::optional<bool>;
228 static auto extract_evm_log_query_addresses(
233 static auto extract_evm_log_query_topics(
238 auto extract_evm_log_query_block(
243 static void handle_get_logs_result(