Skip to main content

All Questions

0 votes
1 answer
15 views

Why Off-chain worker does not deduct DispatchError in Substrate?

I am trying Substrate official off-chain example. I am throwing a DispatchError in my extrinsic. #[pallet::call_index(0)] #[pallet::weight({0})] pub fn submit_price(origin: OriginFor&...
Boleng's user avatar
  • 535
0 votes
0 answers
12 views

Not able to submit multiple signed transactions through off-chain worker

I have to submit 2 signed extrinsics through off-chain worker. The code structure of my off-chain worker is like this: fn offchain_worker(block_number: BlockNumberFor<T>) { if !...
Boleng's user avatar
  • 535
0 votes
0 answers
21 views

Is there e2e testing framework/example for Substrate solo chain?

I am working on a live solo chain. I have to test a scenario where I want to hit HTTP API through off chain-worker. Unfortunately it's not possible to test in mock environment. We can take an example ...
Boleng's user avatar
  • 535
1 vote
1 answer
35 views

Would it be possible to make HTTP request on chain through pallet extrinsic?

We can make HTTP Get and Post request through Offchain worker. Can we also do the same on chain through pallet extrinsic? Is there any restriction?
Boleng's user avatar
  • 535
0 votes
0 answers
25 views

How to send HTTP POST request using Substrate Offchain worker

I am using Substrate official example to send HTTP POST request, which is mentioned here https://docs.substrate.io/reference/how-to-guides/offchain-workers/offchain-http-requests/#read-and-submit-the-...
Boleng's user avatar
  • 535
0 votes
1 answer
42 views

Substrate Offchain Worker - failed to fetch sample price

I am trying to use Substrate Offchain Worker. I implemented as mentioned here https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/examples/offchain-worker. I am using same sample ...
Boleng's user avatar
  • 535
1 vote
1 answer
91 views

How to feed private data(confidential information) in Substrate chain through oracle?

Is there any Oracle solution available to feed private data to Substrate chain? Feeding data to chain has already been answered here How can I build a price feed oracle for my Substrate chain?. And ...
Boleng's user avatar
  • 535
2 votes
1 answer
43 views

How to make a fn only callable by an offchain worker?

I don't think this is possible but is it? I have data that comes from an API that ultimately needs to be stored onchain which I don't want to risk having done through a Pays::No fn in case the call ...
bobby dy's user avatar
2 votes
0 answers
84 views

How should I add offchain worker(OCW) in frontier when using AccountId20?

In order to add an offchain worker with using AccountId20 as the runtime account type I did following things. add associated type type AuthorityId: AppCrypto<Self::Public, Self::Signature>; in ...
xiao liang's user avatar
1 vote
0 answers
34 views

How to create web socket server through off chain worker?

I need to establish a web socket connection through off chain worker. I asked here How to establish web socket connection in offchain_worker but didn't get any response. Is there any way/example to ...
Boleng's user avatar
  • 535
1 vote
1 answer
157 views

How to establish web socket connection in offchain_worker

Is there any way/example to establish web socket connection through off chain worker? There are many Rust examples but I can't use standard library. Can someone please help me?
Boleng's user avatar
  • 535
4 votes
1 answer
130 views

Facing issue in adding offchain worker

I'm using pow substrate chain. I'm running 3 validators by using these commands: For bob ./target/release/node-template \ --base-path /tmp/bob \ --chain local \ --bob \ --port 30335 \ --rpc-port 9944 \...
Deepak Chaudhary's user avatar
4 votes
2 answers
210 views

Read a value from offchain storage of a node

I want to read a single value from OffchainStorage of a live substrate node. Is it possible? Assume I can not use localStorageGet rpc request because it is an unsafe rpc.
Matt Duncan's user avatar
2 votes
1 answer
130 views

Offchain Worker Not Initializing - Cumulus Parachain Template

I am observing unexpected behavior with the Cumulus Parachain Template. Our pallet uses off-chain workers (OCW), and the functionality successfully runs when we attach it to the Substrate Node ...
Brendan's user avatar
  • 65
1 vote
1 answer
42 views

how does work offchain in substrate ( pokadot ) [closed]

I Wanna know about off-chain in the substrate ( Polkadot ) how does work? How is it mine from the onchain ( main chain in Polkadot )? maybe somebody wants to hack the off-chain and they do it a ...
Kianoush Dortaj's user avatar

15 30 50 per page