I use Chopsticks with the subxt crate and get a error while it tries to decode a response from the chain_getBlock method. It fails on deserializing expecting a string where Chopsticks's response has a map. After looking into a difference between chain_getBlock responses from Chopsticks and a real RPC, I noticed that Chopsticks returns logs as an array of decoded maps where a real RPC returns it as an array of encoded strings.
Problem
I use Chopsticks with the
subxt
crate and get a error while it tries to decode a response from thechain_getBlock
method. It fails on deserializing expecting a string where Chopsticks's response has a map. After looking into a difference betweenchain_getBlock
responses from Chopsticks and a real RPC, I noticed that Chopsticks returnslogs
as an array of decoded maps where a real RPC returns it as an array of encoded strings.For example, the following command
returns
And if Chopsticks is started by this command
then a respective request
returns
Proposed solution
Make Chopsticks return encoded
logs
as a real RPC does.