Add a contract
Clarinet can handle adding and configuring a new contract to your project.
To add a new contract, run the clarinet contract new
command, along with your contract name, inside your project.
Clarinet will add 2 files to your project: my-contract.clar
and my-contract.test.ts
.
Clarinet will also add the configuration to the Clarinet.toml
file for your contract.
Adding contracts manually
You can also add contracts to your project by adding the files manually. However, you must add the appropriate configuration to Clarinet.toml
in order for Clarinet to recognize the contracts.