Skip to content

Commit

Permalink
🏗️ Scaffold initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Flocqst committed Jun 4, 2024
0 parents commit 1f80d1f
Show file tree
Hide file tree
Showing 50 changed files with 9,452 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .env-example
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
MAINNET_RPC_URL=https://eth-mainnet.g.alchemy.com/v2/KEY
OPTIMISM_RPC_URL=https://opt-mainnet.g.alchemy.com/v2/KEY
BASE_RPC_URL=https://base-mainnet.g.alchemy.com/v2/KEY
GOERLI_RPC_URL=https://eth-goerli.g.alchemy.com/v2/KEY
OPTIMISM_GOERLI_RPC_URL=https://opt-goerli.g.alchemy.com/v2/KEY
BASE_GOERLI_RPC_URL=https://base-goerli.g.alchemy.com/v2/KEY
PRIVATE_KEY=KEY
ETHERSCAN_API_KEY=KEY
OPTIMISM_ETHERSCAN_API_KEY=KEY
BASESCAN_API_KEY=KEY
46 changes: 46 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
## Pull Request Standards

### Commit Message Standards

1. Commit messages are short and in present tense.
2. 👷🏻‍♂️ prefix -> commits related to adjusting/adding contract logic
3. ✅ prefix -> commits related to testing
4. 📚 prefix -> commits related to documentation
5. ✨ prefix -> commits related to linting/formatting
6. ⛳️ prefix -> commits related to optimizations
7. 🗑️ prefix -> commits related to removing code
8. 🪲 prefix -> commits related to fixing bugs
9. 🚀 prefix -> commits related to deployments/scripts
10. ⚙️ prefix -> commits related to configuration files
11. 📸 prefix -> commits related to adding/updating gas-snapshots

### Pull Request Description Standards

Follow the below format for PR request descriptions:

```
{summary}
## Description
* Create
* Implement
* Remove
* Test
* etc...
## Related issue(s)
Closes [Issue](https://github.com/Kwenta/repo/issues/{ID})
## Motivation and Context
Squashing bugs, adding features, etc...
```

## Checklist

Ensure you completed **all of the steps** below before submitting your pull request:

- [ ] Ran `forge fmt`?
- [ ] Ran `forge snapshot`?
- [ ] Ran `forge test`?

_Pull requests with an incomplete checklist will be thrown out._
34 changes: 34 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: coverage

on: [push]

env:
FOUNDRY_PROFILE: ci

jobs:
check:
strategy:
fail-fast: true

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

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

- name: Report Coverage
run: |
forge coverage --fork-url ${{ secrets.OPTIMISM_GOERLI_RPC_URL }} --report lcov
- name: Upload Coverage Report
uses: codecov/codecov-action@v3
with:
files: ./lcov.info
name: codecov-unit
fail_ci_if_error: true
verbose: true
25 changes: 25 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: lint

on: [push]

env:
FOUNDRY_PROFILE: ci

jobs:
check:
strategy:
fail-fast: true

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

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

- name: Lint Check
run: forge fmt --check
33 changes: 33 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: test

on: [push]

env:
FOUNDRY_PROFILE: ci

jobs:
check:
strategy:
fail-fast: true

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

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

- name: Build Project
run: |
forge --version
forge build --sizes
id: build

- name: Test Project
run: |
forge test --fork-url ${{ secrets.OPTIMISM_GOERLI_RPC_URL }} --etherscan-api-key ${{ secrets.ETHERSCAN_API_KEY }} -vvv
id: test
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Compiler files
cache/
out/

# Ignores development broadcast logs
!/broadcast
/broadcast/*
/broadcast/*/31337/

# Dotenv file
.env

# Other
.vscode
.idea
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
Loading

0 comments on commit 1f80d1f

Please sign in to comment.