Reputation: 143
I have an offchain worker that reads something via http and i would like users to be able to use different urls for it. I have a custom flag in the CLI which takes this URL (something like ./target/release/substrate --custom-url http://google.com
) but i don't know how to read it from the runtime (even in an offchain worker context) to allow the offchain worker to use this user specified url.
Thanks.
Upvotes: 0
Views: 82
Reputation: 2824
This is not possible, although it is possible to use the offchain_localStorageSet
RPC endpoint to allow each node to maintain a different URL for the offchain worker. Have you referred to this document? https://substrate.dev/recipes/off-chain-workers/storage.html
Upvotes: 1