Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
polkadot-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
parity
Mirrored projects
polkadot-sdk
Commits
1217b2cf
Commit
1217b2cf
authored
2 years ago
by
Branislav Kontur
Committed by
Bastian Köcher
11 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Small fix after rebase (#1644)
parent
6c4728f1
Branches
Branches containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bridges/primitives/chain-bridge-hub-rococo/src/lib.rs
+36
-4
36 additions, 4 deletions
bridges/primitives/chain-bridge-hub-rococo/src/lib.rs
bridges/primitives/chain-bridge-hub-wococo/src/lib.rs
+38
-7
38 additions, 7 deletions
bridges/primitives/chain-bridge-hub-wococo/src/lib.rs
with
74 additions
and
11 deletions
bridges/primitives/chain-bridge-hub-rococo/src/lib.rs
+
36
−
4
View file @
1217b2cf
// Copyright 20
19-2021
Parity Technologies (UK) Ltd.
// Copyright 20
22
Parity Technologies (UK) Ltd.
// This file is part of Parity Bridges Common.
// Parity Bridges Common is free software: you can redistribute it and/or modify
...
...
@@ -21,19 +21,51 @@
use
bp_messages
::
*
;
pub
use
bp_polkadot_core
::
*
;
use
bp_runtime
::{
decl_bridge_finality_runtime_apis
,
decl_bridge_messages_runtime_apis
};
use
bp_runtime
::{
decl_bridge_finality_runtime_apis
,
decl_bridge_messages_runtime_apis
,
Chain
,
Parachain
,
};
use
frame_support
::{
dispatch
::
DispatchClass
,
parameter_types
,
sp_runtime
::{
FixedU128
,
MultiAddress
,
MultiSigner
},
weights
::{
constants
::
ExtrinsicBaseWeight
,
WeightToFeeCoefficient
,
WeightToFeeCoefficients
,
WeightToFeePolynomial
,
},
Parameter
,
Parameter
,
RuntimeDebug
,
};
use
sp_std
::
prelude
::
*
;
pub
type
BridgeHubRococo
=
PolkadotLike
;
/// BridgeHubRococo parachain.
#[derive(RuntimeDebug)]
pub
struct
BridgeHubRococo
;
impl
Chain
for
BridgeHubRococo
{
type
BlockNumber
=
BlockNumber
;
type
Hash
=
Hash
;
type
Hasher
=
Hasher
;
type
Header
=
Header
;
type
AccountId
=
AccountId
;
type
Balance
=
Balance
;
type
Index
=
Index
;
type
Signature
=
Signature
;
fn
max_extrinsic_size
()
->
u32
{
*
BlockLength
::
get
()
.max
.get
(
DispatchClass
::
Normal
)
}
fn
max_extrinsic_weight
()
->
Weight
{
BlockWeights
::
get
()
.get
(
DispatchClass
::
Normal
)
.max_extrinsic
.unwrap_or
(
Weight
::
MAX
)
}
}
impl
Parachain
for
BridgeHubRococo
{
const
PARACHAIN_ID
:
u32
=
BRIDGE_HUB_ROCOCO_PARACHAIN_ID
;
}
/// [`WeightToFee`] should reflect cumulus/bridge-hub-rococo-runtime [`WeightToFee`]
pub
struct
WeightToFee
;
...
...
This diff is collapsed.
Click to expand it.
bridges/primitives/chain-bridge-hub-wococo/src/lib.rs
+
38
−
7
View file @
1217b2cf
...
...
@@ -25,19 +25,50 @@
// Re-export only what is really needed
pub
use
bp_bridge_hub_rococo
::{
account_info_storage_key
,
AccountId
,
AccountPublic
,
AccountSigner
,
Address
,
Balance
,
Block
Number
,
Hash
,
Hashing
,
Header
,
Nonce
,
SS58Prefix
,
Signature
,
SignedBlock
,
SignedExtensions
,
UncheckedExtrinsic
,
WeightToFee
,
ADDITIONAL_MESSAGE_BYTE_DELIVERY_WEIGHT
,
DEFAULT
_MESSAGE_DELIVERY_
TX_
WEIGHT
,
EXTRA_STORAGE_PROOF_SIZE
,
MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT
,
Block
Length
,
BlockNumber
,
BlockWeights
,
Hash
,
Hasher
,
Hashing
,
Header
,
Index
,
Nonce
,
SS58Prefix
,
Signature
,
SignedBlock
,
SignedExtensions
,
UncheckedExtrinsic
,
WeightToFee
,
ADDITIONAL
_MESSAGE_
BYTE_
DELIVERY_WEIGHT
,
DEFAULT_MESSAGE_DELIVERY_TX_WEIGHT
,
EXTRA_STORAGE_PROOF_SIZE
,
MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT
,
MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX
,
MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX
,
PAY_INBOUND_DISPATCH_FEE_WEIGHT
,
TX_EXTRA_BYTES
,
};
use
bp_messages
::
*
;
use
bp_runtime
::{
decl_bridge_finality_runtime_apis
,
decl_bridge_messages_runtime_apis
};
use
frame_support
::{
sp_runtime
::
FixedU128
,
Parameter
};
use
bp_runtime
::{
decl_bridge_finality_runtime_apis
,
decl_bridge_messages_runtime_apis
,
Chain
,
Parachain
,
};
use
frame_support
::{
dispatch
::
DispatchClass
,
sp_runtime
::
FixedU128
,
Parameter
,
RuntimeDebug
};
use
sp_std
::
prelude
::
*
;
pub
type
BridgeHubWococo
=
bp_bridge_hub_rococo
::
BridgeHubRococo
;
/// BridgeHubWococo parachain.
#[derive(RuntimeDebug)]
pub
struct
BridgeHubWococo
;
impl
Chain
for
BridgeHubWococo
{
type
BlockNumber
=
BlockNumber
;
type
Hash
=
Hash
;
type
Hasher
=
Hasher
;
type
Header
=
Header
;
type
AccountId
=
AccountId
;
type
Balance
=
Balance
;
type
Index
=
Index
;
type
Signature
=
Signature
;
fn
max_extrinsic_size
()
->
u32
{
*
BlockLength
::
get
()
.max
.get
(
DispatchClass
::
Normal
)
}
fn
max_extrinsic_weight
()
->
Weight
{
BlockWeights
::
get
()
.get
(
DispatchClass
::
Normal
)
.max_extrinsic
.unwrap_or
(
Weight
::
MAX
)
}
}
impl
Parachain
for
BridgeHubWococo
{
const
PARACHAIN_ID
:
u32
=
BRIDGE_HUB_WOCOCO_PARACHAIN_ID
;
}
/// Identifier of BridgeHubWococo in the Wococo relay chain.
pub
const
BRIDGE_HUB_WOCOCO_PARACHAIN_ID
:
u32
=
1013
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment