Skip to content

Commit

Permalink
replace all remaining examples of cosmwasm-plus to cw-plus
Browse files Browse the repository at this point in the history
  • Loading branch information
ueco-jb committed Sep 10, 2021
1 parent 71da345 commit e4fecc8
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 42 deletions.
4 changes: 2 additions & 2 deletions CONTRACTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ the interfaces defined in `packages/cw*`.
## Creating a new contract

Use [`cosmwasm-template`](https://github.com/CosmWasm/cosmwasm-template) as a
basis, in particular the `cosmwasm-plus` branch.
basis, in particular the `cw-plus` branch.

```bash
cd contracts
cargo generate --git https://github.com/CosmWasm/cosmwasm-template.git --branch cosmwasm-plus --name PROJECT_NAME
cargo generate --git https://github.com/CosmWasm/cosmwasm-template.git --branch cw-plus --name PROJECT_NAME
cd PROJECT_NAME
rm -rf .git
rm .gitignore
Expand Down
16 changes: 8 additions & 8 deletions PATTERNS.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ with some clever use of the existing system.
The first case is where we want to do action A, then finish our processing.
A clear example is in `cw20-staking`, where we want to withdraw all rewards
from the validator, then reinvest them, as one atomic operation.
In this case, we simply [return 2 messages](https://github.com/CosmWasm/cosmwasm-plus/blob/master/contracts/cw20-staking/src/contract.rs#L383-L395),
In this case, we simply [return 2 messages](https://github.com/CosmWasm/cw-plus/blob/master/contracts/cw20-staking/src/contract.rs#L383-L395),
the first one calling the staking module, and the second one calling a
protected function on our own contract `_BondAllTokens`.
At the beginning of `_BondAllTokens`, we ensure this is
[called by our own contract](https://github.com/CosmWasm/cosmwasm-plus/blob/master/contracts/cw20-staking/src/contract.rs#L408-L410)
[called by our own contract](https://github.com/CosmWasm/cw-plus/blob/master/contracts/cw20-staking/src/contract.rs#L408-L410)
to keep this a private callback and not a public entry point.

The second case is where we want to get a result from the call, such as
Expand Down Expand Up @@ -136,11 +136,11 @@ registers on `cw4-group` to be informed of any changes to the voting set.
This is essential to manage proper vote counts when the voting set changes
while a proposal is open.

* [Definition of the hooks in cw4 spec](https://github.com/CosmWasm/cosmwasm-plus/blob/c5e8fc92c0412fecd6cdd951c2c0261aa3c9445a/packages/cw4/src/hook.rs)
* [Adding/removing hooks](https://github.com/CosmWasm/cosmwasm-plus/blob/11400ddcc18d56961b0592a655e3da9cba7fd5d8/contracts/cw4-group/src/contract.rs#L156-L190) - which may be refactored into common code
* [Dispatching updates to all registered hooks](https://github.com/CosmWasm/cosmwasm-plus/blob/11400ddcc18d56961b0592a655e3da9cba7fd5d8/contracts/cw4-group/src/contract.rs#L91-L98)
* [`cw3-flex-multisig` registers ExecuteMsg variant](https://github.com/CosmWasm/cosmwasm-plus/blob/0e58f7ebc24c8a16d27e04a0507bac2e11489d0b/contracts/cw3-flex-multisig/src/msg.rs#L126-L127)
* [`cw3-flex-multisig` updates state based on the hook](https://github.com/CosmWasm/cosmwasm-plus/blob/61f436c2203bde7770d9b13724e6548ba26615e7/contracts/cw3-flex-multisig/src/contract.rs#L276-L309)
* [Definition of the hooks in cw4 spec](https://github.com/CosmWasm/cw-plus/blob/c5e8fc92c0412fecd6cdd951c2c0261aa3c9445a/packages/cw4/src/hook.rs)
* [Adding/removing hooks](https://github.com/CosmWasm/cw-plus/blob/11400ddcc18d56961b0592a655e3da9cba7fd5d8/contracts/cw4-group/src/contract.rs#L156-L190) - which may be refactored into common code
* [Dispatching updates to all registered hooks](https://github.com/CosmWasm/cw-plus/blob/11400ddcc18d56961b0592a655e3da9cba7fd5d8/contracts/cw4-group/src/contract.rs#L91-L98)
* [`cw3-flex-multisig` registers ExecuteMsg variant](https://github.com/CosmWasm/cw-plus/blob/0e58f7ebc24c8a16d27e04a0507bac2e11489d0b/contracts/cw3-flex-multisig/src/msg.rs#L126-L127)
* [`cw3-flex-multisig` updates state based on the hook](https://github.com/CosmWasm/cw-plus/blob/61f436c2203bde7770d9b13724e6548ba26615e7/contracts/cw3-flex-multisig/src/contract.rs#L276-L309)

### Listeners

Expand Down Expand Up @@ -177,7 +177,7 @@ He was just an admin briefly in the deploy script, so he could swap
out the permissions once the other contracts were set up.

As an example, we use this pattern when
[setting up the `cw3-flex-multisig` test cases](https://github.com/CosmWasm/cosmwasm-plus/blob/61f436c2203bde7770d9b13724e6548ba26615e7/contracts/cw3-flex-multisig/src/contract.rs#L572-L591).
[setting up the `cw3-flex-multisig` test cases](https://github.com/CosmWasm/cw-plus/blob/61f436c2203bde7770d9b13724e6548ba26615e7/contracts/cw3-flex-multisig/src/contract.rs#L572-L591).
The multisig needs to know the group to query memberships, and the group
needs to have a registered hook to the multisig to update it. We set them
up as "OWNER" and then step down, leaving the contracts pointing to each other.
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CosmWasm Plus

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

| Specification | Crates.io | Docs |
| ---------------- | --------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------|
Expand All @@ -21,21 +21,21 @@

| Contracts | Download | Docs |
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------|
| cw1-subkeys | [Release v0.8.1](https://github.com/CosmWasm/cosmwasm-plus/releases/download/v0.8.1/cw1_subkeys.wasm) | [![Docs](https://docs.rs/cw1-subkeys/badge.svg)](https://docs.rs/cw1-subkeys) |
| cw1-whitelist | [Release v0.8.1](https://github.com/CosmWasm/cosmwasm-plus/releases/download/v0.8.1/cw1_whitelist.wasm) | [![Docs](https://docs.rs/cw1-whitelist/badge.svg)](https://docs.rs/cw1-whitelist) |
| cw3-fixed-multisig | [Release v0.8.1](https://github.com/CosmWasm/cosmwasm-plus/releases/download/v0.8.1/cw3_fixed_multisig.wasm) | [![Docs](https://docs.rs/cw3-fixed-multisig/badge.svg)](https://docs.rs/cw3-fixed-multisig) |
| cw3-flex-multisig | [Release v0.8.1](https://github.com/CosmWasm/cosmwasm-plus/releases/download/v0.8.1/cw3_flex_multisig.wasm) | [![Docs](https://docs.rs/cw3-flex-multisig/badge.svg)](https://docs.rs/cw3-flex-multisig) |
| cw4-group | [Release v0.8.1](https://github.com/CosmWasm/cosmwasm-plus/releases/download/v0.8.1/cw4_group.wasm) | [![Docs](https://docs.rs/cw4-group/badge.svg)](https://docs.rs/cw4-group) |
| cw4-stake | [Release v0.8.1](https://github.com/CosmWasm/cosmwasm-plus/releases/download/v0.8.1/cw4_stake.wasm) | [![Docs](https://docs.rs/cw4-stake/badge.svg)](https://docs.rs/cw4-stake) |
| cw20-atomic-swap | [Release v0.8.1](https://github.com/CosmWasm/cosmwasm-plus/releases/download/v0.8.1/cw20_atomic_swap.wasm) | [![Docs](https://docs.rs/cw20-atomic-swap/badge.svg)](https://docs.rs/cw20-atomic-swap) |
| cw20-base | [Release v0.8.1](https://github.com/CosmWasm/cosmwasm-plus/releases/download/v0.8.1/cw20_base.wasm) | [![Docs](https://docs.rs/cw20-base/badge.svg)](https://docs.rs/cw20-base) |
| cw20-bonding | [Release v0.8.1](https://github.com/CosmWasm/cosmwasm-plus/releases/download/v0.8.1/cw20_bonding.wasm) | [![Docs](https://docs.rs/cw20-bonding/badge.svg)](https://docs.rs/cw20-bonding) |
| cw20-escrow | [Release v0.8.1](https://github.com/CosmWasm/cosmwasm-plus/releases/download/v0.8.1/cw20_escrow.wasm) | [![Docs](https://docs.rs/cw20-escrow/badge.svg)](https://docs.rs/cw20-escrow) |
| cw20-ics20 | [Release v0.8.1](https://github.com/CosmWasm/cosmwasm-plus/releases/download/v0.8.1/cw20_ics20.wasm) | [![Docs](https://docs.rs/cw20-ics20/badge.svg)](https://docs.rs/cw20-ics20) |
| cw20-staking | [Release v0.8.1](https://github.com/CosmWasm/cosmwasm-plus/releases/download/v0.8.1/cw20_staking.wasm) | [![Docs](https://docs.rs/cw20-staking/badge.svg)](https://docs.rs/cw20-staking) |
| cw20-merkle-airdrop | [Release v0.8.1](https://github.com/CosmWasm/cosmwasm-plus/releases/download/v0.8.1/cw20_merkle_airdrop.wasm) | [![Docs](https://docs.rs/cw20-merkle-airdrop/badge.svg)](https://docs.rs/cw20-merkle-airdrop) |
| cw721-base | [Release v0.8.1](https://github.com/CosmWasm/cosmwasm-plus/releases/download/v0.8.1/cw721_base.wasm) | [![Docs](https://docs.rs/cw721-base/badge.svg)](https://docs.rs/cw721-base) |
| cw1155-base | [Release v0.8.1](https://github.com/CosmWasm/cosmwasm-plus/releases/download/v0.8.1/cw1155_base.wasm) | [![Docs](https://docs.rs/cw1155-base/badge.svg)](https://docs.rs/cw1155-base) |
| cw1-subkeys | [Release v0.8.1](https://github.com/CosmWasm/cw-plus/releases/download/v0.8.1/cw1_subkeys.wasm) | [![Docs](https://docs.rs/cw1-subkeys/badge.svg)](https://docs.rs/cw1-subkeys) |
| cw1-whitelist | [Release v0.8.1](https://github.com/CosmWasm/cw-plus/releases/download/v0.8.1/cw1_whitelist.wasm) | [![Docs](https://docs.rs/cw1-whitelist/badge.svg)](https://docs.rs/cw1-whitelist) |
| cw3-fixed-multisig | [Release v0.8.1](https://github.com/CosmWasm/cw-plus/releases/download/v0.8.1/cw3_fixed_multisig.wasm) | [![Docs](https://docs.rs/cw3-fixed-multisig/badge.svg)](https://docs.rs/cw3-fixed-multisig) |
| cw3-flex-multisig | [Release v0.8.1](https://github.com/CosmWasm/cw-plus/releases/download/v0.8.1/cw3_flex_multisig.wasm) | [![Docs](https://docs.rs/cw3-flex-multisig/badge.svg)](https://docs.rs/cw3-flex-multisig) |
| cw4-group | [Release v0.8.1](https://github.com/CosmWasm/cw-plus/releases/download/v0.8.1/cw4_group.wasm) | [![Docs](https://docs.rs/cw4-group/badge.svg)](https://docs.rs/cw4-group) |
| cw4-stake | [Release v0.8.1](https://github.com/CosmWasm/cw-plus/releases/download/v0.8.1/cw4_stake.wasm) | [![Docs](https://docs.rs/cw4-stake/badge.svg)](https://docs.rs/cw4-stake) |
| cw20-atomic-swap | [Release v0.8.1](https://github.com/CosmWasm/cw-plus/releases/download/v0.8.1/cw20_atomic_swap.wasm) | [![Docs](https://docs.rs/cw20-atomic-swap/badge.svg)](https://docs.rs/cw20-atomic-swap) |
| cw20-base | [Release v0.8.1](https://github.com/CosmWasm/cw-plus/releases/download/v0.8.1/cw20_base.wasm) | [![Docs](https://docs.rs/cw20-base/badge.svg)](https://docs.rs/cw20-base) |
| cw20-bonding | [Release v0.8.1](https://github.com/CosmWasm/cw-plus/releases/download/v0.8.1/cw20_bonding.wasm) | [![Docs](https://docs.rs/cw20-bonding/badge.svg)](https://docs.rs/cw20-bonding) |
| cw20-escrow | [Release v0.8.1](https://github.com/CosmWasm/cw-plus/releases/download/v0.8.1/cw20_escrow.wasm) | [![Docs](https://docs.rs/cw20-escrow/badge.svg)](https://docs.rs/cw20-escrow) |
| cw20-ics20 | [Release v0.8.1](https://github.com/CosmWasm/cw-plus/releases/download/v0.8.1/cw20_ics20.wasm) | [![Docs](https://docs.rs/cw20-ics20/badge.svg)](https://docs.rs/cw20-ics20) |
| cw20-staking | [Release v0.8.1](https://github.com/CosmWasm/cw-plus/releases/download/v0.8.1/cw20_staking.wasm) | [![Docs](https://docs.rs/cw20-staking/badge.svg)](https://docs.rs/cw20-staking) |
| cw20-merkle-airdrop | [Release v0.8.1](https://github.com/CosmWasm/cw-plus/releases/download/v0.8.1/cw20_merkle_airdrop.wasm) | [![Docs](https://docs.rs/cw20-merkle-airdrop/badge.svg)](https://docs.rs/cw20-merkle-airdrop) |
| cw721-base | [Release v0.8.1](https://github.com/CosmWasm/cw-plus/releases/download/v0.8.1/cw721_base.wasm) | [![Docs](https://docs.rs/cw721-base/badge.svg)](https://docs.rs/cw721-base) |
| cw1155-base | [Release v0.8.1](https://github.com/CosmWasm/cw-plus/releases/download/v0.8.1/cw1155_base.wasm) | [![Docs](https://docs.rs/cw1155-base/badge.svg)](https://docs.rs/cw1155-base) |

This is a collection of specification and contracts designed for
use on real networks. They are designed not just as examples, but to
Expand Down Expand Up @@ -76,8 +76,8 @@ can handle many different fungible tokens, as long as they all adhere to
the cw20 specification.

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

## Contracts

Expand Down
2 changes: 1 addition & 1 deletion contracts/cw1-subkeys/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,4 @@ sha256sum cw1_subkeys.wasm
```

Or for a production-ready (optimized) build, run a build command in the
the repository root: https://github.com/CosmWasm/cosmwasm-plus#compiling.
the repository root: https://github.com/CosmWasm/cw-plus#compiling.
2 changes: 1 addition & 1 deletion contracts/cw1-whitelist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ sha256sum cw1_whitelist.wasm
```

Or for a production-ready (optimized) build, run a build command in the
the repository root: https://github.com/CosmWasm/cosmwasm-plus#compiling.
the repository root: https://github.com/CosmWasm/cw-plus#compiling.
2 changes: 1 addition & 1 deletion contracts/cw20-atomic-swap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ sha256sum cw20_atomic_swap.wasm
```

Or for a production-ready (optimized) build, run a build command in the
the repository root: https://github.com/CosmWasm/cosmwasm-plus#compiling.
the repository root: https://github.com/CosmWasm/cw-plus#compiling.
2 changes: 1 addition & 1 deletion contracts/cw20-base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ sha256sum cw20_base.wasm
```

Or for a production-ready (optimized) build, run a build command in the
the repository root: https://github.com/CosmWasm/cosmwasm-plus#compiling.
the repository root: https://github.com/CosmWasm/cw-plus#compiling.

## Importing this contract

Expand Down
2 changes: 1 addition & 1 deletion contracts/cw20-escrow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ sha256sum cw20_escrow.wasm
```

Or for a production-ready (optimized) build, run a build command in the
the repository root: https://github.com/CosmWasm/cosmwasm-plus#compiling.
the repository root: https://github.com/CosmWasm/cw-plus#compiling.
2 changes: 1 addition & 1 deletion contracts/cw20-ics20/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ unordered channels for the version negotiation. Once established, it manages a l
[ts-relayer](https://github.com/confio/ts-relayer) `ibc-setup ics20` command to create these.

After there is at least one channel, you can send any CW20 token to this contract via the
[receiver pattern](https://github.com/CosmWasm/cosmwasm-plus/blob/master/packages/cw20/README.md#receiver).
[receiver pattern](https://github.com/CosmWasm/cw-plus/blob/master/packages/cw20/README.md#receiver).
The receive message must contain the channel to send over and the remote address to send to. It may optionally
include a custom timeout.

Expand Down
2 changes: 1 addition & 1 deletion contracts/cw3-fixed-multisig/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ sha256sum cw3_fixed_multisig.wasm
```

Or for a production-ready (optimized) build, run a build command in the
repository root: https://github.com/CosmWasm/cosmwasm-plus#compiling.
repository root: https://github.com/CosmWasm/cw-plus#compiling.
2 changes: 1 addition & 1 deletion contracts/cw3-flex-multisig/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ sha256sum cw3_fixed_multisig.wasm
```

Or for a production-ready (optimized) build, run a build command in
the repository root: https://github.com/CosmWasm/cosmwasm-plus#compiling.
the repository root: https://github.com/CosmWasm/cw-plus#compiling.
4 changes: 2 additions & 2 deletions contracts/cw721-base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Implements:

- [x] CW721 Base
- [x] Metadata extension
- [ ] Enumerable extension (AllTokens done, but not Tokens - requires [#81](https://github.com/CosmWasm/cosmwasm-plus/issues/81))
- [ ] Enumerable extension (AllTokens done, but not Tokens - requires [#81](https://github.com/CosmWasm/cw-plus/issues/81))

## Implementation

Expand Down Expand Up @@ -47,7 +47,7 @@ sha256sum cw20_base.wasm
```

Or for a production-ready (optimized) build, run a build command in the
the repository root: https://github.com/CosmWasm/cosmwasm-plus#compiling.
the repository root: https://github.com/CosmWasm/cw-plus#compiling.

## Importing this contract

Expand Down
4 changes: 2 additions & 2 deletions packages/multi-test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

Warning: **Alpha Software** Designed for internal use only.

This is used for testing cosmwasm-plus contracts, we have no API
This is used for testing cw-plus contracts, we have no API
stability currently. We are working on refactoring it and will
expose a more refined version for use in other contracts. (Ideally
in cosmwasm-plus 0.9 or 0.10).
in cw-plus 0.9 or 0.10).

**Use at your own risk**

Expand Down
4 changes: 2 additions & 2 deletions packages/storage-plus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ more powerful and easy to use interfaces. Here are those interfaces.

**Status: experimental**

You currently should not be using this crate outside of the `cosmwasm-plus`
You currently should not be using this crate outside of the `cw-plus`
repo. This is a first draft of many types. We will update the status
after they have been used more heavily and the interfaces stabilized.

Expand Down Expand Up @@ -386,7 +386,7 @@ fn demo() -> StdResult<()> {

## IndexedMap

In cosmwasm-plus, there's currently one example of `IndexedMap` usage, in the `cw721-base` contract.
In cw-plus, there's currently one example of `IndexedMap` usage, in the `cw721-base` contract.
Let's use it to illustrate `IndexedMap` definition and usage.

### Definition
Expand Down

0 comments on commit e4fecc8

Please sign in to comment.