fix example naming and manifest files

This commit is contained in:
collin 2020-08-18 22:58:14 -07:00
parent 4cf1a55ce9
commit c3a89764bf
24 changed files with 45 additions and 26 deletions

View File

@ -26,7 +26,7 @@ use crate::{
GroupType, GroupType,
Integer, Integer,
}; };
use leo_typed::{Circuit, Function, Identifier, Span, Type, GroupValue}; use leo_typed::{Circuit, Function, GroupValue, Identifier, Span, Type};
use snarkos_errors::gadgets::SynthesisError; use snarkos_errors::gadgets::SynthesisError;
use snarkos_models::{ use snarkos_models::{

View File

@ -1,3 +1,6 @@
[package] [package]
name = "fibonacci" name = "fibonacci"
version = "0.1.0" version = "0.1.0"
description = "Returns a fibonnaci sequence"
remote = "aleo/fibonacci"
license = "LICENSE-MIT"

View File

@ -0,0 +1,6 @@
[package]
name = "hello-world"
version = "0.1.0"
description = "Returns the sum of two u32 integers"
remote = "aleo/hello-world"
license = "LICENSE-MIT"

View File

@ -0,0 +1,6 @@
[main]
a: u32 = 1;
b: u32 = 2;
[registers]
r0: u32 = 0;

View File

@ -0,0 +1,5 @@
// The 'hello_world' main function.
function main(a: u32, b: u32) -> u32 {
let c: u32 = a + b;
return c
}

View File

@ -1,3 +0,0 @@
[package]
name = "hello_world"
version = "0.1.0"

View File

@ -1,2 +0,0 @@
[registers]
r0: u32 = 0;

View File

@ -1,5 +0,0 @@
// The 'hello_world' main function.
function main() -> u32 {
let a: u32 = 1 + 1;
return a
}

View File

@ -0,0 +1,6 @@
[package]
name = "pedersen-hash"
version = "0.1.0"
description = "A 256bit hash function"
remote = "aleo/pedersen-hash"
license = "LICENSE-MIT"

View File

@ -1,3 +0,0 @@
[package]
name = "pedersen_hash"
version = "0.1.0"

View File

@ -0,0 +1,6 @@
[package]
name = "square-root"
version = "0.1.0"
description = "prove knowledge of the square root `a` of a number `b`"
remote = "aleo/square-root"
license = "LICENSE-MIT"

View File

@ -1,7 +1,7 @@
// The program input for square_root/src/main.leo // The program input for square_root/src/main.leo
[main] [main]
a: field = 337; a: u32 = 337;
b: field = 113569; b: u32 = 113569;
[registers] [registers]
r0: bool = false; r0: bool = false;

View File

@ -0,0 +1,5 @@
// The 'square_root' main function.
// prove knowledge of the square root `a` of a number `b`
function main(a: u32, b: u32) -> bool {
return a * a == b
}

View File

@ -1,3 +0,0 @@
[package]
name = "square_root"
version = "0.1.0"

View File

@ -1,5 +0,0 @@
// The 'square_root' main function.
// prove knowledge of the square root `a` of a number `b`:
function main(a: field, b: field) -> bool {
return a * a == b
}

View File

@ -95,10 +95,13 @@ impl Manifest {
fn template(&self) -> String { fn template(&self) -> String {
format!( format!(
r#"[package] r#"[package]
name = "{}" name = "{name}"
version = "0.1.0" version = "0.1.0"
description = "The {name} package"
remote = "[AUTHOR]/{name}"
license = "LICENSE-MIT"
"#, "#,
self.package.name name = self.package.name
) )
} }
} }