Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
macro stubs for all pallet:: macros to improve documentation visibili…
Browse files Browse the repository at this point in the history
…ty and discovery + revamp of pallet macro documentation (#12334)

* proof of concept working for pallet::whitelist_storage

* fix comments

* pallet macros docs rewrite WIP

* fix issue with cargo fmt cobbling links

* tweak capitalization

* fix docs for storage_version

* fix docs for pallet::hooks

* fix several comments

* fix invalid link

* fix wrapping and add missing links for pallet::hooks docs

* run rewrap on all text blocks in frame_support::pallet docs

* cargo fmt

* fix up pallet::call_index docs

* fix docs for pallet::extra_constants

* fix docs for pallet::error

* fix docs for pallet::event

* fix docs for pallet::event

* * fix docs for pallet::storage
* fix docs for pallet::getter
* fix docs for pallet::storage_prefix
* fix docs for pallet::unbounded
* fix docs for pallet::whitelist_storage
* fix docs for #[cfg(..)] (for storage items and attributes)
* fix docs for pallet::storage macro expansion

* fix docs for pallet::type_value

* fix docs for pallet::genesis_config

* fix docs for pallet::genesis_build

* fix docs for pallet::inherent

* fix docs for pallet::validate_unsigned

* fix docs for pallet::origin

* fix docs for general notes on instantiable pallets

* fix docs for example of a non-instantiable pallet

* fix docs for example of an instantiable pallet

* fix docs for upgrade guidelines

* fix docs for upgrade guidelines

* fix docs for upgrade checking and final notes

* fix some examples near the beginning

* extract docs for `pallet::whitelist_storage`

* add docs for pallet_macro_stub

* fix order of pallet::config and pallet::constant

* set up stub for pallet::config

* set up stub for pallet::constant

* fix

* set up stub for pallet::disable_frame_system_supertrait_check

* set up stub for pallet::generate_storage_info

* set up stub for pallet::storage_version

* set up stub for pallet::hooks

* set up stub for pallet::weight

* set up stub for pallet::compact

* set up stub for pallet::call_index

* set up stub for pallet::extra_constants

* set up stub for pallet::error

* set up stub for pallet::event

* set up stub for pallet::generate_deposit

* set up stub for pallet::storage

* set up stub for pallet::getter

* set up stub for pallet::storage_prefix

* set up stub for pallet::unbounded

* set up stub for pallet::type_value

* set up stub for pallet::genesis_config

* set up stub for pallet::genesis_build

* set up stub for pallet::inherent

* set up stub for pallet::validate_unsigned

* set up stub for pallet::origin

* fix comment

* cargo fmt

* tweak error message

* Update frame/support/procedural/src/lib.rs

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>

* Update frame/support/procedural/src/lib.rs

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>

* switch order of derives

Co-authored-by: Squirrel <gilescope@gmail.com>

* tweak wording

Co-authored-by: Squirrel <gilescope@gmail.com>

* add more context info about `MAX_MODULE_ERROR_ENCODED_SIZE`

Co-authored-by: Squirrel <gilescope@gmail.com>

* tweak wording about where clause

Co-authored-by: Squirrel <gilescope@gmail.com>

* clarify wording about system/events key

Co-authored-by: Squirrel <gilescope@gmail.com>

* use "The Event enum" instead of "item"

Co-authored-by: Squirrel <gilescope@gmail.com>

* fix bad wording

Co-authored-by: Squirrel <gilescope@gmail.com>

* use enum instead of type

Co-authored-by: Squirrel <gilescope@gmail.com>

* expect => expects

Co-authored-by: Squirrel <gilescope@gmail.com>

* add additional note about storage prefix

Co-authored-by: Squirrel <gilescope@gmail.com>

* clearer note about GenesisConfig

Co-authored-by: Squirrel <gilescope@gmail.com>

* Use "The impl" instead of "The item"

Co-authored-by: Squirrel <gilescope@gmail.com>

* add note and link to tight-coupling docs

Co-authored-by: Squirrel <gilescope@gmail.com>

* cargo fmt

* remove spaces around parenthesis

* fix missing text for pallet::config

* fix issue with pallet::constant intro

* fix wording about codec index

* fix pallet::error wording

* fix comment about 1 byte => 256 errors

* fix where clause comment

* fix comment about where pallet events are stored

* rewrap some text

* fix pallet::storage docs

* fix pallet::storage_prefix docs

* tweak docs for pallet::genesis_build

* tweak docs for pallet::config

* specify that pallet::event must be present if pallet::config is present

* add note about why we would want to bypass the supertrait check

* mention that pallet::generate_store attribute is only valid on pallet struct

* add note about adding new calls to the end to maintain existing order

* add note about pallet::type_value and pallet::storage

Co-authored-by: Squirrel <gilescope@gmail.com>

* add note about using pallet::type_value alongside pallet::storage

* include warning about modifying disaptchables on other pallet::call_index docs page

* fix incorrect comment

* add much more information for pallet::inherent

* move pallet::pallet macro expansion notes back to their rightful place

* re-run CI

* fix macro expansion appearing in wrong place for pallet::pallet

* replicate pallet::pallet docs on the pallet::pallet macro stub

* force CI re-run

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
Co-authored-by: Squirrel <gilescope@gmail.com>
Co-authored-by: parity-processbot <>
  • Loading branch information
3 people authored Oct 6, 2022
1 parent a84def9 commit f77f788
Show file tree
Hide file tree
Showing 2 changed files with 1,223 additions and 421 deletions.
Loading

0 comments on commit f77f788

Please sign in to comment.