You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example: Using external structs in Aleo instructions
program points.aleo;
struct point:
x as u8;
y as u8;
function add_:
input r0 as point.private;
input r1 as point.private;
add r0.x r1.x into r2;
add r0.y r1.y into r3;
cast r2 r3 into r4 as point;
output r4 as point.private;
/////////////////////////////////////////////////
import points.aleo;
program point_arithmetic.aleo;
struct point:
x as u8;
y as u8;
function add_two_points:
input r0 as point.private;
input r1 as point.private;
call points.aleo/add_ r0 r1 into r2;
output r2 as point.private;
🚀 Feature
Support seamless passing of parameters of any types between programs.
Motivation
Consider a simple program that has transition
one
which takes input of typeA
.Another program should be able to call this program seamlessly:
The text was updated successfully, but these errors were encountered: