Depending on which language for developing Smart Contracts is used, Embark supports special import paths. In this guide we’ll discuss the various ways of importing Smart Contract source code in other Smart Contract files.
Scope of this guide
The following features are currently only supported for Smart Contracts written in the Solidity programming language. If you’re using another language, such as Vyper, these features may not be available.
If using Solidity it’s possible to import other Smart Contract files inside a source file from the application’s folders that are not explicitly defined in the
contracts property of
Embark also supports convenient imports from installed
node_modules. Just specify the package name including the path to the Solidity file you wish to import.
Source files can even be imported straight from Git, Github, IPFS, Swarm or via HTTP(S):