diff --git a/README.md b/README.md index 019156d..86a9fd2 100644 --- a/README.md +++ b/README.md @@ -12,46 +12,46 @@
Basic Setup
-
Use `yarn add` / `yarn build`, not `forge install` / `forge build` etc.
-
Use yarn scripts, not forge scripts (Look at the `package.json`!).
-
Add scripts to the `package.json` as needed.
+
  • Use `yarn add` / `yarn build`, not `forge install` / `forge build` etc.
  • +
  • Use yarn scripts, not forge scripts (Look at the `package.json`!).
  • +
  • Add scripts to the `package.json` as needed.
  • Required Contracts
    -
    Every contract is required to have a full interface.
    -
    The contract should inherit it's own interface.
    -
    The contract should reference it's interface with `@inheritdoc`
    -
    The interface should contain other tags, including `@notice, @param, @return, @dev`
    -
    The contract should be free of clutter, whereas the interface should act as a guide to the contract.
    -
    Errors, Events, and Structs should be located in interfaces, not in contracts.
    +
  • Every contract is required to have a full interface.
  • +
  • The contract should inherit it's own interface.
  • +
  • The contract should reference it's interface with `@inheritdoc`
  • +
  • The interface should contain other tags, including `@notice, @param, @return, @dev`
  • +
  • The contract should be free of clutter, whereas the interface should act as a guide to the contract.
  • +
  • Errors, Events, and Structs should be located in interfaces, not in contracts.
  • Required Testing
    -
    Integration/E2E - should fork chain intended for deployment (likely gnosis or optimism) and should use the deploy script found in `Script/Common.sol` in the `test/integration/IntegrationBase.sol`.
    -
    Unit - should test and branch all contract functionality, with mock contracts or mock function calls added as needed to mock inter-contract calls. `.tree` files are there for example, but not necessary.
    +
  • Integration/E2E - should fork chain intended for deployment (likely gnosis or optimism) and should use the deploy script found in `Script/Common.sol` in the `test/integration/IntegrationBase.sol`.
  • +
  • Unit - should test and branch all contract functionality, with mock contracts or mock function calls added as needed to mock inter-contract calls. `.tree` files are there for example, but not necessary.
  • Test Coverage
    -
    Run `yarn coverage` to generate a coverage report for tests
    -
    Unit and Integration should be 100%, with branch testing reasonably high
    +
  • Run `yarn coverage` to generate a coverage report for tests
  • +
  • Unit and Integration should be 100%, with branch testing reasonably high
  • Advice for Writing Tests
    -
    Make use of `setUp` overrides and inheritance to cut down on redundant setups.
    -
    Make use of helper functions with obvious names (e.g. `_fundUsersWithTokens()`) to reduce complexity for other developers that will review the code.
    -
    Make use of Modifiers within test contracts to constrain fuzzing variables or any other use case
    -
    Make multiple testing contracts in one file that all test the same contract (e.g. E2EGreeterTestSetup, E2EGreeterTestAccessControl, E2EGreeterTestCore, etc.) where contracts inherit the same base setup.
    -
    Make use of constant variables placed in base test setup, so that updating test variables is simple and easy.
    -
    Keep tests organized! Break complexity down and make it readable!
    +
  • Make use of `setUp` overrides and inheritance to cut down on redundant setups.
  • +
  • Make use of helper functions with obvious names (e.g. `_fundUsersWithTokens()`) to reduce complexity for other developers that will review the code.
  • +
  • Make use of Modifiers within test contracts to constrain fuzzing variables or any other use case
  • +
  • Make multiple testing contracts in one file that all test the same contract (e.g. E2EGreeterTestSetup, E2EGreeterTestAccessControl, E2EGreeterTestCore, etc.) where contracts inherit the same base setup.
  • +
  • Make use of constant variables placed in base test setup, so that updating test variables is simple and easy.
  • +
  • Keep tests organized! Break complexity down and make it readable!
  • Required Formatting
    -
    Commits cannot be made without passing the linter!
    -
    Run `yarn lint:check`
    -
    Check `package.json` for more linter commands
    -
    Internal variables start with an underscore ('_exampleOfInternalVar').
    -
    Run `lint:natspec` to check contracts and interfaces for correct natspec.
    +
  • Commits cannot be made without passing the linter!
  • +
  • Run `yarn lint:check`
  • +
  • Check `package.json` for more linter commands
  • +
  • Internal variables start with an underscore ('_exampleOfInternalVar').
  • +
  • Run `lint:natspec` to check contracts and interfaces for correct natspec.
  • Commit Messages
    -
    Example: `feat: added liquidation method to buttered-bread contract` -
    Example: `test: added unit tests` -
    List of commit types: `[build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test]` -
    For more specific details, checkout `https://www.conventionalcommits.org/en/v1.0.0-beta.4/`
    +
  • Example: `feat: added liquidation method to buttered-bread contract` +
  • Example: `test: added unit tests` +
  • List of commit types: `[build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test]` +
  • For more specific details, checkout `https://www.conventionalcommits.org/en/v1.0.0-beta.4/`
  • End of Breadchain Notes