Skip to content

Commit

Permalink
templatise foundry.toml file
Browse files Browse the repository at this point in the history
  • Loading branch information
technophile-04 committed Jan 2, 2025
1 parent 70d2d2a commit 713befe
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 42 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import { withDefaults } from "../../../../utils.js";

const content = ({ profileDefaults, rpcEndpoints, etherscan, fmt, extraConfig }) => `[profile.default]
src = 'contracts'
out = 'out'
libs = ['lib']
fs_permissions = [{ access = "read-write", path = "./"}]
${profileDefaults.filter(Boolean).join("\n")}
[rpc_endpoints]
default_network = "http://127.0.0.1:8545"
localhost = "http://127.0.0.1:8545"
mainnet = "https://eth-mainnet.alchemyapi.io/v2/\${ALCHEMY_API_KEY}"
sepolia = "https://eth-sepolia.g.alchemy.com/v2/\${ALCHEMY_API_KEY}"
arbitrum = "https://arb-mainnet.g.alchemy.com/v2/\${ALCHEMY_API_KEY}"
arbitrumSepolia = "https://arb-sepolia.g.alchemy.com/v2/\${ALCHEMY_API_KEY}"
optimism = "https://opt-mainnet.g.alchemy.com/v2/\${ALCHEMY_API_KEY}"
optimismSepolia = "https://opt-sepolia.g.alchemy.com/v2/\${ALCHEMY_API_KEY}"
polygon = "https://polygon-mainnet.g.alchemy.com/v2/\${ALCHEMY_API_KEY}"
polygonMumbai = "https://polygon-mumbai.g.alchemy.com/v2/\${ALCHEMY_API_KEY}"
polygonZkEvm = "https://zkevm-rpc.com"
polygonZkEvmTestnet = "https://rpc.public.zkevm-test.net"
gnosis = "https://rpc.gnosischain.com"
chiado = "https://rpc.chiadochain.net"
base = "https://mainnet.base.org"
baseSepolia = "https://sepolia.base.org"
scrollSepolia = "https://sepolia-rpc.scroll.io"
scroll = "https://rpc.scroll.io"
pgn = "https://rpc.publicgoods.network"
pgnTestnet = "https://sepolia.publicgoods.network"
${rpcEndpoints.filter(Boolean).join("\n")}
[etherscan]
polygonMumbai = { key = "\${ETHERSCAN_API_KEY}" }
sepolia = { key = "\${ETHERSCAN_API_KEY}" }
${etherscan.filter(Boolean).join("\n")}
[fmt]
line_length = 120
tab_width = 4
quote_style = "double"
bracket_spacing = true
int_types = "long"
${fmt.filter(Boolean).join("\n")}
${extraConfig.filter(Boolean).join("\n")}
# See more config options https://github.com/foundry-rs/foundry/tree/master/config`;

export default withDefaults(content, {
profileDefaults: "",
rpcEndpoints: "",
etherscan: "",
fmt: "",
extraConfig: "",
});

0 comments on commit 713befe

Please sign in to comment.