Initializing a New Project¶
The first step to using Brownie is to initialize a new project. To do this, create a new empty folder and then type:
$ brownie init
This will create the following project structure within the folder:
build/
: Compiled contracts and test datacontracts/
: Contract source codereports/
: JSON report files for use in the Viewing Coverage Datascripts/
: Scripts for deployment and interactiontests/
: Scripts for testing your projectbrownie-config.yaml
: Configuration file for the project
You can also initialize “Brownie mixes”, simple templates to build your project upon. For many examples within the Brownie documentation we will use the token mix, which is a very basic ERC-20 implementation:
$ brownie bake token
This creates a new folder token/
and deploys the project inside it.