Code Monkey home page Code Monkey logo

houston's Introduction

Houston ๐Ÿš€




npm npm bundle size

Houston is a development environment, testing framework and smart contract pipeline for Terra, aiming to make life as a Terra developer easier.

** ๐Ÿšจ Houston is now currently in Beta version. Completed version is not ready yet. use it with your own caution. **

Features

  • Built-in smart contract compilation, linking, deployment and wasm binary management.
  • Configurable build pipeline with support for custom build processes.
  • Scriptable deployment & migrations framework.
  • Network management for deploying to Terra's public & private networks.
  • Instant rebuilding of webassembly binaries during development.

Installation

Houston will gracefully setup a stable version of rust compiler and wasm target to develop smart contracts on Terra blockchain.

Grab the latest version of NPM:

npm install -g @terra-money/houston

Documentation

To get more information on Houston, check out the documentation.

Kickstart

Houston has five commands to help smart contract development:

init: for project initialization

compile: for compiling contracts

migrate: for deploying contracts to blockchain

add: for adding or downloading contract cargo projects

To get help on each command, run houston help <command>.

Initialize project

mkdir myProject
cd myProject
houston init

Once this operation is completed, you'll now have a project structure with the following items:

myProject/
  |- contracts
  | |- starter
  |- wasm
  |- schema
  |- migrations
  | |- 0_deploy_starter.ts 
  |- package.json
  |- tsconfig.json

contracts: directory for cosmwasm contracts

wasm: wasm binaries of compiled contracts

schema: generated schema of compiled contracts

test: test script directory for contract interaction

starter: a starter cosmwasm contract cargo

package.json: package manager for migration scripts

tsconfig.json: Typscript configuration file for migration scripts

Compile contracts

Set current working directory inside of the project directory

houston compile [contractName]

All contract cargos in the contracts directory will be compiled as default.

[contractName] is an optional parameter to specify which cargo to compile with the command.

Once this operation is initiated, you'll see the event in the console as below:

๐Ÿ›  Compiling your contracts...
===========================

After comilation of each contract, you'll get the directories for compiled results as below:

> WASM written to /Users/.../<project folder>/wasm
> Schemas written to /Users/.../<project folder>/schemas/<contract name>_schema

Compiled WASM binaries will be placed in wasm directory as <contract name>.wasm. Generated collection of schema json files will be placed as a directory with the name <contract name>-schema in schemas directory.

You will have the new project structure with the following items:

myProject/
  |- contracts
  | |- starter
  |- wasm
  | |- starter.wasm
  |- schema
  | |- starter-schema
  |   |- config.json
  |   |- ....
  | migrations
  | |- 0_deploy_starter.ts
  | package.json
  | tsconfig.json

Running migrations

run your migraion scripts in migrations folder after installing packages with the following command:

npm install
houston migrate 

Contributions

Contributions are welcome to this project for helping Terra developers to build their dapps. To contribute to this project, you can check CONTRIBUTING.md for the detail.

Or you can join the Terra's official discord channel and discuss new ideas or addition.


License

This software is licensed under the Apache 2.0 license. See LICENSE for full disclosure.

ยฉ 2020 Terraform Labs, PTE.


ย 

Powering the innovation of money.

houston's People

Contributors

hanjukim avatar hskang9 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.