From e94d43536ad36fd4a8da72765b338f100d51430b Mon Sep 17 00:00:00 2001 From: Pranav Gaddamadugu Date: Thu, 6 Oct 2022 00:25:28 -0700 Subject: [PATCH] Fix leo new --- leo/package/src/source/main.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/leo/package/src/source/main.rs b/leo/package/src/source/main.rs index 88549aebe4..37fa50c389 100644 --- a/leo/package/src/source/main.rs +++ b/leo/package/src/source/main.rs @@ -66,15 +66,18 @@ impl MainFile { .map_err(PackageError::io_error_main_file)?) } + // TODO: Generalize to other networks. fn template(&self) -> String { format!( r#"// The '{}' main function. -transition main(public a: u32, b: u32) -> u32 {{ - let c: u32 = a + b; - return c; +program {}.aleo {{ + transition main(public a: u32, b: u32) -> u32 {{ + let c: u32 = a + b; + return c; + }} }} "#, - self.package_name + self.package_name, self.package_name ) } }