Clarity Smart Contract Language

Content

Clarity of Mind Foreword Introduction

Getting started

Getting started with Clarity is an order of magnitude easier than some other smart contract languages. Although the tooling is still a bit experimental, you can already do some pretty great things. Want to test a quick snippet? We have a self-contained REPL ("Read-Evaluate-Print Loop"). Want to spin up a local simulated chain without all the hassles of running a full node? Clarinet has got you covered. How about generating a full-fledged client for your smart contract? Clarigen can make a difference there.

The book will cover installing the official Clarity REPL and Clarinet for end to end smart contract development. A lot of fully functioning Clarity snippets and example contracts will be provided as you work through the chapters. Learning by example is really the best way to master a new skill. The later chapters will challenge you to build a few common smart contracts by yourself using Clarinet. Extra attention will be given to best practices and proper testing.

You are in for a treat if you are reading this book online. Almost all Clarity code snippets contained herein are fully interactive. When you see a play button, you can click it to execute the Clarity code and be shown the results (or mistakes) in your browser. But the fun does not stop there. You can even play around with these snippets by editing them directly. If you are reading this on a different medium, then keep the Clarity REPL by your side.