Skip to content

Commit

Permalink
Run formatter and linter
Browse files Browse the repository at this point in the history
  • Loading branch information
aviggiano committed Mar 27, 2023
1 parent bb1b785 commit 8ef4955
Show file tree
Hide file tree
Showing 69 changed files with 2,979 additions and 1,267 deletions.
41 changes: 17 additions & 24 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -1,54 +1,47 @@
---
---
description: "File a bug report"
labels:
labels:
- bug-candidate
name: "Bug Report"
title: "[Bug-Candidate]: "
body:
-
attributes:
body:
- attributes:
value: |
Before submitting, please check the issues tab to avoid duplicates.
Thanks for taking the time to fill out this bug report!
Before submitting, please check the issues tab to avoid duplicates.
Thanks for taking the time to fill out this bug report!
type: markdown
-
attributes:
- attributes:
label: "Describe the issue:"
id: what-happened
type: textarea
validations:
validations:
required: true
-
attributes:
- attributes:
label: "Steps to reproduce the issue:"
description: "Please be as detailed as you can. It's easier for us to fix the bug if we can reproduce it."
placeholder: "First, clone the `crytic/properties` repository..."
id: reproduce
type: textarea
validations:
validations:
required: true
-
attributes:
- attributes:
label: "If additional code is needed for reproducing, please copy it here, or drop us a link to the repository:"
description: "It can be a github repo, code snippet, or empty if no additional code is needed."
placeholder: "`contract A {}`\n"
id: additional-code
type: textarea
-
attributes:
- attributes:
label: "Echidna version:"
description: "Run `echidna-test --version`"
id: version
type: textarea
validations:
validations:
required: true
-
attributes:
- attributes:
label: "Additional information:"
description: |
Please add any additional information you might consider important, or copy and paste any relevant log output.
This will be automatically formatted into code, so no need for backticks or other formatting.
render: shell
Please add any additional information you might consider important, or copy and paste any relevant log output.
This will be automatically formatted into code, so no need for backticks or other formatting.
render: shell
id: additional-information
type: textarea

4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Feature request
description: Suggest new features or improvements to existing features
labels:
labels:
- "feature-request"
title: "[Feature-request]: "
body:
Expand All @@ -15,4 +15,4 @@ body:
label: Describe the desired feature or improvement
description: Please be as specific as you can, explain why is that needed or what problem it solves.
validations:
required: true
required: true
188 changes: 94 additions & 94 deletions .github/workflows/examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Test examples
on:
push:
branches:
- main
- main
pull_request:
branches:
- '*'
- "*"

env:
FOUNDRY_PROFILE: ci
Expand All @@ -16,100 +16,100 @@ jobs:
name: Test Foundry examples
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Compile ERC20 Foundry example
working-directory: tests/ERC20/foundry
run: forge build --build-info

- name: Run Echidna against ERC20 Internal Foundry example
uses: crytic/echidna-action@v2
with:
echidna-workdir: ./tests/ERC20/foundry
files: .
config: ./echidna-config.yaml
crytic-args: --ignore-compile
contract: CryticERC20InternalHarness

- name: Run Echidna against ERC20 External Foundry example
uses: crytic/echidna-action@v2
with:
echidna-workdir: ./tests/ERC20/foundry
files: .
config: ./echidna-config-ext.yaml
crytic-args: --ignore-compile
contract: CryticERC20ExternalHarness
- name: Compile ERC4646 Foundry example
working-directory: tests/ERC4626/foundry
run: forge build --build-info

- name: Run Echidna against ERC4626 Foundry example
uses: crytic/echidna-action@v2
with:
echidna-workdir: ./tests/ERC4626/foundry
files: .
config: ./echidna.yaml
crytic-args: --ignore-compile
contract: CryticERC4626InternalHarness
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Compile ERC20 Foundry example
working-directory: tests/ERC20/foundry
run: forge build --build-info

- name: Run Echidna against ERC20 Internal Foundry example
uses: crytic/echidna-action@v2
with:
echidna-workdir: ./tests/ERC20/foundry
files: .
config: ./echidna-config.yaml
crytic-args: --ignore-compile
contract: CryticERC20InternalHarness

