• Stars
    star
    242
  • Rank 167,048 (Top 4 %)
  • Language
  • License
    Creative Commons ...
  • Created almost 5 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

😎 Curated list of tools, contracts, and projects working with CosmWasm

Awesome CosmWasm Awesome

Collection of awesome things related to CosmWasm smart contracts.

Please read the contribution guidelines if you want to contribute.

Contents

General Resources

  • The CosmWasm book - a step-by-step guide to writing CosmWasm smart contracts.
  • CosmWasm framework - a "core" CosmWasm repo. This includes the core Rust framework for writing a smart contract, a virtual machine that runs smart contracts and is embedded in any chain running them, the IDL format for describing the interface of a smart contract, and more! A few of these are commonly dependencies of smart contracts.
  • CosmWasm template - a template for getting an empty smart contract up and running quickly. Instructions included!

CosmWasm Framework

  • cosmwasm-std (repo): The standard library for building CosmWasm smart contracts. Code in this package is compiled into the smart contract.
  • cw-storage-plus (repo): Helper methods to reduce boilerplate for storing data types. Easier and more secure persistence layer.
  • cosmwasm-schema (repo): A dependency for CosmWasm contracts to generate the IDL (interface description) files. These are consumed e.g. by ts-codegen to automagically get a TypeScript client for your contract.
  • cw-multi-test (repo):

Smart Contract Libraries

  • cw-utils (repo): A collection of (somewhat random) helpers we found useful when developing cw-plus contracts and specs. Available as a library at crates.io!
  • cw-coins (repo): A helper for managing multiple coins in a smart contract.
  • cw-item-set (repo): A HashSet equivalent (set of unique items) that can be stored in smart contract storage.

Smart Contracts

