Skip to content

Commit

Permalink
Merge pull request #124 from Supercolony-net/release/release-2.0.0
Browse files Browse the repository at this point in the history
Major release 2.0.0
  • Loading branch information
xgreenx authored Jun 2, 2022
2 parents dc666f0 + dbf870b commit 808354f
Show file tree
Hide file tree
Showing 80 changed files with 148 additions and 148 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 = "1.8.0"
version = "2.0.0"
authors = ["Supercolony <[email protected]>"]
edition = "2018"

Expand All @@ -37,8 +37,8 @@ ink_prelude = { version = "~3.2.0", default-features = false }
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 = "~1.8.0", path = "contracts", default-features = false }
openbrush_lang = { version = "~1.8.0", path = "lang", default-features = false }
openbrush_contracts = { version = "~2.0.0", path = "contracts", default-features = false }
openbrush_lang = { version = "~2.0.0", path = "lang", default-features = false }

[lib]
name = "openbrush"
Expand Down
6 changes: 3 additions & 3 deletions contracts/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "openbrush_contracts"
version = "1.8.0"
version = "2.0.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

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

derive = { package = "openbrush_contracts_derive", version = "1.8.0", path = "derive" }
openbrush = { version = "~1.8.0", package = "openbrush_lang", path = "../lang", default-features = false }
derive = { package = "openbrush_contracts_derive", version = "~2.0.0", path = "derive" }
openbrush = { version = "~2.0.0", package = "openbrush_lang", path = "../lang", default-features = false }

[lib]
name = "openbrush_contracts"
Expand Down
4 changes: 2 additions & 2 deletions contracts/derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "openbrush_contracts_derive"
version = "1.8.0"
version = "2.0.0"
authors = ["Supercolony <[email protected]>"]
edition = "2021"

Expand All @@ -17,7 +17,7 @@ include = ["Cargo.toml", "lib.rs"]
syn = { version = "1.0" }
quote = "1.0"
proc-macro2 = "1"
openbrush = { package = "openbrush_lang", version = "1.8.0", path = "../../lang" }
openbrush = { package = "openbrush_lang", version = "~2.0.0", path = "../../lang" }

[lib]
name = "openbrush_contracts_derive"
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/smart-contracts/PSP1155/Extensions/burnable.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sidebar_position: 3
title: PSP1155 Burnable
---

