forked from paritytech/polkadot-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'xcm-v5' into outbound-queue-v2
- Loading branch information
Showing
50 changed files
with
1,107 additions
and
425 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
// SPDX-FileCopyrightText: 2023 Snowfork <[email protected]> | ||
//! Converts messages from Ethereum to XCM messages | ||
use crate::inbound::{CallIndex, GlobalConsensusEthereumConvertsFor}; | ||
use crate::inbound::{CallIndex, EthereumLocationsConverterFor}; | ||
use codec::{Decode, Encode}; | ||
use core::marker::PhantomData; | ||
use frame_support::{traits::tokens::Balance as BalanceT, PalletError}; | ||
|
@@ -247,7 +247,7 @@ where | |
|
||
let bridge_location = Location::new(2, GlobalConsensus(network)); | ||
|
||
let owner = GlobalConsensusEthereumConvertsFor::<[u8; 32]>::from_chain_id(&chain_id); | ||
let owner = EthereumLocationsConverterFor::<[u8; 32]>::from_chain_id(&chain_id); | ||
let asset_id = Self::convert_token_address(network, token); | ||
let create_call_index: [u8; 2] = CreateAssetCall::get(); | ||
let inbound_queue_pallet_index = InboundQueuePalletInstance::get(); | ||
|
@@ -447,7 +447,7 @@ where | |
|
||
#[cfg(test)] | ||
mod tests { | ||
use crate::inbound::{CallIndex, GlobalConsensusEthereumConvertsFor}; | ||
use crate::inbound::{CallIndex, EthereumLocationsConverterFor}; | ||
use frame_support::{assert_ok, parameter_types}; | ||
use hex_literal::hex; | ||
use xcm::prelude::*; | ||
|
@@ -471,7 +471,7 @@ mod tests { | |
let contract_location = Location::new(2, [GlobalConsensus(NETWORK)]); | ||
|
||
let account = | ||
GlobalConsensusEthereumConvertsFor::<[u8; 32]>::convert_location(&contract_location) | ||
EthereumLocationsConverterFor::<[u8; 32]>::convert_location(&contract_location) | ||
.unwrap(); | ||
|
||
assert_eq!(account, expected_account); | ||
|
@@ -482,7 +482,7 @@ mod tests { | |
let contract_location = Location::new(2, [GlobalConsensus(Polkadot), Parachain(1000)]); | ||
|
||
assert_eq!( | ||
GlobalConsensusEthereumConvertsFor::<[u8; 32]>::convert_location(&contract_location), | ||
EthereumLocationsConverterFor::<[u8; 32]>::convert_location(&contract_location), | ||
None, | ||
); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
// SPDX-FileCopyrightText: 2023 Snowfork <[email protected]> | ||
//! Converts messages from Ethereum to XCM messages | ||
use crate::inbound::{CallIndex, GlobalConsensusEthereumConvertsFor}; | ||
use crate::inbound::{CallIndex, EthereumLocationsConverterFor}; | ||
use codec::{Decode, Encode}; | ||
use core::marker::PhantomData; | ||
use frame_support::{traits::tokens::Balance as BalanceT, PalletError}; | ||
|
@@ -247,7 +247,7 @@ where | |
|
||
let bridge_location = Location::new(2, GlobalConsensus(network)); | ||
|
||
let owner = GlobalConsensusEthereumConvertsFor::<[u8; 32]>::from_chain_id(&chain_id); | ||
let owner = EthereumLocationsConverterFor::<[u8; 32]>::from_chain_id(&chain_id); | ||
let asset_id = Self::convert_token_address(network, token); | ||
let create_call_index: [u8; 2] = CreateAssetCall::get(); | ||
let inbound_queue_pallet_index = InboundQueuePalletInstance::get(); | ||
|
@@ -447,7 +447,7 @@ where | |
|
||
#[cfg(test)] | ||
mod tests { | ||
use crate::inbound::{CallIndex, GlobalConsensusEthereumConvertsFor}; | ||
use crate::inbound::{CallIndex, EthereumLocationsConverterFor}; | ||
use frame_support::{assert_ok, parameter_types}; | ||
use hex_literal::hex; | ||
use xcm::prelude::*; | ||
|
@@ -471,7 +471,7 @@ mod tests { | |
let contract_location = Location::new(2, [GlobalConsensus(NETWORK)]); | ||
|
||
let account = | ||
GlobalConsensusEthereumConvertsFor::<[u8; 32]>::convert_location(&contract_location) | ||
EthereumLocationsConverterFor::<[u8; 32]>::convert_location(&contract_location) | ||
.unwrap(); | ||
|
||
assert_eq!(account, expected_account); | ||
|
@@ -482,7 +482,7 @@ mod tests { | |
let contract_location = Location::new(2, [GlobalConsensus(Polkadot), Parachain(1000)]); | ||
|
||
assert_eq!( | ||
GlobalConsensusEthereumConvertsFor::<[u8; 32]>::convert_location(&contract_location), | ||
EthereumLocationsConverterFor::<[u8; 32]>::convert_location(&contract_location), | ||
None, | ||
); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.