forked from ghostant-1017/leo_template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f8d044d
Showing
9 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.env | ||
*.avm | ||
*.prover | ||
*.verifier | ||
outputs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# leo_template.aleo | ||
|
||
## Build Guide | ||
|
||
To compile this Aleo program, run: | ||
```bash | ||
snarkvm build | ||
``` | ||
|
||
To execute this Aleo program, run: | ||
```bash | ||
snarkvm run hello | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
program leo_template.aleo; | ||
|
||
|
||
|
||
function main: | ||
input r0 as u32.public; | ||
input r1 as u32.private; | ||
add r0 r1 into r2; | ||
output r2 as u32.private; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"program": "leo_template.aleo", | ||
"version": "0.0.0", | ||
"description": "", | ||
"license": "MIT" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
source .env | ||
|
||
snarkos developer deploy \ | ||
--private-key $PRIVATE_KEY \ | ||
--query ${API_PREFIX} \ | ||
--priority-fee 100 $PROGRAM_NAME \ | ||
--broadcast ${API_PREFIX}/testnet3/transaction/broadcast \ | ||
--path ./build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
source .env | ||
|
||
FUNCTION_NAME=main | ||
ARG1= | ||
ARG2= | ||
|
||
snarkos developer execute \ | ||
--private-key ${PRIVATE_KEY} \ | ||
--query ${API_PREFIX} \ | ||
--priority-fee 100 $PROGRAM_NAME $FUNCTION_NAME $ARG1 $ARG2 \ | ||
--broadcast ${API_PREFIX}/testnet3/transaction/broadcast |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// The program input for leo_template/src/main.leo | ||
[main] | ||
public a: u32 = 1u32; | ||
b: u32 = 2u32; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"program": "leo_template.aleo", | ||
"version": "0.0.0", | ||
"description": "", | ||
"license": "MIT" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// The 'leo_template' program. | ||
program leo_template.aleo { | ||
transition main(public a: u32, b: u32) -> u32 { | ||
let c: u32 = a + b; | ||
return c; | ||
} | ||
} |