Add a contract
Clarinet can handle adding a new contract and its configuration to your project
To add a new contract, run the clarinet contract new
command inside your project along with your contract name.
Clarinet will add 2 files to your project: my-contract.clar
and my-contract.test.ts
.
my-contract.clar
my-contract.test.ts
.gitignore
Clarinet.toml
package.json
tsconfig.json
vitest.config.js
Clarinet will also add the configuration to the Clarinet.toml
file for your contract.
Adding contracts manually
You may 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.
Last updated on