Coder Social home page Coder Social logo

stacks-shudufhadzo's Introduction

Clarity Experiments

A collection of Clarity smart contract experiments by Marvin Janssen. They run on the Stacks blockchain.

More documentation forthcoming. Until then, take a look at the unit tests on how to use the contracts.

Smart contracts

A basic counter contract.

A multiuser version of the counter contract.

A time-locked vault contract that becomes eligible to claim by the beneficiary after a certain block-height has been reached.

A simplified version of the timelocked-wallet contract that uses top-level defines.

A simple multisig vault that allows members to vote on who should receive the STX contents.

A SIP009-compliant NFT with a mint function.

A SIP010-compliant fungible token with a mint function.

A tiny NFT marketplace (<100 lines of code!) that allows users to list NFTs for sale for a fixed price. Users request payment in either STX or a SIP010-compliant fungible token.

The maker can specify the following when listing:

  • The NFT token to sell.
  • Listing expiry in block height.
  • The payment asset, either STX or a SIP010 fungible token.
  • The NFT price in said payment asset.
  • An optional intended taker. If set, only that principal will be able to fulfill the listing. (Useful if you want to trustlessly sell an NFT to someone specific.)

NFTs are transferred to the market contract when listed. The maker can get it back at any time by cancelling the listing. If the listing expires, the maker can likewise retrieve the NFT by cancelling.

When the taker fulfills the listing, the payment asset is transferred to the maker directly. If all goes well, the NFT is released to the taker.

stacks-shudufhadzo's People

Contributors

marvinjanssen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.