11mod extension;
22mod mock_types;
3+ mod pallet_pink;
34
45use crate :: types:: { AccountId , Balance , BlockNumber , Hash , Hashing , Index } ;
56use frame_support:: weights:: Weight ;
@@ -27,6 +28,7 @@ frame_support::construct_runtime! {
2728 Timestamp : pallet_timestamp:: { Pallet , Call , Storage , Inherent } ,
2829 Randomness : pallet_randomness_collective_flip:: { Pallet , Storage } ,
2930 Contracts : pallet_contracts:: { Pallet , Call , Storage , Event <T >} ,
31+ Pink : pallet_pink:: { Pallet , Storage } ,
3032 }
3133}
3234
@@ -37,6 +39,8 @@ parameter_types! {
3739 pub static ExistentialDeposit : u64 = 0 ;
3840}
3941
42+ impl pallet_pink:: Config for PinkRuntime { }
43+
4044impl frame_system:: Config for PinkRuntime {
4145 type BaseCallFilter = frame_support:: traits:: Everything ;
4246 type BlockWeights = BlockWeights ;
@@ -113,6 +117,7 @@ impl Config for PinkRuntime {
113117 type DeletionWeightLimit = DeletionWeightLimit ;
114118 type Schedule = DefaultSchedule ;
115119 type ContractDeposit = ( ) ;
120+ type AddressGenerator = Pink ;
116121}
117122
118123#[ cfg( test) ]
@@ -212,10 +217,9 @@ mod tests {
212217 // We offset data in the contract tables by 1.
213218 let mut params = vec ! [ ( n + 1 ) as u8 ] ;
214219 params. extend_from_slice ( input) ;
215- let result =
216- Contracts :: bare_call ( ALICE , addr. clone ( ) , 0 , GAS_LIMIT , params, false )
217- . result
218- . unwrap ( ) ;
220+ let result = Contracts :: bare_call ( ALICE , addr. clone ( ) , 0 , GAS_LIMIT , params, false )
221+ . result
222+ . unwrap ( ) ;
219223 assert ! ( result. is_success( ) ) ;
220224 let expected = hash_fn ( input. as_ref ( ) ) ;
221225 assert_eq ! ( & result. data[ ..* expected_size] , & * expected) ;
@@ -225,9 +229,7 @@ mod tests {
225229
226230 pub mod exec {
227231 use sp_runtime:: traits:: BlakeTwo256 ;
228- use sp_state_machine:: {
229- Backend , Ext , OverlayedChanges , StorageTransactionCache ,
230- } ;
232+ use sp_state_machine:: { Backend , Ext , OverlayedChanges , StorageTransactionCache } ;
231233 pub type InMemoryBackend = sp_state_machine:: InMemoryBackend < BlakeTwo256 > ;
232234
233235 pub fn execute_with < R > ( f : impl FnOnce ( ) -> R ) -> R {
0 commit comments