From f4381dee085a95068123852ca54e9752527ce316 Mon Sep 17 00:00:00 2001 From: David Meister Date: Sat, 15 Aug 2026 13:01:13 +0000 Subject: [PATCH] docs: @param tags for UnexpectedDeployedAddress MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `error UnexpectedDeployedAddress(address expected, address actual)` had a single prose line and no `@param` tags, while every other error-declaring file in `src/` documents its error params. The error is raised at two points, both in `deployToNetworks` and so also reachable via `deployAndBroadcast`: before any fork, when the creation code derives an address other than `expectedAddress`, and after broadcasting, when the address deployed to is not `expectedAddress`. `actual` means a different thing at each, which is what went undocumented. The summary line is corrected rather than kept. "Thrown when the deployed address does not match the expected address" is false at the pre-fork site, where nothing has been deployed at all, so `@param` tags underneath it would have documented the parameters and left the wrong statement standing. `expected` is described from the signature — the caller-supplied `expectedAddress` — not as "the address the suite records", which is `RainDeployVerifySnapshot`'s notion and not what either site passes. Co-Authored-By: Claude Opus 5 (1M context) --- src/lib/LibRainDeploy.sol | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/lib/LibRainDeploy.sol b/src/lib/LibRainDeploy.sol index 616ec9f..609a85f 100644 --- a/src/lib/LibRainDeploy.sol +++ b/src/lib/LibRainDeploy.sol @@ -22,7 +22,15 @@ library LibRainDeploy { /// Thrown when a dependency is missing on a network before deployment. error MissingDependency(string network, address dependency); - /// Thrown when the deployed address does not match the expected address. + /// Thrown when an address does not match the address the deploy expects. + /// Raised at two distinct points, and nothing is deployed at the first of + /// them: before any fork, when the address the creation code derives is not + /// the expected one, and after broadcasting, when the address deployed to + /// is not the expected one. + /// @param expected The `expectedAddress` the caller passed to + /// `deployToNetworks` or `deployAndBroadcast`, at both sites. + /// @param actual The address the creation code derives, before any fork, or + /// the address actually deployed to, after broadcasting. error UnexpectedDeployedAddress(address expected, address actual); /// Thrown when the deployed code hash does not match the expected code hash.