GithubHelp home page GithubHelp logo

cosmwasm-contracts's Introduction

Cosmwasm Examples

CircleCI

This repo is a collection of contracts built with the cosmwasm framework. Anyone building on cosmwasm is encouraged to submit their contracts as a sub-project via a PR.

The organization is relatively simple. The top-level directory is just a placeholder and has no real code. And we use workspaces to add multiple contracts below. This allows us to compile all contracts with one command.

Usage

Sample contracts are available under the contracts/ directory. You can view the source code under each contract’s src subdirectory. Take a look here:

Development

Starting a contract

If you want to add a contract, first fork this repo and create a branch for your PR. I suggest setting it up via cosmwasm-template:

cargo generate --git https://github.com/confio/cosmwasm-template.git --name FOO

Then update the README.md to reflect your actual contract (just read the README.md in the autogenerated template - it explains a lot).

Preparing for merge

Before you merge the code, make sure it builds and passes all tests, both in the package, and when calling it from the root packages cargo wasm && cargo test. This should show your package is covered by the CI.

There is also quite some useful information in Development.md and Publishing.md in the newly generated contract.

You should also prepare a compiled contract.wasm before each merge to master. This is not enforced by the CI (a full build each commit), but should be tested on merge. See cosmwasm-opt for an explanation of how to make a deterministic build.

docker run --rm -v "$(pwd)":/code \
  --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
  --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
  cosmwasm/rust-optimizer:0.11.3

cosmwasm-contracts's People

Contributors

ethanfrey avatar kasimte avatar msntcs avatar yun-yeo 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.