Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions .github/workflows/CONTRIBUTING.ms
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Contributing

Thanks for your interest in contributing to the Aave Delivery Infrastructure! Please take a moment to review this document **before submitting a pull request.**

## Rules

1. Significant changes to the Protocol must be reviewed before a Pull Request is created. Create a [Feature Request](https://github.com/aave-dao/aave-delivery-infrastructure/issues) first to discuss your ideas.
2. Contributors must be humans, not bots.
3. First time contributions must not contain only spelling or grammatical fixes.

## Basic guide

This guide is intended to help you get started with contributing. By following these steps, you will understand the development process and workflow.

1. [Forking the repository](#forking-the-repository)
2. [Installing Foundry](#installing-foundry)
4. [Installing dependencies](#installing-dependencies)
5. [Running the test suite](#running-the-test-suite)
7. [Submitting a pull request](#submitting-a-pull-request)
8. [Versioning](#versioning)

---

### Forking the repository

To start contributing to the project, [fork it](https://github.com/aave-dao/aave-delivery-infrastructure/fork) to your private github account.

Once that is done, you can clone your forked repository to your local machine.
```bash
# https
git clone https://github.com/<user>/aave-delivery-infrastructure.git
# ssh
git clone [email protected]:<user>/aave-delivery-infrastructure.git
```

To stay up to date with the main repository, you can add it as a remote.
```bash
# https
git remote add upstream https://github.com/aave-dao/aave-delivery-infrastructure.git
# ssh
git remote add upstream [email protected]:aave-dao/aave-delivery-infrastructure.git
```

---

### Installing foundry

Aave Delivery Infrastructure is a [Foundry](https://github.com/foundry-rs/foundry) project.

Install foundry using the following command:

```bash
curl -L https://foundry.paradigm.xyz | bash
```

---

### Installing dependencies

For generating the changelog, linting and testing, we rely on some additional node packages. You can install them by running:

```bash
npm install
```

---

### Running the test suite

For running the default test suite you can use the following command:

```bash
forge test
```

---

### Submitting a pull request

When you're ready to submit a pull request, you can follow these naming conventions:

- Pull request titles use the [Imperative Mood](https://en.wikipedia.org/wiki/Imperative_mood) (e.g., `Add something`, `Fix something`).
- [Changesets](#versioning) use past tense verbs (e.g., `Added something`, `Fixed something`).

When you submit a pull request, GitHub will automatically lint, build, and test your changes. If you see an ❌, it's most likely a bug in your code. Please, inspect the logs through the GitHub UI to find the cause.

- Pull requests must always cover all the changes made with tests. If you're adding a new feature, you must also add a test for it. If you're fixing a bug, you must add a test that reproduces the bug. Pull requests that cause a regression in test coverage will not be accepted.
- Pull requests that touch code functionality should always include updated gas snapshots. Running `forge test` will update the snapshots for you.
- Make sure that your updates are fitting within the existing code margin. You can check by running `forge build --sizes`

---
56 changes: 0 additions & 56 deletions .github/workflows/certora-review-controller.yml

This file was deleted.

60 changes: 0 additions & 60 deletions .github/workflows/certora-review-forwarder.yml

This file was deleted.

56 changes: 0 additions & 56 deletions .github/workflows/certora-review-receiver.yml

This file was deleted.

60 changes: 60 additions & 0 deletions .github/workflows/certora-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: certora

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

on:
pull_request:
branches:
- '*'
push:
branches:
- main

workflow_dispatch:

jobs:
verify:
runs-on: ubuntu-latest
if:
github.event.pull_request.head.repo.full_name == github.repository || (github.event_name == 'push' &&
github.ref == format('refs/heads/{0}', github.event.repository.default_branch))
permissions:
contents: read
statuses: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Munged
run: |
cd security/certora
touch applyHarness.patch
make munged

- uses: Certora/certora-run-action@v2
with:
cli-version: 7.31.2
configurations: |-
security/certora/confs/verifyCrossChainForwarder-envelopRetry.conf
security/certora/confs/verifyCrossChainForwarder-invariants.conf
security/certora/confs/verifyCrossChainForwarder-newEnvelope.conf
security/certora/confs/verifyCrossChainForwarder-sanity.conf
security/certora/confs/verifyCrossChainForwarder-simpleRules.conf
security/certora/confs/verifyCrossChainForwarder-encode-decode-correct.conf --rule encode_decode_well_formed_TX
security/certora/confs/verifyCrossChainForwarder-shuffle.conf
security/certora/confs/verifyCrossChainReceiver.conf
security/certora/confs/verifyCrossChainControllerWithEmergency.conf
solc-versions: 0.8.20
comment-fail-only: false
solc-remove-version-prefix: "0."
job-name: "Certora Prover Run"
certora-key: ${{ secrets.CERTORAKEY }}
install-java: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

23 changes: 23 additions & 0 deletions .github/workflows/comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: PR Comment

on:
workflow_run:
# The workflow generating the artifacts
workflows: [Test]
types:
- completed

permissions:
actions: read
issues: write
checks: read
statuses: read
pull-requests: write

jobs:
comment:
uses: bgd-labs/github-workflows/.github/workflows/comment.yml@main
secrets:
# the provided PAT needs write and write permissions on issues and pull requests
# the PAT is only really needed when commenting of prs from forks
READ_ONLY_PAT: ${{ secrets.READ_ONLY_PAT }}
Loading
Loading