Commit 5ee26b4
feat(manager): add _initialOwner constructor param for CREATE2 deploys
VRFConsumerBaseV2Plus hard-wires Chainlink's ConfirmedOwner to set
s_owner = msg.sender at construction. With Arachnid's deterministic
CREATE2 deployer (msg.sender = 0x4e59...), the Manager would be
permanently un-owned — every administrative function (setTreasury,
allowlistToken, pause, etc.) uncallable. This blocks any cross-chain
deterministic deploy strategy.
Fix: add _initialOwner as the last constructor param. After the parent
constructors run (VRFConsumerBaseV2Plus sets s_owner = msg.sender),
call transferOwnership(_initialOwner) to propose ownership to the
intended EOA. Two-step transfer (the only available path —
Chainlink's _transferOwnership is private, not internal). Deploy
scripts finalize via acceptOwnership() from the EOA.
Skipped when _initialOwner == msg.sender (Chainlink reverts on
self-transfer); preserves in-test ownership semantics where the test
contract deploys and owns directly.
Test base updated to pass address(this) as _initialOwner. All 85 tests
remain green; zero behavioral changes for non-CREATE2 deploy paths.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 71b4410 commit 5ee26b4
2 files changed
Lines changed: 32 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
256 | 264 | | |
257 | 265 | | |
258 | 266 | | |
| |||
269 | 277 | | |
270 | 278 | | |
271 | 279 | | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
272 | 284 | | |
273 | 285 | | |
274 | 286 | | |
| |||
278 | 290 | | |
279 | 291 | | |
280 | 292 | | |
281 | | - | |
| 293 | + | |
| 294 | + | |
282 | 295 | | |
283 | 296 | | |
284 | 297 | | |
285 | 298 | | |
286 | 299 | | |
287 | 300 | | |
288 | 301 | | |
| 302 | + | |
289 | 303 | | |
290 | 304 | | |
291 | 305 | | |
| |||
303 | 317 | | |
304 | 318 | | |
305 | 319 | | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
306 | 327 | | |
307 | 328 | | |
308 | 329 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
95 | 99 | | |
96 | 100 | | |
97 | 101 | | |
| |||
101 | 105 | | |
102 | 106 | | |
103 | 107 | | |
104 | | - | |
| 108 | + | |
| 109 | + | |
105 | 110 | | |
106 | 111 | | |
107 | 112 | | |
| |||
0 commit comments