@@ -30,6 +30,7 @@ use frame_support::{
3030 construct_runtime,
3131 dispatch:: DispatchClass ,
3232 instances:: { Instance1 , Instance2 } ,
33+ ord_parameter_types,
3334 pallet_prelude:: Get ,
3435 parameter_types,
3536 traits:: {
@@ -48,7 +49,7 @@ use frame_support::{
4849} ;
4950use frame_system:: {
5051 limits:: { BlockLength , BlockWeights } ,
51- EnsureRoot , EnsureRootWithSuccess , EnsureSigned , EnsureWithSuccess ,
52+ EnsureRoot , EnsureRootWithSuccess , EnsureSigned , EnsureSignedBy , EnsureWithSuccess ,
5253} ;
5354pub use node_primitives:: { AccountId , Signature } ;
5455use node_primitives:: { AccountIndex , Balance , BlockNumber , Hash , Index , Moment } ;
@@ -70,8 +71,8 @@ use sp_runtime::{
7071 curve:: PiecewiseLinear ,
7172 generic, impl_opaque_keys,
7273 traits:: {
73- self , BlakeTwo256 , Block as BlockT , Bounded , ConvertInto , NumberFor , OpaqueKeys ,
74- SaturatedConversion , StaticLookup ,
74+ self , AccountIdConversion , BlakeTwo256 , Block as BlockT , Bounded , ConvertInto , NumberFor ,
75+ OpaqueKeys , SaturatedConversion , StaticLookup ,
7576 } ,
7677 transaction_validity:: { TransactionPriority , TransactionSource , TransactionValidity } ,
7778 ApplyExtrinsicResult , FixedPointNumber , FixedU128 , Perbill , Percent , Permill , Perquintill ,
@@ -1485,12 +1486,17 @@ impl pallet_assets::Config<Instance1> for Runtime {
14851486 type BenchmarkHelper = ( ) ;
14861487}
14871488
1489+ ord_parameter_types ! {
1490+ pub const DexOrigin : AccountId = AccountIdConversion :: <AccountId >:: into_account_truncating( & DexPalletId :: get( ) ) ;
1491+ }
1492+
14881493impl pallet_assets:: Config < Instance2 > for Runtime {
14891494 type RuntimeEvent = RuntimeEvent ;
14901495 type Balance = u128 ;
14911496 type AssetId = u32 ;
1497+ type AssetIdParameter = u32 ;
14921498 type Currency = Balances ;
1493- type CreateOrigin = AsEnsureOriginWithArg < EnsureSigned < AccountId > > ;
1499+ type CreateOrigin = AsEnsureOriginWithArg < EnsureSignedBy < DexOrigin , AccountId > > ;
14941500 type ForceOrigin = EnsureRoot < AccountId > ;
14951501 type AssetDeposit = AssetDeposit ;
14961502 type AssetAccountDeposit = ConstU128 < DOLLARS > ;
@@ -1574,9 +1580,6 @@ impl pallet_uniques::Config for Runtime {
15741580 type CollectionId = u32 ;
15751581 type ItemId = u32 ;
15761582 type Currency = Balances ;
1577- type CurrencyBalance = <Self as pallet_balances:: Config >:: Balance ;
1578- type Assets = Assets ;
1579- type AssetId = <Self as pallet_assets:: Config < Instance1 > >:: AssetId ;
15801583 type ForceOrigin = frame_system:: EnsureRoot < AccountId > ;
15811584 type CollectionDeposit = CollectionDeposit ;
15821585 type ItemDeposit = ItemDeposit ;
0 commit comments