-
Notifications
You must be signed in to change notification settings - Fork 0
/
foundry.toml
71 lines (68 loc) · 5.81 KB
/
foundry.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
## defaults for all profiles
[default]
src = 'contracts' # the source directory
test = 'test/foundry' # the test directory
out = 'generated/artifacts/foundry' # the output directory (for artifacts)
libs = ['node_modules', 'lib'] # a list of library directories
script = 'scripts/foundry'
broadcast = 'generated/broadcast'
remappings = [] # a list of remappings
libraries = [] # a list of deployed libraries to link against
cache = true # whether to cache builds or not
cache_path = 'generated/cache/foundry' # where the cache is stored if enabled
force = true # whether to ignore the cache (clean build)
evm_version = 'london' # the evm version (by hardfork name)
gas_reports = ['*'] # list of contracts to report gas of
#solc_version = '0.8.13' # override for the solc version (setting this ignores `auto_detect_solc`)
auto_detect_solc = true # enable auto-detection of the appropriate solc version to use
offline = false # offline mode, if enabled, network access (downloading solc) is disallowed
optimizer = true # enable or disable the solc optimizer
optimizer_runs = 200 # the number of optimizer runs
via_ir = false # whether to enable EVM bytecode generation through an intermediate representation (ir) or not
verbosity = 2 # the verbosity of tests
ignored_error_codes = [] # a list of ignored solc error codes
fuzz_runs = 256 # the number of fuzz runs for tests
ffi = false # whether to enable foreign function interface (ffi) cheatcodes or not
sender = '0x00a329c0648769a73afac7f9381e08fb43dbea72' # the address of `msg.sender` in tests
tx_origin = '0x00a329c0648769a73afac7f9381e08fb43dbea72' # the address of `tx.origin` in tests
initial_balance = '0xffffffffffffffffffffffff' # the initial balance of the test contract
block_number = 0 # the block number we are at in tests
chain_id = 99 # the chain id we are on in tests
# NOTE due to a toml-rs limitation, this value needs to be a string if the desired gas limit exceeds `i64::MAX` (9223372036854775807)
gas_limit = 9223372036854775807 # the gas limit in tests
gas_price = 0 # the gas price (in wei) in tests
block_base_fee_per_gas = 0 # the base fee (in wei) in tests
block_coinbase = '0x0000000000000000000000000000000000000000' # the address of `block.coinbase` in tests
block_timestamp = 0 # the value of `block.timestamp` in tests
block_difficulty = 0 # the value of `block.difficulty` in tests
# How to treat revert (and require) reason strings.
# Possible values are: 'default', 'strip', 'debug' and 'verboseDebug'.
# 'default' does not inject compiler-generated revert strings and keeps user-supplied ones.
# 'strip' removes all revert strings (if possible, i.e. if literals are used) keeping side-effects
# 'debug' injects strings for compiler-generated internal reverts, implemented for ABI encoders V1 and V2 for now.
# 'verboseDebug' even appends further information to user-supplied revert strings (not yet implemented)
revert_strings = 'default'
# caches storage retrieved locally for certain chains and endpoints
# can also be restricted to `chains = ['optimism', 'mainnet']`
# by default all endpoints will be cached, alternative options are 'remote' for only caching non localhost endpoints and '<regex>'
# to disable storage caching entirely set `no_storage_caching = true`
rpc_storage_caching = { chains = 'all', endpoints = 'all' }
# this overrides `rpc_storage_caching` entirely
no_storage_caching = false
# use ipfs method to generate the metadata hash, solc's default.
# To not include the metadata hash, to allow for deterministic code: https://docs.soliditylang.org/en/latest/metadata.html, use 'none'
bytecode_hash = 'none'
# If this option is enabled, Solc is instructed to generate output (bytecode) only for the required contracts
# this can reduce compile time for `forge test` a bit but is considered experimental at this point.
sparse_mode = false
# Setting this option enables decoding of error traces from mainnet deployed / verfied contracts via etherscan
etherscan_api_key='YOURETHERSCANAPIKEY'
## optimizer details for the default profile
[default.optimizer_details]
constantOptimizer = true # whether to enable the optimizer for literal numbers and strings or not
yul = true # whether to enable the new Yul optimizer or not
# sets the `yulDetails` of the `optimizer_details` for the `default` profile
[default.optimizer_details.yulDetails]
stackAllocation = true # whether to enable the improvement of allocation of stack slots for variables or not
optimizerSteps = 'dhfoDgvulfnTUtnIf' # the optimization steps to be applied
# See more config options https://github.com/foundry-rs/foundry/tree/master/config