Version: 0.28.0

Including Other Contracts

Let us say that we have a contract that is getting a too large. If it has a modular structure, you might find it useful to use the #include statement to split the contract up over multiple files.

You take the code that you want to include and put it in a separate file, for example included.ligo:

// Demonstrate JsLIGO inclusion statements, see includer.jsligo
let foo: int = 144;

And then you can include this code using the #include statement like so:

#include "included.jsligo"
let bar: int = foo;