Giter Club home page Giter Club logo

secret-contracts-examples's Introduction

Secret Contract Examples List

A curated list of Secret Contracts ordered by complexity. Secret Agents are welcome to suggest their own projects and improve these.

Basic

  1. Counter - Increments a counter which you can query.
  2. Reminders - Lets users create a private reminder on the blockchain. Includes tutorial.
  3. Voting - Lets users vote "yes" or "no" privately.1
  4. Dice - Two players bet 1 scrt. Player 1 wins the pot if die shows 1-3.
    • Demonstrates sending scrt.
    • Demonstrates randomness.
  5. Calculator - Privately calculates basic arithmetic operations which are saved to the user's History.
    1. With Cookies - Includes stylized SecretJs client.
    2. With Viewing Keys - Simple Typescript SecretJs client.
    3. With Permits - Basic Javascript SecretJs client.

Advanced

  1. Decentralized Reviews - Users can review/rate businesses they transacted with.1
    • Includes basic inter-contract querying.
    • Basic Demonstration of an Iterable Map, which isn't trivial concept in Secret Network.
  2. Blackjack.
    • Includes Random number usage.
    • Includes deploying a contract from a parent contract.
  3. Poker.
    • Includes Random number usage.
  4. Sealed-Bid Auction.
  5. Migrations.
  6. AMM.
    • 4 contracts: A factory contract creates and lists many trading pairs, which enable swaps based on liquidy added by providers who are rewarded LP tokens. The UI uses the router contract to connect paths between unexistent pairs.

Reference implementations

  1. SNIP-20 - Transferable, private, fungible store of value (Token).
  2. SNIP-721 - Transferable, private, non-fungible Token.

Footnotes

  1. currently vulnerable to replay attacks. 2

secret-contracts-examples's People

Contributors

eshelb avatar

Stargazers

seanrad.scrt avatar  avatar

Watchers

Tom Langer avatar Cashmaney avatar Assaf Morami avatar  avatar  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.