Skip to main content

Questions tagged [rpc]

Questions relating to custom RPC implementations or using existing RPCs to make calls to a Substrate node.

Filter by
Sorted by
Tagged with
5 votes
1 answer
1k 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 ...
Alex Bean's user avatar
  • 5,757
5 votes
1 answer
1k 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 ...
weichweich's user avatar
3 votes
2 answers
321 views

Getting extrinsic data with the transaction hash

I've successfully submitted the extrinsic RPC call and got a JSON response { "jsonrpc": "2.0", "result": "...
Amir Boziev's user avatar
0 votes
1 answer
40 views

Run Substrate-node-template with wss and secure rpc

I was running substrate node template with non secure ws connection . After integrating with pallet-evm,pallet-ethereum and other precompiles , I wanted to connect to metamask with secure rpc ...
Md Raisul Islam Rony's user avatar
0 votes
4 answers
481 views

Can I get this timestamp through RPC getblock?

Can I get this timestamp through RPC getblock?
Andy's user avatar
  • 73
10 votes
2 answers
445 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 ...
Amir Boziev's user avatar
9 votes
2 answers
316 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%...
Ramsey - Decentration's user avatar
8 votes
1 answer
237 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 ...
Amir Boziev's user avatar
7 votes
1 answer
192 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 ...
Pablo Buitrago's user avatar
4 votes
1 answer
395 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&...
Valentun's user avatar
  • 220
4 votes
2 answers
271 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 ...
Ramsey - Decentration's user avatar
4 votes
1 answer
321 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: ...
Amiya Behera's user avatar
3 votes
1 answer
217 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, ...
Burak's user avatar
  • 903
2 votes
2 answers
137 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 ...
Peso's user avatar
  • 21
1 vote
2 answers
514 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 ...
Burak's user avatar
  • 903
1 vote
0 answers
65 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 ...
cibou's user avatar
  • 131
0 votes
1 answer
101 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 ...
Shoeb Siddiqui's user avatar
0 votes
1 answer
109 views

Is there a way to collect fee of transaction?

I'm looking to collect Extrinsic transfers as images on https://polkadot.subscan.io/ Maybe use api sidecar or rpc to collect this data? Please help me!!! Thank you so much!!!
hoangnt2's user avatar