pub fn submit_price<T: Config>(price: u32)
Expand description

Submit new price to the list.

This method is a public function of the module and can be called from within a transaction. It appends given price to current list of prices. In our example the offchain worker will create, sign & submit a transaction that calls this function passing the price.

The transaction needs to be signed (see ensure_signed) check, so that the caller pays a fee to execute it. This makes sure that it’s not easy (or rather cheap) to attack the chain by submitting excessive transactions, but note that it doesn’t ensure the price oracle is actually working and receives (and provides) meaningful data. This example is not focused on correctness of the oracle itself, but rather its purpose is to showcase offchain worker capabilities.

Warning: Doc-Only

This function is an automatically generated, and is doc-only, uncallable stub. See the real version in Pallet::submit_price.