Skip to content

Commit

Permalink
Merge pull request #18 from CosmWasm/update-cosmwasm-projects
Browse files Browse the repository at this point in the history
Cleanup
  • Loading branch information
uint authored Oct 26, 2022
2 parents aea9889 + 8e26944 commit fd45539
Showing 1 changed file with 97 additions and 110 deletions.
207 changes: 97 additions & 110 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,48 @@ contribute.
## Contents

- [General Resources](#general-resources)
- [CosmWasm Framework](#cosmwasm-framework)
- [Smart Contracts](#smart-contracts)
- [Smart Contract Libraries](#smart-contract-libraries)
- [`cw-plus` Specifications and Examples](#cw-plus-specifications-and-examples)
- [Other Contracts](#other-contracts)
- [External Projects](#external-projects)
- [Tooling](#tooling)
- [dApps](#dapps)

## General Resources

- [CosmWasm official documentation](https://docs.cosmwasm.com)
- [CosmWasm framework](https://github.com/CosmWasm/cosmwasm) - you will import
this for your contracts, README has useful info and links
- [CosmWasm template](https://github.com/CosmWasm/cosmwasm-template) - how to
start building your own contract
- [The CosmWasm book](https://book.cosmwasm.com/) - a step-by-step guide to
writing CosmWasm smart contracts.
- [CosmWasm framework](https://github.com/CosmWasm/cosmwasm) - 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](https://github.com/CosmWasm/cw-template) - a template for
getting an empty smart contract up and running quickly. Instructions included!

## CosmWasm Framework

- [cosmwasm-std](https://crates.io/crates/cosmwasm-std)
([repo](https://github.com/CosmWasm/cosmwasm/tree/master/packages/std)): The
standard library for building CosmWasm smart contracts. Code in this package
is compiled into the smart contract.
- [cw-storage-plus](https://crates.io/crates/cw-storage-plus)
([repo](https://github.com/CosmWasm/cw-storage-plus)): Helper methods to
reduce boilerplate for storing data types. Easier and more secure persistence
layer.
- [cosmwasm-schema](https://crates.io/crates/cosmwasm-schema)
([repo](https://github.com/CosmWasm/cosmwasm/tree/master/packages/schema)): A
dependency for CosmWasm contracts to generate the IDL (interface description)
files. These are consumed e.g. by
[`ts-codegen`](https://github.com/CosmWasm/ts-codegen) to automagically get a
_TypeScript_ client for your contract.
- [cw-multi-test](https://crates.io/crates/cw-multi-test)
([repo](https://github.com/CosmWasm/cw-multi-test)):
- [cw-utils](https://crates.io/crates/cw-utils)
([repo](https://github.com/CosmWasm/cw-utils)): A collection of (somewhat
random) helpers we found useful when developing `cw-plus` contracts and specs.
Available as a library at crates.io!

## Smart Contracts

Expand All @@ -37,10 +67,30 @@ guidelines on
[sharing code reviews in a decentralized manner](https://github.com/confio/cosmwasm-template/blob/master/Importing.md)
which can be used as the basis for a peer-reviewed audit.

### Plus Contracts
### `cw-plus` Specifications and Examples

[The `cw-plus` repo](https://github.com/CosmWasm/cosmwasm-plus) 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

[The plus contracts](https://github.com/CosmWasm/cosmwasm-plus) are designed
with a cosmwasm-specific spec and focus on composability.
- [cw1](https://github.com/CosmWasm/cosmwasm-plus/tree/master/packages/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](https://github.com/CosmWasm/cw-plus/tree/main/packages/cw2) - contract
metadata (name and version) that can be inspected directly, without querying
the contract.
- [cw3](https://github.com/CosmWasm/cosmwasm-plus/blob/master/packages/cw4/README.md) -
multisig and voting.
- [cw4](https://github.com/CosmWasm/cosmwasm-plus/blob/master/packages/cw4/README.md) -
group membership management with weights.
- [cw20](https://github.com/CosmWasm/cosmwasm-plus/tree/master/packages/cw20) -
fungible token.

#### Reference implementations

- [cw1-whitelist](https://github.com/CosmWasm/cosmwasm-plus/tree/master/contracts/cw1-whitelist)
by [ethanfrey](https://github.com/ethanfrey): This may be the simplest
Expand All @@ -56,32 +106,6 @@ with a cosmwasm-specific spec and focus on composability.
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.
- [cw20-base](https://github.com/CosmWasm/cosmwasm-plus/tree/master/contracts/cw20-base)
by [ethanfrey](https://github.com/ethanfrey): Basic implementation of a
[cw20](https://github.com/CosmWasm/cosmwasm-plus/tree/master/packages/cw20)
contract. It implements the
[cw20](https://github.com/CosmWasm/cosmwasm-plus/blob/master/packages/cw20/README.md)
spec and is designed to be deloyed as is, or imported into other contracts to
easily build cw20-compatible tokens with custom logic.
- [cw20-bonding](https://github.com/CosmWasm/cosmwasm-plus/tree/master/contracts/cw20-bonding)
by [ethanfrey](https://github.com/ethanfrey): Builds on
[cw20](https://github.com/CosmWasm/cosmwasm-plus/tree/master/packages/cw20)
interface. Serves three purposes: A usable and extensible contract for
arbitrary bonding curves, demonstration of how to extend cw20-base to add
extra functionality and, demonstration of the
[Receiver interface](https://github.com/CosmWasm/cosmwasm-plus/blob/master/packages/cw20/README.md#receiver)
- [cw20-atomic-swap](https://github.com/CosmWasm/cosmwasm-plus/tree/master/contracts/cw20-atomic-swap):
This is a contract that allows users to execute atomic swaps. It implements
one side of an atomic swap. The other side can be realized by an equivalent
contract in the same blockchain or, typically, on a different blockchain.
- [cw20-escrow](https://github.com/CosmWasm/cosmwasm-plus/tree/master/contracts/cw20-escrow)
by [ethanfrey](https://github.com/ethanfrey): Escrow meta-contract that allows
multiple users to create independent escrows.
- [cw20-staking](https://github.com/CosmWasm/cosmwasm-plus/tree/master/contracts/cw20-staking)
by [ethanfrey](https://github.com/ethanfrey): This is a sample contract that
releases a minimal form of staking derivatives. This is to be used for
integration tests and as a foundation for other to build more complex logic
upon.
- [cw3-fixed-multisig](https://github.com/CosmWasm/cosmwasm-plus/tree/master/contracts/cw3-fixed-multisig):
This is a simple implementation of the
[cw3 spec](https://github.com/CosmWasm/cosmwasm-plus/blob/master/packages/cw4/README.md).
Expand All @@ -99,94 +123,57 @@ with a cosmwasm-specific spec and focus on composability.
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](https://github.com/CosmWasm/cosmwasm-plus/tree/master/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.
- [cw721-base](https://github.com/CosmWasm/cw-nfts/tree/main/contracts/cw721-base):
This is a basic implementation of a
[cw721 NFT spec](https://github.com/CosmWasm/cw-nfts/blob/main/packages/cw721/README.md).
This is designed to be deployed as is, or imported into other contracts to
easily build cw721-compatible NFTs with custom logic.
This is a second implementation of the
[cw4 spec](https://github.com/CosmWasm/cosmwasm-plus/blob/master/packages/cw4/README.md).
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](https://github.com/CosmWasm/cosmwasm-plus/tree/master/contracts/cw20-base)
by [ethanfrey](https://github.com/ethanfrey): Basic implementation of a
[cw20](https://github.com/CosmWasm/cosmwasm-plus/tree/master/packages/cw20)
contract. It implements the
[cw20](https://github.com/CosmWasm/cosmwasm-plus/blob/master/packages/cw20/README.md)
spec and is designed to be deloyed as is, or imported into other contracts to
easily build cw20-compatible tokens with custom logic.

### Trivial Contracts
### Other Contracts

These contracts demonstrate best practices and learning references. Please do
not use them in production:

- [name service](https://github.com/InterWasm/cw-contracts/tree/main/contracts/nameservice):
Blockchain name service in CosmWasm.
- [escrow](https://github.com/InterWasm/cw-contracts/tree/main/contracts/escrow):
This is a simple single-use escrow contract.
- [simple-option](https://github.com/InterWasm/cw-contracts/tree/main/contracts/simple-option):
This is a simple financial option contract.
- [voting](https://github.com/InterWasm/cw-contracts/tree/main/contracts/voting):
This is a simple voting contract. It creates a contract to manage token
weighted polls, where voters deposit native coins in order to vote. Voters can
withdraw their stake, but not while a poll they've participated in is still in
progress.
- [cw20-pot](https://github.com/InterWasm/cw-contracts/tree/main/contracts/cw20-pot) -
Basic smart contract using cw20 contract

## External projects
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

These projects/contracts are developed and maintained by CosmWasm community.
- [cw-tokens](https://github.com/CosmWasm/cw-tokens) - a few other
[cw20](https://github.com/CosmWasm/cosmwasm-plus/tree/master/packages/cw20)
(fungible token) contracts.
- [cw-nfts](https://github.com/CosmWasm/cw-nfts) - non-fungible tokens. Official
repository for all work on NFT standards and reference contracts. This is
where the
[`cw721 spec`](https://github.com/CosmWasm/cw-nfts/tree/main/packages/cw721)
lives.

- [substrate-light-client](https://github.com/ChorusOne/substrate-light-client):
Implementation of substrate light client in rust compilable to wasm. It is
written to be integrated with CosmWasm readily, and is optimized to run in a
constrained environment of a smart contract.
- [tendermint-light-client](https://github.com/ChorusOne/tendermint-light-client):
Implementation of tendermint light client in rust compilable to wasm. The code
is heavily inspired from tendermint-rs. It is optimized to run in a
constrained environment of a smart contract.
- [CW20 Clawback](https://github.com/tomtau/hackatom): HackAtom V prototype of a
"clawback" contract inspired by Bitcoin Vaults
- [NFT Marketplace](https://github.com/BlockscapeNetwork/hackatom_v/tree/master/contracts/marketplace):
HackAtom V prototype of a CW721 "NFT Marketplace Smart Contract"

## Smart Contract Libraries
## External Projects

- [cosmwasm-std](https://crates.io/crates/cosmwasm-std)
([repo](https://github.com/CosmWasm/cosmwasm/tree/master/packages/std)): The
standard library for building CosmWasm smart contracts. Code in this package
is compiled into the smart contract.
- [cosmwasm-storage](https://crates.io/crates/cosmwasm-storage)
([repo](https://github.com/CosmWasm/cosmwasm/tree/master/packages/storage)):
Helper methods to reduce boilerplate for storing data types. Easier and more
secure persistence layer.
- [cosmwasm-schema](https://crates.io/crates/cosmwasm-schem)
([repo](https://github.com/CosmWasm/cosmwasm/tree/master/packages/schema)): A
dev-dependency for CosmWasm contracts to generate JSON Schema files.
These projects/contracts are developed and maintained by CosmWasm community.

- [DA0-DA0/dao-contracts](https://github.com/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](https://github.com/mars-protocol/v1-core) - Delphi's
"Mars Protocol" is the leading lending protocol on Terra and soon launching on
Osmosis
- [public-awesome/launchpad](https://github.com/public-awesome/launchpad) -
Stargaze provides contracts to easily create and manage new NFT collections.

## Tooling

- [cosmwasm/rust-optimizer](https://github.com/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](https://github.com/cosmology-tech/create-cosmos-app) -
set up a modern Cosmos app with one command, ready to be iterated on.

## dApps

You can find the Official Confio maintained dApp instances deployed here:
[https://dapps.cosmwasm.com](https://dapps.cosmwasm.com)

- Name service:
[https://dapps.cosmwasm.com/names](https://dapps.cosmwasm.com/names)
- Native wallet:
[https://dapps.cosmwasm.com/wallet](https://dapps.cosmwasm.com/wallet)
- CW20 wallet:
[https://dapps.cosmwasm.com/cw20-wallet](https://dapps.cosmwasm.com/cw20-wallet)
- CW20 staking service:
[https://dapps.cosmwasm.com/stakes](https://dapps.cosmwasm.com/stakes)

The code is in the packages directory of the monorepo:
[https://github.com/CosmWasm/dApps/tree/master/packages](https://github.com/CosmWasm/dApps/tree/master/packages)

- Name service:
[https://github.com/CosmWasm/dApps/tree/master/packages/name-service](https://github.com/CosmWasm/dApps/tree/master/packages/name-service)
- Native wallet:
[https://github.com/CosmWasm/dApps/tree/master/packages/wallet](https://github.com/CosmWasm/dApps/tree/master/packages/wallet)
- CW20 wallet:
[https://github.com/CosmWasm/dApps/tree/master/packages/cw20-wallet](https://github.com/CosmWasm/dApps/tree/master/packages/cw20-wallet)
- CW20 staking service:
[https://github.com/CosmWasm/dApps/tree/master/packages/staking-service](https://github.com/CosmWasm/dApps/tree/master/packages/staking-service)
Looking for dApps to feature. See
[#19](https://github.com/CosmWasm/cw-awesome/issues/19).

0 comments on commit fd45539

Please sign in to comment.