-
Notifications
You must be signed in to change notification settings - Fork 5
Compiling contracts
Cobra's compile
command enables us to compile our decentralized application and deploy it accordingly. It compiles our Smart Contracts. This will be compile all smart contracts along with imported sources.
Cobra would automatically fetch all Solidity files from solidity_path
directory from cobra.yaml
. As contracts are written in Solidity, all files containing contracts will have a file extension of sol
. Associated Solidity libraries will also have a sol
extension.
The command comes with integrated solidity compiler.
Running compile
command
cobra compile
Optional command --more
is to see more view errors when compiling a project.
cobra compile --more
Note: Any source code that has changed will be recompiled.
All compiled artifact contracts will have a file extension of json
object. Artifacts of your compilation will be placed in the artifact_path
directory from cobra.yaml
, relative to your project root. (This directory will be created if it does not exist.)
These artifacts are integral to the inner workings of Cobra, and they play an important part in the successful deployment of your application. You should not edit these files as they'll be overwritten by contract compilation and deployment. See cobra compile configuration.
Auther Meheret Tesfaye
@2019, Cobra Framework