Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename constant to what bridge relayers expect #237

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pallets/chainbridge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ pub mod pallet {
/// This must be unique and must not collide with existing IDs within a set of bridged
/// chains.
#[pallet::constant]
type ChainId: Get<ChainId>;
type ChainIdentity: Get<ChainId>;

#[pallet::constant]
type ProposalLifetime: Get<<Self as frame_system::Config>::BlockNumber>;
Expand Down Expand Up @@ -482,7 +482,7 @@ pub mod pallet {
/// Whitelist a chain ID for transfer
pub fn whitelist(id: ChainId) -> DispatchResult {
// Cannot whitelist this chain
ensure!(id != T::ChainId::get(), Error::<T>::InvalidChainId);
ensure!(id != T::ChainIdentity::get(), Error::<T>::InvalidChainId);
// Cannot whitelist with an existing entry
ensure!(!Self::chain_whitelisted(id), Error::<T>::ChainAlreadyWhitelisted);
<ChainNonces<T>>::insert(id, 0);
Expand Down
2 changes: 1 addition & 1 deletion pallets/chainbridge/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ impl crate::pallet::Config for Test {
type RuntimeEvent = RuntimeEvent;
type AdminOrigin = frame_system::EnsureRoot<Self::AccountId>;
type Proposal = RuntimeCall;
type ChainId = TestChainId;
type ChainIdentity = TestChainId;
type ProposalLifetime = ProposalLifetime;
type BridgeAccountId = BridgeAccountId;
}
Expand Down
2 changes: 1 addition & 1 deletion pallets/erc20/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl bridge::Config for Test {
type Event = Event;
type AdminOrigin = frame_system::EnsureRoot<Self::AccountId>;
type Proposal = Call;
type ChainId = TestChainId;
type ChainIdentity = TestChainId;
type ProposalLifetime = ProposalLifetime;
}

Expand Down
2 changes: 1 addition & 1 deletion runtime/cere-dev/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1235,7 +1235,7 @@ impl pallet_chainbridge::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type AdminOrigin = frame_system::EnsureRoot<Self::AccountId>;
type Proposal = RuntimeCall;
type ChainId = ChainId;
type ChainIdentity = ChainId;
type ProposalLifetime = ProposalLifetime;
type BridgeAccountId = BridgeAccountId;
}
Expand Down
2 changes: 1 addition & 1 deletion runtime/cere/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,7 @@ impl pallet_chainbridge::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type AdminOrigin = frame_system::EnsureRoot<Self::AccountId>;
type Proposal = RuntimeCall;
type ChainId = ChainId;
type ChainIdentity = ChainId;
type ProposalLifetime = ProposalLifetime;
type BridgeAccountId = BridgeAccountId;
}
Expand Down
Loading