Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
a451f7e
add developer-hub and all things related
kianenigma Oct 31, 2023
68a053b
fix some things
kianenigma Oct 31, 2023
f7460d8
small fixes
kianenigma Oct 31, 2023
b785e5c
Create docs.yml
kianenigma Oct 31, 2023
00a0fec
Update docs.yml
kianenigma Oct 31, 2023
50c78b4
fix some warnings
kianenigma Oct 31, 2023
89e00e9
Merge branch 'kiz-developer-hub' of github.com:kianenigma/polkadot-sd…
kianenigma Oct 31, 2023
c91250b
fix some warnings
kianenigma Oct 31, 2023
6d57d2e
fix warns
kianenigma Oct 31, 2023
76f2277
update
kianenigma Nov 1, 2023
08802f8
fix
kianenigma Nov 2, 2023
2ec4541
publish note
kianenigma Nov 2, 2023
a826834
fix
kianenigma Nov 2, 2023
8e2f6b8
Master.into()
kianenigma Nov 2, 2023
df2d645
Merge branch 'master' of github.com:paritytech/polkadot-sdk into kiz-…
liamaharon Nov 3, 2023
58d60cb
fix build
liamaharon Nov 3, 2023
c8f7f1e
default page developer hub
liamaharon Nov 3, 2023
198a3e6
Master.into()
kianenigma Nov 4, 2023
bcdc9d5
add lot of ref docs
kianenigma Nov 4, 2023
4664874
Merge branch 'kiz-developer-hub' of github.com:paritytech/polkadot-sd…
kianenigma Nov 4, 2023
d542ff1
Update substrate/frame/support/procedural/src/pallet/parse/call.rs
kianenigma Nov 4, 2023
2f76ba1
Update developer-hub/src/lib.rs
kianenigma Nov 4, 2023
00ec677
Update developer-hub/src/lib.rs
kianenigma Nov 4, 2023
9b1db8c
Update docs/mermaid/polkadot_sdk.mmd
kianenigma Nov 4, 2023
7dba4f8
Update developer-hub/src/polkadot_sdk/mod.rs
kianenigma Nov 4, 2023
3519a03
Update developer-hub/src/reference_docs/wasm_meta_protocol.rs
kianenigma Nov 4, 2023
0d72dd7
Apply suggestions from code review
kianenigma Nov 4, 2023
9942120
Apply suggestions from code review
kianenigma Nov 4, 2023
60a37a1
Upstream.into()
kianenigma Nov 4, 2023
1896ac7
reword templates page.
kianenigma Nov 4, 2023
30d6ac2
repot homepage
kianenigma Nov 4, 2023
a56d3b1
rework substrate dev section
kianenigma Nov 4, 2023
641ff3a
fix cumulus links
kianenigma Nov 4, 2023
3baa30c
Apply extrinsic-encoding ref doc suggestions
jsdw Nov 7, 2023
9c2b3ea
Apply singed-extensions ref doc suggestion
jsdw Nov 7, 2023
62b69fc
add about build
kianenigma Nov 9, 2023
4c8939b
most of the stuff done in polkadot_sdk mod
kianenigma Nov 9, 2023
7b225e1
Apply suggestions from code review
kianenigma Nov 9, 2023
0f55b9a
Update developer-hub/src/polkadot_sdk/cumulus.rs
kianenigma Nov 9, 2023
d08ab24
Update developer-hub/src/polkadot_sdk/cumulus.rs
kianenigma Nov 9, 2023
b9ee9c1
ready to merge
kianenigma Nov 9, 2023
a873808
merge about half a million comments and conflicts
kianenigma Nov 9, 2023
2d5814b
Master.into()
kianenigma Nov 9, 2023
94eeed6
deprecate tutorial
kianenigma Nov 9, 2023
80d4e9e
add missing glossary
juangirini Nov 10, 2023
24ba435
add pvf to the glossary
juangirini Nov 14, 2023
745c7fd
refactor tutorial to guides
juangirini Nov 14, 2023
d305146
fix fmt
juangirini Nov 14, 2023
1d1e4a0
Merge branch 'master' into kiz-developer-hub
juangirini Nov 14, 2023
74eb750
resolve import conflict
juangirini Nov 14, 2023
36baa71
fix ci
juangirini Nov 14, 2023
8defde9
fix ui tests
juangirini Nov 14, 2023
7c839fe
fix ui test
juangirini Nov 14, 2023
196d1d7
remove unused imports
juangirini Nov 15, 2023
f3b1b5b
Merge branch 'master' into kiz-developer-hub
juangirini Nov 15, 2023
0428686
Merge branch 'kiz-developer-hub' into jg/developer-hub-glossary-ref-docs
juangirini Nov 15, 2023
0235ee4
improve glossary
juangirini Nov 15, 2023
239c3a6
add suggested modifications
juangirini Nov 24, 2023
58fb40f
improve Validators definition
juangirini Nov 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix some warnings
  • Loading branch information
