mirror of
https://github.com/arnaucube/go-snark-study.git
synced 2026-02-02 17:26:41 +01:00
add allow import circuits in circuits language compiler
This commit is contained in:
8
circuitexamples/import-example.circuit
Normal file
8
circuitexamples/import-example.circuit
Normal file
@@ -0,0 +1,8 @@
|
||||
import "imported-example.circuit"
|
||||
|
||||
func main(private s0, public s1):
|
||||
s3 = exp3(s0)
|
||||
s4 = sum(s3, s0)
|
||||
s5 = s4 + 5
|
||||
equals(s1, s5)
|
||||
out = 1 * 1
|
||||
7
circuitexamples/imported-example.circuit
Normal file
7
circuitexamples/imported-example.circuit
Normal file
@@ -0,0 +1,7 @@
|
||||
func exp3(private a):
|
||||
b = a * a
|
||||
c = a * b
|
||||
return c
|
||||
func sum(private a, private b):
|
||||
c = a + b
|
||||
return c
|
||||
Reference in New Issue
Block a user