Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
9 changes: 2 additions & 7 deletions runtime/moonbase/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,7 @@ pub type XcmOriginToTransactDispatchOrigin = (
);

parameter_types! {
/// The amount of weight an XCM operation takes. This is safe overestimate.
/// We should increase this to a value close to what polkadot charges
/// We are charging less to make it work with current reserve_transfer_assets issue
/// TODO: Once fixed in polkadot v0.9.12, we should go back to 1_000_000_000
/// https://github.com/paritytech/polkadot/pull/4144
pub UnitWeightCost: Weight = 100_000_000;
pub UnitWeightCost: Weight = 200_000_000;
/// Maximum number of instructions in a single XCM fragment. A sanity check against
/// weight caculations getting too crazy.
pub MaxInstructions: u32 = 100;
Expand Down Expand Up @@ -444,7 +439,7 @@ where
}

parameter_types! {
pub const BaseXcmWeight: Weight = 100_000_000;
pub const BaseXcmWeight: Weight = 200_000_000;
pub const MaxAssetsForTransfer: usize = 2;
// This is how we are going to detect whether the asset is a Reserve asset
// This however is the chain part only
Expand Down
8 changes: 4 additions & 4 deletions runtime/moonbase/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1851,7 +1851,7 @@ fn xtokens_precompiles_transfer() {
.write(U256::from(4000000))
.build(),
)
.expect_cost(12000)
.expect_cost(24000)
.expect_no_logs()
.execute_returns(vec![])
})
Expand Down Expand Up @@ -1903,7 +1903,7 @@ fn xtokens_precompiles_transfer_multiasset() {
.write(U256::from(4000000))
.build(),
)
.expect_cost(12000)
.expect_cost(24000)
.expect_no_logs()
.execute_returns(vec![]);
})
Expand Down Expand Up @@ -1945,7 +1945,7 @@ fn xtokens_precompiles_transfer_native() {
.write(U256::from(4000000))
.build(),
)
.expect_cost(8000)
.expect_cost(16000)
.expect_no_logs()
.execute_returns(vec![]);
})
Expand Down Expand Up @@ -1993,7 +1993,7 @@ fn xtokens_precompile_transfer_local_asset() {
.write(U256::from(4000000))
.build(),
)
.expect_cost(8000)
.expect_cost(16000)
.expect_no_logs()
.execute_returns(vec![]);
})
Expand Down
2 changes: 1 addition & 1 deletion runtime/moonbeam/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ where
}

parameter_types! {
pub const BaseXcmWeight: Weight = 100_000_000;
pub const BaseXcmWeight: Weight = 200_000_000;
pub const MaxAssetsForTransfer: usize = 2;

// This is how we are going to detect whether the asset is a Reserve asset
Expand Down
4 changes: 2 additions & 2 deletions runtime/moonbeam/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2202,7 +2202,7 @@ fn xtokens_precompiles_transfer() {
.write(U256::from(4000000))
.build(),
)
.expect_cost(20000)
.expect_cost(24000)
.expect_no_logs()
.execute_returns(vec![])
})
Expand Down Expand Up @@ -2254,7 +2254,7 @@ fn xtokens_precompiles_transfer_multiasset() {
.write(U256::from(4000000))
.build(),
)
.expect_cost(20000)
.expect_cost(24000)
.expect_no_logs()
.execute_returns(vec![]);
})
Expand Down
2 changes: 1 addition & 1 deletion runtime/moonriver/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ where
}

parameter_types! {
pub const BaseXcmWeight: Weight = 100_000_000;
pub const BaseXcmWeight: Weight = 200_000_000;
pub const MaxAssetsForTransfer: usize = 2;

// This is how we are going to detect whether the asset is a Reserve asset
Expand Down
4 changes: 2 additions & 2 deletions runtime/moonriver/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2186,7 +2186,7 @@ fn xtokens_precompiles_transfer() {
.write(U256::from(4000000))
.build(),
)
.expect_cost(20000)
.expect_cost(24000)
.expect_no_logs()
.execute_returns(vec![])
})
Expand Down Expand Up @@ -2238,7 +2238,7 @@ fn xtokens_precompiles_transfer_multiasset() {
.write(U256::from(4000000))
.build(),
)
.expect_cost(20000)
.expect_cost(24000)
.expect_no_logs()
.execute_returns(vec![]);
})
Expand Down