Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ jobs:
network: hoodi
- config: config_samples/ethereum/hoodi/vaults/hoodi_vaults_easy_track_config.json
network: hoodi
- config: config_samples/ethereum/hoodi/srv3/hoodi_srv3_config.json
network: hoodi
- config: config_samples/ethereum/hoodi/srv3/hoodi_srv3_easy_track_config.json
network: hoodi
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3

Expand Down
4 changes: 3 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,12 @@ explorer_hostname: "api.etherscan.io"
explorer_token_env_var: "ETHERSCAN_EXPLORER_TOKEN"
github_repo: { url, commit, relative_root }
dependencies: { "dep_name": { url, commit, relative_root } }
bytecode_comparison: { constructor_calldata, constructor_args, libraries }
bytecode_comparison: { constructor_calldata, constructor_args, libraries, deployment_from, extra_sources }
allowed_diffs: { bytecode: {...}, source: {...} } # optional; see below
```

`bytecode_comparison.extra_sources` (`{ "0xaddr": ["path/to/File.sol"] }`, optional) names additional source files to fetch from the configured GitHub repo/commit and add to the compilation — for contracts whose explorer-verified source set omits a file the pinned GitHub source imports (e.g. a newly-added interface). The files are fetched the same way as all others (honoring `dependencies`), so verification stays honest.

`allowed_diffs` declares known/expected diffs per contract so a run still passes while everything else stays verified (validated by `diffyscan/utils/allowed_diffs.py`). Each rule needs a `reason`. **Prefer the tightest facet** — bytecode: `immutables`, `byte_ranges`, `cbor_metadata`, `constructor_args`/`constructor_calldata`; source: `line_ranges`, `files`. `any: true` is a blanket wildcard that hides all future drift — avoid it unless a diff genuinely can't be scoped, and say why in the `reason`. The deprecated `--allow-source-diff`/`--allow-bytecode-diff` CLI flags are just shorthands for `any: true`. `tests/test_no_wildcard_regression.py` guards against new wildcards.

### Environment variables
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ diffyscan config_samples/lido_dao_sepolia_config.json

When no path is given, diffyscan looks for `config.json`, `config.yaml`, or `config.yml` in the current directory. When a directory is given, all `.json`, `.yaml`, and `.yml` files inside it are processed.

Alternatively, create a new config file. Configs can be written in JSON or YAML. The `bytecode_comparison` section is optional and only needed for manual overrides when explorer metadata is missing or you want to override it:
Alternatively, create a new config file. Configs can be written in JSON or YAML. The `bytecode_comparison` section is optional and only needed for manual overrides when explorer metadata is missing or you want to override it. `deployment_from` can be used per contract when constructor simulation depends on `msg.sender`:

**JSON** (`config.json`):

Expand Down Expand Up @@ -138,6 +138,9 @@ Alternatively, create a new config file. Configs can be written in JSON or YAML.
"0xC01fC1F2787687Bc656EAc0356ba9Db6e6b7afb7"
]
]
},
"deployment_from": {
"0x045dd46212A178428c088573A7d102B9d89a022A": "0xE92329EC7ddB11D25e25b3c21eeBf11f15eB325d"
}
}
}
Expand Down
Loading