From 0ef5d460853373417d9c96076d3a63243a1ae739 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Thu, 7 May 2026 13:04:05 +0400 Subject: [PATCH] fix Flow constructor NatSpec to match implementation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous NatSpec claimed the constructor "forwards config to `DeployerDiscoverableMetaV2`". Neither is true: the constructor takes no parameters and forwards nothing, and `DeployerDiscoverableMetaV2` is not in `Flow`'s inheritance chain or imported anywhere — it's a dangling reference to a removed dependency. NatSpec rewritten to describe what the constructor actually does: disable initializers so the implementation is unusable directly and all instances must be proxies / clones initialized via a factory. Closes #347. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/concrete/Flow.sol | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/concrete/Flow.sol b/src/concrete/Flow.sol index 476e1aaf..8792ecfa 100644 --- a/src/concrete/Flow.sol +++ b/src/concrete/Flow.sol @@ -109,13 +109,11 @@ contract Flow is ERC721Holder, ERC1155Holder, Multicall, ReentrancyGuard, IInter /// provide the same evaluable when they evaluate the flow. event FlowInitialized(address sender, EvaluableV2 evaluable); - /// Forwards config to `DeployerDiscoverableMetaV2` and disables - /// initializers. The initializers are disabled because inheriting contracts - /// are expected to implement some kind of initialization logic that is - /// compatible with cloning via. proxy/factory. Disabling initializers - /// in the implementation contract forces that the only way to initialize - /// the contract is via. a proxy, which should also strongly encourage - /// patterns that _atomically_ clone and initialize via. some factory. + /// Disables initializers on the implementation contract so that any + /// usable instance is a proxy / clone that runs `initialize` exactly + /// once. Forcing this through a factory encourages the + /// atomically-clone-then-initialize pattern; a directly-deployed + /// implementation is unusable. constructor() { _disableInitializers(); }