GithubHelp home page GithubHelp logo

alis-is / tea Goto Github PK

View Code? Open in Web Editor NEW
8.0 0.0 2.0 258 KB

Tezos contract development Environment by alis.is

License: MIT License

Lua 66.45% LigoLANG 10.47% TypeScript 5.98% JavaScript 16.55% Dockerfile 0.56%
dapp ligo smart-contracts taquito tezos docker

tea's Introduction

TEA

TEA logo

License Chat Open in Remote - Containers

TEA is small, adaptable and self contained development environment for Tezos smart contracts.

  • small - dependencies of this project alone are only ~1.2MB
  • adaptable - all behavior is determined based on app.hjson, can be tracked down and adjusted through ami.lua
  • self contained - all features as included within - adjust them anyway you like or need

Start your new Tezos project faster than you prepare cup of tea. :)

What does TEA provide?

  • ligo compilation and tests (SmartPy is not supported right now but with TEA adaptability you can make it to.)
  • taquito based module for dapp development
  • e2e tests with taquito and sandbox

Dependencies

  • eli and ami - for ami commands - only ~1.2MB
  • (optional) podman or docker
  • (optional) nodejs for dapp development
  • (optional) esy for access to ligo package management
  • For development on windows use wsl2

Get Started

With Dev Container

  1. Make sure you have docker To store repository within the container:
  2. Open dev container directly by clicking the container badge or here. Or to store repository on local file system:
  3. Clone repository
    • git clone https://github.com/alis-is/tea.git
  4. Choose Reopen in Container when prompted by VS Code.

Lightweight local setup

  1. Clone repository
    • git clone https://github.com/alis-is/tea.git
  2. Get eli and ami (lua engines powering tea)
    • wget -q https://raw.githubusercontent.com/alis-is/ami/master/install.sh -O /tmp/install.sh && sh /tmp/install.sh
  3. Install optional dependencies if needed
  4. (optional) Edit app.hjson to adjust template behavior
    • You should set id to name of your project. (Build and deploy commands use this id to name files)
  5. ami setup (Downloads ligo and runs ligo install if needed)
  6. (optional) to develop js module run npm install from within the web directory
  7. You are ready to code

NOTE: TEA is fully self contained template. No behavior is specified in outside packages or set in stone. You can adjust it however you like. Just edit behavior within __tea directory. ;)

Guide

TEA is operated with commands through ami. All commands respects your configuration within app.hjson and are defined within ami.lua

TEA provides bellow commands (see --help of each for details):

  • ami sandbox start start sandbox
  • ami sandbox stop stop sandbox
  • ami compile compiles contract, initial storage and views
  • ami deploy <deploy id> deploys deploy or multiple based on id
  • ami test runs ligo tests (stored in tests)
  • ami test-js runs web module tests (stored in web/tests)
    • requires started sandbox
    • ami test-js tests/admin.specs.js runs tests/admin.specs.js tests

Sample workflow

  1. Code your contract
  2. Run ami compile to compile contract and storage (See --help for options or selective compilation)
  3. Run ami test to execute ligo tests
  4. Run ami deploy <deploy id> to deploy contract to your deploys
    • ami deploy sandbox to deploy to sandbox with default app.hjson
  5. Run ami test-js to test js-module

Debug

You can examine all commands tea executes with log level debug:

  • ami -ll=debug <command> e.g. ami -ll=debug test

Development with VS Code

  1. Install Lua extension from sumneko
  2. Run ami download-dev-metas to download meta definitions for autocomplete
  3. Adjust template as needed. Entire template codebase is scoped within __tea directory.

Projects using this template

tea's People

Contributors

cryi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

cryi pinkdiamond1

tea's Issues

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.