Skip to content

Commit

Permalink
Merge pull request #156 from Supercolony-net/feature/release-2.2.0
Browse files Browse the repository at this point in the history
Release of OpenBrush `2.2.0`
  • Loading branch information
xgreenx authored Jul 23, 2022
2 parents fe8738e + 239c50b commit d6e29f0
Show file tree
Hide file tree
Showing 56 changed files with 75 additions and 69 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ exclude = [

[package]
name = "openbrush"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2018"

Expand All @@ -38,8 +38,8 @@ ink_engine = { version = "~3.3.0", default-features = false, optional = true }
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
scale-info = { version = "2", default-features = false, features = ["derive"], optional = true }

openbrush_contracts = { version = "~2.1.0", path = "contracts", default-features = false }
openbrush_lang = { version = "~2.1.0", path = "lang", default-features = false }
openbrush_contracts = { version = "~2.2.0", path = "contracts", default-features = false }
openbrush_lang = { version = "~2.2.0", path = "lang", default-features = false }

[lib]
name = "openbrush"
Expand Down
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,29 @@ to call methods of that trait from some contract in the network
(do a cross contract call).

```rust
// Somewhere defined trait
#[openbrush::trait_definition]
pub trait Trait1 {
#[ink(message)]
fn foo(&mut self) -> bool;
}

// You can create wrapper in the place where you defined the trait
// Or if you import **everything** from the file where you define trait
#[openbrush::wrapper]
type Trait1Ref = dyn Trait1;

{
// It should be `AccountId` of some contract in the network
// It should be `AccountId` of contract in the network that implements `Trait1` trait
let callee: openbrush::traits::AccountId = [1; 32].into();
// This code will execute a cross contract call to `callee` contract
let result_of_foo: bool = Trait1Ref::foo(&callee);
}
```

> **Note**: The trait should be defined with `openbrush::trait_definition`.
The callee contract should implement that trait.

### Additional stuff

- You can use [`test_utils`](https://github.com/Supercolony-net/openbrush-contracts/blob/main/lang/src/test_utils.rs#L39)
Expand Down Expand Up @@ -154,16 +160,16 @@ More common roadmap of tasks:
- [x] Agnostic traits.
- [x] Wrapper around the trait definition to do a cross-contract calls.
- [X] PSP for NFT token and refactoring according new interface.
- [ ] PSP for Multi token and refactoring according new interface.
- [x] PSP for Multi token and refactoring according new interface.
- [x] Add extension: `PSP34Enumerable`.
- [x] Import all extensions for tokens from OpenZeppelin.
- [x] Add support of upgradeable contracts to ink!/contract-pallet level.
- [x] Implement `Proxy` pattern.
- [x] Implement `Diamond` standard.
- [x] Publish `openbrush` into [crates.io](https://crates.io/crates/openbrush)
- [ ] Add documentation for upgradeable contracts(blocked until [resolving](https://github.com/paritytech/ink/pull/1217)).
- [ ] Add extension: `AccessControlEnumerable`.
- [ ] Add extension: `PSP35Enumerable`.
- [x] Add documentation for upgradeable contracts.
- [x] Add extension: `AccessControlEnumerable`.
- [x] Add extension: `PSP35Enumerable`.
- [ ] Force/help ink! to create new independent events. During this task decide how ink! can generate metadata for
events/traits from other crates.
- [ ] Cover everything with UT and integration tests.
Expand Down
4 changes: 2 additions & 2 deletions contracts/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "openbrush_contracts"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand All @@ -26,7 +26,7 @@ ink_engine = { version = "~3.3.0", default-features = false, optional = true }
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
scale-info = { version = "2", default-features = false, features = ["derive"], optional = true }

openbrush = { version = "~2.1.0", package = "openbrush_lang", path = "../lang", default-features = false }
openbrush = { version = "~2.2.0", package = "openbrush_lang", path = "../lang", default-features = false }

[lib]
name = "openbrush_contracts"
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/smart-contracts/example/contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ implementation of `Lending` and `LendingPermissioned` traits defined in the `len
```toml
[package]
name = "lending_contract"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand All @@ -36,7 +36,7 @@ scale-info = { version = "2", default-features = false, features = ["derive"], o
shares_contract = { path = "../shares", default-features = false, features = ["ink-as-dependency"] }
loan_contract = { path = "../loan", default-features = false, features = ["ink-as-dependency"] }
lending_project = { path = "../..", default-features = false }
openbrush = { version = "~2.1.0", default-features = false, features = ["pausable", "access_control"] }
openbrush = { version = "~2.2.0", default-features = false, features = ["pausable", "access_control"] }

[lib]
name = "lending_contract"
Expand Down
8 changes: 4 additions & 4 deletions docs/docs/smart-contracts/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ scale = { package = "parity-scale-codec", version = "3", default-features = fals
scale-info = { version = "2", default-features = false, features = ["derive"], optional = true }

# Brush dependency
openbrush = { version = "~2.1.0", default-features = false }
openbrush = { version = "~2.2.0", default-features = false }

[features]
default = ["std"]
Expand Down Expand Up @@ -89,17 +89,17 @@ The name of the feature is the same as the name of the module. For example:

To enable `psp22`:
```toml
openbrush = { version = "~2.1.0", default-features = false, features = ["psp22"] }
openbrush = { version = "~2.2.0", default-features = false, features = ["psp22"] }
```

To enable `ownable`:
```toml
openbrush = { version = "~2.1.0", default-features = false, features = ["ownable"] }
openbrush = { version = "~2.2.0", default-features = false, features = ["ownable"] }
```

To enable both:
```toml
openbrush = { version = "~2.1.0", default-features = false, features = ["psp22", "ownable"] }
openbrush = { version = "~2.2.0", default-features = false, features = ["psp22", "ownable"] }
```

After enabling the feature and importing the corresponding module, you need to embed the module
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openbrush",
"version": "2.1.0",
"version": "2.2.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
Expand Down
2 changes: 1 addition & 1 deletion example_project_structure/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lending_project"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected], [email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion example_project_structure/contracts/lending/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lending_contract"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion example_project_structure/contracts/loan/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "loan_contract"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion example_project_structure/contracts/shares/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "shares_contract"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion example_project_structure/contracts/stable_coin/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "stable_coin_contract"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/access_control/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "my_access_control"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/access_control_extensions/enumerable/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "my_access_control_enumerable"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/alternatives/diamond/ink/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_diamond"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/diamond/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "my_diamond"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/diamond/diamond_caller/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "diamond_caller"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/diamond/psp22_facet_v1/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "my_psp22_facet_v1"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/diamond/psp22_facet_v2/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "my_psp22_facet_v2"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/diamond/psp22_metadata_facet/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "my_psp22_metadata_facet"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/ownable/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "my_ownable"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/pausable/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "my_pausable"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/payment_splitter/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "my_payment_splitter"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/proxy/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "my_proxy"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/proxy/psp22_metadata_upgradeable/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "my_psp22_metadata_upgradeable"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/proxy/psp22_upgradeable/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "my_psp22_upgradeable"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/psp22/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "my_psp22"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/psp22_extensions/burnable/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "my_psp22_burnable"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/psp22_extensions/capped/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "my_psp22_capped"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/psp22_extensions/flashmint/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "my_psp22_flashmint"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/psp22_extensions/metadata/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "my_psp22_metadata"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/psp22_extensions/mintable/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "my_psp22_mintable"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/psp22_extensions/pausable/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "my_psp22_pausable"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/psp22_extensions/wrapper/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "my_psp22_wrapper"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/psp22_utils/token_timelock/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "my_psp22_token_timelock"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/psp34/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "my_psp34"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/psp34_extensions/burnable/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "my_psp34_burnable"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/psp34_extensions/enumerable/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "my_psp34_enumerable"
version = "2.1.0"
version = "2.2.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand Down
Loading

0 comments on commit d6e29f0

Please sign in to comment.