/ foundry.toml
foundry.toml
1 [profile.default] 2 # The source directory 3 src = 'contracts' 4 # The test directory 5 test = 'test' 6 # The script directory 7 script = 'script' 8 # The artifact directory 9 out = 'out' 10 # A list of paths to look for libraries in 11 libs = ['lib', 'node_modules'] 12 # A list of remappings 13 remappings = [] 14 # Whether to autodetect remappings by scanning the `libs` folders recursively 15 auto_detect_remappings = true 16 # A list of deployed libraries to link against 17 libraries = [] 18 # Whether to cache builds or not 19 cache = true 20 # The cache directory if enabled 21 cache_path = 'cache' 22 # Where the broadcast logs are stored 23 broadcast = 'boradcast' 24 # additional solc allow paths 25 allow_paths = [] 26 # additional solc include paths 27 include_paths = [] 28 # Whether to ignore the cache 29 force = false 30 # The EVM version by hardfork name 31 evm_version = 'london' 32 # A list of contracts to output gas reports for 33 gas_reports = ['*'] 34 # A list of contracts to ignore for gas reports 35 gas_reports_ignore = [] 36 # Override the Solidity version (this overrides `auto_detect_solc`) 37 solc_version = '0.6.2' 38 # Whether or not Forge should auto-detect the solc version to use 39 auto_detect_solc = true 40 # Disables downloading missing solc versions 41 offline = false 42 # Enables or disables the optimizer 43 optimizer = true 44 # The number of optimizer runs 45 optimizer_runs = 200 46 # The verbosity of tests 47 verbosity = 0 48 # A list of ignored solc error codes 49 ignored_error_codes = [1878, 5574] 50 # Whether contract build warnings will cause compilation to fail 51 deny_warnings = false 52 # Configures the permissions of cheat codes that touch the file system 53 fs_permissions = [] 54 # Whether to emit additional build info files 55 build_info = false 56 # Whether or not to enable `vm.ffi` 57 ffi = false 58 # The address of `msg.sender` in tests 59 sender = '0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38' 60 # The address of `tx.origin` in tests 61 tx_origin = '0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38' 62 # The initial balance of the test contract 63 initial_balance = '0xffffffffffffffffffffffff' 64 # The chain ID we are on in tests 65 chain_id = 31337 66 # The `block.number` value during EVM execution 67 block_number = 1 68 # The gas limit in tests 69 gas_limit = 9223372036854775807 70 # The gas price in tests (in wei) 71 gas_price = 0 72 # The block basefee in tests (in wei) 73 block_base_fee_per_gas = 0 74 # The address of `block.coinbase` in tests 75 block_coinbase = '0x0000000000000000000000000000000000000000' 76 # The block timestamp in tests 77 block_timestamp = 1 78 # The block difficulty in tests 79 block_difficulty = 0 80 # The memory limit of the EVM (32 MB by default) 81 memory_limit = 33554432 82 # Extra output to include in the contract's artifact. 83 extra_output = [] 84 # Extra output to write to separate files. 85 extra_output_files = [] 86 # Print the names of the compiled contracts 87 names = false 88 # Print the sizes of the compiled contracts 89 sizes = false 90 # Whether or not to use the Yul intermediate representation compilation pipeline 91 via_ir = false 92 # Enables or disables RPC caching when forking 93 no_storage_caching = false 94 # Use the given hash method for the metadata hash that is appended 95 # to the bytecode. 96 # The metadata hash can be removed from the bytecode by setting "none" 97 bytecode_hash = "ipfs" 98 # How to treat revert (and require) reason strings 99 revert_strings = "default" 100 # If enabled, the Solidity compiler is instructed to generate bytecode 101 # only for the required contracts. This can reduce compile time 102 # for `forge test`, but is experimental. 103 sparse_mode = false 104 # Contains alias -> URL|Env pairs for RPC endpoints that can be accessed during testing 105 rpc_endpoints = { optimism = "https://optimism.alchemyapi.io/v2/...", mainnet = "${RPC_MAINNET}" } 106 # The Solc instance to use if any. 107 # This takes precedence over `auto_detect_solc`, if a version is set then this overrides auto-detection. 108 #solc = None 109 # Switch optimizer components on or off in detail 110 #optimizer_details = None 111 # Model checker settings. 112 #model_checker = None, 113 # Url of the rpc server that should be used for any rpc calls 114 #eth_rpc_url = None 115 # Etherscan API key 116 #etherscan_api_key = None 117 # Only run test functions matching the specified regex pattern 118 #test_pattern = None 119 # Only run test functions that do not match the specified regex pattern 120 #test_pattern_inverse = None 121 # Only run tests in contracts matching the specified regex pattern 122 #contract_pattern = None 123 # Only run tests in contracts that do not match the specified regex pattern 124 #contract_pattern_inverse = None 125 # Only run tests in source files matching the specified glob pattern 126 #path_pattern = None 127 # Only run tests in source files that do not match the specified glob pattern 128 #path_pattern_inverse = None 129 # Pins the block number for the state fork 130 #fork_block_number = None 131 # The block gas limit 132 #block_gas_limit = None 133 # The path to the `build-info` directory that contains the build info json files 134 #build_info_path = None 135 136 [fmt] 137 # Maximum line length where formatter will try to wrap the line 138 line_length = 120 139 # Number of spaces per indentation level 140 tab_width = 4 141 # Print spaces between brackets 142 bracket_spacing = false 143 # Style of uint/int256 types 144 int_types = "long" 145 # If function parameters are multiline then always put the function attributes on separate lines 146 func_attrs_with_params_multiline = true 147 # Style of quotation marks 148 quote_style = "double" 149 # Style of underscores in number literals 150 number_underscore = "preserve" 151 152 [fuzz] 153 # The number of fuzz runs for fuzz tests 154 runs = 256 155 # The maximum number of test case rejections allowed by proptest, to be 156 # encountered during usage of `vm.assume` cheatcode. This will be used 157 # to set the `max_global_rejects` value in proptest test runner config. 158 # `max_local_rejects` option isn't exposed here since we're not using 159 # `prop_filter`. 160 max_test_rejects = 65536 161 # The weight of the dictionary 162 dictionary_weight = 40 163 # The flag indicating whether to include values from storage 164 include_storage = true 165 # The flag indicating whether to include push bytes values 166 include_push_bytes = true 167 168 [invariant] 169 # The number of runs that must execute for each invariant test group 170 runs = 256 171 # The number of calls executed to attempt to break invariants in one run 172 depth = 15 173 # Fails the invariant fuzzing if a revert occurs 174 fail_on_revert = false 175 # Allows overriding an unsafe external call when running invariant tests. eg. reentrancy checks 176 call_override = false 177 # The weight of the dictionary 178 dictionary_weight = 80 179 # The flag indicating whether to include values from storage 180 include_storage = true 181 # The flag indicating whether to include push bytes values 182 include_push_bytes = true