@@ -27,7 +27,7 @@ use codec::Encode;
2727use frame_benchmarking_cli:: SUBSTRATE_REFERENCE_HARDWARE ;
2828use frame_system_rpc_runtime_api:: AccountNonceApi ;
2929use futures:: prelude:: * ;
30- use node_template_runtime :: RuntimeApi ;
30+ use argochain_runtime :: RuntimeApi ;
3131use node_executor:: ExecutorDispatch ;
3232use node_primitives:: Block ;
3333use sc_client_api:: { Backend , BlockBackend } ;
@@ -76,43 +76,43 @@ pub fn fetch_nonce(client: &FullClient, account: sp_core::sr25519::Pair) -> u32
7676pub fn create_extrinsic (
7777 client : & FullClient ,
7878 sender : sp_core:: sr25519:: Pair ,
79- function : impl Into < node_template_runtime :: RuntimeCall > ,
79+ function : impl Into < argochain_runtime :: RuntimeCall > ,
8080 nonce : Option < u32 > ,
81- ) -> node_template_runtime :: UncheckedExtrinsic {
81+ ) -> argochain_runtime :: UncheckedExtrinsic {
8282 let function = function. into ( ) ;
8383 let genesis_hash = client. block_hash ( 0 ) . ok ( ) . flatten ( ) . expect ( "Genesis block exists; qed" ) ;
8484 let best_hash = client. chain_info ( ) . best_hash ;
8585 let best_block = client. chain_info ( ) . best_number ;
8686 let nonce = nonce. unwrap_or_else ( || fetch_nonce ( client, sender. clone ( ) ) ) ;
8787
88- let period = node_template_runtime :: BlockHashCount :: get ( )
88+ let period = argochain_runtime :: BlockHashCount :: get ( )
8989 . checked_next_power_of_two ( )
9090 . map ( |c| c / 2 )
9191 . unwrap_or ( 2 ) as u64 ;
9292 let tip = 0 ;
93- let extra: node_template_runtime :: SignedExtra = (
94- frame_system:: CheckNonZeroSender :: < node_template_runtime :: Runtime > :: new ( ) ,
95- frame_system:: CheckSpecVersion :: < node_template_runtime :: Runtime > :: new ( ) ,
96- frame_system:: CheckTxVersion :: < node_template_runtime :: Runtime > :: new ( ) ,
97- frame_system:: CheckGenesis :: < node_template_runtime :: Runtime > :: new ( ) ,
98- frame_system:: CheckEra :: < node_template_runtime :: Runtime > :: from ( generic:: Era :: mortal (
93+ let extra: argochain_runtime :: SignedExtra = (
94+ frame_system:: CheckNonZeroSender :: < argochain_runtime :: Runtime > :: new ( ) ,
95+ frame_system:: CheckSpecVersion :: < argochain_runtime :: Runtime > :: new ( ) ,
96+ frame_system:: CheckTxVersion :: < argochain_runtime :: Runtime > :: new ( ) ,
97+ frame_system:: CheckGenesis :: < argochain_runtime :: Runtime > :: new ( ) ,
98+ frame_system:: CheckEra :: < argochain_runtime :: Runtime > :: from ( generic:: Era :: mortal (
9999 period,
100100 best_block. saturated_into ( ) ,
101101 ) ) ,
102- frame_system:: CheckNonce :: < node_template_runtime :: Runtime > :: from ( nonce) ,
103- frame_system:: CheckWeight :: < node_template_runtime :: Runtime > :: new ( ) ,
104- pallet_asset_conversion_tx_payment:: ChargeAssetTxPayment :: < node_template_runtime :: Runtime > :: from (
102+ frame_system:: CheckNonce :: < argochain_runtime :: Runtime > :: from ( nonce) ,
103+ frame_system:: CheckWeight :: < argochain_runtime :: Runtime > :: new ( ) ,
104+ pallet_asset_conversion_tx_payment:: ChargeAssetTxPayment :: < argochain_runtime :: Runtime > :: from (
105105 tip, None ,
106106 ) ,
107107 ) ;
108108
109- let raw_payload = node_template_runtime :: SignedPayload :: from_raw (
109+ let raw_payload = argochain_runtime :: SignedPayload :: from_raw (
110110 function. clone ( ) ,
111111 extra. clone ( ) ,
112112 (
113113 ( ) ,
114- node_template_runtime :: VERSION . spec_version ,
115- node_template_runtime :: VERSION . transaction_version ,
114+ argochain_runtime :: VERSION . spec_version ,
115+ argochain_runtime :: VERSION . transaction_version ,
116116 genesis_hash,
117117 best_hash,
118118 ( ) ,
@@ -122,10 +122,10 @@ pub fn create_extrinsic(
122122 ) ;
123123 let signature = raw_payload. using_encoded ( |e| sender. sign ( e) ) ;
124124
125- node_template_runtime :: UncheckedExtrinsic :: new_signed (
125+ argochain_runtime :: UncheckedExtrinsic :: new_signed (
126126 function,
127127 sp_runtime:: AccountId32 :: from ( sender. public ( ) ) . into ( ) ,
128- node_template_runtime :: Signature :: Sr25519 ( signature) ,
128+ argochain_runtime :: Signature :: Sr25519 ( signature) ,
129129 extra,
130130 )
131131}
@@ -631,7 +631,7 @@ pub fn new_full(
631631mod tests {
632632 use crate :: service:: { new_full_base, NewFullBase } ;
633633 use codec:: Encode ;
634- use node_template_runtime :: {
634+ use argochain_runtime :: {
635635 constants:: { currency:: CENTS , time:: SLOT_DURATION } ,
636636 Address , BalancesCall , RuntimeCall , UncheckedExtrinsic ,
637637 } ;
0 commit comments