Skip to content

Commit ae5b002

Browse files
committed
Add contributing guidelines
1 parent 1bf0b3c commit ae5b002

File tree

3 files changed

+69
-45
lines changed

3 files changed

+69
-45
lines changed

Diff for: .prettierrc.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"overrides": [
3+
{
4+
"files": "*.md",
5+
"options": {
6+
"proseWrap": "always"
7+
}
8+
}
9+
]
10+
}

Diff for: CONTRIBUTING.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Contributing Guidelines
2+
3+
We're happily accepting bugfixes, style improvements, good refactors and enhancements to documentation.
4+
5+
For the specs, their APIs are considered final and immutable. We do not accept API-breaking changes.
6+
7+
It is possible to propose a new protocol instead. In that case, please open an issue for discussion first, including
8+
some motivating use cases.
9+
10+
The contracts are not expected to be packed with features. They're expected to be minimal, reference implementations of
11+
the specifications. We do not therefore accept enhancements.

Diff for: README.md

+48-45
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@
22

33
[![CircleCI](https://circleci.com/gh/CosmWasm/cw-plus/tree/main.svg?style=shield)](https://circleci.com/gh/CosmWasm/cw-plus/tree/main)
44

5-
| Specification | Crates.io | Docs | Coverage |
6-
|---------------|-------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|
7-
| cw1 | [![cw1 on crates.io](https://img.shields.io/crates/v/cw1.svg)](https://crates.io/crates/cw1) | [![Docs](https://docs.rs/cw1/badge.svg)](https://docs.rs/cw1) | [![codecov](https://codecov.io/gh/CosmWasm/cw-plus/branch/main/graph/badge.svg?token=IYY72ZVS3X)](https://codecov.io/gh/CosmWasm/cw-plus) |
8-
| cw2 | [![cw2 on crates.io](https://img.shields.io/crates/v/cw2.svg)](https://crates.io/crates/cw2) | [![Docs](https://docs.rs/cw2/badge.svg)](https://docs.rs/cw2) | [![codecov](https://codecov.io/gh/CosmWasm/cw-plus/branch/main/graph/badge.svg?token=IYY72ZVS3X)](https://codecov.io/gh/CosmWasm/cw-plus) |
9-
| cw3 | [![cw3 on crates.io](https://img.shields.io/crates/v/cw3.svg)](https://crates.io/crates/cw3) | [![Docs](https://docs.rs/cw3/badge.svg)](https://docs.rs/cw3) | [![codecov](https://codecov.io/gh/CosmWasm/cw-plus/branch/main/graph/badge.svg?token=IYY72ZVS3X)](https://codecov.io/gh/CosmWasm/cw-plus) |
10-
| cw4 | [![cw4 on crates.io](https://img.shields.io/crates/v/cw4.svg)](https://crates.io/crates/cw4) | [![Docs](https://docs.rs/cw4/badge.svg)](https://docs.rs/cw4) | [![codecov](https://codecov.io/gh/CosmWasm/cw-plus/branch/main/graph/badge.svg?token=IYY72ZVS3X)](https://codecov.io/gh/CosmWasm/cw-plus) |
11-
| cw20 | [![cw20 on crates.io](https://img.shields.io/crates/v/cw20.svg)](https://crates.io/crates/cw20) | [![Docs](https://docs.rs/cw20/badge.svg)](https://docs.rs/cw20) | [![codecov](https://codecov.io/gh/CosmWasm/cw-plus/branch/main/graph/badge.svg?token=IYY72ZVS3X)](https://codecov.io/gh/CosmWasm/cw-plus) |
12-
13-
| Utilities | Crates.io | Docs | Coverage |
14-
|-----------------|----------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|
15-
| cw-controllers | [![cw-controllers on crates.io](https://img.shields.io/crates/v/cw-controllers.svg)](https://crates.io/crates/cw-controllers) | [![Docs](https://docs.rs/cw-controllers/badge.svg)](https://docs.rs/cw-controllers) | [![codecov](https://codecov.io/gh/CosmWasm/cw-plus/branch/main/graph/badge.svg?token=IYY72ZVS3X)](https://codecov.io/gh/CosmWasm/cw-plus) |
5+
| Specification | Crates.io | Docs | Coverage |
6+
| ------------- | ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
7+
| cw1 | [![cw1 on crates.io](https://img.shields.io/crates/v/cw1.svg)](https://crates.io/crates/cw1) | [![Docs](https://docs.rs/cw1/badge.svg)](https://docs.rs/cw1) | [![codecov](https://codecov.io/gh/CosmWasm/cw-plus/branch/main/graph/badge.svg?token=IYY72ZVS3X)](https://codecov.io/gh/CosmWasm/cw-plus) |
8+
| cw2 | [![cw2 on crates.io](https://img.shields.io/crates/v/cw2.svg)](https://crates.io/crates/cw2) | [![Docs](https://docs.rs/cw2/badge.svg)](https://docs.rs/cw2) | [![codecov](https://codecov.io/gh/CosmWasm/cw-plus/branch/main/graph/badge.svg?token=IYY72ZVS3X)](https://codecov.io/gh/CosmWasm/cw-plus) |
9+
| cw3 | [![cw3 on crates.io](https://img.shields.io/crates/v/cw3.svg)](https://crates.io/crates/cw3) | [![Docs](https://docs.rs/cw3/badge.svg)](https://docs.rs/cw3) | [![codecov](https://codecov.io/gh/CosmWasm/cw-plus/branch/main/graph/badge.svg?token=IYY72ZVS3X)](https://codecov.io/gh/CosmWasm/cw-plus) |
10+
| cw4 | [![cw4 on crates.io](https://img.shields.io/crates/v/cw4.svg)](https://crates.io/crates/cw4) | [![Docs](https://docs.rs/cw4/badge.svg)](https://docs.rs/cw4) | [![codecov](https://codecov.io/gh/CosmWasm/cw-plus/branch/main/graph/badge.svg?token=IYY72ZVS3X)](https://codecov.io/gh/CosmWasm/cw-plus) |
11+
| cw20 | [![cw20 on crates.io](https://img.shields.io/crates/v/cw20.svg)](https://crates.io/crates/cw20) | [![Docs](https://docs.rs/cw20/badge.svg)](https://docs.rs/cw20) | [![codecov](https://codecov.io/gh/CosmWasm/cw-plus/branch/main/graph/badge.svg?token=IYY72ZVS3X)](https://codecov.io/gh/CosmWasm/cw-plus) |
12+
13+
| Utilities | Crates.io | Docs | Coverage |
14+
| -------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
15+
| cw-controllers | [![cw-controllers on crates.io](https://img.shields.io/crates/v/cw-controllers.svg)](https://crates.io/crates/cw-controllers) | [![Docs](https://docs.rs/cw-controllers/badge.svg)](https://docs.rs/cw-controllers) | [![codecov](https://codecov.io/gh/CosmWasm/cw-plus/branch/main/graph/badge.svg?token=IYY72ZVS3X)](https://codecov.io/gh/CosmWasm/cw-plus) |
16+
1617
| Contracts | Download | Docs | Coverage |
17-
|--------------------|----------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|
18+
| ------------------ | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
1819
| cw1-subkeys | [Release v0.13.4](https://github.com/CosmWasm/cw-plus/releases/download/v0.13.4/cw1_subkeys.wasm) | [![Docs](https://docs.rs/cw1-subkeys/badge.svg)](https://docs.rs/cw1-subkeys) | [![codecov](https://codecov.io/gh/CosmWasm/cw-plus/branch/main/graph/badge.svg?token=IYY72ZVS3X)](https://codecov.io/gh/CosmWasm/cw-plus) |
1920
| cw1-whitelist | [Release v0.13.4](https://github.com/CosmWasm/cw-plus/releases/download/v0.13.4/cw1_whitelist.wasm) | [![Docs](https://docs.rs/cw1-whitelist/badge.svg)](https://docs.rs/cw1-whitelist) | [![codecov](https://codecov.io/gh/CosmWasm/cw-plus/branch/main/graph/badge.svg?token=IYY72ZVS3X)](https://codecov.io/gh/CosmWasm/cw-plus) |
2021
| cw3-fixed-multisig | [Release v0.13.4](https://github.com/CosmWasm/cw-plus/releases/download/v0.13.4/cw3_fixed_multisig.wasm) | [![Docs](https://docs.rs/cw3-fixed-multisig/badge.svg)](https://docs.rs/cw3-fixed-multisig) | [![codecov](https://codecov.io/gh/CosmWasm/cw-plus/branch/main/graph/badge.svg?token=IYY72ZVS3X)](https://codecov.io/gh/CosmWasm/cw-plus) |
@@ -57,7 +58,7 @@ The most reusable components are the various cwXYZ specifications under
5758
`packages`. Each one defines a standard interface for different domains,
5859
e.g. [cw20](./packages/cw20/README.md) for fungible tokens,
5960
[cw721](https://github.com/CosmWasm/cw-nfts/blob/main/packages/cw721/README.md) for non-fungible tokens,
60-
[cw1](./packages/cw1/README.md) for "proxy contracts", etc.
61+
[cw1](./packages/cw1/README.md) for "proxy contracts", etc.
6162
The interface comes with a human description in the READMEs, as well
6263
as Rust types that can be imported.
6364

@@ -68,8 +69,7 @@ the real bonus of specifications, we can create an escrow contract that
6869
can handle many different fungible tokens, as long as they all adhere to
6970
the cw20 specification.
7071

71-
If you have ideas for new specifications or want to make enhancements to
72-
existing spec, please [raise an issue](https://github.com/CosmWasm/cw-plus/issues)
72+
If you have ideas for new specifications , please [raise an issue](https://github.com/CosmWasm/cw-plus/issues)
7373
or [create a pull request](https://github.com/CosmWasm/cw-plus/pulls) on this repo.
7474

7575
## Contracts
@@ -84,42 +84,42 @@ contract you want to build on it.
8484

8585
CW1 Proxy Contracts:
8686

87-
* [`cw1-whitelist`](./contracts/cw1-whitelist) a minimal implementation of `cw1`
88-
mainly designed for reference.
89-
* [`cw1-subkeys`](./contracts/cw1-subkeys) a simple, but useful implementation,
90-
which lets us use a proxy contract to provide "allowances" for native tokens
91-
without modifying the `bank` module.
87+
- [`cw1-whitelist`](./contracts/cw1-whitelist) a minimal implementation of `cw1`
88+
mainly designed for reference.
89+
- [`cw1-subkeys`](./contracts/cw1-subkeys) a simple, but useful implementation,
90+
which lets us use a proxy contract to provide "allowances" for native tokens
91+
without modifying the `bank` module.
9292

9393
CW3 Multisig:
9494

95-
* [`cw3-fixed-multisig`](./contracts/cw3-fixed-multisig) a simple implementation of the
96-
[cw3 spec](./packages/cw3/README.md). It is a multisig with a fixed set of addresses,
97-
created upon initialization.
98-
Each address may have the same weight (K of N), or some may have extra voting
99-
power. This works much like the native Cosmos SDK multisig, except that rather
100-
than aggregating the signatures off chain and submitting the final result,
101-
we aggregate the approvals on-chain.
102-
* [`cw3-flex-multisig`](./contracts/cw3-flex-multisig) builds on cw3-fixed-multisig,
103-
with a more powerful implementation of the cw3 spec. It's a multisig contract
104-
backed by a cw4 (group) contract, which independently maintains the voter set.
95+
- [`cw3-fixed-multisig`](./contracts/cw3-fixed-multisig) a simple implementation of the
96+
[cw3 spec](./packages/cw3/README.md). It is a multisig with a fixed set of addresses,
97+
created upon initialization.
98+
Each address may have the same weight (K of N), or some may have extra voting
99+
power. This works much like the native Cosmos SDK multisig, except that rather
100+
than aggregating the signatures off chain and submitting the final result,
101+
we aggregate the approvals on-chain.
102+
- [`cw3-flex-multisig`](./contracts/cw3-flex-multisig) builds on cw3-fixed-multisig,
103+
with a more powerful implementation of the cw3 spec. It's a multisig contract
104+
backed by a cw4 (group) contract, which independently maintains the voter set.
105105

106106
CW4 Group:
107107

108-
* [`cw4-group`](./contracts/cw4-group) a basic implementation of the
109-
[cw4 spec](./packages/cw4/README.md). It handles elected membership, by admin or multisig.
110-
It fulfills all elements of the spec, including raw query lookups,
111-
and is designed to be used as a backing storage for [cw3 compliant contracts](./packages/cw3/README.md).
112-
* [`cw4-stake`](./contracts/cw4-stake) a second implementation of the
113-
[cw4 spec](./packages/cw4/README.md). It fulfills all elements of the spec, including raw query lookups,
114-
and is designed to be used as a backing storage for [cw3 compliant contracts](./packages/cw3/README.md).
115-
It provides a similar API to [`cw4-group`], but rather than appointing members,
116-
their membership and weight are based on the number of staked tokens they have.
108+
- [`cw4-group`](./contracts/cw4-group) a basic implementation of the
109+
[cw4 spec](./packages/cw4/README.md). It handles elected membership, by admin or multisig.
110+
It fulfills all elements of the spec, including raw query lookups,
111+
and is designed to be used as a backing storage for [cw3 compliant contracts](./packages/cw3/README.md).
112+
- [`cw4-stake`](./contracts/cw4-stake) a second implementation of the
113+
[cw4 spec](./packages/cw4/README.md). It fulfills all elements of the spec, including raw query lookups,
114+
and is designed to be used as a backing storage for [cw3 compliant contracts](./packages/cw3/README.md).
115+
It provides a similar API to [`cw4-group`], but rather than appointing members,
116+
their membership and weight are based on the number of staked tokens they have.
117117

118118
CW20 Fungible Tokens:
119119

120-
* [`cw20-base`](./contracts/cw20-base) a straightforward, but complete
121-
implementation of the cw20 spec along with all extensions. Can be deployed
122-
as-is, or imported by other contracts.
120+
- [`cw20-base`](./contracts/cw20-base) a straightforward, but complete
121+
implementation of the cw20 spec along with all extensions. Can be deployed
122+
as-is, or imported by other contracts.
123123

124124
## Compiling
125125

@@ -173,6 +173,10 @@ analyze this package, which gives much faster turn-around:
173173
Note that it will produce a code coverage report for the entire project, but only the coverage in that
174174
package is the real value. If does give quick feedback for you if you unit test writing was successful.
175175

176+
## Contributing
177+
178+
See our [Contributing Guidelines](CONTRIBUTING.md).
179+
176180
## Generating changelog
177181

178182
To generate a changelog we decided to use [github-changelog-generator](https://github.com/github-changelog-generator/github-changelog-generator).
@@ -202,7 +206,6 @@ auto-detect the latest version tag for you, with --latest-tag.
202206

203207
This repo is licensed under [Apache 2.0](./LICENSE).
204208

205-
All *specifications* will always be Apache-2.0. All contracts that are
206-
meant to be *building blocks* will also be Apache-2.0. This is along
209+
All _specifications_ will always be Apache-2.0. All contracts that are
210+
meant to be _building blocks_ will also be Apache-2.0. This is along
207211
the lines of Open Zeppelin or other public references.
208-

0 commit comments

Comments
 (0)