Add new Contract
Clarinet can handle adding a new contract and its configuration to your project.
Topics covered in this guide:
You can use the command below to add a new contract.
$ clarinet contract new bbtc
Clarinet will add two files to your project:
- the contract file in the
- the contract test file in the
│ └── bbtc.clar
│ └── Devnet.toml
│ └── Mainnet.toml
│ └── Testnet.toml
Clarinet will also add your contract configuration in the
path = "contracts/my-contract.clar"
You can add contracts to your project by adding the files manually; however, you must make sure to add the appropriate configuration
Clarinet.toml for Clarinet to recognize the contracts.