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

Commit cb033a4

Browse files
authored
Migrate pallet-proxy to pallet attribute macro (#8365)
* Migrate pallet-proxy to pallet attribute macro Part of #7882. Converts the `Proxy` pallet to the new pallet attribute macro introduced in #6877. [Upgrade guidelines used](https://substrate.dev/rustdocs/v3.0.0/frame_support/attr.pallet.html#upgrade-guidelines). ## ⚠️ Breaking Change ⚠️ From [checking upgrade guidelines](https://crates.parity.io/frame_support/attr.pallet.html#checking-upgrade-guidelines) > storages now use PalletInfo for module_prefix instead of the one given to `decl_storage`: use of this pallet in `construct_runtime!` needs careful updating of the name in order to not break storage or to upgrade storage (moreover for instantiable pallet). If pallet is published, make sure to warn about this breaking change. So users of the `Assets` pallet must be careful about the name they used in `construct_runtime!`. Hence the `runtime-migration` label, which might not be needed depending on the configuration of the `Assets` pallet. ### Notes There are some changes to the docs in metadata for the constants. The docs in the metadata for constants are now more complete.
1 parent 319d244 commit cb033a4

File tree

3 files changed

+247
-189
lines changed

3 files changed

+247
-189
lines changed

frame/proxy/src/benchmarking.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ benchmarks! {
9090
let call: <T as Config>::Call = frame_system::Call::<T>::remark(vec![]).into();
9191
}: _(RawOrigin::Signed(caller), real, Some(T::ProxyType::default()), Box::new(call))
9292
verify {
93-
assert_last_event::<T>(RawEvent::ProxyExecuted(Ok(())).into())
93+
assert_last_event::<T>(Event::ProxyExecuted(Ok(())).into())
9494
}
9595

9696
proxy_announced {
@@ -111,7 +111,7 @@ benchmarks! {
111111
add_announcements::<T>(a, Some(delegate.clone()), None)?;
112112
}: _(RawOrigin::Signed(caller), delegate, real, Some(T::ProxyType::default()), Box::new(call))
113113
verify {
114-
assert_last_event::<T>(RawEvent::ProxyExecuted(Ok(())).into())
114+
assert_last_event::<T>(Event::ProxyExecuted(Ok(())).into())
115115
}
116116

117117
remove_announcement {
@@ -169,7 +169,7 @@ benchmarks! {
169169
let call_hash = T::CallHasher::hash_of(&call);
170170
}: _(RawOrigin::Signed(caller.clone()), real.clone(), call_hash)
171171
verify {
172-
assert_last_event::<T>(RawEvent::Announced(real, caller, call_hash).into());
172+
assert_last_event::<T>(Event::Announced(real, caller, call_hash).into());
173173
}
174174

175175
add_proxy {
@@ -220,7 +220,7 @@ benchmarks! {
220220
)
221221
verify {
222222
let anon_account = Module::<T>::anonymous_account(&caller, &T::ProxyType::default(), 0, None);
223-
assert_last_event::<T>(RawEvent::AnonymousCreated(
223+
assert_last_event::<T>(Event::AnonymousCreated(
224224
anon_account,
225225
caller,
226226
T::ProxyType::default(),

0 commit comments

Comments
 (0)