etherlime compile
Running this command will compile all smart contracts along with imported sources. The command comes with integrated solidity and vyper compiler and would automatically fetch all files with '.sol' and '.vy' extensions and would record the compiled json object in './build' folder. Note! To enable the vyper compiler you need to have running docker.
Syntax
Parameters:
path
- [Optional] By specifyingpath
you can set the rootdirectory where to read the contracts and place the build folder. By
default
path
is set to the current working directory./
runs
- [Optional] By specifyingruns
between 1 and 999 youenabled the optimizer and set how many times the optimizer will be
run. By default the optimizer is not enabled.
solcVersion
- [Optional] By specifyingsolcVersion
you can setthe version of the solc which will be used for compiling the smart
contracts. By default it use the solc version from the node_modules
folder.
docker
- [Optional] When you want to use a docker image for yoursolc you should set
docker=true
in ordersolcVersion
to acceptthe passed image.
list
- [Optional] By specifyinglist
you can list theavailable solc versions. The following values can be used:
docker
,releases
,prereleases
andlatestRelease
. By default only 10version are listed
all
- [Optional] By specifyingall
together withlist
youwill be able to list all available solc versions.
quiet
- [Optional] Disable verboseness during compilation. Bythe default
quiet
is set to false.output
- [Optional] Defines the way that the logs are shown.Choices:
none
- silences the output of logs,normal
- seeverbose logs in the console and
structured
- structured output ina file meant for inter program communication.
buildDirectory
- [Optional] Defines the directory for placingbuilded contracts.
workingDirectory
- [Optional] Defines the folder to use forreading contracts from, instead of the default one:
./contracts
.Here can be specified also a single solidity file for compiling e.g:
/contracts/LimeFactory.sol
.deleteCompiledFiles
- [Optional] Delete the files in thecompilation contract directory before compiling. By the default
deleteCompiledFiles
is set to false.exportAbi
- [Optional] In addition to the json build files, etherlime buildabis
folder with files containing the abi of every contract. By the default
exportAbi
is set to false.
The solcVersion
can accept the following values:
- passing undefined or simply don't using the
solcVersion argument will use the solc version from the local
node_modules
- you can pass directly the version of the solc.
Example:
--solcVersion=0.4.24
- the image which will be used to load the solc into the
docker. Example:
nightly-0.4.25-a2c754b3fed422b3d8027a5298624bcfed3744a5
- you can pass the absolute path to a local solc
- when you set the solc version argument to
native
thecompiler is using the solc globally installed on your machine
Here is example of result:
Last updated