Questions tagged [custom-rpc]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
27 views

How to create custom URL for my RPC node?

When I run node then I can access chain from polkadotjs/apps using 127.0.0.1:8845 (ws://127.0.0.1:8845 ) endpoints. But I want something like wss://paseo.api.integritee.network to be my endpoints. Can ...
Ganesh11's user avatar
  • 1,229
1 vote
1 answer
32 views

How can I change --rpc-max-connections on already running substrate-based node?

I have already running substrate-based node and I started to get error: 429 Too many requests: Too many connections. This happens due to HTTP requests that my FE produces. After research I ...
Artem Levchuk's user avatar
0 votes
0 answers
39 views

Implementing FullDeps in Substrate rpc.rs using channels instead of Arcs

This is a standard implementation of FullDeps in the rpc.rs: // Full client dependencies. pub struct FullDeps<C, P, SC, B> { /// The client instance to use. pub client: Arc<C>, ...
Discardo's user avatar
  • 436
0 votes
2 answers
49 views

A blockchain to read events from another blockchain

I'm working on an idea where I would want my substrate-based blockchain (let's name it Blockchain A) to read events from another substrate-based blockchain (let's call it Blockchain B) and perform ...
Discardo's user avatar
  • 436
3 votes
1 answer
83 views

Custom RPC vs. runtime API

As a Substrate builder, I don't see any reason of still implementing custom RPCs as runtime API seems superior to me. So I was wondering about any arguments for still adding custom RPCs to the client. ...
0x5hmoo's user avatar
  • 189
0 votes
1 answer
24 views

Error on custom rpc in new version

Updating to new version of substrate, of the branch = "polkadot-v0.9.42", it giving error, impl<C, Block, AccountId> ProfileValidationApi<<Block as BlockT>::Hash, AccountId>...
Amiya Behera's user avatar
3 votes
1 answer
20 views

Property X does not exist on type DecoratedRpc

We are currently experiencing an issue related to RPC methods. Let me provide a description of the problem: To generate metadata from our node, we use the following command: echo '{"id":1,&...
Michal Danco's user avatar
6 votes
1 answer
94 views

How to make an RPC call from a working custom RPC, decorate types and display info successfully?

We are building a custom UI for chains containing a specific custom pallet and rpc module. The custom UI is similar to a polkadot-js clone we built, but much simpler. In our simple custom UI, we are ...
Ramsey - Decentration's user avatar
1 vote
1 answer
32 views

How to send data to custom network?

is there any simple example to send data to network? like name, email, phone, address (which is made keyring), and address, etc
Pix Youtube's user avatar
3 votes
2 answers
220 views

polkadot js RPC can't get u128

i have an rpc call that returns an array of structs with multiple fields, one of which is balance of an asset for a user, balance type is u128. when the number is large i get this error createType(...
cocokick's user avatar
  • 165
0 votes
2 answers
125 views

Custom RPC sized array parameters

I have custom RPC, which looks like so #[rpc(client, server)] pub trait SomeRpcApi { #[method(name = "some_submitData")] async fn submit_data( &self, id: u64, ...
Ivan Temchenko's user avatar
2 votes
2 answers
47 views

Does RuntimeApis storage accesses counts towards PoV when called from RPC and not any extrinisc?

We have some custom RPCs that call some custom RuntimeApis that from inside our pallets expose some on chain data. I know that any access (read or write) of on-chain storage from extrinsics will ...
Aramik M's user avatar
  • 139
0 votes
1 answer
72 views

Generate the type-definition for the polkadot.js apps

Currently, I am trying to add the custom RPC into the polkadot.js apps to let me send the RPC call via polkadot.js apps. I discovered that I have to generate my type-definition with the RPC/types, a ...
Jay Pan's user avatar
  • 75
4 votes
2 answers
251 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
5 votes
2 answers
154 views

Show custom RPCs/RuntimeAPIs in PolkadotJS UI

At the moment I try to figure out why PolkadotJS UI (https://polkadot.js.org/) is not able to show my custom RPC endpoints or runtime APIs. They are available in general and also available in the list ...
Janislav's user avatar
  • 319
5 votes
1 answer
878 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,694
4 votes
1 answer
77 views

Panic when Using Rayon with runtime_api in a custom RPC

Works: Use normal iteration in a custom RPC with a runtime_api() call. Goal: Use rayon parallel iteration instead. Result: Panic Working code Simplified Real Code in GitHub let api = self.client....
Wil W's user avatar
  • 433
1 vote
0 answers
67 views

Use state call to query from custom Runtime Api, Balance in frontend is not equal to Balance in Runtime

Background Our front end use state call to query custom RuntimeApi of our solo chain. We try to use state call to replace custom rpcs. Definition Balance is our chain is u128. RuntimeApi Definition ...
ironman_ch_parami's user avatar
3 votes
1 answer
111 views

Testing Custom RPC with a Mock Runtime API

I'm trying to test a Custom RPC. Let's make it a simple pass through. p_api::decl_runtime_apis! { pub trait SimpleApi<AccountId> where AccountId: Codec, { fn is_true() -&...
Wil W's user avatar
  • 433
0 votes
1 answer
128 views

Calculate fee for a given transaction

is it possible to calculate the weight (and transform to fees) for a given transaction ? I mean, I need to create a custom RPC method which will calculate that and return the fees. Thank you
cibou's user avatar
  • 131
0 votes
0 answers
53 views

How to call a function from custom pallet using api.tx?

I made a custom pallet and wants to access its method using a extrinsic call like api.tx.<module>.<method> but was not able to do that, do i need to implement it in blockchain code or it ...
Shubham Gupta's user avatar
2 votes
1 answer
753 views

How to curl custom RPC methods?

We have a pallet (called pallet_supersig), and have an RPC module that we have implemented into a substrate node template with supersig, when running the dev node we can find the rpc methods() that ...
Ramsey - Decentration's user avatar
1 vote
1 answer
131 views

Substrate call raw transaction

I created a custom function in a custom RPC call to send a raw transaction : fn send_raw_transaction(&self, bytes: Bytes) -> FutureResult<TxHash<P>> { let slice = &bytes....
cibou's user avatar
  • 131
1 vote
1 answer
197 views

How to call a contract using a custom RPC?

I uploaded a smart contract to the Aleph Zero test net. When I tried to query one of the methods of said smart contract, I encountered this error: 2022-08-09 09:34:28 API/INIT: RPC methods not ...
rajohs's user avatar
  • 491
-2 votes
1 answer
55 views

Similar eth_call for substrate [closed]

a function like we have in ethereum : eth_call exists for substrate ? Thank you.
cibou's user avatar
  • 131
0 votes
2 answers
65 views

runtime custom rpc is not taking "at" params as optional

I have an rpc #[rpc] pub trait ShivarthuApi<BlockHash> { #[rpc(name = "shivarthu_challengerevidence")] fn get_challengers_evidence( &self, at: Option<...
Amiya Behera's user avatar
0 votes
2 answers
230 views

Custom RPC parameters

I'm trying to return an item that is within a storageMap. Its key is a Vec(u8), but I don't know how to send this type using a curl call. I tried using the id as string and using its hex version and I ...
andresvsm's user avatar
  • 1,104
1 vote
1 answer
38 views

Releasing custom RPC implementation on only a single testnet runtime

We have multiple testnet runtimes configured for the node. A new pallet I'm building is only available for testing in one testnet. There is also a new custom RPC I have written to call into the new ...
vim's user avatar
  • 113