I've been trying to add some rpc calls available for my node, but an error related to the 'getrandom' module appears (even tho I'm not even using it).
I have a very simple pallet that creates and transfers items, and it is working just fine. The problem comes when I try to add the custom rpc calls to the node.
error: the wasm32-unknown-unknown target is not supported by default, you may need to
enable the "js" feature. For more information see:
https://docs.rs/getrandom/#webassembly-support
I tried adding the dependency as stated in the documentation regarding this issue, but nothing seems to fix the issue, it just generates more errors.
This is the documentation I've been using to implement the custom rpc calls for my pallet. I'll leave here my SO question, which is a little bit longer but its the same issue: https://stackoverflow.com/questions/71734501/error-adding-custom-rpcs-for-custom-pallet-substrate
https://core.tetcoin.org/recipes/custom-rpc.html#rpc-to-call-a-runtime-api
https://core.tetcoin.org/recipes/runtime-api.html
Is there any recent documentation about adding custom RPCs for a pallet? Everything I've found is pretty outdated I think.
UPDATE: I've uploaded the current status of the code, I think it will be easier to try.
https://github.com/andresvsm/substrate-pallet-rpc/tree/items-branch