Before you create a PR to add your contract here, read the publishing guidelines and make sure you complete them all, specifically adding an OSI-approved license and checking in valid artifacts for the build (contract.wasm, schema/*.json).

We do validate the artifacts and perform a basic code review of contracts included in this list. However, nothing terribly comprehensive and inclusion here should not be taken in lieu of a proper audit. We do provide some guidelines on sharing code reviews in a decentralized manner which can be used as the basis for a peer-reviewed audit.

cw-plus Specifications and Examples

The cw-plus repo houses both protocol specifications and their reference implementations. These implementations are meant both as examples of production-ready contracts and pieces you might like to use in your project as they are.

Specifications

  • cw1 - proxy contracts that are meant to forward a message (probably after checking the sender against some form of access control), this time with the contract as the sender.
  • cw2 - contract metadata (name and version) that can be inspected directly, without querying the contract.
  • cw3 - multisig and voting.
  • cw4 - group membership management with weights.
  • cw20 - fungible token.

Reference implementations

  • cw1-whitelist by ethanfrey: This may be the simplest implementation of cw1, a whitelist of addresses. It contains a set of admins that are defined upon creation. Any of those admins may Execute any message via the contract, per the CW1 spec.
  • cw1-subkeys by ethanfrey: This builds on cw1-whitelist to provide the first non-trivial solution. It still works like cw1-whitelist with a set of admins (typically 1) which have full control of the account. However, you can then grant a number of accounts allowances to send native tokens from this account.
  • cw3-fixed-multisig: This is a simple implementation of the cw3 spec. It is a multisig with a fixed set of addresses created upon initialization. Each address may have the same weight (K of N) or some may have extra voting power.
  • cw3-flex-multisig: This builds on cw3-fixed-multisig with a more powerful implementation of the cw3 spec. It is a multisig contract that is backed by a cw4 (group) contract, which independently maintains the voter set.
  • cw4-group: This is a basic implementation of the cw4 spec. It fulfills all elements of the spec, including the raw query lookups, and it designed to be used as a backing storage for cw3 compliant contracts.
  • cw4-stake: This is a second implementation of the cw4 spec. It fufills all elements of the spec, including the raw query lookups, and it is designed to be used as a backing storage for cw3 compliant contracts.
  • cw20-base by ethanfrey: Basic implementation of a cw20 contract. It implements the cw20 spec and is designed to be deloyed as is, or imported into other contracts to easily build cw20-compatible tokens with custom logic.

Other Contracts

These contracts demonstrate best practices and learning references. Please do not use them in production as is. You are welcome to fork them, and independently review, refine and audit them, using them as a basis for your protocol. Or just as inspiration

  • cw-tokens - a few other cw20 (fungible token) contracts.
  • cw-nfts - non-fungible tokens. Official repository for all work on NFT standards and reference contracts. This is where the cw721 spec lives.

External Projects

These projects/contracts are developed and maintained by CosmWasm community.

  • DA0-DA0/dao-contracts - DAO DAO is the leading software to build your own DAO on CosmWasm chains, quickly surpassing Aragon in functionality
  • mars-protocol/v1-core - Delphi's "Mars Protocol" is the leading lending protocol on Terra and soon launching on Osmosis
  • public-awesome/launchpad - Stargaze provides contracts to easily create and manage new NFT collections.
  • CronCats/cw-croncat - Croncat provides a general purpose, fully autonomous network that enables scheduled function calls for blockchain contract execution. It allows any application to schedule logic to get executed in the future, once or many times, triggered by an approved β€œagent,” in an economically stable format.

Tooling

  • cosmwasm/rust-optimizer - This is a Docker build with a locked set of dependencies to produce reproducible builds of cosmwasm smart contracts. It also does heavy optimization on the build size, using binary stripping and wasm-opt.
  • cosmology-tech/create-cosmos-app - set up a modern Cosmos app with one command, ready to be iterated on.
  • mandrean/cw-optimizoor - A very fast alternative to rust-optimizer for local development and testing. Written in Rust, no dependency on Docker.
  • cosmwasm devtools (repo) - A web-based console for interacting with CosmWasm smart contracts deployed locally or remotely. Can use Keplr account or generate new addresses as needed.
  • cosmwasm/ts-codegen - Convert your CosmWasm smart contracts into dev-friendly TypeScript classes so you can focus on shipping code.
  • Terran-One/cosmwasm-vm-js - A JavaScript runtime for running CosmWasm contracts in Node.js or the browser.
  • CWSimulate - An online playground / simulation environment for interacting with CosmWasm contract binaries without a blockchain. Can be used for execution visualization / interactive debugging with time-traveling navigation.
  • cosmy-wasmy - A vscode extension to interact with CosmWasm smart contracts on devnet or testnet chains. Allows to query, execute, upload contracts as well as provide code completion snippets.
  • cosmwander - Explore on-chain cosmwasm contracts and discover their message scheme.
  • WELLDONE Code - Remix IDE plugin that supports CosmWasm. It is a web-based IDE that allows developers to deploy smart contracts and execute functions through a browser wallet. It supports its own compiler server, so developers do not need to set up a development environment.
  • Cosmwasm Studio - Monaco IDE that supports CosmWasm. It allows developers to code, build smart contracts and execute functions through a simulation. It supports its own rust-analyzer in Web Assembly so developers can code it the same as local VS Code.
  • cosmwasm-tools - A super fast and cross-platform alternative to rust-optimizer that produces optimized wasm files. Written in Typescript, supporting watch mode, parallel builds, and ts-codegen sharing common dependencies.
  • beaker - A toolkit that simplifies interactions with CosmWasm smart contracts which offers scaffolding, deployment, upgrades, execution, querying, an interactive console, and task scripting capabilities.

dApps

Looking for dApps to feature. See #19.

More Repositories

1

cosmwasm

Framework for building smart contracts in Wasm for the Cosmos SDK
Rust
1,060
star
2

cw-plus

Production Quality contracts under open source licenses
Rust
506
star
3

wasmd

Basic cosmos-sdk app with web assembly smart contracts
Go
367
star
4

cw-template

Quickstart template to get started writing your own cosmwasm contracts
Rust
283
star
5

wasmvm

Go bindings to the CosmWasm VM
Go
173
star
6

optimizer

Dockerfile and script to deterministically produce the smallest possible Wasm for your Rust contract
Rust
123
star
7

ts-codegen

Convert your CosmWasm smart contracts into dev-friendly TypeScript classes so you can focus on shipping code.
TypeScript
116
star
8

sylvia

CosmWasm smart contract framework
Rust
93
star
9

mesh-security-hackathon

Implementation of Sunny's Mesh Security talk (Hackathon / Prototype status)
Rust
88
star
10

cw-tokens

Examples of cw20 usage, extracted from cw-plus, maintained by the community
Rust
85
star
11

dApps

A collection of sample dApps for CosmWasm contracts, using CosmJS frontend SDK
TypeScript
55
star
12

docs-deprecated

Updated documentation repo
JavaScript
52
star
13

CosmWasmJS

Source of the cosmwasm npm package
TypeScript
50
star
14

cw-multi-test

CosmWasm multi-contract testing framework
Rust
46
star
15

cw-storage-plus

Storage abstractions for CosmWasm smart contracts
Rust
35
star
16

testnets

Information on all public CosmWasm testnets
TypeScript
34
star
17

book

CosmWasm book
34
star
18

cosmwasm-go

Enabling CosmWasm smart contracts in Go using TinyGo
Go
29
star
19

token-factory

Pulling out Osmosis token factory module and the custom CosmWasm bindings into it's own repo for easier reuse
Go
24
star
20

resources

23
star
21

tinyjson

Fast JSON serializer for golang.
Go
22
star
22

code-explorer

A code explorer for CosmWasm
TypeScript
21
star
23

cw-minus

Contract helpers originally used for cw-plus contracts/specs
Rust
16
star
24

cosmwasm-verify

Verify CosmWasm build results
Shell
15
star
25

advisories

To publicly communicate advisories about serious bugs in CosmWasm, wasmvm, and wasmd
Shell
14
star
26

drand-verify

A drand verification library in Rust. This can be used by other crates or be compiled to a Wasm blob (< 500 kilobytes) with JavaScript bindings.
Rust
12
star
27

cosmwasm-simulate

Simulation tool for cosmwasm smart contract
Rust
10
star
28

cw-academy-course

CosmWasm academy smart contracts course projects
Rust
7
star
29

mesh-security-ui

Basic UI to try out mesh security
TypeScript
6
star
30

docs

MDX
6
star
31

token-bindings

Minimal Rust bindings for token factory
Rust
5
star
32

CWIPs

CosmWasm Improvement Proposals
Shell
5
star
33

storey

Experimental storage abstractions for blockchain key-value stores
Rust
5
star
34

academy-deploy

TypeScript
4
star
35

cw-cron

Basic job scheduler service implementation for CosmWasm
3
star
36

sylvia-book

3
star
37

name-app

Simple react app on top of cosmwasm, showing use of name server contract
TypeScript
3
star
38

terra-contracts

Custom bindings and sample contracts for Terra integration
Rust
2
star
39

cw-mcs-academy-course

Repository for multi contract systems academy course
Rust
2
star
40

docs-old

Documentation for cosmwasm
JavaScript
2
star
41

simple-option

Demo repo for hackatom video
Rust
2
star
42

cw-storage

CosmWasm library with useful helpers for Storage patterns
Rust
1
star
43

chat.cosmwasm.com

Redirect to our community chat
HTML
1
star
44

cw-tools

Rust
1
star
45

idl

The CosmWasm IDL docs
1
star
46

sylvia-template

Rust
1
star