1
0
Fork 0
mirror of synced 2025-09-24 04:40:05 +00:00
ZoKrates/zokrates_book/src/concepts/imports.md
2019-09-25 12:15:19 +02:00

797 B

Imports

You can separate your code into multiple ZoKrates files using import statements, ignoring the .zok extension of the imported file:

Relative Imports

You can import a resource in the same folder directly, like this:

import "./mycode"

There also is a handy syntax to import from the parent directory:

import "../mycode"

Also imports further up the file-system are supported:

import "../../../mycode"

You can also choose to rename the imported resource, like so:

import "./mycode" as abc

Absolute Imports

Absolute imports don't start with ./ or ../ in the path and are used to import components from the ZoKrates standard library. Please check the according section for more details. `