-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from aragon/bootstrap
Bootstrap
- Loading branch information
Showing
30 changed files
with
1,221 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Profile | ||
export FOUNDRY_PROFILE="default" | ||
|
||
export API_KEY_INFURA="YOUR_API_KEY_INFURA" | ||
export FOUNDRY_PROFILE="default" | ||
|
||
# Forking | ||
export FORKING_NETWORK="mainnet" | ||
export FORK_BLOCK=18335949 | ||
|
||
# DAOFactory, RepoFactory | ||
export MAINNET=0xA03C2182af8eC460D498108C92E8638a580b94d4,0x96E54098317631641703404C06A5afAD89da7373 | ||
export GOERLI=0x1E4350A3c9aFbDbd70FA30B9B2350B9E8182449a,0x477EB3b39C92c38B43778266b09471285e0F7808 | ||
export SEPOLIA=0x7a62da7B56fB3bfCdF70E900787010Bc4c9Ca42e,0x07f49c49Ce2A99CF7C28F66673d406386BDD8Ff4 | ||
export POLYGON=0x51Ead12DEcD31ea75e1046EdFAda14dd639789b8,0x6E924eA5864044D8642385683fFA5AD42FB687f2 | ||
export MUMBAI=0xc715336B5E7F10294F36CA09f19A0493070E2eFB,0x4E7c97ab08c046A8e43571f9839d768ae84492e4 | ||
export BASE_MAINNET=0x1B6632D1357D26055D6452E3b3BEBd1c1d982e86,0xE47C0B1Ea698F2914b6CC218cdC3A5Ca4FAcff18 | ||
export BASE_GOERLI=0x3E773BCb6a8C5ED2f23BF167284DF45D9A550fF6,0x1B6632D1357D26055D6452E3b3BEBd1c1d982e86 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lib/** linguist-vendored |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Lint and Format | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
lint-and-format: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Install pnpm | ||
run: npm install -g pnpm | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Run lint | ||
run: pnpm run lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: test | ||
|
||
on: workflow_dispatch | ||
|
||
env: | ||
FOUNDRY_PROFILE: ci | ||
|
||
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 | ||
|
||
- name: Run Forge build | ||
run: | | ||
forge --version | ||
forge build --sizes | ||
id: build | ||
|
||
- name: Run Forge tests | ||
run: | | ||
forge test -vvv | ||
id: test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# directories | ||
cache | ||
coverage | ||
node_modules | ||
out | ||
|
||
# files | ||
*.env | ||
*.log | ||
.DS_Store | ||
.pnp.* | ||
lcov.info | ||
yarn.lock | ||
|
||
# broadcasts | ||
!broadcast | ||
broadcast/* | ||
broadcast/*/31337/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[submodule "lib/forge-std"] | ||
branch = "v1" | ||
path = "lib/forge-std" | ||
url = "https://github.com/foundry-rs/forge-std" | ||
[submodule "lib/prb-test"] | ||
branch = "release-v0" | ||
path = lib/prb-test | ||
url = https://github.com/PaulRBerg/prb-test | ||
[submodule "lib/openzeppelin-contracts"] | ||
path = lib/openzeppelin-contracts | ||
url = https://github.com/OpenZeppelin/openzeppelin-contracts | ||
[submodule "lib/osx"] | ||
path = lib/osx | ||
url = https://github.com/aragon/osx | ||
[submodule "lib/openzeppelin-contracts-upgradeable"] | ||
branch = "release-v4.9" | ||
path = lib/openzeppelin-contracts-upgradeable | ||
url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# directories | ||
broadcast | ||
cache | ||
coverage | ||
lib | ||
node_modules | ||
out | ||
|
||
# files | ||
*.env | ||
*.log | ||
.DS_Store | ||
.pnp.* | ||
lcov.info | ||
package-lock.json | ||
pnpm-lock.yaml | ||
yarn.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
bracketSpacing: false | ||
singleQuote: true | ||
arrowParens: avoid | ||
|
||
overrides: | ||
- files: '*.sol' | ||
options: | ||
printWidth: 100 | ||
tabWidth: 4 | ||
useTabs: false | ||
singleQuote: false | ||
- files: '*.md' | ||
options: | ||
printWidth: 100 | ||
tabWidth: 2 | ||
useTabs: false | ||
singleQuote: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"extends": "solhint:recommended", | ||
"rules": { | ||
"code-complexity": ["error", 8], | ||
"compiler-version": ["error", ">=0.8.17"], | ||
"func-name-mixedcase": "off", | ||
"func-visibility": ["error", {"ignoreConstructors": true}], | ||
"max-line-length": ["error", 120], | ||
"named-parameters-mapping": "off", | ||
"no-console": "off", | ||
"not-rely-on-time": "off", | ||
"one-contract-per-file": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"recommendations": [ | ||
"esbenp.prettier-vscode", | ||
"NomicFoundation.hardhat-solidity", | ||
"KnisterPeter.vscode-commitizen", | ||
"tintinweb.solidity-visual-auditor" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true, | ||
"prettier.documentSelectors": ["**/*.sol"], | ||
"solidity.formatter": "prettier", | ||
"editor.tabSize": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
|
||
## License | ||
|
||
This project is licensed under AGPL-3.0-or-later. | ||
This project is licensed under AGPL-3.0-or-later. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Full reference https://github.com/foundry-rs/foundry/tree/master/config | ||
|
||
[profile.default] | ||
auto_detect_solc = false | ||
block_timestamp = 1_680_220_800 # March 31, 2023 at 00:00 GMT | ||
bytecode_hash = "none" | ||
cbor_metadata = false | ||
evm_version = "paris" # See https://www.evmdiff.com/features?name=PUSH0&kind=opcode | ||
fuzz = { runs = 1_000 } | ||
gas_reports = ["*"] | ||
libs = ["lib"] | ||
optimizer = true | ||
optimizer_runs = 10_000 | ||
out = "out" | ||
script = "script" | ||
solc = "0.8.17" | ||
src = "src" | ||
test = "test" | ||
|
||
[profile.ci] | ||
fuzz = { runs = 10_000 } | ||
verbosity = 4 | ||
|
||
[rpc_endpoints] | ||
arbitrum_one = "https://arbitrum-mainnet.infura.io/v3/${API_KEY_INFURA}" | ||
avalanche = "https://avalanche-mainnet.infura.io/v3/${API_KEY_INFURA}" | ||
bnb_smart_chain = "https://bsc-dataseed.binance.org" | ||
gnosis_chain = "https://rpc.gnosischain.com" | ||
goerli = "https://goerli.infura.io/v3/${API_KEY_INFURA}" | ||
localhost = "http://localhost:8545" | ||
mainnet = "https://mainnet.infura.io/v3/${API_KEY_INFURA}" | ||
optimism = "https://optimism-mainnet.infura.io/v3/${API_KEY_INFURA}" | ||
polygon = "https://polygon-mainnet.infura.io/v3/${API_KEY_INFURA}" | ||
sepolia = "https://sepolia.infura.io/v3/${API_KEY_INFURA}" |
Submodule ens-contracts
added at
f5f2ed
Submodule openzeppelin-contracts
added at
045704
Submodule openzeppelin-contracts-upgradeable
added at
12ad9e
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"name": "@aragon/osx-plugin-template-foundry", | ||
"description": "", | ||
"version": "1.0.0", | ||
"author": { | ||
"name": "aragon", | ||
"url": "https://github.com/Aragon" | ||
}, | ||
"keywords": [ | ||
"blockchain", | ||
"ethereum", | ||
"forge", | ||
"foundry", | ||
"smart-contracts", | ||
"solidity", | ||
"aragon", | ||
"osx", | ||
"dao", | ||
"daobox" | ||
], | ||
"private": true, | ||
"scripts": { | ||
"clean": "rm -rf cache out", | ||
"build": "forge build", | ||
"lint": "pnpm lint:sol && pnpm prettier:check", | ||
"lint:sol": "solhint --max-warnings 0 \"{script,src,test}/**/*.sol\"", | ||
"prettier:check": "prettier --check --plugin=prettier-plugin-solidity \"**/*.{js,json,md,sol,ts,yml}\"", | ||
"prettier:write": "prettier --check --plugin=prettier-plugin-solidity \"**/*.{js,json,md,sol,ts,yml}\"", | ||
"test": "forge test -vvv", | ||
"test:coverage": "forge coverage", | ||
"test:coverage:report": "forge coverage --report lcov && genhtml lcov.info --branch-coverage --output-dir coverage" | ||
}, | ||
"devDependencies": { | ||
"prettier": "^2.8.8", | ||
"prettier-plugin-solidity": "^1.1.3", | ||
"solhint": "^3.6.2", | ||
"solhint-plugin-prettier": "^0.0.5" | ||
} | ||
} |
Oops, something went wrong.