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
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.