3

I have a simple question if i use off chain workers to get calls to https://somecoinexchange/ to get data for some calculation, what will be the gas usage. I was presuming that since no chain work is done, no gas will be used.

1 Answer 1

1

FRAME doesn't use the concept of gas. It uses weight, which is currently determined based on running benchmarks on some standard hardware. However, everything that runs in offchain_worker doesn't use any weight at all. The runtime code itself is seen as trusted code, but nodes are still allowed to opt-out from running offchain_worker.

TDLR: Your assumption that no weight/gas is being used is correct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.