Fix docs urls (#11966)

* Fix docs urls

* Update bin/node-template/README.md

* Update frame/aura/src/lib.rs

* Run cargo +nightly fmt

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Sacha Lansky
2022-08-03 12:34:33 +01:00
committed by GitHub
parent 5ebf17bfe1
commit df07421904
18 changed files with 39 additions and 40 deletions
@@ -26,7 +26,7 @@ use frame_system::RawOrigin;
// To actually run this benchmark on pallet-example-basic, we need to put this pallet into the
// runtime and compile it with `runtime-benchmarks` feature. The detail procedures are
// documented at:
// https://docs.substrate.io/v3/runtime/benchmarking#how-to-benchmark
// https://docs.substrate.io/reference/how-to-guides/weights/add-benchmarks/
//
// The auto-generated weight estimate of this pallet is copied over to the `weights.rs` file.
// The exact command of how the estimate generated is printed at the top of the file.
+1 -1
View File
@@ -318,7 +318,7 @@ const MILLICENTS: u32 = 1_000_000_000;
// - assigns a dispatch class `operational` if the argument of the call is more than 1000.
//
// More information can be read at:
// - https://docs.substrate.io/v3/runtime/weights-and-fees
// - https://docs.substrate.io/main-docs/build/tx-weights-fees/
//
// Manually configuring weight is an advanced operation and what you really need may well be
// fulfilled by running the benchmarking toolchain. Refer to `benchmarking.rs` file.
+3
View File
@@ -30,11 +30,14 @@ fn generates_event() {
System::set_block_number(System::block_number() + 1); //otherwise event won't be registered.
assert_ok!(Remark::<Test>::store(RawOrigin::Signed(caller.clone()).into(), data.clone(),));
let events = System::events();
// this one we create as we expect it
let system_event: <Test as frame_system::Config>::Event = Event::Stored {
content_hash: sp_io::hashing::blake2_256(&data).into(),
sender: caller,
}
.into();
// this one we actually go into the system pallet and get the last event
// because we know its there from block +1
let frame_system::EventRecord { event, .. } = &events[events.len() - 1];
assert_eq!(event, &system_event);
});
+1 -1
View File
@@ -72,6 +72,6 @@ You need to set an initial superuser account as the sudo `key`.
[`Call`]: ./enum.Call.html
[`Config`]: ./trait.Config.html
[`Origin`]: https://docs.substrate.io/v3/runtime/origins
[`Origin`]: https://docs.substrate.io/main-docs/build/origins/
License: Apache-2.0
+1 -1
View File
@@ -88,7 +88,7 @@
//!
//! * [Democracy](../pallet_democracy/index.html)
//!
//! [`Origin`]: https://docs.substrate.io/v3/runtime/origins
//! [`Origin`]: https://docs.substrate.io/main-docs/build/origins/
#![cfg_attr(not(feature = "std"), no_std)]
@@ -111,7 +111,7 @@ pub fn expand_error(def: &mut Def) -> proc_macro2::TokenStream {
if get_doc_literals(&error_item.attrs).is_empty() {
error_item.attrs.push(syn::parse_quote!(
#[doc = r"
Custom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)
Custom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)
of this pallet.
"]
));
@@ -98,7 +98,7 @@ pub fn expand_event(def: &mut Def) -> proc_macro2::TokenStream {
if get_doc_literals(&event_item.attrs).is_empty() {
event_item.attrs.push(syn::parse_quote!(
#[doc = r"
The [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted
The [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted
by this pallet.
"]
));
@@ -74,7 +74,7 @@ pub fn expand(mut def: Def) -> proc_macro2::TokenStream {
def.item.attrs.push(syn::parse_quote!(
#[doc = r"
The module that hosts all the
[FRAME](https://docs.substrate.io/v3/runtime/frame)
[FRAME](https://docs.substrate.io/main-docs/build/events-errors/)
types needed to add this pallet to a
runtime.
"]
@@ -62,7 +62,7 @@ pub fn expand_pallet_struct(def: &mut Def) -> proc_macro2::TokenStream {
if get_doc_literals(&pallet_item.attrs).is_empty() {
pallet_item.attrs.push(syn::parse_quote!(
#[doc = r"
The [pallet](https://docs.substrate.io/v3/runtime/frame#pallets) implementing
The [pallet](https://docs.substrate.io/reference/frame-pallets/#pallets) implementing
the on-chain logic.
"]
));
+1 -1
View File
@@ -306,7 +306,7 @@ impl<T> Parameter for T where T: Codec + EncodeLike + Clone + Eq + fmt::Debug +
///
/// The following are reserved function signatures:
///
/// * `deposit_event`: Helper function for depositing an [event](https://docs.substrate.io/v3/runtime/events-and-errors).
/// * `deposit_event`: Helper function for depositing an [event](https://docs.substrate.io/main-docs/build/events-errors/).
/// The default behavior is to call `deposit_event` from the [System
/// module](../frame_system/index.html). However, you can write your own implementation for events
/// in your runtime. To use the default behavior, add `fn deposit_event() = default;` to your
+1 -1
View File
@@ -763,7 +763,7 @@ impl<T: MaxEncodedLen> MaxEncodedLen for WrapperOpaque<T> {
fn max_encoded_len() -> usize {
let t_max_len = T::max_encoded_len();
// See scale encoding https://docs.substrate.io/v3/advanced/scale-codec
// See scale encoding: https://docs.substrate.io/reference/scale-codec/
if t_max_len < 64 {
t_max_len + 1
} else if t_max_len < 2usize.pow(14) {