mirror of
https://github.com/AleoHQ/leo.git
synced 2024-11-13 08:47:17 +03:00
fix example naming and manifest files
This commit is contained in:
parent
4cf1a55ce9
commit
c3a89764bf
@ -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::{
|
||||||
|
@ -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"
|
||||||
|
6
examples/hello-world/Leo.toml
Normal file
6
examples/hello-world/Leo.toml
Normal 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"
|
6
examples/hello-world/inputs/hello-world.in
Normal file
6
examples/hello-world/inputs/hello-world.in
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[main]
|
||||||
|
a: u32 = 1;
|
||||||
|
b: u32 = 2;
|
||||||
|
|
||||||
|
[registers]
|
||||||
|
r0: u32 = 0;
|
5
examples/hello-world/src/main.leo
Normal file
5
examples/hello-world/src/main.leo
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
// The 'hello_world' main function.
|
||||||
|
function main(a: u32, b: u32) -> u32 {
|
||||||
|
let c: u32 = a + b;
|
||||||
|
return c
|
||||||
|
}
|
@ -1,3 +0,0 @@
|
|||||||
[package]
|
|
||||||
name = "hello_world"
|
|
||||||
version = "0.1.0"
|
|
@ -1,2 +0,0 @@
|
|||||||
[registers]
|
|
||||||
r0: u32 = 0;
|
|
@ -1,5 +0,0 @@
|
|||||||
// The 'hello_world' main function.
|
|
||||||
function main() -> u32 {
|
|
||||||
let a: u32 = 1 + 1;
|
|
||||||
return a
|
|
||||||
}
|
|
6
examples/pedersen-hash/Leo.toml
Normal file
6
examples/pedersen-hash/Leo.toml
Normal 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"
|
@ -1,3 +0,0 @@
|
|||||||
[package]
|
|
||||||
name = "pedersen_hash"
|
|
||||||
version = "0.1.0"
|
|
6
examples/square-root/Leo.toml
Normal file
6
examples/square-root/Leo.toml
Normal 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"
|
@ -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;
|
5
examples/square-root/src/main.leo
Normal file
5
examples/square-root/src/main.leo
Normal 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
|
||||||
|
}
|
@ -1,3 +0,0 @@
|
|||||||
[package]
|
|
||||||
name = "square_root"
|
|
||||||
version = "0.1.0"
|
|
@ -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
|
|
||||||
}
|
|
@ -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
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user