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>
This commit is contained in:
Sergej Sakac
2022-09-13 00:03:31 +02:00
committed by GitHub
parent 472b5746e5
commit 6e8795afe6
228 changed files with 1791 additions and 1672 deletions
+7 -7
View File
@@ -134,10 +134,10 @@ impl nested::module::Config for RuntimeOriginTest {}
impl module::Config for RuntimeOriginTest {}
pub struct BaseCallFilter;
impl Contains<Call> for BaseCallFilter {
fn contains(c: &Call) -> bool {
impl Contains<RuntimeCall> for BaseCallFilter {
fn contains(c: &RuntimeCall) -> bool {
match c {
Call::NestedModule(_) => true,
RuntimeCall::NestedModule(_) => true,
_ => false,
}
}
@@ -149,9 +149,9 @@ impl system::Config for RuntimeOriginTest {
type Origin = Origin;
type BlockNumber = BlockNumber;
type AccountId = u32;
type Event = Event;
type RuntimeEvent = RuntimeEvent;
type PalletInfo = PalletInfo;
type Call = Call;
type RuntimeCall = RuntimeCall;
type DbWeight = ();
}
@@ -170,7 +170,7 @@ frame_support::construct_runtime!(
pub type Signature = sr25519::Signature;
pub type BlockNumber = u64;
pub type Header = generic::Header<BlockNumber, BlakeTwo256>;
pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<u32, Call, Signature, ()>;
pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<u32, RuntimeCall, Signature, ()>;
pub type Block = generic::Block<Header, UncheckedExtrinsic>;
#[test]
@@ -192,7 +192,7 @@ fn origin_default_filter() {
assert_eq!(Origin::from(nested::module::Origin).filter_call(&rejected_call), false);
let mut origin = Origin::from(Some(0));
origin.add_filter(|c| matches!(c, Call::Module(_)));
origin.add_filter(|c| matches!(c, RuntimeCall::Module(_)));
assert_eq!(origin.filter_call(&accepted_call), false);
assert_eq!(origin.filter_call(&rejected_call), false);