Skip to content

Commit

Permalink
Merge pull request #35 from pooltogether/precomputing-tier-odds
Browse files Browse the repository at this point in the history
Precomputing tier odds
  • Loading branch information
dylandesrosier authored Jun 29, 2023
2 parents 978ba4c + 8892ac2 commit b507fdc
Show file tree
Hide file tree
Showing 35 changed files with 9,107 additions and 3,450 deletions.
29 changes: 29 additions & 0 deletions .envrc.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Mnemonic phrase
export MNEMONIC=""

# Private key
export PRIVATE_KEY=""

# Mainnet RPC URLs
export MAINNET_RPC_URL=""
export ARBITRUM_RPC_URL=""
export OPTIMISM_RPC_URL=""
export POLYGON_RPC_URL=""

# Testnet RPC URLs
export GOERLI_RPC_URL=""
export ARBITRUM_GOERLI_RPC_URL=""
export OPTIMISM_GOERLI_RPC_URL=""
export POLYGON_MUMBAI_RPC_URL=""

# Used for verifying contracts on Etherscan
export ETHERSCAN_API_KEY=""
export ARBITRUM_ETHERSCAN_API_KEY=""
export OPTIMISM_ETHERSCAN_API_KEY=""
export POLYGONSCAN_API_KEY=""

# Used to run Hardhat scripts in fork mode
export FORK_ENABLED=true

# Used to report gas usage when running Forge tests
export FORGE_GAS_REPORT=true
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Compiler files
cache/
coverage/
out/

# Ignores development broadcast logs
Expand All @@ -12,6 +13,7 @@ docs/

# Dotenv file
.env
.envrc

# VSCode
.history
Expand All @@ -20,4 +22,7 @@ docs/
lcov.info

# Test Output Data
data/
data/

.DS_Store
node_modules
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run lint-staged && npm test
8 changes: 8 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"*.{json,md,sol,yml}": [
"npm run format"
],
"*.sol": [
"npm run hint"
]
}
10 changes: 10 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
artifacts
broadcast
cache
cache_hardhat
deployments
lib
out
types

package.json
12 changes: 12 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"printWidth": 100,
"tabWidth": 2,
"overrides": [
{
"files": "*.sol",
"options": {
"bracketSpacing": true
}
}
]
}
11 changes: 11 additions & 0 deletions .solhint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "solhint:recommended",
"plugins": ["prettier"],
"rules": {
"avoid-low-level-calls": "off",
"compiler-version": ["error", "0.8.17"],
"func-visibility": "off",
"no-empty-blocks": "off",
"no-inline-assembly": "off"
}
}
26 changes: 25 additions & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,32 @@
src = 'src'
out = 'out'
libs = ['lib']
gas_reports_ignore = ["ERC20Mintable", "TwabController"]
solc = "0.8.17"
gas_limit = "18446744073709551615" # u64::MAX
gas_reports_ignore = ["ERC20Mintable", "TwabController"]
block_gas_limit = "18446744073709551615" # u64::MAX
fs_permissions = [{ access = "read-write", path = "./data"}]

[rpc_endpoints]
mainnet = "${MAINNET_RPC_URL}"
arbitrum = "${ARBITRUM_RPC_URL}"
optimism = "${OPTIMISM_RPC_URL}"
polygon = "${POLYGON_RPC_URL}"

goerli = "${GOERLI_RPC_URL}"
arbitrum-goerli = "${ARBITRUM_GOERLI_RPC_URL}"
optimism-goerli = "${OPTIMISM_GOERLI_RPC_URL}"
polygon-mumbai = "${POLYGON_MUMBAI_RPC_URL}"

[etherscan]
mainnet = { key = "${ETHERSCAN_API_KEY}", url = "https://api.etherscan.io/api" }
arbitrum = { key = "${ARBITRUM_ETHERSCAN_API_KEY}", url = "https://api.arbiscan.io/api" }
optimism = { key = "${OPTIMISM_ETHERSCAN_API_KEY}", url = "https://api-optimistic.etherscan.io/api" }
polygon = { key = "${POLYGONSCAN_API_KEY}", url = "https://api.polygonscan.com/api" }

goerli = { key = "${ETHERSCAN_API_KEY}", url = "https://api-goerli.etherscan.io/api" }
arbitrum-goerli = { key = "${ARBITRUM_ETHERSCAN_API_KEY}", url = "https://api-goerli.arbiscan.io/api" }
optimism-goerli = { key = "${OPTIMISM_ETHERSCAN_API_KEY}", url = "https://api-goerli-optimistic.etherscan.io/api" }
polygon-mumbai = { key = "${POLYGONSCAN_API_KEY}", url = "https://api-testnet.polygonscan.com/api" }

# See more config options https://github.com/foundry-rs/foundry/tree/master/config
Loading

0 comments on commit b507fdc

Please sign in to comment.