This example shows how you can reuse the implementation of [PSP1155](https://github.com/Supercolony-net/openbrush-contracts/tree/master/contracts/src/token/psp1155) token with [PSP1155Burnable](https://github.com/Supercolony-net/openbrush-contracts/tree/master/contracts/src/token/psp1155/src/extensions/burnable.rs) extension.
This example shows how you can reuse the implementation of [PSP1155](https://github.com/Supercolony-net/openbrush-contracts/tree/main/contracts/src/token/psp1155) token with [PSP1155Burnable](https://github.com/Supercolony-net/openbrush-contracts/tree/main/contracts/src/token/psp1155/src/extensions/burnable.rs) extension.

## How to use this extension

Expand All @@ -16,6 +16,6 @@ impl PSP1155Burnable for MyPSP1155 {}
```

And that's it! Your `PSP1155` is now extended by the `PSP1155Burnable` extension and ready to use its functions!
You can check an example of the usage of [PSP1155 Burnable](https://github.com/Supercolony-net/openbrush-contracts/tree/master/examples/psp1155_extensions/burnable).
You can check an example of the usage of [PSP1155 Burnable](https://github.com/Supercolony-net/openbrush-contracts/tree/main/examples/psp1155_extensions/burnable).

You can also check the documentation for the basic implementation of [PSP1155](/smart-contracts/PSP1155).
4 changes: 2 additions & 2 deletions docs/docs/smart-contracts/PSP1155/Extensions/metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sidebar_position: 1
title: PSP1155 Metadata
---

This example shows how you can reuse the implementation of [PSP1155](https://github.com/Supercolony-net/openbrush-contracts/tree/master/contracts/src/token/psp1155) token with [PSP1155Metadata](https://github.com/Supercolony-net/openbrush-contracts/tree/master/contracts/src/token/psp1155/src/extensions/metadata.rs) extension.
This example shows how you can reuse the implementation of [PSP1155](https://github.com/Supercolony-net/openbrush-contracts/tree/main/contracts/src/token/psp1155) token with [PSP1155Metadata](https://github.com/Supercolony-net/openbrush-contracts/tree/main/contracts/src/token/psp1155/src/extensions/metadata.rs) extension.

## Step 1: Add imports and enable unstable feature

Expand Down Expand Up @@ -61,6 +61,6 @@ impl MyPSP1155 {
}
}
```
You can check an example of the usage of [PSP1155 Metadata](https://github.com/Supercolony-net/openbrush-contracts/tree/master/examples/psp1155_extensions/metadata).
You can check an example of the usage of [PSP1155 Metadata](https://github.com/Supercolony-net/openbrush-contracts/tree/main/examples/psp1155_extensions/metadata).

You can also check the documentation for the basic implementation of [PSP1155](/smart-contracts/PSP1155).
4 changes: 2 additions & 2 deletions docs/docs/smart-contracts/PSP1155/Extensions/mintable.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sidebar_position: 2
title: PSP1155 Mintable
---

This example shows how you can reuse the implementation of [PSP1155](https://github.com/Supercolony-net/openbrush-contracts/tree/master/contracts/src/token/psp1155) token with [PSP1155Mintable](https://github.com/Supercolony-net/openbrush-contracts/tree/master/contracts/src/token/psp1155/src/extensions/mintable.rs) extension.
This example shows how you can reuse the implementation of [PSP1155](https://github.com/Supercolony-net/openbrush-contracts/tree/main/contracts/src/token/psp1155) token with [PSP1155Mintable](https://github.com/Supercolony-net/openbrush-contracts/tree/main/contracts/src/token/psp1155/src/extensions/mintable.rs) extension.

## How to use this extension

Expand All @@ -16,6 +16,6 @@ impl PSP1155Mintable for MyPSP1155 {}
```

And that's it! Your `PSP1155` is now extended by the `PSP1155Mintable` extension and ready to use its functions!
You can check an example of the usage of [PSP1155 Mintable](https://github.com/Supercolony-net/openbrush-contracts/tree/master/examples/psp1155_extensions/mintable).
You can check an example of the usage of [PSP1155 Mintable](https://github.com/Supercolony-net/openbrush-contracts/tree/main/examples/psp1155_extensions/mintable).

You can also check the documentation for the basic implementation of [PSP1155](/smart-contracts/PSP1155).
6 changes: 3 additions & 3 deletions docs/docs/smart-contracts/PSP1155/psp1155.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ sidebar_position: 1
title: PSP1155
---

This example shows how you can reuse the implementation of [PSP1155](https://github.com/Supercolony-net/openbrush-contracts/tree/master/contracts/src/token/psp1155) token. Also, this example shows how you can customize the logic, for example, to track the number of token types with `unique_ids`, adding a new token type with the `add_type` function.
This example shows how you can reuse the implementation of [PSP1155](https://github.com/Supercolony-net/openbrush-contracts/tree/main/contracts/src/token/psp1155) token. Also, this example shows how you can customize the logic, for example, to track the number of token types with `unique_ids`, adding a new token type with the `add_type` function.

## Step 1: Include dependencies

Include `openbrush` as dependency in the cargo file or you can use [default `Cargo.toml`](/smart-contracts/overview#the-default-toml-of-your-project-with-openbrush) template.
After you need to enable default implementation of PSP1155 via `openbrush` feature.

```toml
openbrush = { version = "~1.8.0", default-features = false, features = ["psp1155"] }
openbrush = { version = "~2.0.0", default-features = false, features = ["psp1155"] }
```

## Step 2: Add imports and enable unstable feature
Expand Down Expand Up @@ -108,7 +108,7 @@ impl MyPSP1155 {
}
}
```
You can check an example of the usage of [PSP1155](https://github.com/Supercolony-net/openbrush-contracts/tree/master/examples/psp1155).
You can check an example of the usage of [PSP1155](https://github.com/Supercolony-net/openbrush-contracts/tree/main/examples/psp1155).

Also you can use extensions for PSP1155 token:

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/smart-contracts/PSP22/Extensions/burnable.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: PSP22 Burnable
---

This example shows how you can reuse the implementation of
[PSP22](https://github.com/Supercolony-net/openbrush-contracts/tree/master/contracts/src/token/psp22) token with [PSP22Burnable](https://github.com/Supercolony-net/openbrush-contracts/tree/master/contracts/src/token/psp22/src/extensions/burnable.rs) extension.
[PSP22](https://github.com/Supercolony-net/openbrush-contracts/tree/main/contracts/src/token/psp22) token with [PSP22Burnable](https://github.com/Supercolony-net/openbrush-contracts/tree/main/contracts/src/token/psp22/src/extensions/burnable.rs) extension.

## How to use this extension

Expand All @@ -17,6 +17,6 @@ impl PSP22Burnable for MyPSP22 {}
```

And that's it! Your `PSP22` is now extended by the `PSP22Burnable` extension and ready to use its functions!
You can check an example of the usage of [PSP22 Burnable](https://github.com/Supercolony-net/openbrush-contracts/tree/master/examples/psp22_extensions/burnable).
You can check an example of the usage of [PSP22 Burnable](https://github.com/Supercolony-net/openbrush-contracts/tree/main/examples/psp22_extensions/burnable).

You can also check the documentation for the basic implementation of [PSP22](/smart-contracts/PSP22).
6 changes: 3 additions & 3 deletions docs/docs/smart-contracts/PSP22/Extensions/capped.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ sidebar_position: 7
title: PSP22 Capped
---

This example shows how you can implement a [PSP22](https://github.com/Supercolony-net/openbrush-contracts/tree/master/contracts/src/token/psp22) contract with a supply cap, analogue to [ERC20Capped](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/extensions/ERC20Capped.sol).
This example shows how you can implement a [PSP22](https://github.com/Supercolony-net/openbrush-contracts/tree/main/contracts/src/token/psp22) contract with a supply cap, analogue to [ERC20Capped](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/extensions/ERC20Capped.sol).

## Step 1: Include dependencies

Include `openbrush` as dependency in the cargo file or you can use [default `Cargo.toml`](/smart-contracts/overview#the-default-toml-of-your-project-with-openbrush) template.
After you need to enable default implementation of PSP22 via `openbrush` features.

```toml
openbrush = { version = "~1.8.0", default-features = false, features = ["psp22"] }
openbrush = { version = "~2.0.0", default-features = false, features = ["psp22"] }
```

## Step 2: Add imports and enable unstable feature
Expand Down Expand Up @@ -94,6 +94,6 @@ impl MyPSP22Capped {
}
```

You can check an implementation example of [PSP22 Capped](https://github.com/Supercolony-net/openbrush-contracts/tree/master/examples/psp22_extensions/capped).
You can check an implementation example of [PSP22 Capped](https://github.com/Supercolony-net/openbrush-contracts/tree/main/examples/psp22_extensions/capped).

You can also check the documentation for the basic implementation of [PSP22](/smart-contracts/PSP22).
4 changes: 2 additions & 2 deletions docs/docs/smart-contracts/PSP22/Extensions/flashmint.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sidebar_position: 5
title: PSP22 FlashMint
---

This example shows how you can reuse the implementation of [PSP22](https://github.com/Supercolony-net/openbrush-contracts/tree/master/contracts/src/token/psp22) token with [PSP22FlashMint](https://github.com/Supercolony-net/openbrush-contracts/tree/master/contracts/src/token/psp22/extensions/flashmint.rs) extension, which allows the user to perform a flash loan on the token by minting the borrowed amount and then burning it along with fees for the loan.
This example shows how you can reuse the implementation of [PSP22](https://github.com/Supercolony-net/openbrush-contracts/tree/main/contracts/src/token/psp22) token with [PSP22FlashMint](https://github.com/Supercolony-net/openbrush-contracts/tree/main/contracts/src/token/psp22/extensions/flashmint.rs) extension, which allows the user to perform a flash loan on the token by minting the borrowed amount and then burning it along with fees for the loan.

## 1. Implement the FlashMint extension

Expand All @@ -16,6 +16,6 @@ impl FlashLender for MyPSP22FlashMint {}
```

And that's it! Your `PSP22` is now extended by the `PSP22FlashMint` extension and ready to use its functions!
You can check the full example of the implementation of this extension [here](https://github.com/Supercolony-net/openbrush-contracts/tree/master/examples/psp22_extensions/flashmint).
You can check the full example of the implementation of this extension [here](https://github.com/Supercolony-net/openbrush-contracts/tree/main/examples/psp22_extensions/flashmint).

You can also check the documentation for the basic implementation of [PSP22](/smart-contracts/PSP22).
4 changes: 2 additions & 2 deletions docs/docs/smart-contracts/PSP22/Extensions/metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sidebar_position: 1
title: PSP22 Metadata
---

This example shows how you can reuse the implementation of [PSP22](https://github.com/Supercolony-net/openbrush-contracts/tree/master/contracts/src/token/psp22) token with the [PSP22Metadata](https://github.com/Supercolony-net/openbrush-contracts/tree/master/contracts/src/token/psp22/src/extensions/metadata.rs) extension.
This example shows how you can reuse the implementation of [PSP22](https://github.com/Supercolony-net/openbrush-contracts/tree/main/contracts/src/token/psp22) token with the [PSP22Metadata](https://github.com/Supercolony-net/openbrush-contracts/tree/main/contracts/src/token/psp22/src/extensions/metadata.rs) extension.

## Step 1: Add imports and enable unstable feature

Expand Down Expand Up @@ -67,6 +67,6 @@ impl MyPSP22 {
}
```

You can check an example of the usage of [PSP22 Metadata](https://github.com/Supercolony-net/openbrush-contracts/tree/master/examples/psp22_extensions/metadata).
You can check an example of the usage of [PSP22 Metadata](https://github.com/Supercolony-net/openbrush-contracts/tree/main/examples/psp22_extensions/metadata).

You can also check the documentation for the basic implementation of [PSP22](/smart-contracts/PSP22).
4 changes: 2 additions & 2 deletions docs/docs/smart-contracts/PSP22/Extensions/mintable.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: PSP22 Mintable
---

This example shows how you can reuse the implementation of
[PSP22](https://github.com/Supercolony-net/openbrush-contracts/tree/master/contracts/src/token/psp22) token with [PSP22Mintable](https://github.com/Supercolony-net/openbrush-contracts/tree/master/contracts/src/token/psp22/src/extensions/mintable.rs) extension.
[PSP22](https://github.com/Supercolony-net/openbrush-contracts/tree/main/contracts/src/token/psp22) token with [PSP22Mintable](https://github.com/Supercolony-net/openbrush-contracts/tree/main/contracts/src/token/psp22/src/extensions/mintable.rs) extension.

## How to use this extension

Expand All @@ -16,7 +16,7 @@ use openbrush::contracts::psp22::extensions::mintable::*;
impl PSP22Mintable for MyPSP22 {}
```

You can check an example of the usage of [PSP22 Mintable](https://github.com/Supercolony-net/openbrush-contracts/tree/master/examples/psp22_extensions/mintable).
You can check an example of the usage of [PSP22 Mintable](https://github.com/Supercolony-net/openbrush-contracts/tree/main/examples/psp22_extensions/mintable).

And that's it! Your `PSP22` is now extended by the `PSP22Mintable` extension and ready to use its functions!

Expand Down
6 changes: 3 additions & 3 deletions docs/docs/smart-contracts/PSP22/Extensions/pausable.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ sidebar_position: 6
title: PSP22 Pausable
---

This example shows how you can implement a [PSP22](https://github.com/Supercolony-net/openbrush-contracts/tree/master/contracts/src/token/psp22) contract with a [Pausable](https://github.com/Supercolony-net/openbrush-contracts/tree/master/contracts/src/security/pausable) extension. See an example of [PSP22Pausable](https://github.com/Supercolony-net/openbrush-contracts/tree/master/examples/psp22_extensions/pausable) implementation.
This example shows how you can implement a [PSP22](https://github.com/Supercolony-net/openbrush-contracts/tree/main/contracts/src/token/psp22) contract with a [Pausable](https://github.com/Supercolony-net/openbrush-contracts/tree/main/contracts/src/security/pausable) extension. See an example of [PSP22Pausable](https://github.com/Supercolony-net/openbrush-contracts/tree/main/examples/psp22_extensions/pausable) implementation.

## Step 1: Include dependencies

Include `openbrush` as dependency in the cargo file or you can use [default `Cargo.toml`](/smart-contracts/overview#the-default-toml-of-your-project-with-openbrush) template.
After you need to enable default implementation of PSP22 and Pausable via `openbrush` features.

```toml
openbrush = { version = "~1.8.0", default-features = false, features = ["psp22", "pausable"] }
openbrush = { version = "~2.0.0", default-features = false, features = ["psp22", "pausable"] }
```

## Step 2: Add imports and enable unstable feature
Expand Down Expand Up @@ -98,6 +98,6 @@ impl MyPSP22Pausable {
}
```

You can check an implementation example of [PSP22 Pausable](https://github.com/Supercolony-net/openbrush-contracts/tree/master/examples/psp22_extensions/pausable).
You can check an implementation example of [PSP22 Pausable](https://github.com/Supercolony-net/openbrush-contracts/tree/main/examples/psp22_extensions/pausable).

You can also check the documentation for the basic implementation of [PSP22](/smart-contracts/PSP22).
6 changes: 3 additions & 3 deletions docs/docs/smart-contracts/PSP22/Extensions/wrapper.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ sidebar_position: 4
title: PSP22 Wrapper
---

This example shows how you can reuse the implementation of [PSP22](https://github.com/Supercolony-net/openbrush-contracts/tree/master/contracts/src/token/psp22) token with [PSP22 Wrapper](https://github.com/Supercolony-net/openbrush-contracts/tree/master/contracts/src/token/psp22/extensions/wrapper.rs) extension, which allows you to wrap your `PSP22` token in a `PSP22Wrapper` token which can be used for example for governance.
This example shows how you can reuse the implementation of [PSP22](https://github.com/Supercolony-net/openbrush-contracts/tree/main/contracts/src/token/psp22) token with [PSP22 Wrapper](https://github.com/Supercolony-net/openbrush-contracts/tree/main/contracts/src/token/psp22/extensions/wrapper.rs) extension, which allows you to wrap your `PSP22` token in a `PSP22Wrapper` token which can be used for example for governance.

## Step 1: Include dependencies

Include `openbrush` as dependency in the cargo file or you can use [default `Cargo.toml`](/smart-contracts/overview#the-default-toml-of-your-project-with-openbrush) template.
After you need to enable default implementation of PSP22 via `openbrush` features.

```toml
openbrush = { version = "~1.8.0", default-features = false, features = ["psp22"] }
openbrush = { version = "~2.0.0", default-features = false, features = ["psp22"] }
```

## Step 2: Add imports and enable unstable feature
Expand Down Expand Up @@ -69,6 +69,6 @@ impl MyPSP22 {
}
```

You can check an example of the usage of [PSP22 Wrapper](https://github.com/Supercolony-net/openbrush-contracts/tree/master/examples/psp22_extensions/wrapper).
You can check an example of the usage of [PSP22 Wrapper](https://github.com/Supercolony-net/openbrush-contracts/tree/main/examples/psp22_extensions/wrapper).

You can also check the documentation for the basic implementation of [PSP22](/smart-contracts/PSP22).
Loading

0 comments on commit 808354f

Please sign in to comment.