Questions tagged [rpc]
Questions relating to custom RPC implementations or using existing RPCs to make calls to a Substrate node.
15
questions
5
votes
1
answer
734
views
How to add custom RPCs?
I have the template pallet in the Substrate node template.
This pallet template has a function do_something that store a value in the storage.
I would like to create an RPC call that queries that ...
5
votes
1
answer
937
views
Custom RPCs not decorated
I added some custom RPC endpoints to a substrate blockchain, but when I connect to the node with a simple script it prints:
API/INIT: RPC methods not decorated: ...
The RPCs work, but don't show up ...
0
votes
4
answers
284
views
Can I get this timestamp through RPC getblock?
Can I get this timestamp through RPC getblock?
10
votes
2
answers
368
views
Generating an extrinsic call for a custom pallet
I'm trying to generate an extrinsic offline based on this example. It worked, but the signed transaction is different.
Call Data
As you can see in the output the Call Hash is the same.
Signed ...
9
votes
2
answers
237
views
How can we get a snapshot of all balances at a certain block?
Which api/rpc call and method do I need to use to extract the state of all balances at a certain block?
Let's use Polkadot and recent block as an example:
https://polkadot.js.org/apps/?rpc=wss%3A%2F%...
8
votes
1
answer
191
views
Generating a Storage Key when making an RPC request
I'm trying to make an RPC call to a Substrate node, but I can't generate a proper Storage Key. The Module and Method parts are fine, the problem is the Twox64Concat part. The sp_core::twox_64 of value ...
7
votes
1
answer
166
views
Is it possible to query an OCW's Off-chain storage via RPC from an external service?
I'm off-chain indexing some pallet events into my off-chain local storage using an OCW. Now, I want to be able to retrieve this data via RPC from an external service.
Is this possible? Does it require ...
4
votes
1
answer
353
views
Rpc payment_queryFeeInfo fails on Westend 9310
After the latest upgrade of Westend runtime to version 9310 the RPC call payment_queryFeeInfo fails with the following error message:
{"jsonrpc":"2.0","error":{"code&...
4
votes
2
answers
219
views
How to decorate RPC correctly?
The rpc methods (showing in rpc_methods), are still not showing in their own area, after (attempting to) decorate the rpc.
I have custom rpc on a substrate template.
Here are the rpc_methods:
I have ...
4
votes
1
answer
283
views
Implementation of runtime api RPC
I am trying to implement custom rpc using the tutorial :
https://substrate.recipes/custom-rpc.html, I successfully implemented silly rpc but getting error for runtime api rpc.
Here are my code:
...
3
votes
1
answer
195
views
Can't request to my Custom RPC with an Enum
I'm trying to create a custom RPC for my pallet. I've followed Substrate Recipes (I know it's outdated but helped a lot) and pallet_transaction for Runtime API and RPC.
My first RPC, profile_getSum, ...
2
votes
2
answers
122
views
Help needed with payloads and extrinsics
I know that the payload and extrinsics are dynamic, and even different between parachains/base chains(kusama,polkadot,rococo,westend). But I am struggling to find good documentation on how these ...
1
vote
2
answers
376
views
How to send transactions using RPC?
I'm developing a client library for Dart. I wonder how can I send transactions using RPC.
If I wanted to send a balance transfer only using RPC how could I do it? What are the steps?
I know that I ...
1
vote
0
answers
59
views
Get System info in custom RPC call
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 ...
0
votes
1
answer
89
views
Beefy justification subscription is not working
I would like to subscribe to the beefy justification stream on Rococo. The rpc for getFinalizedHead works fine, but I also require the justifications themselves.
When I try to subscribe to the ...