Koute
9d1741eb3c
Bump parity-scale-codec to 3.6.1 ( #14428 )
2023-06-21 11:37:11 +00:00
Abhijit Roy
4ba78088d3
Update Pallet placeholder struct as per FRAME v2 ( #14348 )
...
* Update Pallet placeholder struct as per FRAME v3
* ".git/.scripts/commands/fmt/fmt.sh"
* Update lib.rs
Removed the unused import
---------
Co-authored-by: command-bot <>
2023-06-12 15:22:05 +00:00
Alexandru Vasile
3da9449067
Bump sp-crates from latest crates.io version + release ( #14265 )
...
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-05-31 12:11:01 +00:00
Alexandru Vasile
98a0550ea2
Release: Bump SP crates to release on crates.io ( #14237 )
...
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-05-29 10:40:59 +00:00
Bastian Köcher
05da6d8e84
HoldReason: Improve usage ( #13869 )
...
* HoldReason: Improve usage
`HoldReason` was switched recently to use the `composite_enum` attribute that will merge the enums
from all pallets in the runtime to `RuntimeHoldReason`. `pallet-nis` was still requiring that the
variant was passed as constant to call `hold`. The proper implementation is to use the `HoldReason`
from inside the pallet directly when calling `hold`. This is done by adding a `RuntimeHoldReason` as
type to the `Config` trait and requiring that `Currency` is using the same reason. Besides that the
pr changes the name `HoldIdentifier` in `pallet_balances::Config` to `RuntimeHoldReason`.
* Update frame/nis/src/lib.rs
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Review comment
* Fixes
---------
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2023-05-24 21:59:34 +00:00
Roman Useinov
376a288fb6
[Deps] Bump scale-info to match cumulus and polkadot ( #13873 )
...
* [Deps] Bump scale-info to match cumulus and polkadot
* fix Cargo.lock
* fix identity
* more fixes
* fix
* fixes
* more fixes
2023-04-12 14:14:06 +02:00
Gavin Wood
5d81f23f8f
Deprecate Currency; introduce holds and freezing into fungible traits ( #12951 )
...
* First reworking of fungibles API
* New API and docs
* More fungible::* API improvements
* New ref-counting logic for old API
* Missing files
* Fixes
* Use the new transfer logic
* Use fungibles for the dispatchables
* Use shelve/restore names
* Locking works with total balance.
* repotting and removal
* Separate Holds from Reserves
* Introduce freezes
* Missing files
* Tests for freezing
* Fix hold+freeze combo
* More tests
* Fee-free dispatchable for upgrading accounts
* Benchmarks and a few fixes
* Another test
* Docs and refactor to avoid blanket impls
* Repot
* Fit out ItemOf fully
* Add events to Balanced traits
* Introduced events into Hold traits
* Fix Assets pallet tests
* Assets benchmarks pass
* Missing files and fixes
* Fixes
* Fixes
* Benchmarks fixes
* Fix balance benchmarks
* Formatting
* Expose fungible sub modules
* Move NIS to fungible API
* Fix broken impl and add test
* Fix tests
* API for `transfer_and_hold`
* Use composite APIs
* Formatting
* Upgraded event
* Fixes
* Fixes
* Fixes
* Fixes
* Repot tests and some fixed
* Fix some bits
* Fix dust tests
* Rename `set_balance`
- `Balances::set_balance` becomes `Balances::force_set_balance`
- `Unbalanced::set_balance` becomes `Unbalances::write_balance`
* becomes
* Move dust handling to fungibles API
* Formatting
* Fixes and more refactoring
* Fixes
* Fixes
* Fixes
* Fixes
* Fixes
* Fixes
* Fixes
* Fixes
* Fixes
* Use reducible_balance for better correctness on fees
* Reducing hold to zero should remove entry.
* Add test
* Docs
* Update frame/support/src/traits/tokens/fungibles/hold.rs
Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com >
* Update frame/support/src/traits/tokens/fungibles/regular.rs
Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com >
* Update frame/support/src/traits/tokens/fungible/hold.rs
Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com >
* Update frame/support/src/traits/tokens/fungible/regular.rs
Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com >
* Docs
* Docs
* Docs
* Fix NIS benchmarks
* Doc comment
* Remove post_mutation
* Fix some tests
* Fix some grumbles
* Enumify bool args to fungible(s) functions
* Fix up assets and balances
* Formatting
* Fix contracts
* Fix tests & benchmarks build
* Typify minted boolean arg
* Typify on_hold boolean arg; renames
* Fix numerous tests
* Fix dependency issue
* Privatize dangerous API mutate_account
* Fix contracts (@alext - please check this commit)
* Remove println
* Fix tests for contracts
* Fix broken rename
* Fix broken rename
* Fix broken rename
* Docs
* Update frame/support/src/traits/tokens/fungible/hold.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* remove from_ref_time
* Update frame/executive/src/lib.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* Update frame/executive/src/lib.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* Reenable test
* Update frame/support/src/traits/tokens/fungibles/hold.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* Update frame/support/src/traits/tokens/fungible/hold.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* Update frame/support/src/traits/tokens/fungible/hold.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* Update frame/support/src/traits/tokens/fungible/hold.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* Update frame/support/src/traits/tokens/currency.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* Update frame/lottery/src/tests.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* Update frame/support/src/traits/tokens/fungible/mod.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* Update frame/support/src/traits/tokens/fungible/regular.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* Update frame/support/src/traits/tokens/fungibles/freeze.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* Update frame/support/src/traits/tokens/fungible/regular.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* Update frame/support/src/traits/tokens/fungibles/hold.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* Update frame/support/src/traits/tokens/fungibles/hold.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* Update frame/support/src/traits/tokens/fungibles/hold.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* Rename UnwantedRemoval to UnwantedAccountRemoval
* Docs
* Formatting
* Update frame/balances/src/lib.rs
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update primitives/runtime/src/lib.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* handle_raw_dust oes nothing
* Formatting
* Fixes
* Grumble
* Fixes
* Add test
* Add test
* Tests for reducible_balance
* Fixes
* Fix Salary
* Fixes
* Disable broken test
* Disable nicely
* Fixes
* Fixes
* Fixes
* Rename some events
* Fix nomination pools breakage
* Add compatibility stub for transfer tx
* Reinstate a safely compatible version of Balances set_balance
* Fixes
* Grumble
* Update frame/nis/src/lib.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_balances
* disable flakey tests
* Update frame/balances/src/lib.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Grumbles
* Grumble
---------
Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com >
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: command-bot <>
2023-03-18 14:47:55 +00:00
Vivek Pandya
2009821cde
Remove use of trait Store from all pallets and deprecate it. ( #13535 )
...
* Remove use of trait Store from staking pallet
* Remove use of trait Store from bounties pallet
* Remove use of trait Store from collective pallet
* Remove use of trait Store from babe pallet
* Remove use of trait Store from assets pallet
* Remove use of trait Store from grandpa pallet
* Remove use of trait Store from balances pallet
* Remove use of trait Store from authorship pallet
* Remove use of trait Store from authority-discovery pallet
* Remove use of trait Store from atomic-swap pallet
* Remove use of trait Store from sudo pallet
* Remove use of trait Store from scheduler pallet
* Remove use of trait Store from scored-pool pallet
* Remove use of trait Store from society pallet
* Remove use of trait Store from lottery pallet
* Remove use of trait Store from executive pallet
* Remove use of trait Store from democracy pallet
* Remove use of trait Store from elections-phragmen pallet
* Remove use of trait Store from indices pallet
* Remove use of trait Store from identity pallet
* Remove use of trait Store from multisig pallet
* Remove use of trait Store from merkle-mountain-range pallet
* Remove use of trait Store from im-online pallet
* Remove use of trait Store from membership pallet
* Remove use of trait Store from nicks pallet
* Remove use of trait Store from session pallet
* Remove use of trait Store from transaction-payment pallet
* Remove use of trait Store from utility pallet
* Remove use of trait Store from child-bounties pallet
* Remove use of trait Store from nis pallet
* Remove use of trait Store from nfts pallet
* Remove use of trait Store from conviction-voting pallet
* Remove use of trait Store from treasury pallet
* Remove use of trait Store from vesting pallet
* Remove use of trait Store from preimage pallet
* Remove use of trait Store from uniques pallet
* Remove use of trait Store from ranked-collective pallet
* Remove use of trait Store from beefy-mmr pallet
* Remove use of trait Store from referenda pallet
* Remove use of trait Store from whitelist pallet
* Remove use of trait Store from alliance pallet
* Remove use of trait Store from nomination-pools pallet
* Remove use of trait Store from state-trie-migration pallet
* Remove use of trait Store from message-queue pallet
* Remove use of trait Store from root-offences pallet
* Remove use of trait Store from root-testing pallet
* Remove use of trait Store from timestamps pallet
* Remove use of trait Store from system pallet
* Remove use of trait Store from offences pallet
* Remove use of trait Store from recovery pallet
* Remove use of trait Store from node-authorization pallet
* Remove use of trait Store from proxy pallet
* Remove use of trait Store from benchmarking pallet
* Remove use of trait Store from bags-list pallet
* Add deprecated warning in store_trait
* Change warning message
* Run cargo fmt
* Fix warning and update tests
* Remove unnecessary allow deprecated
* Remove use of trait Store
* Fix mismatch in expected output
* Minor update to warning message for deprecation of generate_store with Store trait attribute
* Fixes as per review comments
* Fixes as per review suggestions
* Remove use of Store trait from core-fellowship pallet
* Fix type in store_trait.rs
* Fixes as pre review comment
2023-03-13 15:30:05 +00:00
Vivek Pandya
bc53b9a03a
Remove years from copyright notes. ( #13415 )
...
* Change copyright year to 2023 from 2022
* Fix incorrect update of copyright year
* Remove years from copy right header
* Fix remaining files
* Fix typo in a header and remove update-copyright.sh
2023-02-21 18:46:41 +00:00
Gavin Wood
2d7fa18e73
Make DispatchError impl MEL ( #13169 )
...
* Make DispatchError impl MEL
* Upgrade SCALE codec to support `codec(skip)` for MEL
Co-authored-by: Bastian Köcher <info@kchr.de >
2023-01-19 16:47:47 +00:00
Oliver Tale-Yazdi
2bc6078738
Remove unused types ( #13091 )
...
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2023-01-07 13:42:44 +00:00
Oliver Tale-Yazdi
31f5119ecd
Use explicit call indices ( #12891 )
...
* frame-system: explicit call index
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Use explicit call indices
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* pallet-template: explicit call index
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* DNM: Temporarily require call_index
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Revert "DNM: Temporarily require call_index"
This reverts commit c4934e312e12af72ca05a8029d7da753a9c99346.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2022-12-12 14:32:41 +00:00
Niklas Adolfsson
2b8af8cb1a
release sp-core 7.0.0 and sp-runtime 7.0.0 ( #12599 )
...
* chore(release): sp-core v7.0.0
* chore(release): sp-runtime v7.0.0
* fix bad merge
2022-11-15 14:54:14 +00:00
Sergej Sakac
e4b6f4a66d
BREAKING: Rename Origin ( #12258 )
...
* BREAKING: Rename Origin
* more renaming
* a bit more renaming
* fix
* more fixing
* fix in frame_support
* even more fixes
* fix
* small fix
* ...
* update .stderr
* docs
* update docs
* update docs
* docs
2022-09-20 22:13:09 +00:00
Sergej Sakac
6e8795afe6
BREAKING: Rename Call & Event ( #11981 )
...
* rename Event to RuntimeEvent
* rename Call
* rename in runtimes
* small fix
* rename Event
* small fix & rename RuntimeCall back to Call for now
* small fixes
* more renaming
* a bit more renaming
* fmt
* small fix
* commit
* prep for renaming associated types
* fix
* rename associated Event type
* rename to RuntimeEvent
* commit
* merge conflict fixes & fmt
* additional renaming
* fix.
* fix decl_event
* rename in tests
* remove warnings
* remove accidental rename
* .
* commit
* update .stderr
* fix in test
* update .stderr
* TRYBUILD=overwrite
* docs
* fmt
* small change in docs
* rename PalletEvent to Event
* rename Call to RuntimeCall
* renamed at wrong places :P
* rename Call
* rename
* rename associated type
* fix
* fix & fmt
* commit
* frame-support-test
* passing tests
* update docs
* rustdoc fix
* update .stderr
* wrong code in docs
* merge fix
* fix in error message
* update .stderr
* docs & error message
* .
* merge fix
* merge fix
* fmt
* fmt
* merge fix
* more fixing
* fmt
* remove unused
* fmt
* fix
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2022-09-12 22:03:31 +00:00
Shawn Tabrizi
30951822ba
Weight v1.5: Opaque Struct ( #12138 )
...
* initial idea
* update frame_support
* update a bunch more
* add ord
* adjust RuntimeDbWeight
* frame_system builds
* re-export
* frame_support tests pass
* frame_executive compile
* frame_executive builds
* frame_system tests passing
* pallet-utility tests pass
* fix a bunch of pallets
* more
* phragmen
* state-trie-migration
* scheduler and referenda
* pallet-election-provider-multi-phase
* aura
* staking
* more
* babe
* balances
* bunch more
* sudo
* transaction-payment
* asset-tx-payment
* last pallets
* fix alliance merge
* fix node template runtime
* fix pallet-contracts cc @athei
* fix node runtime
* fix compile on runtime-benchmarks feature
* comment
* fix frame-support-test
* fix more tests
* weight regex
* frame system works
* fix a bunch
* more
* more
* more
* more
* more
* more fixes
* update templates
* fix contracts benchmarks
* Update lib.rs
* Update lib.rs
* fix ui
* make scalar saturating mul const
* more const functions
* scalar div
* refactor using constant functions
* move impl
* fix overhead template
* use compactas
* Update lib.rs
2022-08-31 11:26:13 +00:00
Squirrel
a68a80fbae
declone and close the door ( #12035 )
...
* declone and close the door
* cargo fmt
* remove brackets
2022-08-15 19:38:36 +00:00
Oliver Tale-Yazdi
dd2314a118
Remove storage MaxValues limits ( #11643 )
...
* Remove limits
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Remove more
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2022-06-11 17:50:16 +00:00
dependabot[bot]
a5d0a65bf4
Bump scale-info from 2.0.1 to 2.1.1 ( #11420 )
...
Bumps [scale-info](https://github.com/paritytech/scale-info ) from 2.0.1 to 2.1.1.
- [Release notes](https://github.com/paritytech/scale-info/releases )
- [Changelog](https://github.com/paritytech/scale-info/blob/master/CHANGELOG.md )
- [Commits](https://github.com/paritytech/scale-info/commits/v2.1.1 )
---
updated-dependencies:
- dependency-name: scale-info
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-16 10:07:00 +02:00
Shawn Tabrizi
7d5202341b
Basic TOML Lint ( #11348 )
...
* basic lint
* lint ordering
2022-05-04 13:38:54 +00:00
Falco Hirschenberger
b581604aa7
Apply some clippy lints ( #11154 )
...
* Apply some clippy hints
* Revert clippy ci changes
* Update client/cli/src/commands/generate.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/commands/inspect_key.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/db/src/bench.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/db/src/bench.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/service/src/client/block_rules.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/service/src/client/block_rules.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/network/src/transactions.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/network/src/protocol.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Revert due to missing `or_default` function.
* Fix compilation and simplify code
* Undo change that corrupts benchmark.
* fix clippy
* Update client/service/test/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/state-db/src/noncanonical.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/state-db/src/noncanonical.rs
remove leftovers!
* Update client/tracing/src/logging/directives.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update utils/fork-tree/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* added needed ref
* Update frame/referenda/src/benchmarking.rs
* Simplify byte-vec creation
* let's just not overlap the ranges
* Correction
* cargo fmt
* Update utils/frame/benchmarking-cli/src/shared/stats.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update utils/frame/benchmarking-cli/src/pallet/command.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update utils/frame/benchmarking-cli/src/pallet/command.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Giles Cope <gilescope@gmail.com >
2022-04-30 21:28:27 +00:00
Qinxuan Chen
51915ebe4a
Remove deprecated RawEvent types from some pallets ( #11316 )
...
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
2022-04-29 08:28:17 +00:00
dependabot[bot]
ee084279c8
Bump scale-info from 2.0.0 to 2.0.1 ( #10965 )
...
Bumps [scale-info](https://github.com/paritytech/scale-info ) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/paritytech/scale-info/releases )
- [Changelog](https://github.com/paritytech/scale-info/blob/master/CHANGELOG.md )
- [Commits](https://github.com/paritytech/scale-info/commits )
---
updated-dependencies:
- dependency-name: scale-info
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-02 21:13:24 +01:00
Andrew Jones
a3a7fe9041
Release primitive crates ( #10937 )
...
* cargo set-version --bump major -p pallet-contracts-primitives
* cargo set-version --bump major -p sp-core
* cargo set-version --bump major -p sp-runtime-interface
* cargo set-version --bump major -p sp-wasm-interface
* cargo set-version --bump major -p sp-runtime
* cargo set-version --bump major -p sp-storage
* cargo set-version --bump major -p sp-rpc
* cargo set-version --bump major -p sp-io
* cargo set-version --bump major -p sp-trie
* cargo set-version -p sp-state-machine -- 0.12.0
* cargo set-version -p sp-externalities -- 0.12.0
* cargo set-version -p sp-keystore -- 0.12.0
* cargo set-version --bump major -p sp-keyring
* cargo set-version --bump major -p sp-version
* cargo set-version --bump major -p sp-tracing
* cargo set-version --bump major -p sp-application-crypto
* cargo set-version --bump major -p sp-arithmetic
* cargo unleash version bump-major -p sp-runtime-interface-proc-macro
* Add codec max-encoded-len feature to sp-arithmetic
* cargo unleash version bump-major -p sp-core-hashing-proc-macro
2022-03-01 14:35:23 +01:00
wigy
535325d2e6
Upgrading parity-scale-codec to v3 ( #10825 )
...
* Upgraded dependencies
* Adapting code to scale v3
* Empty commit to trigger CI
* Triggering CI
* Fixing UI test
* Remove superfluous dev-dep added by #9228
* Cryout for CI
2022-02-24 15:34:34 +01:00
Shawn Tabrizi
f6f82d876b
Add Storage Info to Various Pallets ( #10810 )
...
* atomic swap
* bounties
* bounties fmt
* gilt
* indices
* nicks
* randomness-collective-flip
* recovery
* reuse maxapprovals
* Update tests.rs
* Update frame/randomness-collective-flip/src/lib.rs
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* use the correct bound
* complete recovery
* use `bounded_vec` macro
* Update tests.rs
* transaction payment
* uniques
* mmr
* example offchain worker
* beefy-mmr
* Update frame/recovery/src/lib.rs
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Use BoundedVec instead of a type-parameterized BoundedString
* cargo fmt
* Update frame/atomic-swap/src/lib.rs
* use config const
* Update lib.rs
* update mel_bound
* fmt
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
2022-02-08 14:10:35 +00:00
Alexander Theißen
3938c1cb62
Release pallet-contracts-primitives ( #10772 )
...
* Bump sp-storage
* Bump sp-rpc
* Bump sp-io
* Bump sp-trie
* Bump sp-state-machine
* Bump sp-externalities
* Bump sp-keystore
* Bump sp-application-crypto
* Bump pallet-contracts-primitives
* Bump sp-core
* Bump sp-runtime-interface
* Bump sp-wasm-interface
* Bump sp-runtime
* Bump sp-storage
* Update lock file
* Revert "Bump sp-storage"
This reverts commit f86c6db1ae334e28207b658fd90714ade0332e3b.
* Update lock file
2022-02-01 20:38:02 +01:00
Oliver Tale-Yazdi
362a6d9b28
Require MaxEncodedLen per default ( #10662 )
...
* Remove generate_storage_info
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add without_storage_info where needed
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update doc tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add more without_storage_info
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* fix TryBuild
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* fix TryBuild tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2022-01-20 11:16:04 +00:00
Nazar Mokrynskyi
6b60c3dbff
Relax types on DigestItemRef, such that byte slices can be used in addition to vector references ( #10536 )
...
* Relax types on `DigestItemRef`, such that byte slices can be used in addition to vector references
* Apply clippy suggestions
2022-01-20 11:02:22 +01:00
Bastian Köcher
f3662b4bba
Happy new year 2022 ( #10573 )
2022-01-03 09:22:14 +01:00
dharjeezy
1b0be8ae06
Replace parameter_types with ConstU32 &c. ( #10402 )
...
* remove parameter types and use const type
* remove parameter types and use const type
* Delete {
* Delete count,
* refractor for beefy, benchmarking, child bounties, and collective pallets
* refractor for pallet contracts
* refractor for elections
* refractor for more pallets
* fix CI issues
* fix CI issues
* fix CI issues
* fix CI issues
* remove warning to fix CI issue
* remove warning to fix CI issue
refractor for pallet preimage
* remove warning to fix CI issue
refractor for pallet proxy
* remove warning to fix CI issue
refractor for pallet recovery
refractor for pallet randomness-collective-flip
* remove warning to fix CI issue
refractor for pallet scored-pool
refractor for pallet scheduler
refractor for pallet session
* remove warning to fix CI issue
refractor for pallet society, support, system, timestamp, tips
* remove warning to fix CI issue
refractor for pallet transaction_payment, transaction_storage, treasury, uniques, utility
* remove warning to fix CI issue
* cargo +nightly fmt
* CI fix
* more param refractor on beefy-mmr
* refractor for beefy
* Update frame/babe/src/mock.rs
* Update frame/babe/src/mock.rs
* Update frame/bounties/src/tests.rs
* Update frame/tips/src/tests.rs
* Delete mock.rs
* Update frame/examples/basic/src/tests.rs
* Apply suggestions from code review
* Update frame/im-online/src/mock.rs
* Update frame/im-online/src/mock.rs
* Update frame/offences/benchmarking/src/mock.rs
* Update frame/session/benchmarking/src/mock.rs
* Update frame/support/test/tests/pallet_compatibility.rs
* Update frame/support/test/tests/pallet_compatibility_instance.rs
* Update frame/treasury/src/tests.rs
* Update test-utils/runtime/src/lib.rs
* some cleanup
* fmt
* remove unused
Co-authored-by: Damilare <dakinlose@teamapt.com >
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
2021-12-16 03:06:11 +00:00
David
edf73199ab
Prepare sp-runtime for publication ( #10451 )
...
* Bump versions of sp-core and dependencies to v4.0.0
* Update references from `4.0.0-dev` –> `4.0.0`
* Funny whitespace
* Funny whitespace 2
* Prepare `sp-runtime` for publication
2021-12-15 12:36:17 +01:00
Bastian Köcher
f6f58f95e1
inspect-key: Adds support for expect-public (#10430 )
...
* Introduce `SecretUri`
* `inspect-key`: Adds support for `expect-public`
`expect-public` can be used to check that a given secret uri corresponds to the given public key.
This is mainly useful when the secret uri is protected by a password and a new derived account
should be generated. With `--expect-public` the user can pass the public key/account-id of the
"base" secret uri aka the one without any derivation to ensure the correct password was inserted.
* Fixes
* 🤦
* Apply suggestions from code review
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com >
* Review feedback
* FMT
* Bump the versions
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com >
2021-12-11 08:13:18 +01:00
Gavin Wood
3dd8f83a3a
Insufficient asset quota and deposits ( #10382 )
...
* Allow asset accounts to exist by deposit
* Place limit on consumers (and therefore freebie asset accounts)
* Maximum number of assets
* Fixes
* Fixes
* Formatting
* Docs
* Formatting
* Destroyed assets are properly tidied
* Update frame/assets/src/types.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
* Docs
* Docs
* Formatting
* Docs
* Docs
* Fixes
* Fixes
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
2021-12-09 13:22:54 +01:00
David
92dc635f3c
Release sp-core 4.0.0 ( #10447 )
...
* Bump versions of sp-core and dependencies to v4.0.0
* Update references from `4.0.0-dev` –> `4.0.0`
* Funny whitespace
* Funny whitespace 2
2021-12-08 21:06:50 +01:00
David Salami
120894fdb7
Add field names to pallet Event variants ( #9993 )
...
* convert pallet-assets events to struct types
* updated events of a couple pallets
* updated pallet event field names
* update pallet event field names
* updated events in test files
* cargo fmt
* minorfixes
* fix assertion error
* minor fix
* formatting fix
* fmt
2021-11-16 01:56:00 +00:00
Bastian Köcher
b08d3017a8
Switch to Rust 2021 ( #10170 )
...
* Switch to Rust 2021
* Update trybuild to fix errors
2021-11-04 19:54:48 +01:00
Dan Shields
8db7ec9cc9
Migrate to docs.substrate.io throughout ( #10007 )
...
* all reverences of substrate.dev replaced with *correct* docs.substrate.io links
* fix links in non-cargo files, errors in replace
* homepage https://substrate.io
* cargo +nightly fmt
* FMT
Co-authored-by: Bastian Köcher <info@kchr.de >
2021-10-13 12:56:56 -06:00
Andrew Jones
49b6dfd2e5
Enrich metadata with type information ( #8615 )
...
* Cargo.lock after merge
* Restore scale-info feature
* Fully qualify TypeInfo derive
* Skip PendingSwap T
* Add missing skip_type_params attr
* metadata docs features
* Reduce pallet event attribute to struct
* Cargo.lock
* Update frame/balances/src/tests_composite.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
* Line widths check
* Cargo.lock
* Add scale-info/std
* Update frame/system/src/lib.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
* Use `skip_type_params` to remove `TypeInfo` requirements on checks
* Revert "Remove unused Call metadata stuff"
This reverts commit 41311f85
* Skip BalanceSwapAction type parameter
* Remove unused event metadata macro
* Update frame-metadata
* Update primitives/npos-elections/compact/src/codec.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
* Manual TypeInfo for Header
* Remove TypeInfo requirement for consts in BoundedVec etc.
* Another TypeInfo bound removed
* review: fix indentation
* TypeInfo impls for Identity types
* Add some todos to add custom TypeInfo impls
* Update frame/support/procedural/src/pallet/expand/pallet_struct.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
* Add some todos to add custom TypeInfo impls
* Add a test for manual Data TypeInfo impl
* Add custom TypeInfo impl for Vote
* Era custom TypeInfo crimes
* Revert finality-grandpa version to 0.14.z
* review: renamed module to pallet_constants_metadata
* New line at end of file
* Add missing scale-info/std
* Update frame/support/src/storage/types/mod.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
* Remove StorageEntryType::Map unused flag
* Add missing scale-info dependency after merge
* SignedExtension::AdditionalSigned metadata
* Update frame-metadata, use abbreviated docs and args fields
* Update frame/example/Cargo.toml
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* Add scale_info/std and remove unused scale-info dependency
* Remove scale-info dependency
* Remove treasury pallet::metadata
* Remove redundant Event test
* Add back scale-info as dev dependency
* fix error metadata when no error defined in decl_module
* Add Module3 to tests
* Fix metadata test
* Add docs feature to frame-support test
* WIP fixing pallet metadata test
* Remove redundant FunctionMetadata, FunctionArgumentMetadata as per https://github.com/paritytech/frame-metadata/pull/20
* Use main branch of frame-metadata
* Use patch of scale-info for latest changes
* Use latest patched scale-info
* Manual TypeInfo for DigestItem
* Manual TypeInfo for DigestItem
* Update scale-info
* Skip __Ignore variants for Error, depends on https://github.com/paritytech/scale-info/pull/117
* Named fields for FRAME v2 pallet Call variants
* Named fields for FRAME v1 pallet Call variants
* Add missing scale-info dependency
* WIP expand benchmark call variant
* fix benchmark with new function
create a new function for each variant of a pallet call.
This function is called by benchmarking macro in order not to break call
creation with unnamed argument
* fix tests
* more fix
* Fix staking tests
* Fix offchain workers calls
* Cherry pick rustfmt.toml from master
* cargo +nightly-2021-06-22 fmt --all
* Update to new call variant structs
* More call variant struct updates
* Remove unused import
* More call variant structs
* More call variant structs
* Even more call variant structs
* Mooar variant structs
* Evermore variant structs
* Call variant structs ad infinitum
* Fmt
* More call variants
* Last call variant
* Call variants all done?
* Fix SS58Prefix type
* Potential workaround for BitFlags<IdentityFields> TypeInfo
* Enable docs capturing for Call, Event, and Error types
* Fix IdentityFields TypeInfo
* Remove metadata-docs feature
* Add capture_docs = true for legacy Call, Event and Error types
* Fmt
* Fix metadata test type
* Update benchmarks with call struct variants
* Fmt
* More test fixes
* Fmt
* Fix benches
* Use latest capture_docs attr
* Latest scale_info
* Fmt
* review: change &Vec to &[]
* Remove pallet metadata attr
* review: remove commented out test code
* review: skip_type_params trailing comma suggestion
* Update to scale-info 0.10.0
* Update construct_runtime ui tests, different because of metadata TypeInfo impls
* Add some TypeInfo derives for UI tests
* Update storage ensure span ui stderrs
* Update call argument bound ui tests
Possibly changed because change from tuple to struct variants?
* Add scale-info dev dependency
* Update to latest finality-grandpa release
* review: missing newline
* review: missing scale-info/std
* review: remove duplicate scale-info/std
* review: remove fully qualified TypeInfo
* review: add missing scale-info/std
* review: remove unnecessary imports.
* Fmt
* Use crates.io RC version of frame-metadata
* Remove scale-info/std because it is a dev dependency
* Add missing scale_info dev-dependency for test
* Delete empty metadata folder
* Fix sp_std import
* review: improve manual UncheckedExtrinsic TypeInfo impl
* review: use full scale-info for dev-dependency
* Remove DefaultByteGetter impl
* review: derive TypeInfo for generic header
* Fmt
* Update primitives/runtime/src/generic/unchecked_extrinsic.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* Update primitives/runtime/src/generic/unchecked_extrinsic.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* Update bin/node/executor/Cargo.toml
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update frame/identity/src/types.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update frame/support/src/dispatch.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Remove redundant derive
* Simplify scale-info dependency
* Strip underscore prefix from call variant struct names
* Another underscore field
* More underscore fields
* Another underscore field
* Update to frame-metadata 14.0.0-rc.2 with combined StorageEntryType::Map
* Fmt
* Revert weights formatting
* Fix up some tests
* Fix up some tests for StorageEntryTypeMetadata
* scale-info dev dependency
* Fix test error
* Add missing TypeInfo derives
* Add back missing scale-info dependency
* Add back missing scale-info dependency
* Fix npos compact impls
* Cargo.lock
* Fmt
* Fix errors
* Fmt
* Fix renamed raw_solution field
* Fix error
* Fmt
* Fix some benchmarks
* Fmt
* Stray R
* Fix
* Add missing TypeInfos
* ui test fix
* Fix line widths
* Revert "ui test fix"
This reverts commit 2d15ec058a216e3f92d713f1174603a2bb1eac65.
* Upgrade to scale-info 0.11.0
* Revert "Upgrade to scale-info 0.11.0"
This reverts commit 047bb179085a0059c36cd20ab405f55cf0867e28.
* Add Runtime type
* Update to scale-info 0.12
* Update to scale-info 1.0
* Update frame-metadata to version 14.0.0
* Patch finality-grandpa until release available
* Fix metadata tests
* Fix metadata tests
* Fmt
* Remove patched finality-grandpa
* Fix tests, use scale_info imports
* Fix pallet tests
* Add BlockNumber TypeInfo bound
* ui test fix
* Cargo.lock
* Remove pallet metadata
* Cargo.lock
* Add missing scale-info dependency
* Remove pallet event metadata
* Fix error
* Fix collective errors
* Semicolol
* Fmt
* Remove another metadata attribute
* Add new variant to custom digest TypeInfo
* Fmt
* Cargo.lock from master
* Remove comma lol
* Fix example call error
* Fix example call error properly
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-09-15 11:40:41 +00:00
Kian Paimani
abd08e29ce
Rewrap all comments to 100 line width ( #9490 )
...
* reformat everything again
* manual formatting
* last manual fix
* Fix build
2021-08-11 14:56:55 +00:00
Gavin Wood
bdda3ed612
Remove Filter and use Contains instead ( #9514 )
...
* Remove Filter and use Contains instead
* Fixes
* Formatting
* Update docs/Upgrading-2.0-to-3.0.md
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Typo
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
2021-08-07 19:26:40 +00:00
Squirrel
aafe64315a
Remove extra commas made redundent after rustfmt ( #9404 )
...
* Remove extra commas made redundent after rustfmt
2021-07-22 11:06:17 +01:00
Bastian Köcher
7b56ab15b4
Run cargo fmt on the whole code base ( #9394 )
...
* Run cargo fmt on the whole code base
* Second run
* Add CI check
* Fix compilation
* More unnecessary braces
* Handle weights
* Use --all
* Use correct attributes...
* Fix UI tests
* AHHHHHHHHH
* 🤦
* Docs
* Fix compilation
* 🤷
* Please stop
* 🤦 x 2
* More
* make rustfmt.toml consistent with polkadot
Co-authored-by: André Silva <andrerfosilva@gmail.com >
2021-07-21 14:32:32 +00:00
Falco Hirschenberger
76a289ebd8
Add missing #[pallet::constant] annotations to pallets ( #9367 )
...
fixing #9306
2021-07-18 18:27:39 +00:00
Alexander Theißen
e01ac8cea0
contracts: Allow contracts to dispatch calls into the runtime ( #9276 )
...
* contracts: Allow contracts to dispatch calls into the runtime
* Fix RPC tests
* Fix typo
* Replace () by AllowAllFilter and DenyAllFilter
* Add rust doc
* Fixup for `()` removal
* Fix lowest gas calculation
* Rename AllowAllFilter and DenyAllFilter
* Updated changelog
2021-07-12 20:40:27 +00:00
Benjamin Kampmann
c78c2892a4
Attempting to fix publishing ( #9140 )
...
* mark template and utils as non-publish
* switch to development version for testing
* activate unleash check
* maybe if I disable all rules...
* Fix isolated compilation of `max-encoded-len-derive` with `syn`
error[E0369]: binary operation `==` cannot be applied to type `syn::Path`
--> src/lib.rs:88:29
|
88 | .filter(|attr| attr.path == parse_quote!(max_encoded_len_crate))
| --------- ^^ ----------------------------------- _
| |
| syn::Path
error: aborting due to previous error
For more information about this error, try `rustc --explain E0369`.
Error: could not compile `max-encoded-len-derive`
* WIP: bump changes crates since v3 tag to next breaking
cargo unleash version bump-breaking --changed-since v3.0.0
cargo unleash version set-pre dev --changed-since v3.0.0
FIXME: Don't modify crates that are not yet released, e.g.
`max-encoded-len-derive`
* Update lockfile
* WIP: Bump sp-transaction-pool as well
* WIP: Bump sp-offchain as well
* WIP: Bump frame-system-rpc-runtime-api as well
* WIP: Bump sp-authority-discovery as well
* Manually deactivate dev-deps before `cargo unleash check`
Otherwise we run into `Cycle detected` error.
* Bump sp-consensus-slots
* Add missing Cargo.lock change
* Bump sp-consensus-vrf as well
* Bump sp-keyring as well
* Bump sp-consensus-pow as well
* Try to speed up the `unleash-check` job
Previously, the job took 106 minutes - let's see if explicitly
specifying a `CARGO_TARGET_DIR` will help
* fixup: Ensure the temp target dir exists for unleash check
* Bump pallet-transaction-payment-rpc-runtime-api as well
Needed for Polkadot
* Bump pallet-transaction-payment-rpc as well
Needed for Polkadot
* Try updating crates after patching in the Polkadot CI job
* Use another approach to update patched Substrate crates
* Try to update all sp-core versions in Polkadot CI job
* Simplify sp-core version checking
* Apply another shellcheck lint
* Just do the simplest thing I guess
* Welp don't do --offline then
* Clean up `unleash-check` job triggers
Co-authored-by: Denis Pisarev <denis.pisarev@parity.io >
* Fix a note in unleash-check cache step
* Add a note about temporary optimization in cargo-unleash
* Pin a newer version of cargo-unleash
Co-authored-by: Igor Matuszewski <xanewok@gmail.com >
Co-authored-by: Denis Pisarev <denis.pisarev@parity.io >
2021-07-11 12:17:53 +00:00
Shinsaku Ashizawa
8ebe99c8f5
change reference trait to config ( #9224 )
2021-06-29 09:26:27 +02:00
Alexander Popiak
5dec6e5c81
make all extrinsics public so they are available from outside ( #9078 )
...
Co-authored-by: thiolliere <gui.thiolliere@gmail.com >
2021-06-12 12:43:08 +02:00
Xiliang Chen
223529e4dd
Named reserve ( #7778 )
...
* add NamedReservableCurrency
* move currency related trait and types into a new file
* implement NamedReservableCurrency
* remove empty reserves
* Update frame/support/src/traits.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* fix build
* bump year
* add MaxReserves
* repatriate_reserved_named should put reserved fund into named reserved
* add tests
* add some docs
* fix warning
* Update lib.rs
* fix test
* fix test
* fix
* fix
* triggier CI
* Move NamedReservableCurrency.
* Use strongly bounded vec for reserves.
* Fix test.
* remove duplicated file
* trigger CI
* Make `ReserveIdentifier` assosicated type
* add helpers
* make ReserveIdentifier assosicated type
* fix
* update
* trigger CI
* Apply suggestions from code review
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* trigger CI
* Apply suggestions from code review
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Gavin Wood <i@gavwood.com >
Co-authored-by: Shaun Wang <spxwang@gmail.com >
2021-06-04 09:32:46 +02:00
Tim Gestson
14befab52e
Remove now unneeded empty hooks and calls #8873 ( #8874 )
...
* Remove now unneeded empty hooks and calls
* fix pallet_ui tests
2021-05-23 16:30:46 +00:00