Skip to content

Commit 8a32072

Browse files
authored
Initial commit
0 parents  commit 8a32072

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+12265
-0
lines changed

.env.EXAMPLE

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
PK=0x{$INSERT_KEY_HERE}
2+
3+
MAINNET_RPC_URL=https://eth-mainnet.g.alchemy.com/v2/{$INSERT_KEY_HERE}
4+
ETHERSCAN_API_URL=https://api.etherscan.io/api
5+
ETHERSCAN_API_KEY={$INSERT_KEY_HERE}
6+
7+
POLYGON_RPC_URL=https://polygon-mainnet.g.alchemy.com/v2/{$INSERT_KEY_HERE}
8+
POLYGONSCAN_API_URL=https://api.polygonscan.com/api
9+
POLYGONSCAN_API_KEY={$INSERT_KEY_HERE}
10+
11+
FRAXTAL_RPC_URL=https://rpc.frax.com
12+
FRAXTAL_TESTNET_RPC_URL=https://rpc.testnet.frax.com
13+
FRAXSCAN_API_URL=https://api.fraxscan.com/api
14+
FRAXSCAN_TESTNET_API_URL=https://api-holesky.fraxscan.com/api
15+
FRAXSCAN_API_KEY={$INSERT_KEY_HERE}

.github/workflows/main.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
name: Node.js CI
4+
on:
5+
push:
6+
branches: master
7+
pull_request:
8+
branches: master
9+
jobs:
10+
build:
11+
timeout-minutes: 60
12+
runs-on: ubuntu-latest
13+
env:
14+
MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }}
15+
FOUNDRY_PROFILE: "test"
16+
steps:
17+
- uses: actions/setup-node@v2
18+
with:
19+
node-version: 16.x
20+
- uses: actions/checkout@v2
21+
- uses: pnpm/action-setup@v2
22+
with:
23+
version: 8.11.0
24+
25+
- name: Install Foundry
26+
uses: foundry-rs/foundry-toolchain@v1
27+
with:
28+
version: nightly
29+
- run: pnpm i
30+
- run: pnpm lint:check
31+
- run: forge build
32+
- run: forge test

.gitignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Compiler files
2+
cache/
3+
out/
4+
5+
# Ignores development broadcast logs
6+
!/broadcast
7+
/broadcast/*/31337/
8+
/broadcast/**/dry-run/
9+
10+
# Docs
11+
docs/
12+
13+
# Dotenv file
14+
.env
15+
16+
#misc
17+
node_modules
18+
.DS_Store
19+
.vscode
20+
lcov.info
21+
report/
22+
.idea/

.husky/_/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx lint-staged --allow-empty

.lintstagedrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"*.{js,json,ts,yaml,yml}": [
3+
"prettier --config ./.prettierrc.json --write"
4+
],
5+
"*.sol": [
6+
"forge fmt", "prettier --config ./.prettierrc.json --write"
7+
]
8+
}

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
public-hoist-pattern=*

.prettierignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# directories
2+
out
3+
broadcast
4+
cache
5+
artifacts
6+
7+
# files
8+
*.env
9+

.prettierrc.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"arrowParens": "always",
3+
"bracketSpacing": true,
4+
"endOfLine": "auto",
5+
"printWidth": 120,
6+
"singleQuote": false,
7+
"tabWidth": 2,
8+
"trailingComma": "all",
9+
"plugins": ["prettier-plugin-svelte", "prettier-plugin-solidity"],
10+
"overrides": [
11+
{
12+
"files": "*.sol",
13+
"options": {
14+
"bracketSpacing": true,
15+
"tabWidth": 4,
16+
"singleQuote": false,
17+
"parser": "solidity-parse"
18+
}
19+
}
20+
]
21+
}

.solhint.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"extends": "solhint:recommended",
3+
"plugins": ["prettier"],
4+
"rules": {
5+
"code-complexity": ["warn", 8],
6+
"compiler-version": ["warn", ">=0.8.0"],
7+
"const-name-snakecase": "warn",
8+
"constructor-syntax": "error",
9+
"func-visibility": ["warn", { "ignoreConstructors": true }],
10+
"max-line-length": ["warn", 120],
11+
"not-rely-on-time": "warn",
12+
"prettier/prettier": [
13+
"warn",
14+
{
15+
"endOfLine": "auto"
16+
}
17+
],
18+
"reason-string": ["warn", { "maxLength": 32 }],
19+
"func-param-name-mixedCase": "warn",
20+
"named-parameters-mapping": "warn",
21+
"private-vars-leading-underscore": "warn",
22+
"no-console": "warn"
23+
}
24+
}

0 commit comments

Comments
 (0)