22
33use crate :: {
44 ChainTemplate , Config , Provider ,
5- generator:: chain:: { ChainSpec , Network } ,
5+ generator:: chain:: ChainSpec ,
66 utils:: helpers:: { sanitize, write_to_file} ,
77} ;
88use anyhow:: Result ;
@@ -73,9 +73,6 @@ pub fn instantiate_standard_template(
7373 & target. join ( "node/src/chain_spec.rs" ) ,
7474 chainspec. render ( ) . expect ( "infallible" ) . as_ref ( ) ,
7575 ) ?;
76- // Add network configuration
77- let network = Network { node : "parachain-template-node" . into ( ) } ;
78- write_to_file ( & target. join ( "network.toml" ) , network. render ( ) . expect ( "infallible" ) . as_ref ( ) ) ?;
7976 Ok ( tag)
8077}
8178
@@ -97,7 +94,7 @@ pub fn instantiate_openzeppelin_template(
9794mod tests {
9895 use super :: * ;
9996 use anyhow:: Result ;
100- use std:: { env :: current_dir , fs } ;
97+ use std:: fs ;
10198
10299 fn setup_template_and_instantiate ( ) -> Result < tempfile:: TempDir > {
103100 let temp_dir = tempfile:: tempdir ( ) . expect ( "Failed to create temp dir" ) ;
@@ -129,17 +126,6 @@ mod tests {
129126 ) ;
130127 assert ! ( generated_file_content. contains( "1000000" ) ) ;
131128
132- // Verify network.toml contains expected content
133- let generated_file_content =
134- fs:: read_to_string ( temp_dir. path ( ) . join ( "network.toml" ) ) . expect ( "Failed to read file" ) ;
135- let expected_file_content =
136- fs:: read_to_string ( current_dir ( ) ?. join ( "./templates/base/network.templ" ) )
137- . expect ( "Failed to read file" ) ;
138- assert_eq ! (
139- generated_file_content,
140- expected_file_content. replace( "^^node^^" , "parachain-template-node" )
141- ) ;
142-
143129 Ok ( ( ) )
144130 }
145131
0 commit comments