Files

51 lines
2.6 KiB
TOML

# Development profile - Used for testing and local development
[profile.default]
src = "src" # Source directory for Solidity contracts
out = "out" # Output directory for compiled artifacts
libs = ["lib"] # External library directories
solc_version = '0.8.20' # Solidity compiler version
bytecode_hash = "none" # Skip bytecode hashing for faster compilation
cbor_metadata = false # Disable CBOR metadata to reduce contract size
optimizer = false # Disable optimizer for faster compilation
via_ir = false # Disable IR pipeline for faster compilation
optimizer_runs = 200 # Lower number for faster compilation
parallel = true # Enable parallel compilation for faster builds
ffi = true # Enable FFI for development/testing
# Production profile - Used for testnet/mainnet deployments
[profile.production]
src = "src" # Source directory for Solidity contracts
out = "out" # Output directory for compiled artifacts
libs = ["lib"] # External library directories
solc_version = '0.8.20' # Solidity compiler version
bytecode_hash = "none" # Skip bytecode hashing for faster compilation
cbor_metadata = false # Disable CBOR metadata to reduce contract size
optimizer = true # Enable optimizer for gas optimization
via_ir = true # Enable IR-based compilation for better optimization
optimizer_runs = 1000000 # Optimize for many contract calls
extra_output = [ # Additional outputs for verification and debugging
"storageLayout", # Storage layout for debugging
"metadata" # Contract metadata for verification
]
build_info = true # Generate build info for contract verification
ffi = false # Disable foreign function interface for security
parallel = true # Enable parallel compilation
# Code formatting settings
[fmt]
line_length = 120 # Maximum line length
tab_width = 4 # Number of spaces per tab
bracket_spacing = true # Spaces inside brackets
multiline_func_header = "all" # Format function headers across multiple lines
number_underscore = "thousands" # Add underscores to large numbers
quote_style = "double" # Use double quotes for strings
ignore = [] # Files to ignore when formatting
# Network configuration
[rpc_endpoints]
rpc_url = "${RPC_URL}" # RPC endpoint from environment variable
# See more config options https://github.com/foundry-rs/foundry/tree/master/config