Skip to content

Commit

Permalink
Docs: Updated documentation to set clarity version of contract
Browse files Browse the repository at this point in the history
  • Loading branch information
LakshmiLavanyaKasturi authored and hugocaillard committed Jan 18, 2023
1 parent 3df3847 commit b124d96
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions docs/how-to-guides/how-to-set-up-local-development-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,21 @@ This command creates a new `my-contract.clar` file in the `contracts` directory,
path = "contracts/my-contract.clar"
```

### Set clarity version of contract

You can specify the clarity version of your contract in the `Clarinet.toml` configuration file by updating it as shown below.

```
[contracts.cbtc-token]
path = "contracts/cbtc-token.clar"
clarity = 1
```
```
[contracts.cbtc-token]
path = "contracts/cbtc-token.clar"
clarity = 2
```

At this point, you can begin editing your smart contract in the `contracts` directory. At any point while you are developing, you can use the command `clarinet check` to check the syntax of your smart contract.

For a more in-depth overview of developing with Clarinet, review this comprehensive walkthrough video.
Expand Down Expand Up @@ -166,5 +181,3 @@ For more information on assertions, review [asserts](https://deno.land/[email protected].
- [Clarity language reference](https://docs.stacks.co/references/language-functions)
- [Deno standard library - asserts](https://deno.land/[email protected]/testing/asserts.ts)
- [Clarity visual studio code plugin](https://marketplace.visualstudio.com/items?itemName=HiroSystems.clarity-lsp)


0 comments on commit b124d96

Please sign in to comment.