-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathfoundry.toml
More file actions
46 lines (43 loc) · 1.97 KB
/
Copy pathfoundry.toml
File metadata and controls
46 lines (43 loc) · 1.97 KB
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
[profile.default]
solc = "0.8.36"
src = 'src'
out = 'out'
libs = ['lib']
optimizer = true
optimizer_runs = 200
evm_version = 'prague'
# ERC-3643's Token.sol pins `pragma solidity 0.8.30` exactly, which cannot share a compilation unit
# with solc 0.8.36. Tests that deploy the real vendored token therefore live in their own directory
# and are built by the `erc3643` profile below. Run them with:
# FOUNDRY_PROFILE=erc3643 forge test
skip = ['test/ERC3643Real/**']
# Builds the whole project at solc 0.8.30 so the vendored ERC-3643 `Token.sol` compiles alongside
# our own contracts (which are `^0.8.20`, so 0.8.30 satisfies them). Nothing else changes.
[profile.erc3643]
solc = "0.8.30"
src = 'src'
out = 'out-erc3643'
libs = ['lib']
optimizer = true
optimizer_runs = 200
evm_version = 'prague'
# Profiles inherit unspecified keys from [profile.default], so the default's `skip` must be
# cleared here or this profile would skip the very tests it exists to run.
skip = []
match_path = 'test/ERC3643Real/*'
# ERC-3643 imports `@onchain-id/solidity`, an npm package rather than a submodule, so it is not
# vendored. `test/utils/onchainid/` holds minimal IIdentity / IClaimIssuer stubs, wired in by a
# CONTEXT-SCOPED remapping (the `lib/ERC-3643/:` prefix) so they apply to the ERC-3643 build only.
#
# It lives here rather than in `remappings.txt` on purpose. `forge remappings` prints that file for
# every profile, and `hardhat-foundry` runs exactly that command and rejects any line containing a
# `:` with "remapping contexts are not allowed" -- which broke `npx hardhat test` in CI. Declared as
# profile config it is applied only when this profile is selected, so the default profile Hardhat
# sees stays context-free. Do not move it back.
remappings = ['lib/ERC-3643/:@onchain-id/solidity/contracts/=test/utils/onchainid/']
[invariant]
runs = 64
depth = 128
fail_on_revert = true
[profile.ci]
# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options