kianenigma committed Oct 31, 2023
commit 50c78b44dbec76e49fc14cad85b3bbd00ac5a54a
65 changes: 33 additions & 32 deletions substrate/frame/support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub mod __private {
pub use sp_core::{OpaqueMetadata, Void};
pub use sp_core_hashing_proc_macro;
pub use sp_inherents;
pub use sp_io::{self, storage::root as storage_root};
pub use sp_io::{self, storage::root as storage_root, TestExternalities};
pub use sp_metadata_ir as metadata_ir;
#[cfg(feature = "std")]
pub use sp_runtime::{bounded_btree_map, bounded_vec};
Expand All @@ -57,7 +57,6 @@ pub mod __private {
pub use sp_std;
pub use sp_tracing;
pub use tt_call::*;
pub use sp_io::TestExternalities;
}

#[macro_use]
Expand Down Expand Up @@ -2200,28 +2199,30 @@ pub use frame_support_procedural::pallet;
/// Contains macro stubs for all of the pallet:: macros
pub mod pallet_macros {
pub use frame_support_procedural::{
composite_enum, config, constant, disable_frame_system_supertrait_check, error,
event, extra_constants, generate_deposit, generate_store, getter, hooks, import_section,
inherent, no_default, no_default_bounds, origin, pallet_section, storage, storage_prefix,
composite_enum, config, constant, disable_frame_system_supertrait_check, error, event,
extra_constants, generate_deposit, generate_store, getter, hooks, import_section, inherent,
no_default, no_default_bounds, origin, pallet_section, storage, storage_prefix,
storage_version, type_value, unbounded, validate_unsigned, weight, whitelist_storage,
};

/// Allows a pallet to declare a set of functions as a *dispatchable extrinsic*. In slightly
/// simplified terms, this macro declares the set of "transactions" of a pallet.
/// Allows a pallet to declare a set of functions as a *dispatchable extrinsic*. In
/// slightly simplified terms, this macro declares the set of "transactions" of a pallet.
///
/// > The exact definition of **extrinsic** can be found in
/// > [`sp_runtime::generic::UncheckedExtrinsic`].
///
/// A **dispatchable** is a common term in FRAME, referring to process of constructing a
/// function, and dispatching it with the correct inputs. This is commonly used with extrinsics,
/// for example "an extrinsic has been dispatched". See [`sp_runtime::traits::Dispatchable`] and
/// [`crate::dispatch::UnfilteredDispatch`].
/// function, and dispatching it with the correct inputs. This is commonly used with
/// extrinsics, for example "an extrinsic has been dispatched". See
/// [`sp_runtime::traits::Dispatchable`] and
/// [`crate::traits::UnfilteredDispatchable`].
///
/// ## Call Enum
///
/// The macro is called `call` (rather than `#[pallet::extrinsics]`) because of the generation
/// of a `enum Call`. This enum contains only the encoding of the function arguments of the
/// dispatchable, alongside the information needed to route it to the correct function.
/// The macro is called `call` (rather than `#[pallet::extrinsics]`) because of the
/// generation of a `enum Call`. This enum contains only the encoding of the function
/// arguments of the dispatchable, alongside the information needed to route it to the
/// correct function.
///
/// ```
/// #[frame_support::pallet(dev_mode)]
Expand Down Expand Up @@ -2270,7 +2271,7 @@ pub mod pallet_macros {
/// # TestExternalities::new_empty().execute_with(|| {
/// let origin: RuntimeOrigin = frame_system::RawOrigin::Signed(10).into();
/// // calling into a dispatchable from within the runtime is simply a function call.
/// let _ = custom_pallet::Pallet::<Runtime>::some_dispatchable(origin.clone(), 10);
/// let _ = custom_pallet::Pallet::<Runtime>::some_dispatchable(origin.clone(), 10);
///
/// // calling into a dispatchable from the outer world involves constructing the bytes of
/// let call = custom_pallet::Call::<Runtime>::some_dispatchable { input: 10 };
Expand All @@ -2284,29 +2285,29 @@ pub mod pallet_macros {
/// // referring to the second variant of `enum Call`.
/// let call = custom_pallet::Call::<Runtime>::other { input: 10 };
/// assert_eq!(call.encode(), vec![1u8, 10, 0, 0, 0, 0, 0, 0, 0]);
/// # });
/// # });
/// }
/// ```
///
/// Further properties of dispatchable functions are as follows:
///
/// - Unless if annotated by `dev_mode`, it must contain [`weight`] to denote the pre-dispatch
/// weight consumed.
/// - Unless if annotated by `dev_mode`, it must contain [`weight`] to denote the
/// pre-dispatch weight consumed.
/// - The dispatchable must declare its index via [`call_index`], which can override the
/// position of a function in `enum Call`.
/// - The first argument is always an `OriginFor` (or `T::RuntimeOrigin`).
/// - The return type is always [`crate::dispatch::DispatchResult`] (or
/// [`crate::dispatch::DispatchResultWithPostInfo`]).
///
/// **WARNING**: modifying dispatchables, changing their order (ie. using [`call_index`]),
/// removing some, etc., must be done with care. This will change the encoding of the , and the
/// call can be stored on-chain (e.g. in `pallet-scheduler`). Thus, migration might be needed.
/// This is why the use of `call_index` is mandatory by default in FRAME.
/// removing some, etc., must be done with care. This will change the encoding of the , and
/// the call can be stored on-chain (e.g. in `pallet-scheduler`). Thus, migration might be
/// needed. This is why the use of `call_index` is mandatory by default in FRAME.
///
/// ## Default Behavior
///
/// If no `#[pallet::call]` exists, then a default implementation corresponding to the following
/// code is automatically generated:
/// If no `#[pallet::call]` exists, then a default implementation corresponding to the
/// following code is automatically generated:
///
/// ```ignore
/// #[pallet::call]
Expand All @@ -2317,20 +2318,20 @@ pub mod pallet_macros {
/// Enforce the index of a variant in the generated `enum Call`. See [`call`] for more
/// information.
///
/// All call indexes start from 0, until it encounters a dispatchable function with a defined
/// call index. The dispatchable function that lexically follows the function with a defined
/// call index will have that call index, but incremented by 1, e.g. if there are 3 dispatchable
/// functions `fn foo`, `fn bar` and `fn qux` in that order, and only `fn bar` has a call index
/// of 10, then `fn qux` will have an index of 11, instead of 1.
/// All call indexes start from 0, until it encounters a dispatchable function with a
/// defined call index. The dispatchable function that lexically follows the function with
/// a defined call index will have that call index, but incremented by 1, e.g. if there are
/// 3 dispatchable functions `fn foo`, `fn bar` and `fn qux` in that order, and only `fn
/// bar` has a call index of 10, then `fn qux` will have an index of 11, instead of 1.
pub use frame_support_procedural::call_index;

/// Declares the arguments of a [`call`] function to be encoded using
/// [`parity_scale_codec::Compact`]. This will results in smaller extrinsic encoding.
/// [`codec::Compact`]. This will results in smaller extrinsic encoding.
///
/// A common example of `compact` is for numeric values that are often times far far away from
/// their theoretical maximum. For example, in the context of a crypto-currency, the balance of
/// an individual account is often times way less then what the numeric type allows. In all such
/// cases, using `compact` is sensible.
/// A common example of `compact` is for numeric values that are often times far far away
/// from their theoretical maximum. For example, in the context of a crypto-currency, the
/// balance of an individual account is often times way less then what the numeric type
/// allows. In all such cases, using `compact` is sensible.
///
/// ```
/// #[frame_support::pallet(dev_mode)]
Expand Down
3 changes: 1 addition & 2 deletions substrate/frame/support/src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,7 @@ impl PalletVersionToStorageVersionHelper for T {
}
}

/// Migrate from the `PalletVersion` struct to the new
/// [`StorageVersion`](crate::traits::StorageVersion) struct.
/// Migrate from the `PalletVersion` struct to the new [`StorageVersion`] struct.
///
/// This will remove all `PalletVersion's` from the state and insert the current storage version.
pub fn migrate_from_pallet_version_to_storage_version<
Expand Down
6 changes: 3 additions & 3 deletions substrate/frame/support/src/storage/child.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ pub fn kill_storage(child_info: &ChildInfo, limit: Option<u32>) -> KillStorageRe
/// guarantee that the subsequent call is in a new block; in this case the previous call's result
/// cursor need not be passed in an a `None` may be passed instead. This exception may be useful
/// then making this call solely from a block-hook such as `on_initialize`.
///
/// Returns [`MultiRemovalResults`](sp_io::MultiRemovalResults) to inform about the result. Once the
/// resultant `maybe_cursor` field is `None`, then no further items remain to be deleted.

/// Returns [`MultiRemovalResults`] to inform about the result. Once the resultant `maybe_cursor`
/// field is `None`, then no further items remain to be deleted.
///
/// NOTE: After the initial call for any given child storage, it is important that no keys further
/// keys are inserted. If so, then they may or may not be deleted by subsequent calls.
Expand Down
6 changes: 3 additions & 3 deletions substrate/frame/support/src/storage/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,7 @@ pub trait StorageTryAppend<Item>: StorageDecodeLength + private::Sealed {
fn bound() -> usize;
}

/// Storage value that is capable of [`StorageTryAppend`](crate::storage::StorageTryAppend).
/// Storage value that is capable of [`StorageTryAppend`].
pub trait TryAppendValue<T: StorageTryAppend<I>, I: Encode> {
/// Try and append the `item` into the storage item.
///
Expand Down Expand Up @@ -1515,7 +1515,7 @@ where
}
}

/// Storage map that is capable of [`StorageTryAppend`](crate::storage::StorageTryAppend).
/// Storage map that is capable of [`StorageTryAppend`].
pub trait TryAppendMap<K: Encode, T: StorageTryAppend<I>, I: Encode> {
/// Try and append the `item` into the storage map at the given `key`.
///
Expand Down Expand Up @@ -1549,7 +1549,7 @@ where
}
}

/// Storage double map that is capable of [`StorageTryAppend`](crate::storage::StorageTryAppend).
/// Storage double map that is capable of [`StorageTryAppend`].
pub trait TryAppendDoubleMap<K1: Encode, K2: Encode, T: StorageTryAppend<I>, I: Encode> {
/// Try and append the `item` into the storage double map at the given `key`.
///
Expand Down