Skip to content

Commit

Permalink
Merge pull request #154 from Supercolony-net/feature/upgradable-contract
Browse files Browse the repository at this point in the history
Documentation about upgradable contracts
  • Loading branch information
xgreenx authored Jul 22, 2022
2 parents 8a20f95 + 168625d commit fe8738e
Show file tree
Hide file tree
Showing 10 changed files with 706 additions and 16 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
693 changes: 693 additions & 0 deletions docs/docs/smart-contracts/upgradeable.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions examples/diamond/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

Contract module which provides am implementation of Diamond Standard pattern for upgradeable contracts.

This module is used through the embedding of `DiamondData` and implementation of `Diamond` and
`DiamondStorage` traits. It will allow us to update contract implementation via the Diamond Standard pattern.
This module is used through the embedding of `diamond::Data` and implementation of `Diamond` and
`Storage` traits. It will allow us to update contract implementation via the Diamond Standard pattern.
We can add support for different facets (contracts) and their functions and remove or replace existing functions
from the contract.

Expand Down
4 changes: 2 additions & 2 deletions examples/ownable/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Contract module which provides a basic access control mechanism, where
there is an account (an owner) that can be granted exclusive access to
specific functions.

This module is used through the embedding of `OwnableData` and implementation of `Ownable` and
`OwnableStorage` traits. It will make the modifier `only_owner` available, which can be applied
This module is used through the embedding of `ownable::Data` and implementation of `Ownable` and
`Storage` traits. It will make the modifier `only_owner` available, which can be applied
to your functions to restrict their use to the owner.

[See example](https://supercolony-net.github.io/openbrush-contracts/smart-contracts/ownable)
4 changes: 2 additions & 2 deletions examples/pausable/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Contract module, which allows children to implement an emergency stop
mechanism that an authorized account can trigger.

This module is used through the embedding of `PausableData` and implementation of `Pausable` and
`PausableStorage` traits. It will make available the modifier `when_not_paused` and `when_paused`,
This module is used through the embedding of `pausable::Data` and implementation of `Pausable` and
`Storage` traits. It will make available the modifier `when_not_paused` and `when_paused`,
which can be applied to your functions to restrict their usage.

[See example](https://supercolony-net.github.io/openbrush-contracts/smart-contracts/pausable)
Expand Down
7 changes: 2 additions & 5 deletions examples/payment_splitter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ accounts but kept in this contract, and the actual transfer is triggered as a se
function. `release` pays out to only the provided address. If you will have many people to pay out, especially if often, you will likely
want to use the `releaseAll` method instead to save you a lot of time.

** Note **: In the substrate balance of contract decreases each block. Because it pays rent for the storage.
So during `release`, each next user will get fewer native tokens.

This module is used through embedding of `PaymentSplitterData` and implementation of `PaymentSplitter` and
`PaymentSplitterStorage` traits.
This module is used through embedding of `payment_splitter::Data` and implementation of `PaymentSplitter` and
`Storage` traits.

[See example](https://supercolony-net.github.io/openbrush-contracts/smart-contracts/payment-splitter)
4 changes: 2 additions & 2 deletions examples/proxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

Contract module which provides am implementation of Proxy pattern for upgradeable contracts.

This module is used through the embedding of `ProxyData` and implementation of `Proxy` and
`ProxyStorage` traits. It will allow us to update contract implementation via a Proxy pattern.
This module is used through the embedding of `proxy::Data` and implementation of `Proxy` and
`Storage` traits. It will allow us to update contract implementation via a Proxy pattern.
We can get the current contract's implementation code hash or set the new implementation's code hash.
To set a new code hash signer must be the owner of the Proxy.

Expand Down
6 changes: 3 additions & 3 deletions examples/timelock_controller/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ is in charge of proposing (resp executing) operations. A common use case is
to position this `TimelockController` as the owner of a smart contract, with
a multisig or a DAO as the sole proposer.

This module is used through embedding of `TimelockControllerData`, `AccessControlData` and
implementation of `TimelockController`, `TimelockControllerStorage`, `AccessControl` and
`AccessControlStorage` traits.
This module is used through embedding of `timelock_controller::Data`, `access_control::Data` and
implementation of `TimelockController`, `AccessControl` and
`Storage` traits.

[See example](https://supercolony-net.github.io/openbrush-contracts/smart-contracts/timelock-controller)

0 comments on commit fe8738e

Please sign in to comment.