Git Product home page Git Product logo

ergoscript-by-example's Introduction

ErgoScript By Example

Learn ErgoScript by reading example smart contracts powered by the Ergo Playground.

Each contract example includes a Ergo Playground link which allows you to instantly edit and run the smart contract code inside of your browser.

If you ever need clarity about how specific types/functions/operators in ErgoScript work, please reference the ErgoScript Language Description.

For an overarching summary of how everything in this repo works, please reference the video below:

ErgoScript By Example & Ergo Playground Introductory Video

Table Of Contents

ErgoScript Examples

Number Difficulty Title
1 Beginner Pin Lock Contract
2 Intermediate Single-Chain Swap Contracts

Extra Resources To Get Started

If you are unfamiliar with the Extended UTXO model, smart contracts, or Ergo specifically, the above examples may be a little bit challenging to jump straight into. As such the following links below are recommended resources for getting a solid background in understanding what is going on:

  1. Emurgo Research: How Do UTXO Contracts Work? (First 2 sections)

  2. ErgoScript Whitepaper

  3. Advanced ErgoScript Whitepaper

  4. Emurgo Research: High Level Design Patterns In EUTXO Systems

The first two links should enlighten you to the majority of the basics, and the links thereafter are more advanced deep dives.

How To Contribute

We are always happy to include new community-submitted examples within this repo if you are interested in contributing.

All examples submitted must:

  • Use the Ergo Playground via Scastie (basic template here)
  • Create a test scenario to show off the off-chain logic required for the contract to work
  • Provide clear comments inside of the code explaining what is going on
  • Follow the example template. (Ensure you include your scastie Ergo Playground url in both links)
  • Have an understandable/relevant title + filename

Simply create a PR with your new exampleTitle.md file added to the repo + this README.md updated with your example added to the list of ErgoScript Examples.

If you are unsure about anything feel free to reference the first example contract and/or join the Ergo Discord to ask questions.

ergoscript-by-example's People

Contributors

kushti avatar robkorn avatar

Watchers

 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.