Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
0xcentur1on authored Aug 14, 2023
0 parents commit be0e3f6
Show file tree
Hide file tree
Showing 27 changed files with 4,107 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{diff,md}]
trim_trailing_whitespace = false

[{package.json,.travis.yml}]
indent_style = space
indent_size = 2

[foundry.toml]
indent_style = space
indent_size = 4
6 changes: 6 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export FOUNDRY_ETH_FROM='string: wallet address'
export FOUNDRY_ETH_KEYSTORE_DIR='string: keystore directory'
export FOUNDRY_ETH_PASSWORD_FILE='string: keystore file password'

export ALCHEMY_API_KEY='string: API key'
export ETHERSCAN_API_KEY='string: API key'
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.sol linguist-language=Solidity
49 changes: 49 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Tests

on:
push:
branches:
- master
pull_request:
branches:
- master

env:
FOUNDRY_PROFILE: ci
# For fork mode only
# FORK_URL: ${{ secrets.ALCHEMY_GOERLI_ETH_RPC_URL }}

jobs:
check:
strategy:
fail-fast: true

name: Foundry Project
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: Run Forge Build
run: |
forge --version
forge build --sizes
id: build

# Standalone mode
- name: Run Forge Tests
run: |
forge test -vvv
id: test

# Fork mode
# - name: Run Forge Tests
# run: |
# forge test -vvv --fork-url=$FORK_URL
# id: test
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
cache/
out/
node_modules/
.env*
!.env.example
broadcast/
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
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no -- commitlint --edit "${1}"
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lib/
13 changes: 13 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"printWidth": 120,
"overrides": [
{
"files": [
"*.json"
],
"options": {
"parser": "json-stringify"
}
}
]
}
20 changes: 20 additions & 0 deletions .solhint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"extends": "solhint:recommended",
"plugins": [
"prettier"
],
"rules": {
"prettier/prettier": "warn",
"max-line-length": "off",
"check-send-result": "off",
"not-rely-on-time": "off",
"multiple-sends": "off",
"compiler-version": "off",
"func-visibility": [
"warn",
{
"ignoreConstructors": true
}
]
}
}
1 change: 1 addition & 0 deletions .solhintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lib/
Loading

0 comments on commit be0e3f6

Please sign in to comment.