Skip to main content
2 votes
Accepted

Which one is the latest release polkadot-v1.12.0 or release-polkadot-v1.12.0 or release-crates-io-v1.12.0?

crates-io-* is for crates.io. polkadot-* is a tag for release. release-* is a branch. It corresponds to that version and may include minor updates. For me, I always use release-*.
AurevoirXavier's user avatar
  • 10.7k
1 vote
Accepted

How to fix `cargo clippy` error for `#[pallet::call]` and `#[pallet::generate_deposit(pub(crate) fn deposit_event)]`

You can't fix these clippy errors locally. If you want to keep #![warn(clippy::missing_docs_in_private_items)]. Those code is generated by a macro defined in upstream. You'll need to submit a PR to ...
AurevoirXavier's user avatar
  • 10.7k
1 vote
Accepted

how to create merkle root of given hashes inside a pallet

The following code should do it: sp_runtime::traits::BlakeTwo256::trie_root( leaves .iter() .enumerate() .map(|(i, l)| ((i as u32).encode(), l.encode())) .collect() ...
bkchr's user avatar
  • 11.6k
1 vote
Accepted

Is there a way to use a crate that depends on the `std` in substrate OCW?

I'm not sure why it was designed this way, but I understand how it works. Perhaps they intended for the OCW to run anywhere since it's part of the WASM blob. Therefore, everything is compiled into ...
AurevoirXavier's user avatar
  • 10.7k

Only top scored, non community-wiki answers of a minimum length are eligible