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

Remove all dependencies to repository open-runtime-module-library #2969

Merged
merged 27 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a11e25a
refactor xtokens precompile: get rid of orml-xtokens pallet
librelois Sep 17, 2024
6e5af04
refactor GMP precompile: get rid of orml-xtokens pallet
librelois Sep 17, 2024
464be87
chore: remove all orml deps (reimplement som primitives)
librelois Sep 17, 2024
acc6e9e
Merge branch 'master' into elois-remove-orml
librelois Sep 23, 2024
a1a1f80
update some comments
librelois Sep 24, 2024
8709279
fix dev-test maintenance-filter
librelois Sep 24, 2024
0c469fe
transferWithFee and transferMultiassetWithFee ignore fee parameter now
librelois Sep 24, 2024
0be705f
fix dev-test wormhole
librelois Sep 24, 2024
f152597
fix dev-test wormhole (2)
librelois Sep 24, 2024
338a7c7
wip: example
librelois Sep 26, 2024
292fc09
remove unused code
ahmadkaouk Oct 3, 2024
18a5f0a
remove orml dependencies from mocks and fix compilation
ahmadkaouk Oct 4, 2024
d47169f
fix rust tests
ahmadkaouk Oct 7, 2024
266c2fe
Merge branch 'master' into elois-remove-orml
ahmadkaouk Oct 7, 2024
0c86795
fix
ahmadkaouk Oct 7, 2024
57e67a8
Add missing copyright
ahmadkaouk Oct 7, 2024
4c53901
Fix rust tests
ahmadkaouk Oct 8, 2024
53c4a94
fix format
ahmadkaouk Oct 8, 2024
3693209
formatting
ahmadkaouk Oct 8, 2024
ac5af63
fix tracing test
ahmadkaouk Oct 8, 2024
d577ff9
fix format
ahmadkaouk Oct 8, 2024
f2305df
fix tracing
ahmadkaouk Oct 8, 2024
38f9354
enable call of transfer_assets
ahmadkaouk Oct 8, 2024
6da2e9a
fix tracing test
ahmadkaouk Oct 9, 2024
ff4d811
remove unused code
ahmadkaouk Oct 9, 2024
e2d02b7
Merge remote-tracking branch 'origin/master' into elois-remove-orml
Agusrodri Oct 9, 2024
2aa407e
improvements
ahmadkaouk Oct 10, 2024
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
90 changes: 2 additions & 88 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,6 @@ cumulus-relay-chain-minimal-node = { git = "https://github.com/moonbeam-foundati
cumulus-relay-chain-rpc-interface = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-stable2407" }

# Polkadot / XCM (wasm)
orml-traits = { git = "https://github.com/moonbeam-foundation/open-runtime-module-library", branch = "moonbeam-polkadot-stable2407", default-features = false }
orml-xcm-support = { git = "https://github.com/moonbeam-foundation/open-runtime-module-library", branch = "moonbeam-polkadot-stable2407", default-features = false }
orml-xtokens = { git = "https://github.com/moonbeam-foundation/open-runtime-module-library", branch = "moonbeam-polkadot-stable2407", default-features = false }
pallet-xcm = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-stable2407", default-features = false }
pallet-xcm-benchmarks = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-stable2407", default-features = false }
polkadot-core-primitives = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-stable2407", default-features = false }
Expand Down Expand Up @@ -442,7 +439,6 @@ crossbeam-deque = { opt-level = 3 }
crypto-mac = { opt-level = 3 }
curve25519-dalek = { opt-level = 3 }
ed25519-zebra = { opt-level = 3 }
flate2 = { opt-level = 3 }
futures-channel = { opt-level = 3 }
hash-db = { opt-level = 3 }
hashbrown = { opt-level = 3 }
Expand Down
2 changes: 0 additions & 2 deletions pallets/parachain-staking/src/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.

/* TODO: use orml_utilities::OrderedSet without leaking substrate v2.0 dependencies*/

use frame_support::traits::Get;
use parity_scale_codec::{Decode, Encode};
use scale_info::TypeInfo;
Expand Down
2 changes: 0 additions & 2 deletions pallets/xcm-transactor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ sp-std = { workspace = true }
cumulus-primitives-core = { workspace = true }

# Polkadot / XCM
orml-traits = { workspace = true }
xcm = { workspace = true }
xcm-builder = { workspace = true }
xcm-executor = { workspace = true }
Expand All @@ -47,7 +46,6 @@ std = [
"frame-benchmarking/std",
"frame-support/std",
"frame-system/std",
"orml-traits/std",
"parity-scale-codec/std",
"sp-io/std",
"sp-runtime/std",
Expand Down
1 change: 0 additions & 1 deletion pallets/xcm-transactor/src/encode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
//! Module to provide `StakeEncodeCall`, `HrmpEncodeCall` and `UtilityEncodeCall` implementations
//! for the Xcm Transactor pallet

#![cfg_attr(not(feature = "std"), no_std)]
use frame_support::pallet_prelude::*;
use sp_runtime::traits::{AccountIdLookup, StaticLookup};
use sp_std::prelude::*;
Expand Down
10 changes: 5 additions & 5 deletions pallets/xcm-transactor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ pub mod pallet {
dispatch::DispatchResult, pallet_prelude::*, weights::constants::WEIGHT_REF_TIME_PER_SECOND,
};
use frame_system::{ensure_signed, pallet_prelude::*};
use orml_traits::location::{Parse, Reserve};
use sp_runtime::traits::{AtLeast32BitUnsigned, Bounded, Convert};
use sp_std::boxed::Box;
use sp_std::convert::TryFrom;
Expand All @@ -109,7 +108,7 @@ pub mod pallet {
use xcm::{latest::prelude::*, VersionedLocation};
use xcm_executor::traits::{TransactAsset, WeightBounds};
use xcm_primitives::{
FilterMaxAssetFee, HrmpAvailableCalls, HrmpEncodeCall, UtilityAvailableCalls,
FilterMaxAssetFee, HrmpAvailableCalls, HrmpEncodeCall, Reserve, UtilityAvailableCalls,
UtilityEncodeCall, XcmTransact,
};

Expand Down Expand Up @@ -180,7 +179,7 @@ pub mod pallet {

/// The way to retrieve the reserve of a Asset. This can be
/// configured to accept absolute or relative paths for self tokens
type ReserveProvider: Reserve;
type ReserveProvider: xcm_primitives::Reserve;

/// The way to filter the max fee to use for HRMP management operations
type MaxHrmpFee: FilterMaxAssetFee;
Expand Down Expand Up @@ -1167,8 +1166,9 @@ pub mod pallet {

/// Ensure `dest` has chain part and none recipient part.
fn ensure_valid_dest(dest: &Location) -> Result<Location, DispatchError> {
if let (Some(dest), None) = (dest.chain_part(), dest.non_chain_part()) {
Ok(dest)
let chain_location = dest.chain_location();
if *dest == chain_location {
Ok(chain_location)
ahmadkaouk marked this conversation as resolved.
Show resolved Hide resolved
} else {
Err(Error::<T>::InvalidDest.into())
}
Expand Down
6 changes: 5 additions & 1 deletion pallets/xcm-transactor/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,10 @@ impl SendXcm for TestSendXcm {

parameter_types! {
pub MaxFee: Asset = (Location::parent(), 1_000_000_000_000u128).into();
pub SelfLocationAbsolute: Location = Location {
parents: 1,
interior: [Parachain(ParachainId::get().into())].into(),
};
}
pub type MaxHrmpRelayFee = xcm_builder::Case<MaxFee>;

Expand All @@ -398,7 +402,7 @@ impl Config for Test {
type UniversalLocation = UniversalLocation;
type BaseXcmWeight = BaseXcmWeight;
type XcmSender = TestSendXcm;
type ReserveProvider = orml_traits::location::RelativeReserveProvider;
type ReserveProvider = xcm_primitives::AbsoluteAndRelativeReserve<SelfLocationAbsolute>;
type WeightInfo = ();
type HrmpManipulatorOrigin = EnsureRoot<u64>;
type HrmpOpenOrigin = EnsureRoot<u64>;
Expand Down
3 changes: 1 addition & 2 deletions precompiles/gmp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ slices = { workspace = true }

# Moonbeam
account = { workspace = true }
pallet-xcm-transactor = { workspace = true }

# Substrate
frame-support = { workspace = true }
Expand All @@ -30,8 +31,6 @@ pallet-evm = { workspace = true, features = ["forbid-evm-reentrancy"] }
precompile-utils = { workspace = true }

# Polkadot / XCM
orml-traits = { workspace = true }
orml-xtokens = { workspace = true }
pallet-xcm = { workspace = true }
xcm = { workspace = true }
xcm-builder = { workspace = true }
Expand Down
Loading
Loading