1#![cfg_attr(not(feature = "std"), no_std)]
18#![allow(clippy::too_many_arguments)]
20
21pub use bp_polkadot_core::*;
22pub use bp_rococo::{
23 SS58Prefix, MAX_AUTHORITIES_COUNT, MAX_NESTED_PARACHAIN_HEAD_DATA_SIZE, PARAS_PALLET_NAME,
24};
25
26use bp_header_chain::ChainWithGrandpa;
27use bp_runtime::{decl_bridge_finality_runtime_apis, Chain};
28use frame_support::weights::Weight;
29
30pub struct Wococo;
32
33impl Chain for Wococo {
34 type BlockNumber = <PolkadotLike as Chain>::BlockNumber;
35 type Hash = <PolkadotLike as Chain>::Hash;
36 type Hasher = <PolkadotLike as Chain>::Hasher;
37 type Header = <PolkadotLike as Chain>::Header;
38
39 type AccountId = <PolkadotLike as Chain>::AccountId;
40 type Balance = <PolkadotLike as Chain>::Balance;
41 type Nonce = <PolkadotLike as Chain>::Nonce;
42 type Signature = <PolkadotLike as Chain>::Signature;
43
44 fn max_extrinsic_size() -> u32 {
45 PolkadotLike::max_extrinsic_size()
46 }
47
48 fn max_extrinsic_weight() -> Weight {
49 PolkadotLike::max_extrinsic_weight()
50 }
51}
52
53impl ChainWithGrandpa for Wococo {
54 const WITH_CHAIN_GRANDPA_PALLET_NAME: &'static str = WITH_WOCOCO_GRANDPA_PALLET_NAME;
55 const MAX_AUTHORITIES_COUNT: u32 = MAX_AUTHORITIES_COUNT;
56 const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 =
57 REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY;
58 const MAX_HEADER_SIZE: u32 = MAX_HEADER_SIZE;
59 const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = AVERAGE_HEADER_SIZE_IN_JUSTIFICATION;
60}
61
62pub use bp_rococo::CommonSignedExtension as SignedExtension;
64
65pub const WITH_WOCOCO_GRANDPA_PALLET_NAME: &str = "BridgeWococoGrandpa";
67
68decl_bridge_finality_runtime_apis!(wococo, grandpa);