|
| 1 | +# Configuration options |
| 2 | + |
| 3 | +<style>table {margin: 0}</style> |
| 4 | + |
| 5 | +The following is a list of all the options that may be provided in the Echidna configuration file. |
| 6 | + |
| 7 | +## `testMode` |
| 8 | + |
| 9 | +Type | Default | Available in |
| 10 | +-----|---------|------------- |
| 11 | +String | `"property"` | * |
| 12 | + |
| 13 | +The test mode to run. It should be one of the following items: |
| 14 | + |
| 15 | +* `"property"`: Run user-defined property tests. |
| 16 | +* `"assertion"`: Detect assertion failures (previously `checkAsserts`). |
| 17 | +* `"optimization"`: Find the maximum value for a function. |
| 18 | +* `"overflow"`: Detect integer overflows (only available in Solidity 0.8.0 or greater). |
| 19 | +* `"exploration"`: Run contract code without executing any tests. |
| 20 | + |
| 21 | +## `testLimit` |
| 22 | + |
| 23 | +Type | Default | Available in |
| 24 | +-----|---------|------------- |
| 25 | +Int | `50000` | * |
| 26 | + |
| 27 | +Number of sequences of transactions to generate during testing. |
| 28 | + |
| 29 | +## `seqLen` |
| 30 | + |
| 31 | +Type | Default | Available in |
| 32 | +-----|---------|------------- |
| 33 | +Int | `100` | * |
| 34 | + |
| 35 | +Number of transactions to generate during testing. |
| 36 | + |
| 37 | +## `shrinkLimit` |
| 38 | + |
| 39 | +Type | Default | Available in |
| 40 | +-----|---------|------------- |
| 41 | +Int | `5000` | * |
| 42 | + |
| 43 | +Number of attempts to shrink a failing sequence of transactions. |
| 44 | + |
| 45 | +## `contractAddr` |
| 46 | + |
| 47 | +Type | Default | Available in |
| 48 | +-----|---------|------------- |
| 49 | +Address | `"0x00a329c0648769a73afac7f9381e08fb43dbea72"` | * |
| 50 | + |
| 51 | +Address to deploy the contract to test. |
| 52 | + |
| 53 | +## `coverage` |
| 54 | + |
| 55 | +Type | Default | Available in |
| 56 | +-----|---------|------------- |
| 57 | +Bool | `true` | * |
| 58 | + |
| 59 | +Enable the use of coverage-guided fuzzing and corpus collection. |
| 60 | + |
| 61 | +## `corpusDir` |
| 62 | + |
| 63 | +Type | Default | Available in |
| 64 | +-----|---------|------------- |
| 65 | +String | `null` | * |
| 66 | + |
| 67 | +Directory to save the corpus collected (requires coverage enabled). |
| 68 | + |
| 69 | +## `deployer` |
| 70 | + |
| 71 | +Type | Default | Available in |
| 72 | +-----|---------|------------- |
| 73 | +Address | `"0x30000"` | * |
| 74 | + |
| 75 | +Address of the deployer of the contract to test. |
| 76 | + |
| 77 | +## `deployContracts` |
| 78 | + |
| 79 | +Type | Default | Available in |
| 80 | +-----|---------|------------- |
| 81 | +[[Address, String]] | `[]` | * |
| 82 | + |
| 83 | +Addresses and contract names to deploy using the available source code. The deployer address is the same as the contract to test. Echidna will error if the deployment fails. |
| 84 | + |
| 85 | +## `deployBytecodes` |
| 86 | + |
| 87 | +Type | Default | Available in |
| 88 | +-----|---------|------------- |
| 89 | +[[Address, String]] | `[]` | * |
| 90 | + |
| 91 | +Addresses and bytecodes to deploy. The deployer address is the same as the contract to test. Echidna will error if the deployment fails. |
| 92 | + |
| 93 | +## `sender` |
| 94 | + |
| 95 | +Type | Default | Available in |
| 96 | +-----|---------|------------- |
| 97 | +[Address] | `["0x10000", "0x20000", "0x30000"]` | * |
| 98 | + |
| 99 | +List of addresses to (randomly) use for the transactions sent during testing. |
| 100 | + |
| 101 | +## `psender` |
| 102 | + |
| 103 | +Type | Default | Available in |
| 104 | +-----|---------|------------- |
| 105 | +Address | `"0x10000"` | * |
| 106 | + |
| 107 | +Address of the sender of the property to test. |
| 108 | + |
| 109 | +## `prefix` |
| 110 | + |
| 111 | +Type | Default | Available in |
| 112 | +-----|---------|------------- |
| 113 | +String | `"echidna_"` | * |
| 114 | + |
| 115 | +Prefix of the function names used as properties in the contract to test. |
| 116 | + |
| 117 | +## `propMaxGas` |
| 118 | + |
| 119 | +Type | Default | Available in |
| 120 | +-----|---------|------------- |
| 121 | +Int | `12500000` (current max gas per block) | * |
| 122 | + |
| 123 | +Maximum amount of gas to consume when running function properties. |
| 124 | + |
| 125 | +## `testMaxGas` |
| 126 | + |
| 127 | +Type | Default | Available in |
| 128 | +-----|---------|------------- |
| 129 | +Int | `12500000` (current max gas per block) | * |
| 130 | + |
| 131 | +Maximum amount of gas to consume when running random transactions. |
| 132 | + |
| 133 | +## `maxGasprice` |
| 134 | + |
| 135 | +Type | Default | Available in |
| 136 | +-----|---------|------------- |
| 137 | +Int | `0` | * |
| 138 | + |
| 139 | +Maximum amount of gas price to randomly use in transactions. Do not change it unless you absolutely need it. |
| 140 | + |
| 141 | +## `maxTimeDelay` |
| 142 | + |
| 143 | +Type | Default | Available in |
| 144 | +-----|---------|------------- |
| 145 | +Int | `604800` (one week) | * |
| 146 | + |
| 147 | +Maximum amount of seconds of delay between transactions. |
| 148 | + |
| 149 | +## `maxBlockDelay` |
| 150 | + |
| 151 | +Type | Default | Available in |
| 152 | +-----|---------|------------- |
| 153 | +Int | `60480` | * |
| 154 | + |
| 155 | +Maximum amount of block numbers between transactions. |
| 156 | + |
| 157 | +## `solcArgs` |
| 158 | + |
| 159 | +Type | Default | Available in |
| 160 | +-----|---------|------------- |
| 161 | +String | `""` | * |
| 162 | + |
| 163 | +Additional arguments to use in `solc` for compiling the contract to test. |
| 164 | + |
| 165 | +## `cryticArgs` |
| 166 | + |
| 167 | +Type | Default | Available in |
| 168 | +-----|---------|------------- |
| 169 | +[String] | `[]` | * |
| 170 | + |
| 171 | +Additional arguments to use in `crytic-compile` for compiling the contract to test. |
| 172 | + |
| 173 | +## `quiet` |
| 174 | + |
| 175 | +Type | Default | Available in |
| 176 | +-----|---------|------------- |
| 177 | +Bool | `false` | * |
| 178 | + |
| 179 | +Hide `solc` stderr output and additional information during the testing. |
| 180 | + |
| 181 | +## `format` |
| 182 | + |
| 183 | +Type | Default | Available in |
| 184 | +-----|---------|------------- |
| 185 | +String | `null` | * |
| 186 | + |
| 187 | +Select a textual output format. By default, interactive TUI is run or text if a terminal is absent. |
| 188 | + |
| 189 | +* `"text"`: simple textual interface. |
| 190 | +* `"json"`: JSON output. |
| 191 | +* `"none"`: no output. |
| 192 | + |
| 193 | +## `balanceContract` |
| 194 | + |
| 195 | +Type | Default | Available in |
| 196 | +-----|---------|------------- |
| 197 | +Int | `0` | * |
| 198 | + |
| 199 | +Initial Ether balance of `contractAddr`. |
| 200 | + |
| 201 | +## `balanceAddr` |
| 202 | + |
| 203 | +Type | Default | Available in |
| 204 | +-----|---------|------------- |
| 205 | +Int | `0xffffffff` | * |
| 206 | + |
| 207 | +Initial Ether balance of `deployer` and each of the `sender` accounts. |
| 208 | + |
| 209 | +## `maxValue` |
| 210 | + |
| 211 | +Type | Default | Available in |
| 212 | +-----|---------|------------- |
| 213 | +Int | `100000000000000000000` (100 ETH) | * |
| 214 | + |
| 215 | +Max amount of value in each randomly generated transaction. |
| 216 | + |
| 217 | +## `testDestruction` |
| 218 | + |
| 219 | +Type | Default | Available in |
| 220 | +-----|---------|------------- |
| 221 | +Bool | `false` | * |
| 222 | + |
| 223 | +Add a special test that fails if a contract is self-destructed. |
| 224 | + |
| 225 | +## `stopOnFail` |
| 226 | + |
| 227 | +Type | Default | Available in |
| 228 | +-----|---------|------------- |
| 229 | +Bool | `false` | * |
| 230 | + |
| 231 | +Stops the fuzzing campaign when the first test fails. |
| 232 | + |
| 233 | +## `allContracts` |
| 234 | + |
| 235 | +Type | Default | Available in |
| 236 | +-----|---------|------------- |
| 237 | +Bool | `false` | * |
| 238 | + |
| 239 | +Makes Echidna fuzz the provided test contracts and any other deployed contract whose ABI is known at runtime. |
| 240 | + |
| 241 | +## `allowFFI` |
| 242 | + |
| 243 | +Type | Default | Available in |
| 244 | +-----|---------|------------- |
| 245 | +Bool | `false` | 2.1.0+ |
| 246 | + |
| 247 | +Allows the use of the HEVM `ffi` cheatcode. |
0 commit comments