Metadata v14 (companion to #3336) (#564)

* Remove event pallet::metadata attributes

* Add scale-info deps, TypeInfo derives, update call variants

* Update metadata runtime APIs

* Add missing scale_info dependency, update rococo runtime API

* Add missing scale_info dependency

* Remove pushed diener patches

* Cargo.lock

* Add missing scale-info dependencies

* Fixes

* Statemint runtime fixes

* Call struct variant empty matches

* Add missing scale-info dependency

* Fixes

* scale-info 1.0

* cargo update -p xcm

* update lock

* Update Cargo.lock

* update to latest polkadot

* remove rpc_http_threads

https://github.com/paritytech/substrate/pull/9737

* replace task executor with tokio handler

https://github.com/paritytech/substrate/pull/9737

* fix test compilation?

* Update Cargo.lock

* cargo update

* remove unused

* Update substrate and polkadot

* Update test/client/src/lib.rs

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Andrew Jones
2021-09-16 11:11:05 +01:00
committed by GitHub
parent b39bad58f1
commit e3eb3a0a12
36 changed files with 576 additions and 409 deletions
@@ -6,6 +6,7 @@ version = "0.1.0"
[dependencies]
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
scale-info = { version = "1.0.0", default-features = false, features = ["derive"] }
serde = { version = "1.0.101", optional = true, features = ["derive"] }
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
@@ -17,6 +18,7 @@ cumulus-primitives-core = { path = "../../../primitives/core", default-features
default = ["std"]
std = [
"codec/std",
"scale-info/std",
"serde",
"cumulus-primitives-core/std",
"frame-support/std",
@@ -6,6 +6,7 @@ version = "0.1.0"
[dependencies]
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
scale-info = { version = "1.0.0", default-features = false, features = ["derive"] }
serde = { version = "1.0.101", optional = true, features = ["derive"] }
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
@@ -22,6 +23,7 @@ cumulus-pallet-xcm = { path = "../../../pallets/xcm", default-features = false }
default = ["std"]
std = [
"codec/std",
"scale-info/std",
"serde",
"cumulus-primitives-core/std",
"sp-std/std",
@@ -79,7 +79,6 @@ pub mod pallet {
#[pallet::event]
#[pallet::generate_deposit(pub(super) fn deposit_event)]
#[pallet::metadata(T::BlockNumber = "BlockNumber")]
pub enum Event<T: Config> {
PingSent(ParaId, u32, Vec<u8>),
Pinged(ParaId, u32, Vec<u8>),
@@ -105,7 +104,7 @@ pub mod pallet {
Xcm(vec![Transact {
origin_type: OriginKind::Native,
require_weight_at_most: 1_000,
call: <T as Config>::Call::from(Call::<T>::ping(seq, payload.clone())).encode().into(),
call: <T as Config>::Call::from(Call::<T>::ping { seq, payload: payload.clone() }).encode().into(),
}]),
) {
Ok(()) => {
@@ -167,7 +166,7 @@ pub mod pallet {
Xcm(vec![Transact {
origin_type: OriginKind::Native,
require_weight_at_most: 1_000,
call: <T as Config>::Call::from(Call::<T>::pong(seq, payload.clone())).encode().into(),
call: <T as Config>::Call::from(Call::<T>::pong { seq, payload: payload.clone() } ).encode().into(),
}]),
) {
Ok(()) => Self::deposit_event(Event::PongSent(para, seq, payload)),