* use proper intra doc link
* use proper intra doc link
* get system path name from path module name function for the docs
* used format macro in formatting doc string for better output
* helper function to get intra doc string
* helper function to get intra doc string
* use helper function on expand_origin_pallet_conversions
* remove duplicates
* Update frame/support/procedural/src/construct_runtime/expand/origin.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* remove leading white space
Co-authored-by: Damilare <dakinlose@teamapt.com>
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* use CountedMap in pallet-bags-list
* Fix build
* Update frame/bags-list/src/list/mod.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
* add a check as well
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
* Update CI image to the latest rustc
* Update rustc error messages
* whitespace
* update test output
* updating compiler errors
* kid's finally learning to read and spots the TRYBUILD=overwrite message.
* undoing a little blessing
* imperfect error msg
* revert ci image to production
Co-authored-by: gilescope <gilescope@gmail.com>
* pallet-scheduler: Introduce `OriginPrivilegeCmp`
When a scheduled task should be canceled, the origin that tries to
cancel the task is compared to the origin the task should be executed
with. Before this pr this check only allowed that both origins are
equal. However, this is problematic as this means that for example a
council origin it needs to be have the same amount of yes votes to
cancel the scheduled task. While a council origin with more yes votes
should be able to cancel this task. This happened recently on Kusama and
lead to a failed cancelation of a scheduled task. With this pr the two
origins are compared and the cancelling origin needs to have greater or
equal privileges as the origin that scheduled the task. What a greater,
equal or less privilege is, can be configured in the runtime.
For simplicity, a `EqualPrivilegeOnly` implementation is provided that
only checks if two origins are equal. So, this mimics the old behaviour.
* FMT
* fix import
* Small optimizations
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
* pallet-multisig: Improve opaque call handling
Before the opaque call was just a type redefinition of `Vec<u8>`. With metadata v14 that was
breaking external tools, as they stopped looking at the type name. To improve the situation the
`WrapperKeepOpaque` type is introduced that communicates to the outside the correct type info.
* Cleanup
* Fix benchmarks
* FMT
* Rebased with master. Resolved merge conflict in
frame/support/test/tests/pallet.rs
* Switching Account ID to SomeType1, as SomeType3 was giving me conversion error.
* Wrong indent config. Fixed.
* These tabs look fine locally, but look different on Github. Trying to get the style config right.
* Parsing pallet::constant_name.
Passing unit tests, which is confusing because I didn't change `ident` in the ExtraConstantDef initialization.
* Finalized parsing of extra constant name by adding optional metadata field.
Added expansion logic that replaces respective `idents` where they exist.
* Erasing this to try to keep the format the same across the source code.
* Another formatting change for consistency.
* Update frame/support/procedural/src/pallet/expand/constants.rs
strictly more idiomatic.
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* Update frame/support/procedural/src/pallet/parse/extra_constants.rs
strictly idiomatic change.
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* Fixing formatting and CI warnings.
* switched to nightly compiler to use rustfmt.toml
Co-authored-by: Eric Miller <emiller@lirio.co>
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* improve root filter bypass
* improve doc
* fmt
* refactor test for more understandable flow
* Update frame/support/procedural/src/construct_runtime/expand/origin.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
* match
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
* Focus on correctness lints. This relies on a compiler patch that landed 8th July 2021.
If people are using an earlier version of the compiler everything will still work unless they try and run clippy.
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Denis Pisarev <denis.pisarev@parity.io>
* Record pallet indices in CallMetadata
* Resurrect PalletVersion infrastructure and rename as CrateVersion
* cargo fmt
* Add missing runtime generics to pallet struct
* Fix path to instance
* Fix test
* Fix UI test expectations
* Fix UI test expectations
* Move crate_version function to PalletInfoAccess
* Update UI test expectations
* Add crate_name method to PalletInfo
* Convert path to module name instead of exposing crate name
* cargo fmt
* Keep the double colons when constructing the module name
* Remove unused import
* Update UI test expectations
* Update frame/support/src/traits/metadata.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* Update UI test expectations
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* refactor `do_destroy`
* destroy trait
* refactor do_force_create
* impl create trait
* do not bleed weight into api
* Do the same for uniques
* add docs
* Prepare UI tests for rust 1.54
* Delete wrong_page.stderr
* CI: run with a staging CI image
* Revert "CI: run with a staging CI image"
This reverts commit 66f5b00d14b50fd9d8fbf773f7e884f380697591.
* CI: debug, again
* LOG_TARGET is only used in std
* Remove unnecessary unsafe
* Fixes
* Use correct rustc locally
* FMT
* Compile with benchmarking
* Review feedback
* Some ui tests
* I know...
* Fix wasm tests
Co-authored-by: Denis P <denis.pisarev@parity.io>
Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
* Integrating WrapperOpaque from PR #9738
* Adding storage_info to pallet im-online
Changing some `Vec` to `WeakBoundedVec`
Adding the following bounds:
* `MaxKeys
* `MaxPeerInHeartbeats`
* `MaxPeerDataEncodingSize`
to limit the size of `WeakBoundedVec`
* Fix syntax
* Need to clone keys
* Changes in formatting