{"id":19291788,"url":"https://github.com/hirosystems/clarity-notebook","last_synced_at":"2025-10-17T17:28:45.053Z","repository":{"id":66355262,"uuid":"273123350","full_name":"hirosystems/clarity-notebook","owner":"hirosystems","description":"A set of Jupyter notebooks for getting started with Clarity.","archived":false,"fork":false,"pushed_at":"2021-02-25T03:51:19.000Z","size":26,"stargazers_count":12,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-15T21:43:52.997Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hirosystems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-18T02:29:50.000Z","updated_at":"2023-05-01T19:58:13.000Z","dependencies_parsed_at":"2023-06-08T06:30:37.517Z","dependency_job_id":null,"html_url":"https://github.com/hirosystems/clarity-notebook","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Fclarity-notebook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Fclarity-notebook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Fclarity-notebook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Fclarity-notebook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hirosystems","download_url":"https://codeload.github.com/hirosystems/clarity-notebook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250183245,"owners_count":21388682,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T22:27:54.103Z","updated_at":"2025-10-17T17:28:39.998Z","avatar_url":"https://github.com/hirosystems.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Clarity Notebook\n\n## Interactive tour\n\n### Chapter 1 - Basics\n\nIn this chapter, we will dissect some hello world programs and learn the basics of Clarity and its functional programming syntax. We will learn how to define a function and the fundamental control flow functions.\n\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/lgalabru/clarity-notebook/master?filepath=work%2Finteractive-tour-chapter-01.ipynb)\n\n### Chapter 2 - Data types\n\nIn this chapter, we will gradually learn about the data types powering Clarity, from the most basic ones, to the most sophisticated. This chapter will gives us the fundamental keys to approach the next chapters.\n\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/lgalabru/clarity-notebook/master?filepath=work%2Finteractive-tour-chapter-02.ipynb)\n\n### Chapter 3 - Data storage\n\nIn this chapter, we will be introducing two primitives for storing, updating and retrieving stateful data in Clarity programs, along with their associated functions.\n\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/lgalabru/clarity-notebook/master?filepath=work%2Finteractive-tour-chapter-03.ipynb)\n\n### Chapter 4 - Arithmetic and Logic functions\n\nIn this chapter, we will learn about all the arithmetic and logic functions available natively in Clarity.\n\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/lgalabru/clarity-notebook/master?filepath=work%2Finteractive-tour-chapter-04.ipynb)\n\n### Chapter 5 - Sequence functions\n\nIn this chapter, we will have a closer look at a family of types, the sequences (list, buffer and strings), and see how the functions map / reduce can be combined and leveraged for solving problems.\n\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/lgalabru/clarity-notebook/master?filepath=work%2Finteractive-tour-chapter-05.ipynb)\n\n### Chapter 6 - Token Oriented Programming\n\nIn this chapter, we will introduce another type of data storage primitive, designed to simplify the structure and reduce the amount of code of programs manipulating Fungible and Non Fungible Tokens.\n\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/lgalabru/clarity-notebook/master?filepath=work%2Finteractive-tour-chapter-06.ipynb)\n\n### Chapter 7 - Cryptographic and Blockchain functions\n\nIn this chapter, we will learn about the handful of native cryptographic functions available natively with Clarity, along with some of the very unique functions that can be used for exploring the state of the chain, past and present.\n\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/lgalabru/clarity-notebook/master?filepath=work%2Finteractive-tour-chapter-07.ipynb)\n\n### Chapter 8 - Inter-Contract Communication functions\n\nIn this chapter, we will learn how contracts can safely dispatch inter contract calls and exchange data with other programs, statically and dynamically through the use of traits.\n\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/lgalabru/clarity-notebook/master?filepath=work%2Finteractive-tour-chapter-08.ipynb)\n\n### Chapter 9 - Best practices and recommandations\n\nIn this chapter, we will learn about smart contracts best practices. We will be suggesting design patterns and recommandations aiming at maximizing security.\n\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/lgalabru/clarity-notebook/master?filepath=work%2Finteractive-tour-chapter-09.ipynb)\n\n### Misc\n\n#### Generating some randomness\n\nIn this notebook, we will generate some randomness, using the VRF of the current block\n\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/lgalabru/clarity-notebook/master?filepath=work%2Fmisc-randomness.ipynb)\n\n### Run the notebooks locally\n\nThe first step is to ensure that you have Rust and the support software installed.\n\n```bash\ncurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n```\n\nThen you need to install Jupyter, using your favourite package manager:\n\n```bash\nbrew install jupyter\n```\n\nAnd install Clarity for Jupyter:\n\n```bash\ncargo install clarity-jupyter-kernel\nclarity-jupyter-kernel --install\n```\n\nFrom there, you can clone this repository:\n\n```bash\ngit clone https://github.com/lgalabru/clarity-notebook.git\n\ncd clarity-notebook\n```\n\nThen start Jupyter:\n\n```bash\njupyter-notebook\n```\n\nHappy hacking / learning!\n\n## Current status\n\n- [x] Chapter 1 - drafted\n- [x] Chapter 2 - drafted\n- [x] Chapter 3 - drafted\n- [x] Chapter 4 - drafted\n- [ ] Chapter 5\n- [ ] Chapter 6\n- [ ] Chapter 7\n- [ ] Chapter 8\n- [ ] Chapter 9\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhirosystems%2Fclarity-notebook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhirosystems%2Fclarity-notebook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhirosystems%2Fclarity-notebook/lists"}