Skip to content
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
66 changes: 66 additions & 0 deletions chopsticks/configs/regionx-local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
endpoint: ws://127.0.0.1:9955
mock-signature-host: true
db: ./db.sqlite

import-storage:
System:
Account:
- - - 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
- providers: 1
data:
free: 1000000000000000
Regions:
Regions:
[
[
[{ core: 0, begin: 366408, mask: "0xffffffffffffffffffff" }],
{
owner: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,
locked: true,
record:
{
Available:
{
end: 371448,
owner: "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
paid: null,
},
},
},
],
[
[{ core: 1, begin: 366408, mask: "0xffffffffffffffffffff" }],
{
owner: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,
locked: true,
record:
{
Available:
{
end: 371448,
owner: "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
paid: null,
},
},
},
],
]
Market:
Listings: [
[
[{ core: 0, begin: 366408, mask: "0xffffffffffffffffffff" }],
{
seller: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,
timeslice_price: 1000000000, # 0.001 KSM / timeslice
sale_recipient: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,
},
],
[
[{ core: 1, begin: 366408, mask: "0xffffffffffffffffffff" }],
{
seller: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,
timeslice_price: 15000000000, # 0.0015 KSM / timeslice
sale_recipient: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,
},
],
]
1 change: 1 addition & 0 deletions pallets/market/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ use ismp::{
};
use ismp_testsuite::mocks::Host;
use pallet_regions::primitives::StateMachineHeightProvider;
use polkadot_sdk::*;
use sp_core::{ConstU64, H256};
use sp_runtime::{
traits::{BlakeTwo256, BlockNumberProvider, IdentityLookup},
Expand Down
1 change: 1 addition & 0 deletions pallets/orders/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use frame_support::{
traits::{fungible::Mutate, tokens::Preservation, Everything},
};
use frame_system::{config_preludes::TestDefaultConfig, DefaultConfig};
use polkadot_sdk::*;
use sp_core::{ConstU64, H256};
use sp_runtime::{
traits::{BlakeTwo256, BlockNumberProvider, Convert, IdentityLookup},
Expand Down
1 change: 1 addition & 0 deletions pallets/orders/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ use frame_support::{
assert_noop, assert_ok,
traits::{Currency, Get},
};
use polkadot_sdk::*;
use sp_runtime::{traits::Convert, ArithmeticError, DispatchError, TokenError};

#[test]
Expand Down
8 changes: 4 additions & 4 deletions pallets/processor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ polkadot-sdk = { workspace = true, features = [
"pallet-balances",
], default-features = true }

pallet-regions = { workspace = true, default-features = false }
pallet-orders = { workspace = true, default-features = false }
pallet-regions = { workspace = true, default-features = true }
pallet-orders = { workspace = true, default-features = true }

ismp = { workspace = true, default-features = false }
ismp-testsuite = { workspace = true }
ismp = { workspace = true, default-features = true }
ismp-testsuite = { workspace = true, default-features = true }

[features]
default = ["std"]
Expand Down
2 changes: 2 additions & 0 deletions pallets/processor/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,14 @@ use order_primitives::{OrderId, ParaId};
use pallet_broker::RegionId;
use pallet_orders::FeeHandler;
use pallet_regions::primitives::StateMachineHeightProvider;
use polkadot_sdk::*;
use smallvec::smallvec;
use sp_core::{ConstU64, H256};
use sp_runtime::{
traits::{BlakeTwo256, BlockNumberProvider, Convert, IdentityLookup},
BuildStorage, DispatchResult, Perbill,
};
use staging_xcm as xcm;
use std::sync::Arc;
use xcm::opaque::latest::prelude::*;

Expand Down
1 change: 1 addition & 0 deletions pallets/processor/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ use frame_support::{
use nonfungible_primitives::LockableNonFungible;
use order_primitives::{Order, ParaId, Requirements};
use pallet_broker::{CoreMask, RegionId, RegionRecord};
use polkadot_sdk::*;

#[test]
fn fulfill_order_works() {
Expand Down
2 changes: 2 additions & 0 deletions pallets/regions/src/ismp_mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@
//
// You should have received a copy of the GNU General Public License
// along with RegionX. If not, see <https://www.gnu.org/licenses/>.

use anyhow;
use ismp::{
dispatcher::{DispatchRequest, FeeMetadata, IsmpDispatcher},
router::{GetRequest as IsmpGet, PostResponse, Request},
};
use ismp_testsuite::mocks::Host;
use polkadot_sdk::*;
use sp_core::{Get, H256};
use std::{cell::RefCell, marker::PhantomData, sync::Arc};

Expand Down
1 change: 1 addition & 0 deletions pallets/regions/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ use crate::{ismp_mock::MockDispatcher, StateMachineHeightProvider};
use frame_support::{derive_impl, pallet_prelude::*, parameter_types, traits::Everything};
use frame_system::{config_preludes::TestDefaultConfig, DefaultConfig};
use ismp::{consensus::StateMachineId, host::StateMachine};
use polkadot_sdk::*;
use sp_core::{ConstU64, H256};
use sp_runtime::{
traits::{BlakeTwo256, BlockNumberProvider, IdentityLookup},
Expand Down
1 change: 1 addition & 0 deletions pallets/regions/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ use ismp::{
};
use nonfungible_primitives::LockableNonFungible;
use pallet_broker::{CoreMask, RegionId, RegionRecord};
use polkadot_sdk::*;
use region_primitives::RegionInspect;

// pallet hash + storage item hash
Expand Down
1 change: 0 additions & 1 deletion runtime/kusama/src/genesis_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ use crate::{
use alloc::{vec, vec::Vec};
use cumulus_primitives_core::ParaId;
use polkadot_sdk::*;
use sp_core::{sr25519, Pair};
use sp_genesis_builder::PresetId;
use sp_keyring::Sr25519Keyring;
use staging_xcm as xcm;
Expand Down
1 change: 1 addition & 0 deletions runtime/kusama/src/weights/block_weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ pub mod constants {
#[cfg(test)]
mod test_weights {
use frame_support::weights::constants;
use polkadot_sdk::*;

/// Checks that the weight exists and is sane.
// NOTE: If this test fails but you are sure that the generated values are fine,
Expand Down
Loading