Commit aafb939d authored by Maurelian's avatar Maurelian

docs(ctb): Document use of OZ as a default when available

parent 69f9e28d
...@@ -195,6 +195,11 @@ After the initial Bedrock upgrade, contracts MUST use the following versioning s ...@@ -195,6 +195,11 @@ After the initial Bedrock upgrade, contracts MUST use the following versioning s
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. 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.
### Dependencies
Where basic functionality is already supported by an existing contract in the OpenZeppelin library,
we should default to using the Upgradeable version of that contract.
### Tests ### Tests
Tests are written using Foundry. Tests are written using Foundry.
...@@ -207,13 +212,13 @@ These guidelines are also encoded in a script which can be run with: ...@@ -207,13 +212,13 @@ These guidelines are also encoded in a script which can be run with:
ts-node scripts/forge-test-names.ts ts-node scripts/forge-test-names.ts
``` ```
*Note: This is a work in progress, not all test files are compliant with these guidelines.* _Note: This is a work in progress, not all test files are compliant with these guidelines._
#### Organizing Principles #### Organizing Principles
- Solidity `contract`s are used to organize the test suite similar to how mocha uses describe. - Solidity `contract`s are used to organize the test suite similar to how mocha uses describe.
- Every non-trivial state changing function should have a separate contract for happy and sad path - Every non-trivial state changing function should have a separate contract for happy and sad path
tests. This helps to make it very obvious where there are not yet sad path tests. tests. This helps to make it very obvious where there are not yet sad path tests.
- Simpler functions like getters and setters are grouped together into test contracts. - Simpler functions like getters and setters are grouped together into test contracts.
#### Test function naming convention #### Test function naming convention
......
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