1

Hello I would like to be able to call

fn system_name(&self) -> RpcResult<String> {
    Ok(self.info.impl_name.clone())
}

inside a custom rpc call our custom rpc call is implemented like that:

io.extend_with(ApiServer::to_delegate(Api::new(
    client.clone(),
    pool.clone(),
    graph,
    Some(aureum_node_runtime::TransactionConverter),
    network.clone(),
    signers,
    overrides.clone(),
    backend.clone(),
    is_authority,
    block_data_cache.clone(),
)));
5
  • What have you tried? What errors are you running into? Please review: substrate.stackexchange.com/help/how-to-ask
    – Shawn Tabrizi
    Jul 13, 2022 at 8:00
  • Hello @ShawnTabrizi, I searched how to add info property in the implement function io.extend_with(ApiServer::to_delegate(Api::new( client.clone(), pool.clone(), graph, Some(aureum_node_runtime::TransactionConverter), network.clone(), signers, overrides.clone(), backend.clone(), is_authority, block_data_cache.clone(), ))); I cant find a way how to access info in my Api methods. thank you.
    – cibou
    Jul 15, 2022 at 5:54
  • @ShawnTabrizi an idea? thank you
    – cibou
    Jul 18, 2022 at 7:49
  • No not really. It is not clear to me what you want to do. I cannot even read the code you have copied into your comment. You need to please review how to ask a proper question here on the forum.
    – Shawn Tabrizi
    Jul 18, 2022 at 8:50
  • @ShawnTabrizi I just want to use this method Ok(self.info.impl_name.clone()) in my custom rpc code
    – cibou
    Jul 18, 2022 at 11:53

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.