Skip to content

Commit 70cc666

Browse files
authored
Update xtokens & tarpaulin (#2934)
* update xtokens * update tarpaulin
1 parent b2028fe commit 70cc666

File tree

11 files changed

+29
-22
lines changed

11 files changed

+29
-22
lines changed

.github/workflows/coverage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ concurrency:
1818
cancel-in-progress: true
1919

2020
env:
21-
TARPAULIN_VERSION: 0.32.7
21+
TARPAULIN_VERSION: 0.33.0
2222
CARGO_INCREMENTAL: 0
2323
jobs:
2424
test:
@@ -45,7 +45,7 @@ jobs:
4545
run: |
4646
wget https://github.com/xd009642/tarpaulin/releases/download/${{ env.TARPAULIN_VERSION }}/cargo-tarpaulin-x86_64-unknown-linux-musl.tar.gz
4747
tar -zxvf cargo-tarpaulin-x86_64-unknown-linux-musl.tar.gz -C $HOME/.cargo/bin
48-
cargo tarpaulin -v --workspace \
48+
cargo tarpaulin --engine llvm --workspace \
4949
-e \
5050
acala acala-cli acala-service \
5151
acala-primitives \

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ crc32fast = { opt-level = 3 }
8080
crossbeam-deque = { opt-level = 3 }
8181
crypto-mac = { opt-level = 3 }
8282
curve25519-dalek = { opt-level = 3 }
83+
ed25519-dalek = { opt-level = 3 }
8384
ed25519-zebra = { opt-level = 3 }
8485
futures-channel = { opt-level = 3 }
8586
hash-db = { opt-level = 3 }
@@ -105,7 +106,6 @@ similar = { opt-level = 3 }
105106
smallvec = { opt-level = 3 }
106107
twox-hash = { opt-level = 3 }
107108
uint = { opt-level = 3 }
108-
x25519-dalek = { opt-level = 3 }
109109
zeroize = { opt-level = 3 }
110110

111111
[workspace.dependencies]

runtime/acala/src/lib.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1997,8 +1997,13 @@ pub type Executive = frame_executive::Executive<
19971997
Migrations,
19981998
>;
19991999

2000+
parameter_types! {
2001+
pub const XTokensPallet: &'static str = "XTokens";
2002+
pub const MigrationStatus: &'static str = "MigrationStatus";
2003+
}
2004+
20002005
#[allow(unused_parens)]
2001-
type Migrations = (pallet_xcm::migration::MigrateToLatestXcmVersion<Runtime>,);
2006+
type Migrations = (frame_support::migrations::RemoveStorage<XTokensPallet, MigrationStatus, RocksDbWeight>,);
20022007

20032008
#[cfg(feature = "runtime-benchmarks")]
20042009
#[macro_use]

runtime/acala/src/xcm_config.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ use module_support::HomaSubAccountXcm;
3535
use module_transaction_payment::BuyWeightRateOfTransactionFeePool;
3636
use orml_traits::parameter_type_with_key;
3737
use orml_xcm_support::{DepositToAlternative, IsNativeConcrete, MultiCurrencyAdapter, MultiNativeAsset};
38-
use orml_xtokens::AbsoluteReserveProviderMigrationPhase;
38+
use orml_xtokens::AbsoluteReserveProvider;
3939
use parachains_common::message_queue::{NarrowOriginToSibling, ParaIdToSibling};
4040
use parity_scale_codec::{Decode, Encode};
4141
use polkadot_runtime_common::xcm_sender::NoPriceForMessageDelivery;
@@ -111,7 +111,7 @@ type Reserves = (
111111
// Relaychain (DOT) from Asset Hub
112112
Case<RelayChainNativeAssetFromAssetHub>,
113113
// Assets which the reserve is the same as the origin.
114-
MultiNativeAsset<AbsoluteReserveProviderMigrationPhase<Runtime>>,
114+
MultiNativeAsset<AbsoluteReserveProvider>,
115115
);
116116

117117
pub type Trader = (
@@ -379,8 +379,7 @@ impl orml_xtokens::Config for Runtime {
379379
type MaxAssetsForTransfer = MaxAssetsForTransfer;
380380
type MinXcmFee = ParachainMinFee;
381381
type LocationsFilter = Everything;
382-
type ReserveProvider = AbsoluteReserveProviderMigrationPhase<Runtime>;
382+
type ReserveProvider = AbsoluteReserveProvider;
383383
type RateLimiter = ();
384384
type RateLimiterId = ();
385-
type MigrationPhaseUpdateOrigin = EnsureRootOrHalfGeneralCouncil;
386385
}

runtime/common/src/precompile/mock.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ use module_support::{
3939
SpecificJointsSwap,
4040
};
4141
use orml_traits::{parameter_type_with_key, MultiCurrency, MultiReservableCurrency};
42-
use orml_xtokens::AbsoluteReserveProviderMigrationPhase;
42+
use orml_xtokens::AbsoluteReserveProvider;
4343
use parity_scale_codec::{Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
4444
pub use primitives::{
4545
define_combined_task,
@@ -926,10 +926,9 @@ impl orml_xtokens::Config for Test {
926926
type MaxAssetsForTransfer = MaxAssetsForTransfer;
927927
type MinXcmFee = ParachainMinFee;
928928
type LocationsFilter = Everything;
929-
type ReserveProvider = AbsoluteReserveProviderMigrationPhase<Test>;
929+
type ReserveProvider = AbsoluteReserveProvider;
930930
type RateLimiter = ();
931931
type RateLimiterId = ();
932-
type MigrationPhaseUpdateOrigin = EnsureRoot<AccountId>;
933932
}
934933

935934
parameter_types!(

runtime/integration-tests/src/treasury.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fn treasury_should_take_xcm_execution_revenue() {
2929
let shallow_weight = 600_000_000;
3030
#[cfg(feature = "with-acala-runtime")]
3131
let shallow_weight = 600_000_000;
32-
let origin = Location::parent();
32+
let origin = AssetHubLocation::get();
3333

3434
// receive relay chain token
3535
let asset: Asset = (Location::parent(), dot_amount).into();

runtime/karura/src/lib.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2004,8 +2004,13 @@ pub type Executive = frame_executive::Executive<
20042004
Migrations,
20052005
>;
20062006

2007+
parameter_types! {
2008+
pub const XTokensPallet: &'static str = "XTokens";
2009+
pub const MigrationStatus: &'static str = "MigrationStatus";
2010+
}
2011+
20072012
#[allow(unused_parens)]
2008-
type Migrations = (pallet_xcm::migration::MigrateToLatestXcmVersion<Runtime>,);
2013+
type Migrations = (frame_support::migrations::RemoveStorage<XTokensPallet, MigrationStatus, RocksDbWeight>,);
20092014

20102015
#[cfg(feature = "runtime-benchmarks")]
20112016
#[macro_use]

runtime/karura/src/xcm_config.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ use module_support::HomaSubAccountXcm;
3333
use module_transaction_payment::BuyWeightRateOfTransactionFeePool;
3434
use orml_traits::parameter_type_with_key;
3535
use orml_xcm_support::{DepositToAlternative, IsNativeConcrete, MultiCurrencyAdapter, MultiNativeAsset};
36-
use orml_xtokens::AbsoluteReserveProviderMigrationPhase;
36+
use orml_xtokens::AbsoluteReserveProvider;
3737
use parachains_common::message_queue::{NarrowOriginToSibling, ParaIdToSibling};
3838
use parity_scale_codec::{Decode, Encode};
3939
use polkadot_runtime_common::xcm_sender::NoPriceForMessageDelivery;
@@ -153,7 +153,7 @@ type Reserves = (
153153
// Relaychain (KSM) from Asset Hub
154154
Case<RelayChainNativeAssetFromAssetHub>,
155155
// Assets which the reserve is the same as the origin.
156-
MultiNativeAsset<AbsoluteReserveProviderMigrationPhase<Runtime>>,
156+
MultiNativeAsset<AbsoluteReserveProvider>,
157157
);
158158

159159
pub type Trader = (
@@ -337,10 +337,9 @@ impl orml_xtokens::Config for Runtime {
337337
type MaxAssetsForTransfer = MaxAssetsForTransfer;
338338
type MinXcmFee = ParachainMinFee;
339339
type LocationsFilter = Everything;
340-
type ReserveProvider = AbsoluteReserveProviderMigrationPhase<Runtime>;
340+
type ReserveProvider = AbsoluteReserveProvider;
341341
type RateLimiter = ();
342342
type RateLimiterId = ();
343-
type MigrationPhaseUpdateOrigin = EnsureRootOrHalfGeneralCouncil;
344343
}
345344

346345
pub type LocalAssetTransactor = (

0 commit comments

Comments
 (0)