Open mfornet opened 2 years ago
Yeah, that's one of the pain points of the type-system we've highlighted so far. I guess, semantically speaking, it sorta makes sense: as there are multiple types of query requests, so too there should be multiple types of query responses. However, we expect to smoothen out cases like that in the higher-level near-api-rs down the line.
Looking at [this example](https://github.com/near/near-jsonrpc-client-rs/blob/master/examples/contract_view_method.rs) I wonder if we can have an updated interface, where if a
CallFunction
was used as a request, then the response is aCallResult
and it is not required to match againstQueryResponseKind
.