Commit aff6e893 authored by Matt Solomon's avatar Matt Solomon Committed by GitHub

doc(ctb): Update style guide to define new versioning scheme (#10834)

* doc: add smart contract versioning and release documentation

* Update packages/contracts-bedrock/VERSIONING.md

* Update packages/contracts-bedrock/VERSIONING.md

* Update packages/contracts-bedrock/VERSIONING.md
parent de12c496
......@@ -110,23 +110,29 @@ pattern for each new implementation contract:
### Versioning
All (non-library and non-abstract) contracts MUST extend the `Semver` base contract which
All (non-library and non-abstract) contracts MUST inherit the `ISemver` interface which
exposes a `version()` function that returns a semver-compliant version string.
Contracts must have a `Semver` of `1.0.0` or greater to be production ready. Contracts
with `Semver` values less than `1.0.0` should only be used locally or on devnets.
Contracts must have a `version` of `1.0.0` or greater to be production ready.
Additionally, contracts MUST use the following versioning scheme:
Additionally, contracts MUST use the following versioning scheme when incrementing their version:
- `patch` releases are to be used only for changes that do NOT modify contract bytecode (such as updating comments).
- `minor` releases are to be used for changes that modify bytecode OR changes that expand the contract ABI provided that these changes do NOT break the existing interface.
- `major` releases are to be used for changes that break the existing contract interface OR changes that modify the security model of a contract.
The remainder of the contract versioning and release process can be found in [`VERSIONING.md](./VERSIONING.md).
#### Exceptions
We have made an exception to the `Semver` rule for the `WETH` contract to avoid
making changes to a well-known, simple, and recognizable contract.
Additionally, bumping the patch version does change the bytecode, so another exception is carved out for this.
In other words, changing comments increments the patch version, which changes bytecode. This bytecode
change implies a minor version increment is needed, but because it's just a version change, only a
patch increment should be used.
### Dependencies
Where basic functionality is already supported by an existing contract in the OpenZeppelin library,
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment