11 const jsonrpc::Request::Parameters ¶ms) {
12 if (params.size() > 1 or params.empty()) {
13 throw jsonrpc::InvalidParametersFault(
"Incorrect number of params");
15 auto &keys = params[0];
16 if (!keys.IsArray()) {
17 throw jsonrpc::InvalidParametersFault(
18 "Parameter 'params' must be a string array of the storage keys");
21 auto &key_str_array = keys.AsArray();
25 for (
auto &key_str : key_str_array) {
26 if (!key_str.IsString())
27 throw jsonrpc::InvalidParametersFault(
28 "Parameter 'params' must be a string array of the storage keys");
33 return outcome::success();
std::vector< common::Buffer > key_buffers_
std::shared_ptr< StateApi > api_
outcome::result< void > init(const jsonrpc::Request::Parameters ¶ms)
outcome::result< std::vector< uint8_t > > unhexWith0x(std::string_view hex_with_prefix)
Unhex hex-string with 0x in the begining.
outcome::result< uint32_t > execute()