- name: Run Echidna against ERC20 External Foundry example
uses: crytic/echidna-action@v2
with:
echidna-workdir: ./tests/ERC20/foundry
files: .
config: ./echidna-config-ext.yaml
crytic-args: --ignore-compile
contract: CryticERC20ExternalHarness

- name: Compile ERC4646 Foundry example
working-directory: tests/ERC4626/foundry
run: forge build --build-info

- name: Run Echidna against ERC4626 Foundry example
uses: crytic/echidna-action@v2
with:
echidna-workdir: ./tests/ERC4626/foundry
files: .
config: ./echidna.yaml
crytic-args: --ignore-compile
contract: CryticERC4626InternalHarness

hardhat:
name: Test Hardhat examples
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive

- name: Set up Nodejs
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install dependencies and compile ERC20 example
working-directory: tests/ERC20/hardhat
run: |
npm ci
npx hardhat compile --force
- name: Run Echidna for Internal tests
uses: crytic/echidna-action@v2
with:
echidna-workdir: ./tests/ERC20/hardhat
files: .
config: ./tests/echidna-config.yaml
crytic-args: --ignore-compile
contract: CryticERC20InternalHarness
- name: Run Echidna for External tests
uses: crytic/echidna-action@v2
with:
echidna-workdir: ./tests/ERC20/hardhat
files: .
config: ./tests/echidna-config-ext.yaml
crytic-args: --ignore-compile
contract: CryticERC20ExternalHarness

- name: Install dependencies and compile ERC4626 example
working-directory: tests/ERC4626/hardhat
run: |
npm ci
npx hardhat compile --force
- name: Run Echidna
uses: crytic/echidna-action@v2
with:
echidna-workdir: ./tests/ERC4626/hardhat
files: .
config: tests/echidna-config.yaml
crytic-args: --ignore-compile
contract: CryticERC4626Harness
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive

- name: Set up Nodejs
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install dependencies and compile ERC20 example
working-directory: tests/ERC20/hardhat
run: |
npm ci
npx hardhat compile --force
- name: Run Echidna for Internal tests
uses: crytic/echidna-action@v2
with:
echidna-workdir: ./tests/ERC20/hardhat
files: .
config: ./tests/echidna-config.yaml
crytic-args: --ignore-compile
contract: CryticERC20InternalHarness

- name: Run Echidna for External tests
uses: crytic/echidna-action@v2
with:
echidna-workdir: ./tests/ERC20/hardhat
files: .
config: ./tests/echidna-config-ext.yaml
crytic-args: --ignore-compile
contract: CryticERC20ExternalHarness

- name: Install dependencies and compile ERC4626 example
working-directory: tests/ERC4626/hardhat
run: |
npm ci
npx hardhat compile --force
- name: Run Echidna
uses: crytic/echidna-action@v2
with:
echidna-workdir: ./tests/ERC4626/hardhat
files: .
config: tests/echidna-config.yaml
crytic-args: --ignore-compile
contract: CryticERC4626Harness
2 changes: 1 addition & 1 deletion .solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"rules": {
"compiler-version": ["off"],
"func-name-mixedcase": ["off"],
"func-visibility": ["warn",{ "ignoreConstructors":true }],
"func-visibility": ["warn", { "ignoreConstructors": true }],
"no-empty-blocks": ["off"],
"var-name-mixedcase": ["off"]
}
Expand Down
23 changes: 22 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Some pull request guidelines:
## Directory Structure

Below is a rough outline of the directory structure:

```text
.
├── contracts # Parent folder for contracts
Expand All @@ -48,7 +49,7 @@ Below is a rough outline of the directory structure:
│ ├── Math # Properties for mathematical libraries
│ │ └── ABDKMath64x64
│ ├── util # Helpers for new or existing properties
│ └── ...
│ └── ...
├── lib # External libraries needed for the repository
└── tests # Tests for properties
├── ERC20
Expand All @@ -64,6 +65,26 @@ Below is a rough outline of the directory structure:

Please follow this structure in your collaborations.

## Linting and formatting

To install the formatters and linters, run:

```bash
npm install
```

The formatter is run with:

```bash
npm run format
```

The linter is run with:

```bash
npm run lint
```

## Running tests on your computer

Please read [README.md](README.md) for instructions on how to set up your environment and run the tests.
Loading

0 comments on commit 8ef4955

Please sign in to comment.