-
Notifications
You must be signed in to change notification settings - Fork 661
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
1 parent
7954539
commit 6922569
Showing
33 changed files
with
324 additions
and
2 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
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
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 @@ | ||
# import_example.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,12 @@ | ||
program child.aleo; | ||
|
||
record A: | ||
owner as address.private; | ||
val as u32.private; | ||
|
||
|
||
function mint: | ||
input r0 as address.private; | ||
input r1 as u32.private; | ||
cast r0 r1 into r2 as A.record; | ||
output r2 as A.record; |
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 child.aleo; | ||
program parent.aleo; | ||
|
||
|
||
|
||
function wrapper_mint: | ||
input r0 as address.private; | ||
input r1 as u32.private; | ||
call child.aleo/mint aleo1q30lfyggefvzzxqaaclzrn3wd94q4u8zzy8jhhfrcqrf306ayvqsdvj7s4 1u32 into r2; | ||
output r2 as child.aleo/A.record; |
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 @@ | ||
program prog_a.aleo; | ||
|
||
record A: | ||
owner as address.private; | ||
val as u32.private; | ||
|
||
|
||
function mint: | ||
input r0 as address.private; | ||
input r1 as u32.private; | ||
cast r0 r1 into r2 as A.record; | ||
output r2 as A.record; |
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 prog_a.aleo; | ||
program prog_b.aleo; | ||
|
||
|
||
|
||
function wrapper_mint: | ||
input r0 as address.private; | ||
input r1 as u32.private; | ||
call prog_a.aleo/mint aleo1q30lfyggefvzzxqaaclzrn3wd94q4u8zzy8jhhfrcqrf306ayvqsdvj7s4 1u32 into r2; | ||
output r2 as prog_a.aleo/A.record; |
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 @@ | ||
import child.aleo; | ||
import parent.aleo; | ||
program grandparent.aleo; | ||
|
||
|
||
|
||
function double_wrapper_mint: | ||
input r0 as address.private; | ||
input r1 as u32.private; | ||
call parent.aleo/wrapper_mint r0 r1 into r2; | ||
output r2 as child.aleo/A.record; |
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,18 @@ | ||
{ | ||
"program": "grandparent.aleo", | ||
"version": "0.0.0", | ||
"description": "", | ||
"license": "MIT", | ||
"dependencies": [ | ||
{ | ||
"name": "child.aleo", | ||
"location": "local", | ||
"path": "parent/child" | ||
}, | ||
{ | ||
"name": "parent.aleo", | ||
"location": "local", | ||
"path": "parent" | ||
} | ||
] | ||
} |
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 import_example/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,13 @@ | ||
[[package]] | ||
name = "child" | ||
location = "local" | ||
path = "parent/child" | ||
checksum = "6341f6fcccbfa86b71e0eac445b9d0ee558c74ef896183ee82b456b9e7fb2270" | ||
dependencies = [] | ||
|
||
[[package]] | ||
name = "parent" | ||
location = "local" | ||
path = "parent" | ||
checksum = "abf40f1784b1e58b97f55322cff031bb36d276d9986bdd8149c2d0cf3829a61e" | ||
dependencies = ["child.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,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 @@ | ||
# b.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,12 @@ | ||
program a.aleo; | ||
|
||
record A: | ||
owner as address.private; | ||
val as u32.private; | ||
|
||
|
||
function mint: | ||
input r0 as address.private; | ||
input r1 as u32.private; | ||
cast r0 r1 into r2 as A.record; | ||
output r2 as A.record; |
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 @@ | ||
program child.aleo; | ||
|
||
record A: | ||
owner as address.private; | ||
val as u32.private; | ||
|
||
|
||
function mint: | ||
input r0 as address.private; | ||
input r1 as u32.private; | ||
cast r0 r1 into r2 as A.record; | ||
output r2 as A.record; |
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 @@ | ||
program prog_a.aleo; | ||
|
||
record A: | ||
owner as address.private; | ||
val as u32.private; | ||
|
||
|
||
function mint: | ||
input r0 as address.private; | ||
input r1 as u32.private; | ||
cast r0 r1 into r2 as A.record; | ||
output r2 as A.record; |
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 child.aleo; | ||
program parent.aleo; | ||
|
||
|
||
|
||
function wrapper_mint: | ||
input r0 as address.private; | ||
input r1 as u32.private; | ||
call child.aleo/mint aleo1q30lfyggefvzzxqaaclzrn3wd94q4u8zzy8jhhfrcqrf306ayvqsdvj7s4 1u32 into r2; | ||
output r2 as child.aleo/A.record; |
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": "prog_b.aleo", | ||
"version": "0.0.0", | ||
"description": "", | ||
"license": "MIT", | ||
"dependencies": [ | ||
{ | ||
"name": "child.aleo", | ||
"location": "local", | ||
"path": "child" | ||
} | ||
] | ||
} |
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 @@ | ||
# a.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,12 @@ | ||
program child.aleo; | ||
|
||
record A: | ||
owner as address.private; | ||
val as u32.private; | ||
|
||
|
||
function mint: | ||
input r0 as address.private; | ||
input r1 as u32.private; | ||
cast r0 r1 into r2 as A.record; | ||
output r2 as A.record; |
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": "child.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,4 @@ | ||
// The program input for a/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 @@ | ||
package = [] |
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": "child.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,10 @@ | ||
// The 'a' program. | ||
program child.aleo { | ||
record A { | ||
owner: address, | ||
val: u32, | ||
} | ||
transition mint(owner: address, val: u32) -> A { | ||
return A {owner: owner, val: val}; | ||
} | ||
} |
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 b/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 @@ | ||
[[package]] | ||
name = "child" | ||
location = "local" | ||
path = "parent/child" | ||
checksum = "6341f6fcccbfa86b71e0eac445b9d0ee558c74ef896183ee82b456b9e7fb2270" | ||
dependencies = [] |
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": "parent.aleo", | ||
"version": "0.0.0", | ||
"description": "", | ||
"license": "MIT", | ||
"dependencies": [ | ||
{ | ||
"name": "child.aleo", | ||
"location": "local", | ||
"path": "child" | ||
} | ||
] | ||
} |
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 'b' program. | ||
import child.aleo; | ||
program parent.aleo { | ||
transition wrapper_mint(owner: address, val: u32) -> child.aleo/A { | ||
return child.aleo/mint(aleo1q30lfyggefvzzxqaaclzrn3wd94q4u8zzy8jhhfrcqrf306ayvqsdvj7s4, 1u32); | ||
} | ||
} |
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,18 @@ | ||
{ | ||
"program": "grandparent.aleo", | ||
"version": "0.0.0", | ||
"description": "", | ||
"license": "MIT", | ||
"dependencies": [ | ||
{ | ||
"name": "child.aleo", | ||
"location": "local", | ||
"path": "parent/child" | ||
}, | ||
{ | ||
"name": "parent.aleo", | ||
"location": "local", | ||
"path": "parent" | ||
} | ||
] | ||
} |
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 @@ | ||
// The 'import_example' program. | ||
import child.aleo; | ||
import parent.aleo; | ||
program grandparent.aleo { | ||
transition double_wrapper_mint(owner: address, val: u32) -> child.aleo/A { | ||
return parent.aleo/wrapper_mint(owner,val); | ||
} | ||
} |