/clarity-smart-contracts

Collection of Smart Contract for Stacks Blockchain in Clarity

Primary LanguageTypeScriptMIT LicenseMIT

Gitpod ready-to-code

Clarity Smart Contracts

A collection of various smart contracts written in Clarity. They run on the Stacks blockchain.

See also original Clarity tutorials by Blockstack.

Repositories with Smart Contracts

  • Swapr Trustless token exchange.
  • Flexr Token with an elastic supply, guaranteed by design to be uncorrelated to other tokens.
  • Stackstarter Crowdfunding
  • Marketplace Marketplace (NFTs that can get disabled + market).
  • Loopbomb Marketplace Marketplace for art NFTs and others.
  • Profit sharing token Token with included profit sharing on resale.
  • Blind Poll Anonymous polls, where all submitted answers will be sealed until they're revealed by participants after the poll is closed.
  • Highscore Simple list of submitted scores.
  • Redistribution Pot for redistributing funds.
  • Endless list A bottomless, paged, list of items.
  • Stacks loans Loans with fixed interest rates.
  • Advent calendar Open one door each day, open to everybody to add new doors.

More examples on

Smart Contracts in this Repository

This repo is gitpod ready. Click the gitpod button to start editing and running the contracts. (Read more about Clarity Web IDE (gitpod based))

.
+-- contracts
|    +-- license (OI License - contract to handle licenses for using UI apps, not data apps)
|    +-- tokens  (Token contracts with various properties)
|    +-- experiments (All the rest)
+-- test
|    +-- integration (Tests that run on mocknet or testnet)
|    +-- unit (Test that run on clarity VM only)

Documented Contracts

Escrow contract: Simple token transfer via 3rd party (contract account). Video of demo

Flip coin contract: Random coin flipping, users can bet on the outcome.