-
Notifications
You must be signed in to change notification settings - Fork 659
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Working example in . Run test in and to see it in action
- Loading branch information
1 parent
b1c9e93
commit 17571c1
Showing
16 changed files
with
106 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 @@ | ||
# nested.aleo | ||
|
||
## Build Guide | ||
|
||
To compile this Aleo program, run: | ||
```bash | ||
snarkvm build | ||
``` | ||
|
||
To execute this Aleo program, run: | ||
```bash | ||
snarkvm run hello | ||
``` |
10 changes: 10 additions & 0 deletions
10
utils/tmp/nested/build/imports/nested_example_layer_0.aleo
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,10 @@ | ||
import nested_example_layer_2.aleo; | ||
import nested_example_layer_1.aleo; | ||
|
||
program nested_example_layer_0.aleo; | ||
|
||
function main: | ||
input r0 as u32.public; | ||
input r1 as u32.private; | ||
call nested_example_layer_1.aleo/external_function 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,9 @@ | ||
import nested_example_layer_2.aleo; | ||
|
||
program nested_example_layer_1.aleo; | ||
|
||
function external_function: | ||
input r0 as u32.public; | ||
input r1 as u32.private; | ||
call nested_example_layer_2.aleo/external_nested_function 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,7 @@ | ||
program nested_example_layer_2.aleo; | ||
|
||
function external_nested_function: | ||
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,12 @@ | ||
import nested_example_layer_2.aleo; | ||
import nested_example_layer_1.aleo; | ||
import nested_example_layer_0.aleo; | ||
program nested.aleo; | ||
|
||
|
||
|
||
function example: | ||
input r0 as u32.public; | ||
input r1 as u32.private; | ||
call nested_example_layer_0.aleo/main 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,13 @@ | ||
{ | ||
"program": "nested.aleo", | ||
"version": "0.0.0", | ||
"description": "", | ||
"license": "MIT", | ||
"dependencies": [ | ||
{ | ||
"name": "nested_example_layer_0.aleo", | ||
"location": "network", | ||
"network": "testnet3" | ||
} | ||
] | ||
} |
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 nested/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,20 @@ | ||
[[package]] | ||
name = "nested_example_layer_0.aleo" | ||
network = "testnet3" | ||
location = "network" | ||
checksum = "23414151de5687d5daa447533109ee810b7e763c4d0659e2f53562123e639b2c" | ||
dependencies = ["nested_example_layer_2.aleo", "nested_example_layer_1.aleo"] | ||
|
||
[[package]] | ||
name = "nested_example_layer_2.aleo" | ||
network = "testnet3" | ||
location = "network" | ||
checksum = "b987b8490b214ad9120a47b218a1c1387c7c2763aaf2aa9c81002a4c7020b3e4" | ||
dependencies = [] | ||
|
||
[[package]] | ||
name = "nested_example_layer_1.aleo" | ||
network = "testnet3" | ||
location = "network" | ||
checksum = "17701f7369fe6bad74cdfb956bd9d85c6753ffedbf43be9fe5a4bfdc1751617b" | ||
dependencies = ["nested_example_layer_2.aleo"] |
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": "nested.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 'nested' program. | ||
program nested.aleo { | ||
transition main(public a: u32, b: u32) -> u32 { | ||
let c: u32 = a + b; | ||
return c; | ||
} | ||
} |
Binary file added
BIN
+72.3 MB
utils/tmp/super_simple/build/build/credits-aleo/transfer_private.prover
Binary file not shown.
Binary file added
BIN
+682 Bytes
utils/tmp/super_simple/build/build/credits-aleo/transfer_private.verifier
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.