Skip to content

Commit

Permalink
style: replace outdates links
Browse files Browse the repository at this point in the history
  • Loading branch information
Daanvdplas committed May 20, 2024
1 parent f0e6e2f commit 3acdcfd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//! Benchmarking setup for pallet-parachain-template

// https://docs.substrate.io/test/benchmark/

use super::*;

#[allow(unused)]
Expand Down
10 changes: 4 additions & 6 deletions crates/pop-parachains/templates/pallet/src/lib.rs.templ
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/// Edit this file to define custom logic or remove it if it is not needed.
/// Learn more about FRAME and the core library of Substrate FRAME pallets:
/// <https://docs.substrate.io/v3/runtime/frame>
/// <https://docs.substrate.io/build/custom-pallets/>
pub use pallet::*;

#[cfg(test)]
Expand Down Expand Up @@ -30,15 +30,13 @@ pub mod pallet {
pub struct Pallet<T>(_);

// The pallet's runtime storage items.
// https://docs.substrate.io/v3/runtime/storage
// https://docs.substrate.io/build/runtime-storage/
#[pallet::storage]
#[pallet::getter(fn something)]
// Learn more about declaring storage items:
// https://docs.substrate.io/v3/runtime/storage#declaring-storage-items
pub type Something<T> = StorageValue<_, u32>;

// Pallets use events to inform users when important changes are made.
// https://docs.substrate.io/v3/runtime/events-and-errors
// https://docs.substrate.io/build/events-and-errors/
#[pallet::event]
#[pallet::generate_deposit(pub(super) fn deposit_event)]
pub enum Event<T: Config> {
Expand Down Expand Up @@ -71,7 +69,7 @@ pub mod pallet {
pub fn do_something(origin: OriginFor<T>, something: u32) -> DispatchResultWithPostInfo {
// Check that the extrinsic was signed and get the signer.
// This function will return an error if the extrinsic is not signed.
// https://docs.substrate.io/v3/runtime/origins
// https://docs.substrate.io/build/origins/
let who = ensure_signed(origin)?;

// Update storage.
Expand Down
2 changes: 2 additions & 0 deletions crates/pop-parachains/templates/pallet/src/tests.rs.templ
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use crate::{mock::*, Error};
use frame_support::{assert_noop, assert_ok};

// https://docs.substrate.io/test/

#[test]
fn it_works_for_default_value() {
new_test_ext().execute_with(|| {
Expand Down

0 comments on commit 3acdcfd

Please sign in to comment.