generated from PaulRBerg/foundry-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0ff5a2d
commit 94b9964
Showing
22 changed files
with
1,927 additions
and
53 deletions.
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,10 @@ | ||
export API_KEY_ALCHEMY="YOUR_API_KEY_ALCHEMY" | ||
export API_KEY_ARBISCAN="YOUR_API_KEY_ARBISCAN" | ||
export API_KEY_BSCSCAN="YOUR_API_KEY_BSCSCAN" | ||
export API_KEY_ETHERSCAN="YOUR_API_KEY_ETHERSCAN" | ||
export API_KEY_GNOSISSCAN="YOUR_API_KEY_GNOSISSCAN" | ||
export API_KEY_INFURA="YOUR_API_KEY_INFURA" | ||
export API_KEY_OPTIMISTIC_ETHERSCAN="YOUR_API_KEY_OPTIMISTIC_ETHERSCAN" | ||
export API_KEY_POLYGONSCAN="YOUR_API_KEY_POLYGONSCAN" | ||
export MNEMONIC="YOUR_MNEMONIC" | ||
export FOUNDRY_PROFILE="default" |
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,24 @@ | ||
[submodule "packages/contracts/lib/forge-std"] | ||
branch = "v1" | ||
path = "packages/contracts/lib/forge-std" | ||
url = "https://github.com/foundry-rs/forge-std" | ||
[submodule "packages/contracts/lib/prb-test"] | ||
branch = "release-v0" | ||
path = "packages/contracts/lib/prb-test" | ||
url = "https://github.com/PaulRBerg/prb-test" | ||
[submodule "packages/contracts/lib/openzeppelin-contracts"] | ||
path = packages/contracts/lib/openzeppelin-contracts | ||
url = https://github.com/OpenZeppelin/openzeppelin-contracts | ||
[submodule "packages/contracts/lib/osx"] | ||
path = packages/contracts/lib/osx | ||
url = https://github.com/aragon/osx | ||
[submodule "packages/contracts/lib/openzeppelin-contracts-upgradeable"] | ||
branch = "release-v4.9" | ||
path = packages/contracts/lib/openzeppelin-contracts-upgradeable | ||
url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable | ||
[submodule "packages/contracts/lib/ens-contracts"] | ||
path = packages/contracts/lib/ens-contracts | ||
url = https://github.com/ensdomains/ens-contracts | ||
[submodule "packages/contracts/lib/BokkyPooBahsDateTimeLibrary"] | ||
path = packages/contracts/lib/BokkyPooBahsDateTimeLibrary | ||
url = https://github.com/bokkypoobah/BokkyPooBahsDateTimeLibrary |
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,7 @@ | ||
bracketSpacing: true | ||
printWidth: 120 | ||
proseWrap: "always" | ||
singleQuote: false | ||
tabWidth: 2 | ||
trailingComma: "all" | ||
useTabs: false |
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 |
---|---|---|
@@ -1,6 +1,55 @@ | ||
# Full reference https://github.com/foundry-rs/foundry/tree/master/config | ||
|
||
[profile.default] | ||
src = "src" | ||
out = "out" | ||
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 | ||
|
||
[etherscan] | ||
arbitrum_one = { key = "${API_KEY_ARBISCAN}" } | ||
avalanche = { key = "${API_KEY_SNOWTRACE}" } | ||
bnb_smart_chain = { key = "${API_KEY_BSCSCAN}" } | ||
gnosis_chain = { key = "${API_KEY_GNOSISSCAN}" } | ||
goerli = { key = "${API_KEY_ETHERSCAN}" } | ||
mainnet = { key = "${API_KEY_ETHERSCAN}" } | ||
optimism = { key = "${API_KEY_OPTIMISTIC_ETHERSCAN}" } | ||
polygon = { key = "${API_KEY_POLYGONSCAN}" } | ||
sepolia = { key = "${API_KEY_ETHERSCAN}" } | ||
|
||
[fmt] | ||
bracket_spacing = true | ||
int_types = "long" | ||
line_length = 120 | ||
multiline_func_header = "all" | ||
number_underscore = "thousands" | ||
quote_style = "double" | ||
tab_width = 4 | ||
wrap_comments = true | ||
|
||
# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options | ||
[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://eth-mainnet.g.alchemy.com/v2/${API_KEY_ALCHEMY}" | ||
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}" |
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": "contracts", | ||
"description": "", | ||
"version": "1.0.0", | ||
"author": { | ||
"name": "DAObox", | ||
"url": "https://github.com/DAObox" | ||
}, | ||
"devDependencies": { | ||
"prettier": "^3.0.0" | ||
}, | ||
"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": "forge fmt --check && pnpm solhint {script,src,test}/**/*.sol", | ||
"prettier:check": "prettier --check **/*.{json,md,yml} --ignore-path=.prettierignore", | ||
"prettier:write": "prettier --write **/*.{json,md,yml} --ignore-path=.prettierignore", | ||
"test": "forge test -vvv", | ||
"test:coverage": "forge coverage", | ||
"test:coverage:report": "forge coverage --report lcov && genhtml lcov.info --branch-coverage --output-dir coverage" | ||
}, | ||
"dependencies": { | ||
"solhint": "^3.6.2" | ||
} | ||
} |
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 @@ | ||
@prb/test/=lib/prb-test/src/ | ||
forge-std/=lib/forge-std/src/ | ||
@aragon/osx/=lib/osx/packages/contracts/src | ||
datetime/=lib/BokkyPooBahsDateTimeLibrary/contracts | ||
@ensdomains/ens-contracts/=lib/ens-contracts/ | ||
|
||
|
||
@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/ | ||
@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/ | ||
ds-test/=lib/forge-std/lib/ds-test/src/ | ||
ens-contracts/=lib/ens-contracts/contracts/ | ||
erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/ | ||
openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/ | ||
openzeppelin-contracts/=lib/openzeppelin-contracts/ | ||
|
||
|
||
|
||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.