From 014f0ea095e978d6b5f3d42536d1865023e62f4c Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 12:09:02 +0000 Subject: [PATCH 01/43] Per-network beacon for registry beacon proxy suites Co-Authored-By: Claude Opus 5.5 --- src/lib/LibRainDeployCloneMechanism.sol | 5 +- src/lib/LibRainDeployCloneOnChainChecks.sol | 4 +- src/lib/LibRainDeployRegistryBeaconProxy.sol | 119 +++++++++++++++++-- 3 files changed, 115 insertions(+), 13 deletions(-) diff --git a/src/lib/LibRainDeployCloneMechanism.sol b/src/lib/LibRainDeployCloneMechanism.sol index adceb8e..0f169f7 100644 --- a/src/lib/LibRainDeployCloneMechanism.sol +++ b/src/lib/LibRainDeployCloneMechanism.sol @@ -499,7 +499,9 @@ library LibRainDeployCloneMechanism { RegistryBeaconProxyParams memory params = abi.decode(payload(suite), (RegistryBeaconProxyParams)); LibRainDeployClone.checkDependencyDeclared(params.factory, suite.dependencies); LibRainDeployClone.checkDependencyDeclared(params.registry, suite.dependencies); - LibRainDeployClone.checkDependencyDeclared(params.beacon, suite.dependencies); + if (params.beaconPerNetwork.length == 0) { + LibRainDeployClone.checkDependencyDeclared(params.beacon, suite.dependencies); + } return params; } @@ -894,6 +896,7 @@ library LibRainDeployCloneMechanism { authority: proxy.authority, beaconName: proxy.beaconName, beacon: proxy.beacon, + beaconPerNetwork: proxy.beaconPerNetwork, data: proxy.data, salt: proxy.salt }); diff --git a/src/lib/LibRainDeployCloneOnChainChecks.sol b/src/lib/LibRainDeployCloneOnChainChecks.sol index 668223b..d23e9ae 100644 --- a/src/lib/LibRainDeployCloneOnChainChecks.sol +++ b/src/lib/LibRainDeployCloneOnChainChecks.sol @@ -192,7 +192,9 @@ library LibRainDeployCloneOnChainChecks { { bytes32 id = LibRainDeployDeclaration.mechanismIdOf(suite); if (id == REGISTRY_BEACON_PROXY_MECHANISM) { - address beacon = LibRainDeployCloneMechanism.registryBeaconProxyParams(suite).beacon; + address beacon = LibRainDeployRegistryBeaconProxy.beaconOnNetwork( + LibRainDeployCloneMechanism.registryBeaconProxyParams(suite), chainId + ).beacon; if (IERC5313(beacon).owner() == deployer) { revert RegistryBeaconOwnedByDeployKey(chainId, beacon); } diff --git a/src/lib/LibRainDeployRegistryBeaconProxy.sol b/src/lib/LibRainDeployRegistryBeaconProxy.sol index f389a56..847c4b1 100644 --- a/src/lib/LibRainDeployRegistryBeaconProxy.sol +++ b/src/lib/LibRainDeployRegistryBeaconProxy.sol @@ -21,6 +21,13 @@ string constant REGISTRY_BEACON_PROXY_UNANCHORABLE_REASON = "A RegistryBeaconPro "arguments. Its source is not compiled here, so there is no artifact to anchor it to; the beacon the binding " "resolves to, and each implementation it serves, are the anchored contracts."; +/// A registry beacon proxy's beacon and its expected code hash on one chain. +struct RegistryBeaconOnNetwork { + uint256 chainId; + address beacon; + bytes32 codeHash; +} + /// One contract a repo deploys as a registry beacon proxy. /// The address commits to the registry, authority and beacon name, not to the beacon they resolve to or the /// implementation that runs `initialize(data)`. Every beacon the binding resolves to while the proxy is @@ -32,11 +39,14 @@ struct RegistryBeaconProxyDeploy { address registry; address authority; bytes32 beaconName; - /// The beacon the binding MUST resolve to at broadcast. Not committed to by the address. + /// The beacon the binding MUST resolve to at broadcast. Not committed to by the address. Zero when + /// `beaconPerNetwork` is set. address beacon; + /// The beacon per chain id, when chains differ. + RegistryBeaconOnNetwork[] beaconPerNetwork; bytes data; bytes32 salt; - /// MUST include the factory, the registry and the beacon. + /// MUST include the factory, the registry and `beacon` when set. DeployDependency[] dependencies; /// The proxy's runtime code, generated into `src/generated/` and checked by `Git is clean`. bytes runtimeCode; @@ -49,6 +59,7 @@ struct RegistryBeaconProxyParams { address authority; bytes32 beaconName; address beacon; + RegistryBeaconOnNetwork[] beaconPerNetwork; bytes data; bytes32 salt; } @@ -71,6 +82,20 @@ library LibRainDeployRegistryBeaconProxy { /// @param resolved The beacon the binding resolves to. error RegistryBeaconProxyBeaconMismatch(string network, address expected, address resolved); + /// Thrown when a suite declares both `beacon` and `beaconPerNetwork`, or neither. + error RegistryBeaconProxyBeaconAmbiguous(); + + /// Thrown when a per-network suite names no beacon for a chain, or names one twice. + /// @param chainId The chain id. + error RegistryBeaconProxyNoBeaconOnNetwork(uint256 chainId); + + /// Thrown when the beacon on a network does not carry its declared code hash. + /// @param network The network. + /// @param beacon The beacon. + /// @param expected The declared code hash. + /// @param actual The beacon's code hash. + error RegistryBeaconProxyBeaconCodeHashMismatch(string network, address beacon, bytes32 expected, bytes32 actual); + /// Thrown when a registry beacon proxy deployed on the fork answers `owner()` with the deploy key. /// @param network The network. /// @param proxy The proxy. @@ -116,23 +141,58 @@ library LibRainDeployRegistryBeaconProxy { RegistryBeaconProxyParams memory params, address implementation, bytes memory implementationCode + ) internal returns (bytes memory) { + return registryBeaconProxyRuntimeCode(vm, params, params.beacon, implementation, implementationCode); + } + + /// As above, simulating `chainId`'s beacon from `beaconOnNetwork`. + /// @param vm The Vm instance to etch with. + /// @param params The proxy's factory call. + /// @param chainId The chain whose beacon to simulate. + /// @param implementation The implementation the beacon serves. + /// @param implementationCode The implementation's runtime code. + /// @return The proxy's runtime code. + function registryBeaconProxyRuntimeCodeOnNetwork( + Vm vm, + RegistryBeaconProxyParams memory params, + uint256 chainId, + address implementation, + bytes memory implementationCode + ) internal returns (bytes memory) { + return registryBeaconProxyRuntimeCode( + vm, params, beaconOnNetwork(params, chainId).beacon, implementation, implementationCode + ); + } + + /// @param vm The Vm instance to etch with. + /// @param params The proxy's factory call. + /// @param beacon The beacon to simulate. + /// @param implementation The implementation the beacon serves. + /// @param implementationCode The implementation's runtime code. + /// @return The proxy's runtime code. + function registryBeaconProxyRuntimeCode( + Vm vm, + RegistryBeaconProxyParams memory params, + address beacon, + address implementation, + bytes memory implementationCode ) internal returns (bytes memory) { uint256 state = vm.snapshotState(); vm.etch(params.registry, address(new ConfigRegistry()).code); vm.etch(implementation, implementationCode); // slither-disable-next-line too-many-digits vm.etch( - params.beacon, bytes.concat(type(UpgradeableBeacon).creationCode, abi.encode(implementation, params.beacon)) + beacon, bytes.concat(type(UpgradeableBeacon).creationCode, abi.encode(implementation, beacon)) ); // slither-disable-next-line low-level-calls - (bool constructed, bytes memory beaconCode) = params.beacon.call(""); + (bool constructed, bytes memory beaconCode) = beacon.call(""); if (!constructed) { - revert RegistryBeaconProxyBeaconConstructionFailed(params.beacon, implementation); + revert RegistryBeaconProxyBeaconConstructionFailed(beacon, implementation); } - vm.etch(params.beacon, beaconCode); + vm.etch(beacon, beaconCode); uint256 moment = vm.getBlockTimestamp(); // slither-disable-next-line unused-return - try IConfigRegistryV5(params.registry).getV5(params.authority, params.beaconName) returns ( + try IConfigRegistryV5(params.registry).getV5(params.authority, beaconName) returns ( bytes memory, uint256 registeredAt, bytes32 ) { if (registeredAt > moment) { @@ -142,14 +202,14 @@ library LibRainDeployRegistryBeaconProxy { vm.warp(moment + 1); vm.prank(params.authority); IConfigRegistryV5(params.registry) - .registerV5(params.authority, params.beaconName, "address", abi.encode(params.beacon), ""); + .registerV5(params.authority, beaconName, "address", abi.encode(beacon), ""); bytes memory creationCode = registryBeaconProxyCreationCode(params); address proxy; assembly ("memory-safe") { proxy := create(0, add(creationCode, 0x20), mload(creationCode)) } if (proxy == address(0)) { - revert RegistryBeaconProxyLocalDeployFailed(params.registry, params.authority, params.beaconName); + revert RegistryBeaconProxyLocalDeployFailed(params.registry, params.authority, beaconName); } bytes memory runtimeCode = proxy.code; if (!vm.revertToState(state)) { @@ -163,10 +223,47 @@ library LibRainDeployRegistryBeaconProxy { /// @param network The network. /// @param params The proxy's factory call. function checkBeacon(string memory network, RegistryBeaconProxyParams memory params) internal view { + RegistryBeaconOnNetwork memory onNetwork = beaconOnNetwork(params, block.chainid); address resolved = LibICloneableFactoryV7.resolveBeacon(params.registry, params.authority, params.beaconName); - if (resolved != params.beacon) { - revert RegistryBeaconProxyBeaconMismatch(network, params.beacon, resolved); + if (resolved != onNetwork.beacon) { + revert RegistryBeaconProxyBeaconMismatch(network, onNetwork.beacon, resolved); + } + if (params.beaconPerNetwork.length > 0 && onNetwork.beacon.codehash != onNetwork.codeHash) { + revert RegistryBeaconProxyBeaconCodeHashMismatch( + network, onNetwork.beacon, onNetwork.codeHash, onNetwork.beacon.codehash + ); + } + } + + /// @param params The proxy's factory call. + /// @param chainId The chain id. + /// @return `beacon` for a single-beacon suite, else the one entry of `beaconPerNetwork` for `chainId`, refusing + /// `RegistryBeaconProxyNoBeaconOnNetwork` for none or several. Refuses `RegistryBeaconProxyBeaconAmbiguous` unless + /// exactly one of `beacon` and `beaconPerNetwork` is set. + function beaconOnNetwork(RegistryBeaconProxyParams memory params, uint256 chainId) + internal + pure + returns (RegistryBeaconOnNetwork memory) + { + if ((params.beacon == address(0)) == (params.beaconPerNetwork.length == 0)) { + revert RegistryBeaconProxyBeaconAmbiguous(); + } + if (params.beaconPerNetwork.length == 0) { + return RegistryBeaconOnNetwork({chainId: chainId, beacon: params.beacon, codeHash: bytes32(0)}); + } + uint256 found = type(uint256).max; + for (uint256 i = 0; i < params.beaconPerNetwork.length; i++) { + if (params.beaconPerNetwork[i].chainId == chainId) { + if (found != type(uint256).max) { + revert RegistryBeaconProxyNoBeaconOnNetwork(chainId); + } + found = i; + } + } + if (found == type(uint256).max) { + revert RegistryBeaconProxyNoBeaconOnNetwork(chainId); } + return params.beaconPerNetwork[found]; } /// @param params The proxy's factory call. From 92645abc099e20bb8342fa1a3cfce445eea071ca Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 12:09:51 +0000 Subject: [PATCH 02/43] Keep params.beaconName in registry beacon proxy simulation Co-Authored-By: Claude Opus 5.5 --- src/lib/LibRainDeployRegistryBeaconProxy.sol | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/LibRainDeployRegistryBeaconProxy.sol b/src/lib/LibRainDeployRegistryBeaconProxy.sol index 847c4b1..7625460 100644 --- a/src/lib/LibRainDeployRegistryBeaconProxy.sol +++ b/src/lib/LibRainDeployRegistryBeaconProxy.sol @@ -192,7 +192,7 @@ library LibRainDeployRegistryBeaconProxy { vm.etch(beacon, beaconCode); uint256 moment = vm.getBlockTimestamp(); // slither-disable-next-line unused-return - try IConfigRegistryV5(params.registry).getV5(params.authority, beaconName) returns ( + try IConfigRegistryV5(params.registry).getV5(params.authority, params.beaconName) returns ( bytes memory, uint256 registeredAt, bytes32 ) { if (registeredAt > moment) { @@ -202,14 +202,14 @@ library LibRainDeployRegistryBeaconProxy { vm.warp(moment + 1); vm.prank(params.authority); IConfigRegistryV5(params.registry) - .registerV5(params.authority, beaconName, "address", abi.encode(beacon), ""); + .registerV5(params.authority, params.beaconName, "address", abi.encode(beacon), ""); bytes memory creationCode = registryBeaconProxyCreationCode(params); address proxy; assembly ("memory-safe") { proxy := create(0, add(creationCode, 0x20), mload(creationCode)) } if (proxy == address(0)) { - revert RegistryBeaconProxyLocalDeployFailed(params.registry, params.authority, beaconName); + revert RegistryBeaconProxyLocalDeployFailed(params.registry, params.authority, params.beaconName); } bytes memory runtimeCode = proxy.code; if (!vm.revertToState(state)) { From 10adff111297508fdd6a637c5229064e04fe1cc0 Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 12:11:18 +0000 Subject: [PATCH 03/43] Declare an empty beaconPerNetwork in single-beacon registry beacon proxy tests Co-Authored-By: Claude Opus 5.5 --- test/lib/LibRegistryBeaconProxyTest.sol | 3 +++ .../LibRainDeployCloneMechanismRegistryBeaconProxy.t.sol | 1 + test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/test/lib/LibRegistryBeaconProxyTest.sol b/test/lib/LibRegistryBeaconProxyTest.sol index 0a935d7..1fc409e 100644 --- a/test/lib/LibRegistryBeaconProxyTest.sol +++ b/test/lib/LibRegistryBeaconProxyTest.sol @@ -10,6 +10,7 @@ import {DeployDependency} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; import {TestCloneFactory} from "../../src/test/TestCloneFactory.sol"; import { LibRainDeployRegistryBeaconProxy, + RegistryBeaconOnNetwork, RegistryBeaconProxyDeploy, RegistryBeaconProxyParams } from "../../src/lib/LibRainDeployRegistryBeaconProxy.sol"; @@ -51,6 +52,7 @@ library LibRegistryBeaconProxyTest { authority: AUTHORITY, beaconName: BEACON_NAME, beacon: beacon, + beaconPerNetwork: new RegistryBeaconOnNetwork[](0), data: data, salt: salt }); @@ -77,6 +79,7 @@ library LibRegistryBeaconProxyTest { authority: params.authority, beaconName: params.beaconName, beacon: params.beacon, + beaconPerNetwork: params.beaconPerNetwork, data: params.data, salt: params.salt, dependencies: dependencies, diff --git a/test/src/lib/LibRainDeployCloneMechanismRegistryBeaconProxy.t.sol b/test/src/lib/LibRainDeployCloneMechanismRegistryBeaconProxy.t.sol index 1ba93a1..c9dd6d2 100644 --- a/test/src/lib/LibRainDeployCloneMechanismRegistryBeaconProxy.t.sol +++ b/test/src/lib/LibRainDeployCloneMechanismRegistryBeaconProxy.t.sol @@ -94,6 +94,7 @@ contract LibRainDeployCloneMechanismRegistryBeaconProxyTest is Test { authority: proxy.authority, beaconName: proxy.beaconName, beacon: proxy.beacon, + beaconPerNetwork: proxy.beaconPerNetwork, data: proxy.data, salt: proxy.salt }); diff --git a/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol b/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol index 0607f9d..66e60a6 100644 --- a/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol +++ b/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol @@ -14,6 +14,7 @@ import {IConfigRegistryV5} from "rain-deploy-0.1.43/src/interface/IConfigRegistr import { LibRainDeployRegistryBeaconProxy, REGISTRY_BEACON_PROXY_ARTIFACT_PATH, + RegistryBeaconOnNetwork, RegistryBeaconProxyParams } from "../../../src/lib/LibRainDeployRegistryBeaconProxy.sol"; import {RegistryBeaconProxy} from "../../../script/RegistryBeaconProxy.sol"; @@ -66,6 +67,7 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { authority: LibRegistryBeaconProxyTest.AUTHORITY, beaconName: LibRegistryBeaconProxyTest.BEACON_NAME, beacon: address(0xBEAC0), + beaconPerNetwork: new RegistryBeaconOnNetwork[](0), data: TEST_DATA, salt: TEST_SALT }); @@ -78,6 +80,7 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { authority: params.authority, beaconName: params.beaconName, beacon: params.beacon, + beaconPerNetwork: params.beaconPerNetwork, data: params.data, salt: params.salt }); @@ -195,6 +198,7 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { authority: LibRegistryBeaconProxyTest.AUTHORITY, beaconName: LibRegistryBeaconProxyTest.BEACON_NAME, beacon: beaconAt, + beaconPerNetwork: new RegistryBeaconOnNetwork[](0), data: data, salt: salt }); @@ -226,6 +230,7 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { authority: LibRegistryBeaconProxyTest.AUTHORITY, beaconName: LibRegistryBeaconProxyTest.BEACON_NAME, beacon: address(0xBEAC0), + beaconPerNetwork: new RegistryBeaconOnNetwork[](0), data: TEST_DATA, salt: TEST_SALT }); @@ -257,6 +262,7 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { authority: LibRegistryBeaconProxyTest.AUTHORITY, beaconName: LibRegistryBeaconProxyTest.BEACON_NAME, beacon: address(0xBEAC0), + beaconPerNetwork: new RegistryBeaconOnNetwork[](0), data: TEST_DATA, salt: TEST_SALT }); From 0ef8273db5b63f8ab09f0544a43dbebee6377e4f Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 12:13:49 +0000 Subject: [PATCH 04/43] Keep the verify-chain registry params encoded in storage The per-network beacon array cannot be copied from memory to storage under legacy codegen. Co-Authored-By: Claude Opus 5.5 --- ...DeployVerifyChainRegistryBeaconProxy.t.sol | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxy.t.sol b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxy.t.sol index 4063744..77ed315 100644 --- a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxy.t.sol +++ b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxy.t.sol @@ -28,7 +28,11 @@ import {LibExternalDeployments} from "../../lib/LibExternalDeployments.sol"; contract RainDeployVerifyChainRegistryBeaconProxyTest is PerNetworkCloneBeaconVerifyChain { string constant PROXY_SUITE = "registry-beacon-proxy@0_0_1"; - RegistryBeaconProxyParams internal sParams; + bytes internal sParamsData; + + function storedParams() internal view returns (RegistryBeaconProxyParams memory) { + return abi.decode(sParamsData, (RegistryBeaconProxyParams)); + } /// Puts the per-network clone release and the beacon at its Polygon clone on every fork, as /// `RainDeployVerifyChainBeaconProxyTest` does, plus a factory and a registry binding the beacon. @@ -45,18 +49,20 @@ contract RainDeployVerifyChainRegistryBeaconProxyTest is PerNetworkCloneBeaconVe vm.etch(addresses[i], release.storedRuntimeCode); vm.makePersistent(addresses[i]); } - sParams = LibRegistryBeaconProxyTest.live(vm, addresses[1], OWNER, hex"deadbeef", bytes32(uint256(5))); - sBeacon = sParams.beacon; - vm.makePersistent(sParams.factory); - vm.makePersistent(sParams.registry); + RegistryBeaconProxyParams memory params = + LibRegistryBeaconProxyTest.live(vm, addresses[1], OWNER, hex"deadbeef", bytes32(uint256(5))); + sParamsData = abi.encode(params); + sBeacon = params.beacon; + vm.makePersistent(params.factory); + vm.makePersistent(params.registry); vm.makePersistent(sBeacon); - sExternalDeployments.push(LibExternalDeployments.deployedNow(sParams.factory)); - sExternalDeployments.push(LibExternalDeployments.deployedNow(sParams.registry)); + sExternalDeployments.push(LibExternalDeployments.deployedNow(params.factory)); + sExternalDeployments.push(LibExternalDeployments.deployedNow(params.registry)); sExternalDeployments.push(LibExternalDeployments.deployedNow(sBeacon)); } function liveProxySuite() internal returns (DeploySuite memory) { - RegistryBeaconProxyParams memory params = sParams; + RegistryBeaconProxyParams memory params = storedParams(); DeploySuite memory suite = LibRainDeployCloneMechanism.registryBeaconProxyCandidate( LibRegistryBeaconProxyTest.declared(PROXY_SUITE, params, LibRegistryBeaconProxyTest.runtimeOf(vm, params)) @@ -90,7 +96,7 @@ contract RainDeployVerifyChainRegistryBeaconProxyTest is PerNetworkCloneBeaconVe address(new UpgradeableBeacon(perNetworkCloneReleaseAddress(PER_NETWORK_CLONE_POLYGON_CHAIN_ID), OWNER)); vm.makePersistent(other); vm.warp(block.timestamp + 1); - LibRegistryBeaconProxyTest.bind(vm, sParams.registry, other); + LibRegistryBeaconProxyTest.bind(vm, storedParams().registry, other); vm.expectRevert( abi.encodeWithSelector( LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyBeaconMismatch.selector, @@ -104,13 +110,14 @@ contract RainDeployVerifyChainRegistryBeaconProxyTest is PerNetworkCloneBeaconVe function testRegistryBeaconProxyWithAChangedFactoryIsRefusedNamingNetworkAndDependency() external { DeploySuite memory suite = liveProxySuite(); - bytes32 declared = sParams.factory.codehash; - vm.etch(sParams.factory, type(MockCloneFactory).runtimeCode); + address factory = storedParams().factory; + bytes32 declared = factory.codehash; + vm.etch(factory, type(MockCloneFactory).runtimeCode); vm.expectRevert( abi.encodeWithSelector( LibRainDeploy.DependencyChanged.selector, LibRainDeploy.POLYGON, - sParams.factory, + factory, declared, keccak256(type(MockCloneFactory).runtimeCode) ) From 89d5c8e3b20ff70a357da34fc1fae875ea4bcdba Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 12:17:54 +0000 Subject: [PATCH 05/43] Registry beacon proxy suites carry only the per-chain beacon list Remove the single beacon field and RegistryBeaconProxyBeaconAmbiguous; one path handles every suite. Co-Authored-By: Claude Opus 5.5 --- src/lib/LibRainDeployCloneMechanism.sol | 6 +-- src/lib/LibRainDeployRegistryBeaconProxy.sol | 43 ++++---------------- test/lib/LibRegistryBeaconProxyTest.sol | 21 ++++++---- 3 files changed, 20 insertions(+), 50 deletions(-) diff --git a/src/lib/LibRainDeployCloneMechanism.sol b/src/lib/LibRainDeployCloneMechanism.sol index 0f169f7..decaeff 100644 --- a/src/lib/LibRainDeployCloneMechanism.sol +++ b/src/lib/LibRainDeployCloneMechanism.sol @@ -490,7 +490,7 @@ library LibRainDeployCloneMechanism { } /// @param suite A registry beacon proxy suite. - /// @return Its factory call, its factory, registry and beacon checked among its dependencies. + /// @return Its factory call, its factory and registry checked among its dependencies. function registryBeaconProxyParams(DeploySuite memory suite) internal pure @@ -499,9 +499,6 @@ library LibRainDeployCloneMechanism { RegistryBeaconProxyParams memory params = abi.decode(payload(suite), (RegistryBeaconProxyParams)); LibRainDeployClone.checkDependencyDeclared(params.factory, suite.dependencies); LibRainDeployClone.checkDependencyDeclared(params.registry, suite.dependencies); - if (params.beaconPerNetwork.length == 0) { - LibRainDeployClone.checkDependencyDeclared(params.beacon, suite.dependencies); - } return params; } @@ -895,7 +892,6 @@ library LibRainDeployCloneMechanism { registry: proxy.registry, authority: proxy.authority, beaconName: proxy.beaconName, - beacon: proxy.beacon, beaconPerNetwork: proxy.beaconPerNetwork, data: proxy.data, salt: proxy.salt diff --git a/src/lib/LibRainDeployRegistryBeaconProxy.sol b/src/lib/LibRainDeployRegistryBeaconProxy.sol index 7625460..a9b262d 100644 --- a/src/lib/LibRainDeployRegistryBeaconProxy.sol +++ b/src/lib/LibRainDeployRegistryBeaconProxy.sol @@ -39,14 +39,11 @@ struct RegistryBeaconProxyDeploy { address registry; address authority; bytes32 beaconName; - /// The beacon the binding MUST resolve to at broadcast. Not committed to by the address. Zero when - /// `beaconPerNetwork` is set. - address beacon; - /// The beacon per chain id, when chains differ. + /// The beacon the binding MUST resolve to at broadcast on each chain. Not committed to by the address. RegistryBeaconOnNetwork[] beaconPerNetwork; bytes data; bytes32 salt; - /// MUST include the factory, the registry and `beacon` when set. + /// MUST include the factory and the registry. DeployDependency[] dependencies; /// The proxy's runtime code, generated into `src/generated/` and checked by `Git is clean`. bytes runtimeCode; @@ -58,7 +55,6 @@ struct RegistryBeaconProxyParams { address registry; address authority; bytes32 beaconName; - address beacon; RegistryBeaconOnNetwork[] beaconPerNetwork; bytes data; bytes32 salt; @@ -82,10 +78,7 @@ library LibRainDeployRegistryBeaconProxy { /// @param resolved The beacon the binding resolves to. error RegistryBeaconProxyBeaconMismatch(string network, address expected, address resolved); - /// Thrown when a suite declares both `beacon` and `beaconPerNetwork`, or neither. - error RegistryBeaconProxyBeaconAmbiguous(); - - /// Thrown when a per-network suite names no beacon for a chain, or names one twice. + /// Thrown when a suite names no beacon for a chain, or names one twice. /// @param chainId The chain id. error RegistryBeaconProxyNoBeaconOnNetwork(uint256 chainId); @@ -130,22 +123,7 @@ library LibRainDeployRegistryBeaconProxy { /// The proxy's runtime code, for a repo's `script/Build.sol` to generate into `src/generated/`. Etches a /// `ConfigRegistry` at `params.registry` binding `beaconName` under `authority` to an `UpgradeableBeacon` at - /// `params.beacon` serving `implementation`, deploys the creation code, then reverts the local state. - /// @param vm The Vm instance to etch with. - /// @param params The proxy's factory call. - /// @param implementation The implementation the beacon serves. - /// @param implementationCode The implementation's runtime code. - /// @return The proxy's runtime code. - function registryBeaconProxyRuntimeCode( - Vm vm, - RegistryBeaconProxyParams memory params, - address implementation, - bytes memory implementationCode - ) internal returns (bytes memory) { - return registryBeaconProxyRuntimeCode(vm, params, params.beacon, implementation, implementationCode); - } - - /// As above, simulating `chainId`'s beacon from `beaconOnNetwork`. + /// `chainId`'s beacon serving `implementation`, deploys the creation code, then reverts the local state. /// @param vm The Vm instance to etch with. /// @param params The proxy's factory call. /// @param chainId The chain whose beacon to simulate. @@ -228,7 +206,7 @@ library LibRainDeployRegistryBeaconProxy { if (resolved != onNetwork.beacon) { revert RegistryBeaconProxyBeaconMismatch(network, onNetwork.beacon, resolved); } - if (params.beaconPerNetwork.length > 0 && onNetwork.beacon.codehash != onNetwork.codeHash) { + if (onNetwork.beacon.codehash != onNetwork.codeHash) { revert RegistryBeaconProxyBeaconCodeHashMismatch( network, onNetwork.beacon, onNetwork.codeHash, onNetwork.beacon.codehash ); @@ -237,20 +215,13 @@ library LibRainDeployRegistryBeaconProxy { /// @param params The proxy's factory call. /// @param chainId The chain id. - /// @return `beacon` for a single-beacon suite, else the one entry of `beaconPerNetwork` for `chainId`, refusing - /// `RegistryBeaconProxyNoBeaconOnNetwork` for none or several. Refuses `RegistryBeaconProxyBeaconAmbiguous` unless - /// exactly one of `beacon` and `beaconPerNetwork` is set. + /// @return The one entry of `beaconPerNetwork` for `chainId`, refusing `RegistryBeaconProxyNoBeaconOnNetwork` for + /// none or several. function beaconOnNetwork(RegistryBeaconProxyParams memory params, uint256 chainId) internal pure returns (RegistryBeaconOnNetwork memory) { - if ((params.beacon == address(0)) == (params.beaconPerNetwork.length == 0)) { - revert RegistryBeaconProxyBeaconAmbiguous(); - } - if (params.beaconPerNetwork.length == 0) { - return RegistryBeaconOnNetwork({chainId: chainId, beacon: params.beacon, codeHash: bytes32(0)}); - } uint256 found = type(uint256).max; for (uint256 i = 0; i < params.beaconPerNetwork.length; i++) { if (params.beaconPerNetwork[i].chainId == chainId) { diff --git a/test/lib/LibRegistryBeaconProxyTest.sol b/test/lib/LibRegistryBeaconProxyTest.sol index 1fc409e..6d0df09 100644 --- a/test/lib/LibRegistryBeaconProxyTest.sol +++ b/test/lib/LibRegistryBeaconProxyTest.sol @@ -46,13 +46,15 @@ library LibRegistryBeaconProxyTest { address registry = address(new ConfigRegistry()); address beacon = address(new UpgradeableBeacon(implementation, beaconOwner)); bind(vm, registry, beacon); + RegistryBeaconOnNetwork[] memory beaconPerNetwork = new RegistryBeaconOnNetwork[](1); + beaconPerNetwork[0] = + RegistryBeaconOnNetwork({chainId: block.chainid, beacon: beacon, codeHash: beacon.codehash}); return RegistryBeaconProxyParams({ factory: address(new TestCloneFactory()), registry: registry, authority: AUTHORITY, beaconName: BEACON_NAME, - beacon: beacon, - beaconPerNetwork: new RegistryBeaconOnNetwork[](0), + beaconPerNetwork: beaconPerNetwork, data: data, salt: salt }); @@ -71,14 +73,15 @@ library LibRegistryBeaconProxyTest { DeployDependency[] memory dependencies = new DeployDependency[](3); dependencies[0] = DeployDependency({deployedAddress: params.factory, runtimeCode: params.factory.code}); dependencies[1] = DeployDependency({deployedAddress: params.registry, runtimeCode: params.registry.code}); - dependencies[2] = DeployDependency({deployedAddress: params.beacon, runtimeCode: params.beacon.code}); + dependencies[2] = DeployDependency({ + deployedAddress: params.beaconPerNetwork[0].beacon, runtimeCode: params.beaconPerNetwork[0].beacon.code + }); return RegistryBeaconProxyDeploy({ suite: suite, factory: params.factory, registry: params.registry, authority: params.authority, beaconName: params.beaconName, - beacon: params.beacon, beaconPerNetwork: params.beaconPerNetwork, data: params.data, salt: params.salt, @@ -88,14 +91,14 @@ library LibRegistryBeaconProxyTest { } /// The generated runtime code of `params`'s proxy, its beacon serving the implementation the real beacon at - /// `params.beacon` serves. + /// `params.beaconPerNetwork[0]` serves. /// @param vm The Vm instance to generate with. - /// @param params The factory call, a real beacon at its `beacon`. + /// @param params The factory call, a real beacon at its `beaconPerNetwork[0]`. /// @return The proxy's runtime code. function runtimeOf(Vm vm, RegistryBeaconProxyParams memory params) internal returns (bytes memory) { - address implementation = UpgradeableBeacon(params.beacon).implementation(); - return LibRainDeployRegistryBeaconProxy.registryBeaconProxyRuntimeCode( - vm, params, implementation, implementation.code + address implementation = UpgradeableBeacon(params.beaconPerNetwork[0].beacon).implementation(); + return LibRainDeployRegistryBeaconProxy.registryBeaconProxyRuntimeCodeOnNetwork( + vm, params, block.chainid, implementation, implementation.code ); } } From 5264cd854bebbf228cf4a55fe198bc9273f42087 Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 12:26:51 +0000 Subject: [PATCH 06/43] Port registry beacon proxy tests to the per-chain beacon list Tests read each suite's beacon from beaconPerNetwork, declare only the factory and registry as dependencies, and cover beaconOnNetwork's missing and duplicate chain refusals, checkBeacon's per-chain binding and code-hash refusals, and the address ignoring the beacon list. Co-Authored-By: Claude Opus 5.5 --- test/lib/LibRegistryBeaconProxyTest.sol | 36 +- ...DeployVerifyChainRegistryBeaconProxy.t.sol | 3 +- ...loyCloneMechanismRegistryBeaconProxy.t.sol | 27 +- ...oneOnChainChecks.registryBeaconProxy.t.sol | 2 +- .../lib/LibRainDeployCloneOnChainChecks.t.sol | 5 +- ...loyCloneSnapshot.registryBeaconProxy.t.sol | 1 - .../LibRainDeployRegistryBeaconProxy.t.sol | 385 +++++++++++++++--- 7 files changed, 374 insertions(+), 85 deletions(-) diff --git a/test/lib/LibRegistryBeaconProxyTest.sol b/test/lib/LibRegistryBeaconProxyTest.sol index 6d0df09..e3690f3 100644 --- a/test/lib/LibRegistryBeaconProxyTest.sol +++ b/test/lib/LibRegistryBeaconProxyTest.sol @@ -32,7 +32,7 @@ library LibRegistryBeaconProxyTest { } /// A fresh `TestCloneFactory`, `ConfigRegistry` and `UpgradeableBeacon` serving `implementation`, the beacon - /// bound in the registry. + /// bound in the registry and listed for the current chain. /// @param vm The Vm instance to prank with. /// @param implementation The implementation the beacon serves. /// @param beaconOwner The beacon's owner. @@ -46,21 +46,34 @@ library LibRegistryBeaconProxyTest { address registry = address(new ConfigRegistry()); address beacon = address(new UpgradeableBeacon(implementation, beaconOwner)); bind(vm, registry, beacon); - RegistryBeaconOnNetwork[] memory beaconPerNetwork = new RegistryBeaconOnNetwork[](1); - beaconPerNetwork[0] = - RegistryBeaconOnNetwork({chainId: block.chainid, beacon: beacon, codeHash: beacon.codehash}); return RegistryBeaconProxyParams({ factory: address(new TestCloneFactory()), registry: registry, authority: AUTHORITY, beaconName: BEACON_NAME, - beaconPerNetwork: beaconPerNetwork, + beaconPerNetwork: onlyOn(block.chainid, beacon), data: data, salt: salt }); } - /// `params` declared, its factory, registry and beacon its dependencies with the code they hold now. + /// @param chainId The chain id. + /// @param beacon The beacon. + /// @return `beacon` on `chainId`, at the hash of the code it holds now. + function onNetwork(uint256 chainId, address beacon) internal view returns (RegistryBeaconOnNetwork memory) { + return RegistryBeaconOnNetwork({chainId: chainId, beacon: beacon, codeHash: beacon.codehash}); + } + + /// @param chainId The chain id. + /// @param beacon The beacon. + /// @return `onNetwork(chainId, beacon)` alone. + function onlyOn(uint256 chainId, address beacon) internal view returns (RegistryBeaconOnNetwork[] memory) { + RegistryBeaconOnNetwork[] memory beaconPerNetwork = new RegistryBeaconOnNetwork[](1); + beaconPerNetwork[0] = onNetwork(chainId, beacon); + return beaconPerNetwork; + } + + /// `params` declared, its factory and registry its dependencies with the code they hold now. /// @param suite The suite key. /// @param params The factory call. /// @param runtimeCode The proxy's declared runtime code. @@ -70,12 +83,9 @@ library LibRegistryBeaconProxyTest { view returns (RegistryBeaconProxyDeploy memory) { - DeployDependency[] memory dependencies = new DeployDependency[](3); + DeployDependency[] memory dependencies = new DeployDependency[](2); dependencies[0] = DeployDependency({deployedAddress: params.factory, runtimeCode: params.factory.code}); dependencies[1] = DeployDependency({deployedAddress: params.registry, runtimeCode: params.registry.code}); - dependencies[2] = DeployDependency({ - deployedAddress: params.beaconPerNetwork[0].beacon, runtimeCode: params.beaconPerNetwork[0].beacon.code - }); return RegistryBeaconProxyDeploy({ suite: suite, factory: params.factory, @@ -90,15 +100,15 @@ library LibRegistryBeaconProxyTest { }); } - /// The generated runtime code of `params`'s proxy, its beacon serving the implementation the real beacon at - /// `params.beaconPerNetwork[0]` serves. + /// The generated runtime code of `params`'s proxy on the chain of `params.beaconPerNetwork[0]`, its beacon + /// serving the implementation the real beacon there serves. /// @param vm The Vm instance to generate with. /// @param params The factory call, a real beacon at its `beaconPerNetwork[0]`. /// @return The proxy's runtime code. function runtimeOf(Vm vm, RegistryBeaconProxyParams memory params) internal returns (bytes memory) { address implementation = UpgradeableBeacon(params.beaconPerNetwork[0].beacon).implementation(); return LibRainDeployRegistryBeaconProxy.registryBeaconProxyRuntimeCodeOnNetwork( - vm, params, block.chainid, implementation, implementation.code + vm, params, params.beaconPerNetwork[0].chainId, implementation, implementation.code ); } } diff --git a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxy.t.sol b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxy.t.sol index 77ed315..5f03bbc 100644 --- a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxy.t.sol +++ b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxy.t.sol @@ -51,8 +51,9 @@ contract RainDeployVerifyChainRegistryBeaconProxyTest is PerNetworkCloneBeaconVe } RegistryBeaconProxyParams memory params = LibRegistryBeaconProxyTest.live(vm, addresses[1], OWNER, hex"deadbeef", bytes32(uint256(5))); + sBeacon = params.beaconPerNetwork[0].beacon; + params.beaconPerNetwork = LibRegistryBeaconProxyTest.onlyOn(PER_NETWORK_CLONE_POLYGON_CHAIN_ID, sBeacon); sParamsData = abi.encode(params); - sBeacon = params.beacon; vm.makePersistent(params.factory); vm.makePersistent(params.registry); vm.makePersistent(sBeacon); diff --git a/test/src/lib/LibRainDeployCloneMechanismRegistryBeaconProxy.t.sol b/test/src/lib/LibRainDeployCloneMechanismRegistryBeaconProxy.t.sol index c9dd6d2..eef93a4 100644 --- a/test/src/lib/LibRainDeployCloneMechanismRegistryBeaconProxy.t.sol +++ b/test/src/lib/LibRainDeployCloneMechanismRegistryBeaconProxy.t.sol @@ -52,13 +52,12 @@ contract LibRainDeployCloneMechanismRegistryBeaconProxyTest is Test { sDeploy = new ExampleCloneDeploy(); } - /// `LibRegistryBeaconProxyTest.live`, its factory, registry and beacon declared external deployments of `sDeploy`. + /// `LibRegistryBeaconProxyTest.live`, its factory and registry declared external deployments of `sDeploy`. function liveParams() internal returns (RegistryBeaconProxyParams memory) { RegistryBeaconProxyParams memory params = LibRegistryBeaconProxyTest.live(vm, address(new MockCloneableV2()), address(this), TEST_DATA, TEST_SALT); sDeploy.addExternalDeployment(LibExternalDeployments.deployedNow(params.factory)); sDeploy.addExternalDeployment(LibExternalDeployments.deployedNow(params.registry)); - sDeploy.addExternalDeployment(LibExternalDeployments.deployedNow(params.beacon)); return params; } @@ -84,16 +83,15 @@ contract LibRainDeployCloneMechanismRegistryBeaconProxyTest is Test { return LibRainDeployCloneMechanism.appendExtendedNetworks(suite, extended); } - function testRegistryBeaconProxyCandidateDerivesEveryFieldFromTheDeclaration(RegistryBeaconProxyDeploy memory proxy) - external - pure - { + function testRegistryBeaconProxyCandidateDerivesEveryFieldFromTheDeclaration( + RegistryBeaconProxyDeploy memory proxy, + address beacon + ) external pure { RegistryBeaconProxyParams memory params = RegistryBeaconProxyParams({ factory: proxy.factory, registry: proxy.registry, authority: proxy.authority, beaconName: proxy.beaconName, - beacon: proxy.beacon, beaconPerNetwork: proxy.beaconPerNetwork, data: proxy.data, salt: proxy.salt @@ -117,7 +115,7 @@ contract LibRainDeployCloneMechanismRegistryBeaconProxyTest is Test { assertNotEq( snapshot.storedDeployedAddress, LibRainDeployBeaconProxy.beaconProxyDeployedAddress( - CloneParams({factory: proxy.factory, implementation: proxy.beacon, data: proxy.data, salt: proxy.salt}) + CloneParams({factory: proxy.factory, implementation: beacon, data: proxy.data, salt: proxy.salt}) ) ); } @@ -269,8 +267,9 @@ contract LibRainDeployCloneMechanismRegistryBeaconProxyTest is Test { function testRegistryBeaconProxyCreationCodeOfAnotherMechanismIsRefused() external { RegistryBeaconProxyParams memory params = liveParams(); DeploySuite memory suite = suiteOf(params); - expectCreationCodeRefused(suite, LibRainDeployBeaconProxy.beaconProxyCreationCode(params.beacon)); - expectCreationCodeRefused(suite, LibRainDeployClone.cloneCreationCode(params.beacon)); + address beacon = params.beaconPerNetwork[0].beacon; + expectCreationCodeRefused(suite, LibRainDeployBeaconProxy.beaconProxyCreationCode(beacon)); + expectCreationCodeRefused(suite, LibRainDeployClone.cloneCreationCode(beacon)); expectCreationCodeRefused(suite, ""); } @@ -306,7 +305,7 @@ contract LibRainDeployCloneMechanismRegistryBeaconProxyTest is Test { abi.encodeWithSelector( LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyBeaconMismatch.selector, LibRainDeploy.ARBITRUM_ONE, - params.beacon, + params.beaconPerNetwork[0].beacon, otherBeacon ) ); @@ -326,11 +325,11 @@ contract LibRainDeployCloneMechanismRegistryBeaconProxyTest is Test { function testRegistryBeaconProxySuiteMissingADependencyIsRefused() external { RegistryBeaconProxyParams memory params = liveParams(); DeploySuite memory declared = suiteOf(params); - address[3] memory required = [params.factory, params.registry, params.beacon]; + address[2] memory required = [params.factory, params.registry]; for (uint256 missing = 0; missing < required.length; missing++) { DeploySuite memory suite = abi.decode(abi.encode(declared), (DeploySuite)); - DeployDependency[] memory kept = new DeployDependency[](2); + DeployDependency[] memory kept = new DeployDependency[](1); uint256 k = 0; for (uint256 i = 0; i < declared.dependencies.length; i++) { if (declared.dependencies[i].deployedAddress != required[missing]) { @@ -338,7 +337,7 @@ contract LibRainDeployCloneMechanismRegistryBeaconProxyTest is Test { k++; } } - assertEq(k, 2); + assertEq(k, 1); suite.dependencies = kept; bytes memory refusal = diff --git a/test/src/lib/LibRainDeployCloneOnChainChecks.registryBeaconProxy.t.sol b/test/src/lib/LibRainDeployCloneOnChainChecks.registryBeaconProxy.t.sol index c1e11e7..b0769ee 100644 --- a/test/src/lib/LibRainDeployCloneOnChainChecks.registryBeaconProxy.t.sol +++ b/test/src/lib/LibRainDeployCloneOnChainChecks.registryBeaconProxy.t.sol @@ -58,7 +58,7 @@ contract LibRainDeployCloneOnChainChecksRegistryBeaconProxyTest is Test { abi.encodeWithSelector( LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyBeaconMismatch.selector, LibRainDeploy.ARBITRUM_ONE, - params.beacon, + params.beaconPerNetwork[0].beacon, bound ) ); diff --git a/test/src/lib/LibRainDeployCloneOnChainChecks.t.sol b/test/src/lib/LibRainDeployCloneOnChainChecks.t.sol index 43ac7bb..3220a79 100644 --- a/test/src/lib/LibRainDeployCloneOnChainChecks.t.sol +++ b/test/src/lib/LibRainDeployCloneOnChainChecks.t.sol @@ -90,6 +90,7 @@ contract LibRainDeployCloneOnChainChecksBroadcastSeatTest is Test { LibRegistryBeaconProxyTest.live( vm, address(new MockCloneableV2()), beaconOwner, hex"deadbeef", bytes32(uint256(5)) ); + params.beaconPerNetwork[0].chainId = 42161; DeploySuite memory suite = LibRainDeployCloneMechanism.registryBeaconProxyCandidate( LibRegistryBeaconProxyTest.declared( @@ -120,7 +121,9 @@ contract LibRainDeployCloneOnChainChecksBroadcastSeatTest is Test { function testBroadcastSeatRefusesARegistryBeaconProxyWhoseDeclaredBeaconTheDeployKeyOwns() external { (RegistryBeaconProxyParams memory params, DeploySuite memory suite) = registrySuite(DEPLOYER); - vm.expectRevert(abi.encodeWithSelector(RegistryBeaconOwnedByDeployKey.selector, 42161, params.beacon)); + vm.expectRevert( + abi.encodeWithSelector(RegistryBeaconOwnedByDeployKey.selector, 42161, params.beaconPerNetwork[0].beacon) + ); this.checkRegistryBroadcastSeat(suite, OWNER); } diff --git a/test/src/lib/LibRainDeployCloneSnapshot.registryBeaconProxy.t.sol b/test/src/lib/LibRainDeployCloneSnapshot.registryBeaconProxy.t.sol index c0cb0ec..a6efd27 100644 --- a/test/src/lib/LibRainDeployCloneSnapshot.registryBeaconProxy.t.sol +++ b/test/src/lib/LibRainDeployCloneSnapshot.registryBeaconProxy.t.sol @@ -226,7 +226,6 @@ contract LibRainDeployCloneSnapshotRegistryBeaconProxyTest is Test, RainDeploySu ); sExternalDeployments.push(LibExternalDeployments.deployedNow(params.factory)); sExternalDeployments.push(LibExternalDeployments.deployedNow(params.registry)); - sExternalDeployments.push(LibExternalDeployments.deployedNow(params.beacon)); DeploySuite memory suite = LibRainDeployCloneMechanism.registryBeaconProxyCandidate( LibRegistryBeaconProxyTest.declared( diff --git a/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol b/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol index 66e60a6..484a07f 100644 --- a/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol +++ b/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol @@ -6,7 +6,7 @@ import {Test} from "forge-std-1.17.0/src/Test.sol"; import {UpgradeableBeacon} from "@openzeppelin-contracts-5.7.0/proxy/beacon/UpgradeableBeacon.sol"; import {ICloneableFactoryV7} from "../../../src/interface/ICloneableFactoryV7.sol"; import {REGISTRY_BEACON_PROXY_CREATION_CODE} from "../../../src/generated/RegistryBeaconProxy.sol"; -import {DelegatedBeacon} from "../../../src/lib/LibICloneableFactoryV5.sol"; +import {DelegatedBeacon, ZeroBeaconCodeSize} from "../../../src/lib/LibICloneableFactoryV5.sol"; import {BeaconBindingTypeMismatch} from "../../../src/lib/LibICloneableFactoryV7.sol"; import {TestCloneFactory} from "../../../src/test/TestCloneFactory.sol"; import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; @@ -24,6 +24,7 @@ import {MockDirtyOwnerCloneable} from "../../concrete/MockDirtyOwnerCloneable.so import {MockLongOwnerCloneable} from "../../concrete/MockLongOwnerCloneable.sol"; import {MockMisansweringOwnerCloneable} from "../../concrete/MockMisansweringOwnerCloneable.sol"; import {MockOriginOwnedCloneable} from "../../concrete/MockOriginOwnedCloneable.sol"; +import {MockOwnable2StepBeacon} from "../../concrete/MockOwnable2StepBeacon.sol"; /// @title LibRainDeployRegistryBeaconProxyTest /// @notice `LibRainDeployRegistryBeaconProxy`'s derivations, generator and deploy step, against a real @@ -35,6 +36,8 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { address constant DEPLOYER = address(0xD3910E8); + address constant UNLIVED_BEACON = address(0xBEAC0); + function externalDeployStep(string memory network, address deployer, bytes memory paramsData) external returns (address) @@ -44,11 +47,23 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { function externalRuntimeCode( RegistryBeaconProxyParams memory params, + address beacon, address implementation, bytes memory implementationCode ) external returns (bytes memory) { return LibRainDeployRegistryBeaconProxy.registryBeaconProxyRuntimeCode( - vm, params, implementation, implementationCode + vm, params, beacon, implementation, implementationCode + ); + } + + function externalRuntimeCodeOnNetwork( + RegistryBeaconProxyParams memory params, + uint256 chainId, + address implementation, + bytes memory implementationCode + ) external returns (bytes memory) { + return LibRainDeployRegistryBeaconProxy.registryBeaconProxyRuntimeCodeOnNetwork( + vm, params, chainId, implementation, implementationCode ); } @@ -56,6 +71,14 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { LibRainDeployRegistryBeaconProxy.checkBeacon(network, params); } + function externalBeaconOnNetwork(RegistryBeaconProxyParams memory params, uint256 chainId) + external + pure + returns (RegistryBeaconOnNetwork memory) + { + return LibRainDeployRegistryBeaconProxy.beaconOnNetwork(params, chainId); + } + function liveParams(address implementation, bytes memory data) internal returns (RegistryBeaconProxyParams memory) { return LibRegistryBeaconProxyTest.live(vm, implementation, address(this), data, TEST_SALT); } @@ -66,20 +89,30 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { registry: address(0x12E6), authority: LibRegistryBeaconProxyTest.AUTHORITY, beaconName: LibRegistryBeaconProxyTest.BEACON_NAME, - beacon: address(0xBEAC0), beaconPerNetwork: new RegistryBeaconOnNetwork[](0), data: TEST_DATA, salt: TEST_SALT }); } + /// Three chains, each on its own beacon at its own address and code hash. + function threeChains() internal pure returns (RegistryBeaconOnNetwork[] memory) { + RegistryBeaconOnNetwork[] memory beaconPerNetwork = new RegistryBeaconOnNetwork[](3); + beaconPerNetwork[0] = + RegistryBeaconOnNetwork({chainId: 42161, beacon: address(0xBEAC1), codeHash: keccak256("arbitrum")}); + beaconPerNetwork[1] = + RegistryBeaconOnNetwork({chainId: 8453, beacon: address(0xBEAC2), codeHash: keccak256("base")}); + beaconPerNetwork[2] = + RegistryBeaconOnNetwork({chainId: 137, beacon: address(0xBEAC3), codeHash: keccak256("polygon")}); + return beaconPerNetwork; + } + function copy(RegistryBeaconProxyParams memory params) internal pure returns (RegistryBeaconProxyParams memory) { return RegistryBeaconProxyParams({ factory: params.factory, registry: params.registry, authority: params.authority, beaconName: params.beaconName, - beacon: params.beacon, beaconPerNetwork: params.beaconPerNetwork, data: params.data, salt: params.salt @@ -131,7 +164,7 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { ); } - function testRegistryBeaconProxyAddressMovesWithEveryCommittedInputButNotTheBeacon( + function testRegistryBeaconProxyAddressMovesWithEveryCommittedInput( RegistryBeaconProxyParams memory params, uint160 delta, bytes32 other @@ -162,11 +195,20 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { moved = copy(params); moved.data = abi.encodePacked(params.data, hex"00"); assertNotEq(LibRainDeployRegistryBeaconProxy.registryBeaconProxyDeployedAddress(moved), base, "data"); - moved = copy(params); - unchecked { - moved.beacon = address(uint160(params.beacon) + delta); - } - assertEq(LibRainDeployRegistryBeaconProxy.registryBeaconProxyDeployedAddress(moved), base, "beacon"); + } + + function testRegistryBeaconProxyAddressIsTheSameWhateverTheBeaconPerNetwork( + RegistryBeaconProxyParams memory params, + RegistryBeaconOnNetwork[] memory other + ) external pure { + address base = LibRainDeployRegistryBeaconProxy.registryBeaconProxyDeployedAddress(params); + RegistryBeaconProxyParams memory moved = copy(params); + moved.beaconPerNetwork = other; + assertEq(LibRainDeployRegistryBeaconProxy.registryBeaconProxyDeployedAddress(moved), base, "other list"); + moved.beaconPerNetwork = threeChains(); + assertEq(LibRainDeployRegistryBeaconProxy.registryBeaconProxyDeployedAddress(moved), base, "three chains"); + moved.beaconPerNetwork = new RegistryBeaconOnNetwork[](0); + assertEq(LibRainDeployRegistryBeaconProxy.registryBeaconProxyDeployedAddress(moved), base, "empty list"); } function testRegistryBeaconProxyArtifactPathResolvesToNothing() external view { @@ -197,14 +239,13 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { registry: registryAt, authority: LibRegistryBeaconProxyTest.AUTHORITY, beaconName: LibRegistryBeaconProxyTest.BEACON_NAME, - beacon: beaconAt, - beaconPerNetwork: new RegistryBeaconOnNetwork[](0), + beaconPerNetwork: LibRegistryBeaconProxyTest.onlyOn(block.chainid, beaconAt), data: data, salt: salt }); - bytes memory generated = LibRainDeployRegistryBeaconProxy.registryBeaconProxyRuntimeCode( - vm, params, address(implementation), address(implementation).code + bytes memory generated = LibRainDeployRegistryBeaconProxy.registryBeaconProxyRuntimeCodeOnNetwork( + vm, params, block.chainid, address(implementation), address(implementation).code ); assertEq(registryAt.code.length, 0, "registry left behind"); assertEq(beaconAt.code.length, 0, "beacon left behind"); @@ -224,57 +265,72 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { function testRegistryBeaconProxyRuntimeCodeCommitsToTheBeacon(uint160 delta) external { vm.assume(delta != 0); - RegistryBeaconProxyParams memory params = RegistryBeaconProxyParams({ - factory: address(0xFAC7), - registry: address(0x12E6), - authority: LibRegistryBeaconProxyTest.AUTHORITY, - beaconName: LibRegistryBeaconProxyTest.BEACON_NAME, - beacon: address(0xBEAC0), - beaconPerNetwork: new RegistryBeaconOnNetwork[](0), - data: TEST_DATA, - salt: TEST_SALT - }); + RegistryBeaconProxyParams memory params = unlivedParams(); MockCloneableV2 implementation = new MockCloneableV2(); bytes memory base = LibRainDeployRegistryBeaconProxy.registryBeaconProxyRuntimeCode( - vm, params, address(implementation), address(implementation).code + vm, params, UNLIVED_BEACON, address(implementation), address(implementation).code ); - RegistryBeaconProxyParams memory moved = copy(params); + address moved; unchecked { - moved.beacon = address(uint160(params.beacon) + delta); + moved = address(uint160(UNLIVED_BEACON) + delta); } vm.assume( - uint160(moved.beacon) > 0xffff && moved.beacon != params.registry && moved.beacon != address(implementation) - && moved.beacon.code.length == 0 + uint160(moved) > 0xffff && moved != params.registry && moved != address(implementation) + && moved.code.length == 0 ); - assumeNotForgeAddress(moved.beacon); + assumeNotForgeAddress(moved); assertNotEq( LibRainDeployRegistryBeaconProxy.registryBeaconProxyRuntimeCode( - vm, moved, address(implementation), address(implementation).code + vm, params, moved, address(implementation), address(implementation).code ), base ); } + function testRegistryBeaconProxyRuntimeCodeOnNetworkSimulatesEachChainsOwnBeacon() external { + RegistryBeaconProxyParams memory params = unlivedParams(); + params.beaconPerNetwork = threeChains(); + MockCloneableV2 implementation = new MockCloneableV2(); + for (uint256 i = 0; i < params.beaconPerNetwork.length; i++) { + assertEq( + this.externalRuntimeCodeOnNetwork( + params, params.beaconPerNetwork[i].chainId, address(implementation), address(implementation).code + ), + this.externalRuntimeCode( + params, params.beaconPerNetwork[i].beacon, address(implementation), address(implementation).code + ) + ); + } + assertNotEq( + this.externalRuntimeCodeOnNetwork(params, 42161, address(implementation), address(implementation).code), + this.externalRuntimeCodeOnNetwork(params, 8453, address(implementation), address(implementation).code) + ); + } + + function testRegistryBeaconProxyRuntimeCodeOnNetworkRefusesAChainNotListed(uint256 chainId) external { + RegistryBeaconProxyParams memory params = unlivedParams(); + params.beaconPerNetwork = threeChains(); + vm.assume(chainId != 42161 && chainId != 8453 && chainId != 137); + MockCloneableV2 implementation = new MockCloneableV2(); + vm.expectRevert( + abi.encodeWithSelector( + LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyNoBeaconOnNetwork.selector, chainId + ) + ); + this.externalRuntimeCodeOnNetwork(params, chainId, address(implementation), address(implementation).code); + } + function testRegistryBeaconProxyRuntimeCodeRefusesAnImplementationWithoutCode() external { - RegistryBeaconProxyParams memory params = RegistryBeaconProxyParams({ - factory: address(0xFAC7), - registry: address(0x12E6), - authority: LibRegistryBeaconProxyTest.AUTHORITY, - beaconName: LibRegistryBeaconProxyTest.BEACON_NAME, - beacon: address(0xBEAC0), - beaconPerNetwork: new RegistryBeaconOnNetwork[](0), - data: TEST_DATA, - salt: TEST_SALT - }); + RegistryBeaconProxyParams memory params = unlivedParams(); address implementation = address(0x1A9E); vm.expectRevert( abi.encodeWithSelector( LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyBeaconConstructionFailed.selector, - params.beacon, + UNLIVED_BEACON, implementation ) ); - this.externalRuntimeCode(params, implementation, ""); + this.externalRuntimeCode(params, UNLIVED_BEACON, implementation, ""); } function testRegistryBeaconProxyRuntimeCodeOutlastsABindingAfterTheClock(uint32 ahead) external { @@ -283,7 +339,7 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { bytes memory expected = LibRegistryBeaconProxyTest.runtimeOf(vm, params); uint256 moment = block.timestamp; vm.warp(moment + ahead); - LibRegistryBeaconProxyTest.bind(vm, params.registry, params.beacon); + LibRegistryBeaconProxyTest.bind(vm, params.registry, params.beaconPerNetwork[0].beacon); vm.warp(moment); assertEq(LibRegistryBeaconProxyTest.runtimeOf(vm, params), expected); assertEq(block.timestamp, moment, "clock left moved"); @@ -293,12 +349,12 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { RegistryBeaconProxyParams memory params = unlivedParams(); MockCloneableV2 deployed = new MockCloneableV2(); bytes memory expected = LibRainDeployRegistryBeaconProxy.registryBeaconProxyRuntimeCode( - vm, params, address(deployed), address(deployed).code + vm, params, UNLIVED_BEACON, address(deployed), address(deployed).code ); address implementation = address(0x1A9E); assertEq( LibRainDeployRegistryBeaconProxy.registryBeaconProxyRuntimeCode( - vm, params, implementation, address(deployed).code + vm, params, UNLIVED_BEACON, implementation, address(deployed).code ), expected ); @@ -309,7 +365,7 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { RegistryBeaconProxyParams memory params = unlivedParams(); MockCloneableV2 implementation = new MockCloneableV2(); vm.mockCall( - params.beacon, + UNLIVED_BEACON, abi.encodeWithSelector(UpgradeableBeacon.implementation.selector), abi.encode(address(0x1A9E)) ); @@ -321,7 +377,7 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { params.beaconName ) ); - this.externalRuntimeCode(params, address(implementation), address(implementation).code); + this.externalRuntimeCode(params, UNLIVED_BEACON, address(implementation), address(implementation).code); } function testCheckBeaconAcceptsTheBoundBeacon() external { @@ -331,9 +387,9 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { function testCheckBeaconRefusesAnotherBeacon(address declared) external { RegistryBeaconProxyParams memory params = liveParams(address(new MockCloneableV2()), TEST_DATA); - vm.assume(declared != params.beacon); - address bound = params.beacon; - params.beacon = declared; + address bound = params.beaconPerNetwork[0].beacon; + vm.assume(declared != bound); + params.beaconPerNetwork[0].beacon = declared; vm.expectRevert( abi.encodeWithSelector( LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyBeaconMismatch.selector, @@ -345,6 +401,222 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { this.externalCheckBeacon(LibRainDeploy.ARBITRUM_ONE, params); } + function testBeaconOnNetworkAnswersEachChainsOwnEntry() external view { + RegistryBeaconProxyParams memory params = unlivedParams(); + params.beaconPerNetwork = threeChains(); + for (uint256 i = 0; i < params.beaconPerNetwork.length; i++) { + assertEq( + abi.encode(this.externalBeaconOnNetwork(params, params.beaconPerNetwork[i].chainId)), + abi.encode(params.beaconPerNetwork[i]) + ); + } + } + + function testBeaconOnNetworkRefusesAChainNotListed(uint256 chainId) external { + RegistryBeaconProxyParams memory params = unlivedParams(); + params.beaconPerNetwork = threeChains(); + vm.assume(chainId != 42161 && chainId != 8453 && chainId != 137); + vm.expectRevert( + abi.encodeWithSelector( + LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyNoBeaconOnNetwork.selector, chainId + ) + ); + this.externalBeaconOnNetwork(params, chainId); + } + + function testBeaconOnNetworkRefusesAnEmptyList(uint256 chainId) external { + vm.expectRevert( + abi.encodeWithSelector( + LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyNoBeaconOnNetwork.selector, chainId + ) + ); + this.externalBeaconOnNetwork(unlivedParams(), chainId); + } + + /// A chain listed twice is refused whether the entries agree or not, and wherever the second one sits. + function testBeaconOnNetworkRefusesAChainListedTwice(uint8 duplicated, uint8 at, bool same) external { + RegistryBeaconOnNetwork[] memory three = threeChains(); + RegistryBeaconOnNetwork memory twice = three[duplicated % 3]; + if (!same) { + twice = RegistryBeaconOnNetwork({ + chainId: twice.chainId, beacon: address(0xBEAC4), codeHash: keccak256("other") + }); + } + RegistryBeaconOnNetwork[] memory four = new RegistryBeaconOnNetwork[](4); + uint256 insertAt = at % 4; + uint256 k = 0; + for (uint256 i = 0; i < 4; i++) { + four[i] = i == insertAt ? twice : three[k++]; + } + RegistryBeaconProxyParams memory params = unlivedParams(); + params.beaconPerNetwork = four; + vm.expectRevert( + abi.encodeWithSelector( + LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyNoBeaconOnNetwork.selector, twice.chainId + ) + ); + this.externalBeaconOnNetwork(params, twice.chainId); + } + + /// Three chains, each binding the name to its own live beacon: on each the check passes, and refuses a binding to + /// another chain's beacon naming the one this chain declares. + function testCheckBeaconReadsTheCurrentChainsBeacon() external { + RegistryBeaconProxyParams memory params = liveParams(address(new MockCloneableV2()), TEST_DATA); + uint256[3] memory chainIds = [uint256(42161), 8453, 137]; + address[3] memory beacons = [ + address(new UpgradeableBeacon(address(new MockCloneableV2()), address(this))), + address(new MockOwnable2StepBeacon(address(new MockCloneableV2()), address(this))), + address(new UpgradeableBeacon(address(new MockCloneableV2()), address(0xB0B))) + ]; + params.beaconPerNetwork = new RegistryBeaconOnNetwork[](3); + for (uint256 i = 0; i < 3; i++) { + params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.onNetwork(chainIds[i], beacons[i]); + } + for (uint256 i = 0; i < 3; i++) { + vm.chainId(chainIds[i]); + vm.warp(block.timestamp + 1); + LibRegistryBeaconProxyTest.bind(vm, params.registry, beacons[i]); + this.externalCheckBeacon(LibRainDeploy.ARBITRUM_ONE, params); + + address other = beacons[(i + 1) % 3]; + vm.warp(block.timestamp + 1); + LibRegistryBeaconProxyTest.bind(vm, params.registry, other); + vm.expectRevert( + abi.encodeWithSelector( + LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyBeaconMismatch.selector, + LibRainDeploy.ARBITRUM_ONE, + beacons[i], + other + ) + ); + this.externalCheckBeacon(LibRainDeploy.ARBITRUM_ONE, params); + } + } + + function testCheckBeaconRefusesAChainNotListed(uint64 chainId) external { + RegistryBeaconProxyParams memory params = liveParams(address(new MockCloneableV2()), TEST_DATA); + vm.assume(chainId != 0 && chainId != block.chainid); + vm.chainId(chainId); + vm.expectRevert( + abi.encodeWithSelector( + LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyNoBeaconOnNetwork.selector, chainId + ) + ); + this.externalCheckBeacon(LibRainDeploy.ARBITRUM_ONE, params); + } + + function testCheckBeaconRefusesTheCurrentChainListedTwice() external { + RegistryBeaconProxyParams memory params = liveParams(address(new MockCloneableV2()), TEST_DATA); + RegistryBeaconOnNetwork[] memory twice = new RegistryBeaconOnNetwork[](2); + twice[0] = params.beaconPerNetwork[0]; + twice[1] = params.beaconPerNetwork[0]; + params.beaconPerNetwork = twice; + vm.expectRevert( + abi.encodeWithSelector( + LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyNoBeaconOnNetwork.selector, block.chainid + ) + ); + this.externalCheckBeacon(LibRainDeploy.ARBITRUM_ONE, params); + } + + function testCheckBeaconRefusesACodeHashMismatch(bytes32 declared) external { + RegistryBeaconProxyParams memory params = liveParams(address(new MockCloneableV2()), TEST_DATA); + address beacon = params.beaconPerNetwork[0].beacon; + vm.assume(declared != beacon.codehash); + params.beaconPerNetwork[0].codeHash = declared; + vm.expectRevert( + abi.encodeWithSelector( + LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyBeaconCodeHashMismatch.selector, + LibRainDeploy.ARBITRUM_ONE, + beacon, + declared, + beacon.codehash + ) + ); + this.externalCheckBeacon(LibRainDeploy.ARBITRUM_ONE, params); + } + + function testCheckBeaconRefusesABeaconWhoseCodeChanged() external { + RegistryBeaconProxyParams memory params = liveParams(address(new MockCloneableV2()), TEST_DATA); + address beacon = params.beaconPerNetwork[0].beacon; + bytes32 declared = beacon.codehash; + vm.etch(beacon, type(MockOwnable2StepBeacon).runtimeCode); + vm.expectRevert( + abi.encodeWithSelector( + LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyBeaconCodeHashMismatch.selector, + LibRainDeploy.ARBITRUM_ONE, + beacon, + declared, + keccak256(type(MockOwnable2StepBeacon).runtimeCode) + ) + ); + this.externalCheckBeacon(LibRainDeploy.ARBITRUM_ONE, params); + } + + function testCheckBeaconRefusesABoundBeaconWithoutCode() external { + RegistryBeaconProxyParams memory params = liveParams(address(new MockCloneableV2()), TEST_DATA); + address beacon = params.beaconPerNetwork[0].beacon; + bytes32 declared = beacon.codehash; + vm.etch(beacon, ""); + vm.expectRevert( + abi.encodeWithSelector( + LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyBeaconCodeHashMismatch.selector, + LibRainDeploy.ARBITRUM_ONE, + beacon, + declared, + beacon.codehash + ) + ); + this.externalCheckBeacon(LibRainDeploy.ARBITRUM_ONE, params); + } + + /// A beacon without code is refused even when it is declared at the code hash it has. + function testRegistryBeaconProxyDeployStepRefusesABeaconWithoutCodeDeclaredAtItsHash(address codeless) external { + RegistryBeaconProxyParams memory params = liveParams(address(new MockCloneableV2()), TEST_DATA); + assumeNotForgeAddress(codeless); + vm.assume(codeless.code.length == 0 && uint160(codeless) > 0xffff); + vm.warp(block.timestamp + 1); + LibRegistryBeaconProxyTest.bind(vm, params.registry, codeless); + params.beaconPerNetwork = LibRegistryBeaconProxyTest.onlyOn(block.chainid, codeless); + address expected = LibRainDeployRegistryBeaconProxy.registryBeaconProxyDeployedAddress(params); + vm.expectRevert(abi.encodeWithSelector(ZeroBeaconCodeSize.selector)); + this.externalDeployStep(LibRainDeploy.ARBITRUM_ONE, DEPLOYER, abi.encode(params)); + assertEq(expected.code.length, 0); + } + + function testRegistryBeaconProxyDeployStepRefusesACodeHashMismatch(bytes32 declared) external { + RegistryBeaconProxyParams memory params = liveParams(address(new MockCloneableV2()), TEST_DATA); + address beacon = params.beaconPerNetwork[0].beacon; + vm.assume(declared != beacon.codehash); + params.beaconPerNetwork[0].codeHash = declared; + address expected = LibRainDeployRegistryBeaconProxy.registryBeaconProxyDeployedAddress(params); + vm.expectRevert( + abi.encodeWithSelector( + LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyBeaconCodeHashMismatch.selector, + LibRainDeploy.ARBITRUM_ONE, + beacon, + declared, + beacon.codehash + ) + ); + this.externalDeployStep(LibRainDeploy.ARBITRUM_ONE, DEPLOYER, abi.encode(params)); + assertEq(expected.code.length, 0); + } + + function testRegistryBeaconProxyDeployStepRefusesAChainNotListed(uint64 chainId) external { + RegistryBeaconProxyParams memory params = liveParams(address(new MockCloneableV2()), TEST_DATA); + vm.assume(chainId != 0 && chainId != block.chainid); + vm.chainId(chainId); + address expected = LibRainDeployRegistryBeaconProxy.registryBeaconProxyDeployedAddress(params); + vm.expectRevert( + abi.encodeWithSelector( + LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyNoBeaconOnNetwork.selector, chainId + ) + ); + this.externalDeployStep(LibRainDeploy.ARBITRUM_ONE, DEPLOYER, abi.encode(params)); + assertEq(expected.code.length, 0); + } + function testRegistryBeaconProxyDeployStepDeploysTheDerivedAddress() external { RegistryBeaconProxyParams memory params = liveParams(address(new MockCloneableV2()), TEST_DATA); address deployed = this.externalDeployStep(LibRainDeploy.ARBITRUM_ONE, DEPLOYER, abi.encode(params)); @@ -405,7 +677,7 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { abi.encodeWithSelector( LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyBeaconMismatch.selector, LibRainDeploy.ARBITRUM_ONE, - params.beacon, + params.beaconPerNetwork[0].beacon, bound ) ); @@ -418,7 +690,9 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { vm.warp(block.timestamp + 1); vm.prank(params.authority); IConfigRegistryV5(params.registry) - .registerV5(params.authority, params.beaconName, "uint256", abi.encode(params.beacon), ""); + .registerV5( + params.authority, params.beaconName, "uint256", abi.encode(params.beaconPerNetwork[0].beacon), "" + ); address expected = LibRainDeployRegistryBeaconProxy.registryBeaconProxyDeployedAddress(params); vm.expectRevert( abi.encodeWithSelector( @@ -433,9 +707,12 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { assertEq(expected.code.length, 0); } + /// Refused even when declared at the code hash the delegation gives it. function testRegistryBeaconProxyDeployStepRefusesADelegatedBeacon(address delegate) external { RegistryBeaconProxyParams memory params = liveParams(address(new MockCloneableV2()), TEST_DATA); - vm.etch(params.beacon, abi.encodePacked(hex"ef0100", delegate)); + address beacon = params.beaconPerNetwork[0].beacon; + vm.etch(beacon, abi.encodePacked(hex"ef0100", delegate)); + params.beaconPerNetwork[0].codeHash = beacon.codehash; address expected = LibRainDeployRegistryBeaconProxy.registryBeaconProxyDeployedAddress(params); vm.expectRevert(abi.encodeWithSelector(DelegatedBeacon.selector)); this.externalDeployStep(LibRainDeploy.ARBITRUM_ONE, DEPLOYER, abi.encode(params)); From 6ca3c4b4edffdeeeee0a079954d1da8061653d53 Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 12:29:46 +0000 Subject: [PATCH 07/43] Test per-chain beacons on registry-beacon-proxy suites (WIP, uncompiled) Co-Authored-By: Claude Opus 5.5 --- ...DeployVerifyChainRegistryBeaconProxy.t.sol | 32 +++ ...nRegistryBeaconProxyBeaconPerNetwork.t.sol | 240 ++++++++++++++++++ .../lib/LibRainDeployCloneOnChainChecks.t.sol | 85 ++++++- .../LibRainDeployRegistryBeaconProxy.t.sol | 49 ++++ 4 files changed, 405 insertions(+), 1 deletion(-) create mode 100644 test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol diff --git a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxy.t.sol b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxy.t.sol index 5f03bbc..a4c7a5b 100644 --- a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxy.t.sol +++ b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxy.t.sol @@ -9,6 +9,7 @@ import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; import {LibRainDeployCloneMechanism} from "../../../src/lib/LibRainDeployCloneMechanism.sol"; import { LibRainDeployRegistryBeaconProxy, + RegistryBeaconOnNetwork, RegistryBeaconProxyParams } from "../../../src/lib/LibRainDeployRegistryBeaconProxy.sol"; import { @@ -87,10 +88,41 @@ contract RainDeployVerifyChainRegistryBeaconProxyTest is PerNetworkCloneBeaconVe ); } + /// The matrix on local forks over `suite` alone, required on Arbitrum One and Polygon. + function externalCheckOnEveryLocalFork(DeploySuite memory suite) external { + DeploySuite[] memory suites = new DeploySuite[](1); + suites[0] = suite; + DeployDeclaration memory d = declaration(); + suites[0].networks = d.networks; + checkDeployedOnNetworks( + d, Vm(address(new LocalForkVm())), LibRainDeploy.declaredNetworkConfigs(d.networks), suites + ); + } + function testRegistryBeaconProxyWhoseBindingResolvesToItsDeclaredBeaconPasses() external { this.externalCheckOnLocalForks(liveProxySuite()); } + function testRegistryBeaconProxyWithOneBeaconListedForEachChainPassesOnEach() external { + RegistryBeaconProxyParams memory params = storedParams(); + RegistryBeaconOnNetwork[] memory both = new RegistryBeaconOnNetwork[](2); + both[0] = LibRegistryBeaconProxyTest.onNetwork(PER_NETWORK_CLONE_ARBITRUM_ONE_CHAIN_ID, sBeacon); + both[1] = LibRegistryBeaconProxyTest.onNetwork(PER_NETWORK_CLONE_POLYGON_CHAIN_ID, sBeacon); + params.beaconPerNetwork = both; + sParamsData = abi.encode(params); + this.externalCheckOnEveryLocalFork(liveProxySuite()); + } + + function testRegistryBeaconProxyRequiredOnAChainItDoesNotListIsRefused() external { + vm.expectRevert( + abi.encodeWithSelector( + LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyNoBeaconOnNetwork.selector, + PER_NETWORK_CLONE_ARBITRUM_ONE_CHAIN_ID + ) + ); + this.externalCheckOnEveryLocalFork(liveProxySuite()); + } + function testRegistryBeaconProxyWhoseBindingResolvesToAnotherBeaconIsRefused() external { DeploySuite memory suite = liveProxySuite(); address other = diff --git a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol new file mode 100644 index 0000000..05535cb --- /dev/null +++ b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol @@ -0,0 +1,240 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {Vm} from "forge-std-1.17.0/src/Vm.sol"; +import {UpgradeableBeacon} from "@openzeppelin-contracts-5.7.0/proxy/beacon/UpgradeableBeacon.sol"; +import { + DeployDeclaration, + DeployDependency, + DeploySuite +} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; +import {RainDeployVerifyChain} from "rain-deploy-0.1.43/src/abstract/RainDeployVerifyChain.sol"; +import {LibRainDeploy, SupportedNetwork} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; +import {ICloneableFactoryV7} from "../../../src/interface/ICloneableFactoryV7.sol"; +import {LibRainDeployCloneMechanism} from "../../../src/lib/LibRainDeployCloneMechanism.sol"; +import { + LibRainDeployRegistryBeaconProxy, + RegistryBeaconOnNetwork, + RegistryBeaconProxyParams +} from "../../../src/lib/LibRainDeployRegistryBeaconProxy.sol"; +import {LocalForkVm} from "../../concrete/LocalForkVm.sol"; +import {MockCloneableV2} from "../../concrete/MockCloneableV2.sol"; +import {MockOwnable2StepBeacon} from "../../concrete/MockOwnable2StepBeacon.sol"; +import {LibRegistryBeaconProxyTest} from "../../lib/LibRegistryBeaconProxyTest.sol"; +import {LibExternalDeployments} from "../../lib/LibExternalDeployments.sol"; + +/// @title RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetworkTest +/// @notice The chain matrix, on local forks, over one registry beacon proxy suite on Arbitrum One, Base and Polygon, +/// each chain binding the name to its own beacon. +contract RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetworkTest is RainDeployVerifyChain { + string constant PROXY_SUITE = "registry-beacon-proxy@0_0_1"; + + bytes internal sParamsData; + + function storedParams() internal view returns (RegistryBeaconProxyParams memory) { + return abi.decode(sParamsData, (RegistryBeaconProxyParams)); + } + + function networks() internal pure returns (string[] memory) { + string[] memory names = new string[](3); + names[0] = LibRainDeploy.ARBITRUM_ONE; + names[1] = LibRainDeploy.BASE; + names[2] = LibRainDeploy.POLYGON; + return names; + } + + function declaration() internal view override returns (DeployDeclaration memory) { + RegistryBeaconProxyParams memory params = storedParams(); + DeployDeclaration memory d; + LibRainDeployDeclaration.extend(d); + LibRainDeployDeclaration.setNetworks(d, networks()); + LibRainDeployCloneMechanism.extend(d); + DeployDependency[] memory externals = new DeployDependency[](2); + externals[0] = LibExternalDeployments.deployedNow(params.factory); + externals[1] = LibExternalDeployments.deployedNow(params.registry); + LibExternalDeployments.add(d, externals); + return d; + } + + /// A factory and registry, and a beacon per network, each serving its own implementation: an `UpgradeableBeacon` + /// on Arbitrum One, a `MockOwnable2StepBeacon` on Base and an `UpgradeableBeacon` under another owner on Polygon. + function setUp() external { + RegistryBeaconProxyParams memory params = LibRegistryBeaconProxyTest.live( + vm, address(new MockCloneableV2()), address(this), hex"deadbeef", bytes32(uint256(5)) + ); + address[3] memory beacons = [ + params.beaconPerNetwork[0].beacon, + address(new MockOwnable2StepBeacon(address(new MockCloneableV2()), address(this))), + address(new UpgradeableBeacon(address(new MockCloneableV2()), address(0xB0B))) + ]; + SupportedNetwork[] memory configs = LibRainDeploy.declaredNetworkConfigs(networks()); + params.beaconPerNetwork = new RegistryBeaconOnNetwork[](3); + for (uint256 i = 0; i < 3; i++) { + params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.onNetwork(configs[i].chainId, beacons[i]); + } + sParamsData = abi.encode(params); + } + + function proxySuite(RegistryBeaconProxyParams memory params) internal returns (DeploySuite memory) { + return LibRainDeployCloneMechanism.registryBeaconProxyCandidate( + LibRegistryBeaconProxyTest.declared(PROXY_SUITE, params, LibRegistryBeaconProxyTest.runtimeOf(vm, params)) + ) + .snapshot; + } + + /// Selects `network`'s chain id and binds the name to `beacon` there. + function bindOn(RegistryBeaconProxyParams memory params, SupportedNetwork memory network, address beacon) + internal + { + vm.chainId(network.chainId); + vm.warp(block.timestamp + 1); + LibRegistryBeaconProxyTest.bind(vm, params.registry, beacon); + } + + /// The matrix on local forks over `suite` alone, required on `network`. + function externalCheckOnLocalForks(DeploySuite memory suite, string memory network) external { + DeploySuite[] memory suites = new DeploySuite[](1); + suites[0] = suite; + string[] memory required = new string[](1); + required[0] = network; + suites[0].networks = required; + DeployDeclaration memory d = declaration(); + checkDeployedOnNetworks( + d, Vm(address(new LocalForkVm())), LibRainDeploy.declaredNetworkConfigs(d.networks), suites + ); + } + + /// On each chain, from the same state: the name bound to that chain's beacon, the proxy simulated locally on that + /// chain is the one the factory deploys there, at the suite's one address, and the matrix passes the suite there. + function testOneSuiteOnItsOwnBeaconOnEachOfThreeChainsPassesOnEach() external { + RegistryBeaconProxyParams memory params = storedParams(); + DeploySuite memory suite = proxySuite(params); + SupportedNetwork[] memory configs = LibRainDeploy.declaredNetworkConfigs(networks()); + uint256 state = vm.snapshotState(); + for (uint256 i = 0; i < configs.length; i++) { + RegistryBeaconOnNetwork memory onNetwork = params.beaconPerNetwork[i]; + bindOn(params, configs[i], onNetwork.beacon); + address implementation = UpgradeableBeacon(onNetwork.beacon).implementation(); + bytes memory simulated = LibRainDeployRegistryBeaconProxy.registryBeaconProxyRuntimeCodeOnNetwork( + vm, params, configs[i].chainId, implementation, implementation.code + ); + address proxy = ICloneableFactoryV7(params.factory) + .registryBeaconProxy(params.registry, params.authority, params.beaconName, params.data, params.salt); + assertEq(proxy, suite.storedDeployedAddress, configs[i].name); + assertEq(proxy.code, simulated, configs[i].name); + assertEq(MockCloneableV2(proxy).sInitData(), params.data, configs[i].name); + this.externalCheckOnLocalForks(suite, configs[i].name); + assertTrue(vm.revertToState(state)); + } + } + + /// The suite's one address on every chain, the address a suite listing only one of its beacons has. + function testOneSuiteOverThreeChainsHasOneAddress() external { + RegistryBeaconProxyParams memory params = storedParams(); + DeploySuite memory suite = proxySuite(params); + RegistryBeaconProxyParams memory one = storedParams(); + one.beaconPerNetwork = LibRegistryBeaconProxyTest.onlyOn(42161, params.beaconPerNetwork[0].beacon); + address expected = proxySuite(one).storedDeployedAddress; + assertEq(suite.storedDeployedAddress, expected); + SupportedNetwork[] memory configs = LibRainDeploy.declaredNetworkConfigs(networks()); + DeployDeclaration memory d = declaration(); + for (uint256 i = 0; i < configs.length; i++) { + assertEq(LibRainDeployCloneMechanism.deployedAddress(d, suite, configs[i].chainId), expected); + } + } + + /// The proxy etched at its address on network `i`'s chain, the name bound to `beacon` there. + function liveOn(RegistryBeaconProxyParams memory params, DeploySuite memory suite, uint256 i, address beacon) + internal + { + bindOn(params, LibRainDeploy.declaredNetworkConfigs(networks())[i], beacon); + vm.etch(suite.storedDeployedAddress, suite.storedRuntimeCode); + } + + function testOneSuiteOverThreeChainsIsRefusedOnAChainBoundToAnotherChainsBeacon() external { + RegistryBeaconProxyParams memory params = storedParams(); + DeploySuite memory suite = proxySuite(params); + liveOn(params, suite, 1, params.beaconPerNetwork[2].beacon); + vm.expectRevert( + abi.encodeWithSelector( + LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyBeaconMismatch.selector, + LibRainDeploy.BASE, + params.beaconPerNetwork[1].beacon, + params.beaconPerNetwork[2].beacon + ) + ); + this.externalCheckOnLocalForks(suite, LibRainDeploy.BASE); + } + + function testOneSuiteOverThreeChainsIsRefusedOnAChainWhoseBeaconCodeChanged() external { + RegistryBeaconProxyParams memory params = storedParams(); + DeploySuite memory suite = proxySuite(params); + address beacon = params.beaconPerNetwork[1].beacon; + liveOn(params, suite, 1, beacon); + vm.etch(beacon, type(UpgradeableBeacon).runtimeCode); + vm.expectRevert( + abi.encodeWithSelector( + LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyBeaconCodeHashMismatch.selector, + LibRainDeploy.BASE, + beacon, + params.beaconPerNetwork[1].codeHash, + keccak256(type(UpgradeableBeacon).runtimeCode) + ) + ); + this.externalCheckOnLocalForks(suite, LibRainDeploy.BASE); + } + + function testOneSuiteOverThreeChainsIsRefusedOnAChainWhoseBeaconHasNoCode() external { + RegistryBeaconProxyParams memory params = storedParams(); + DeploySuite memory suite = proxySuite(params); + address beacon = params.beaconPerNetwork[2].beacon; + liveOn(params, suite, 2, beacon); + vm.etch(beacon, ""); + vm.expectRevert( + abi.encodeWithSelector( + LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyBeaconCodeHashMismatch.selector, + LibRainDeploy.POLYGON, + beacon, + params.beaconPerNetwork[2].codeHash, + beacon.codehash + ) + ); + this.externalCheckOnLocalForks(suite, LibRainDeploy.POLYGON); + } + + function testOneSuiteOverThreeChainsIsRefusedOnAChainItDoesNotList() external { + RegistryBeaconProxyParams memory params = storedParams(); + RegistryBeaconOnNetwork[] memory two = new RegistryBeaconOnNetwork[](2); + two[0] = params.beaconPerNetwork[0]; + two[1] = params.beaconPerNetwork[2]; + params.beaconPerNetwork = two; + DeploySuite memory suite = proxySuite(params); + liveOn(params, suite, 1, storedParams().beaconPerNetwork[1].beacon); + vm.expectRevert( + abi.encodeWithSelector( + LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyNoBeaconOnNetwork.selector, uint256(8453) + ) + ); + this.externalCheckOnLocalForks(suite, LibRainDeploy.BASE); + } + + function testOneSuiteOverThreeChainsIsRefusedOnAChainItListsTwice() external { + RegistryBeaconProxyParams memory params = storedParams(); + RegistryBeaconOnNetwork[] memory four = new RegistryBeaconOnNetwork[](4); + for (uint256 i = 0; i < 3; i++) { + four[i] = params.beaconPerNetwork[i]; + } + four[3] = params.beaconPerNetwork[1]; + params.beaconPerNetwork = four; + DeploySuite memory suite = proxySuite(params); + liveOn(params, suite, 1, four[1].beacon); + vm.expectRevert( + abi.encodeWithSelector( + LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyNoBeaconOnNetwork.selector, uint256(8453) + ) + ); + this.externalCheckOnLocalForks(suite, LibRainDeploy.BASE); + } +} diff --git a/test/src/lib/LibRainDeployCloneOnChainChecks.t.sol b/test/src/lib/LibRainDeployCloneOnChainChecks.t.sol index 3220a79..5134ccc 100644 --- a/test/src/lib/LibRainDeployCloneOnChainChecks.t.sol +++ b/test/src/lib/LibRainDeployCloneOnChainChecks.t.sol @@ -17,7 +17,12 @@ import { LibRainDeployCloneOnChainChecks, RegistryBeaconOwnedByDeployKey } from "../../../src/lib/LibRainDeployCloneOnChainChecks.sol"; -import {RegistryBeaconProxyParams} from "../../../src/lib/LibRainDeployRegistryBeaconProxy.sol"; +import {UpgradeableBeacon} from "@openzeppelin-contracts-5.7.0/proxy/beacon/UpgradeableBeacon.sol"; +import { + LibRainDeployRegistryBeaconProxy, + RegistryBeaconOnNetwork, + RegistryBeaconProxyParams +} from "../../../src/lib/LibRainDeployRegistryBeaconProxy.sol"; import {LibRegistryBeaconProxyTest} from "../../lib/LibRegistryBeaconProxyTest.sol"; import {MockCloneableV2} from "../../concrete/MockCloneableV2.sol"; @@ -131,4 +136,82 @@ contract LibRainDeployCloneOnChainChecksBroadcastSeatTest is Test { (, DeploySuite memory suite) = registrySuite(OWNER); this.checkRegistryBroadcastSeat(suite, DEPLOYER); } + + function checkRegistryBroadcastSeatOn(DeploySuite memory suite, uint256 chainId) external view { + LibRainDeployCloneOnChainChecks.checkBroadcastSeat(declaration(OWNER, OWNER), suite, chainId, DEPLOYER); + } + + /// `owners[i]` owns the beacon on `chainIds[i]`, each its own beacon. + function registrySuiteOver(uint256[] memory chainIds, address[] memory owners) + internal + returns (RegistryBeaconProxyParams memory, DeploySuite memory) + { + RegistryBeaconProxyParams memory params = LibRegistryBeaconProxyTest.live( + vm, address(new MockCloneableV2()), owners[0], hex"deadbeef", bytes32(uint256(5)) + ); + address first = params.beaconPerNetwork[0].beacon; + params.beaconPerNetwork = new RegistryBeaconOnNetwork[](chainIds.length); + for (uint256 i = 0; i < chainIds.length; i++) { + address beacon = i == 0 ? first : address(new UpgradeableBeacon(address(new MockCloneableV2()), owners[i])); + params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.onNetwork(chainIds[i], beacon); + } + DeploySuite memory suite = + LibRainDeployCloneMechanism.registryBeaconProxyCandidate( + LibRegistryBeaconProxyTest.declared( + "registry-beacon-proxy@0_0_1", params, LibRegistryBeaconProxyTest.runtimeOf(vm, params) + ) + ) + .snapshot; + return (params, suite); + } + + /// Three chains, each on its own beacon, the deploy key owning only Base's: refused on Base naming Base's beacon, + /// passed on the others, refused on a chain the suite does not list. + function testBroadcastSeatReadsEachChainsOwnRegistryBeacon() external { + uint256[] memory chainIds = new uint256[](3); + chainIds[0] = 42161; + chainIds[1] = 8453; + chainIds[2] = 137; + address[] memory owners = new address[](3); + owners[0] = OWNER; + owners[1] = DEPLOYER; + owners[2] = NEW_OWNER; + (RegistryBeaconProxyParams memory params, DeploySuite memory suite) = registrySuiteOver(chainIds, owners); + + this.checkRegistryBroadcastSeatOn(suite, 42161); + this.checkRegistryBroadcastSeatOn(suite, 137); + vm.expectRevert( + abi.encodeWithSelector(RegistryBeaconOwnedByDeployKey.selector, 8453, params.beaconPerNetwork[1].beacon) + ); + this.checkRegistryBroadcastSeatOn(suite, 8453); + vm.expectRevert( + abi.encodeWithSelector(LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyNoBeaconOnNetwork.selector, 1) + ); + this.checkRegistryBroadcastSeatOn(suite, 1); + } + + /// One beacon listed for each of two chains is read on each. + function testBroadcastSeatReadsOneRegistryBeaconListedPerChain() external { + (RegistryBeaconProxyParams memory params,) = registrySuite(DEPLOYER); + address beacon = params.beaconPerNetwork[0].beacon; + RegistryBeaconOnNetwork[] memory both = new RegistryBeaconOnNetwork[](2); + both[0] = LibRegistryBeaconProxyTest.onNetwork(42161, beacon); + both[1] = LibRegistryBeaconProxyTest.onNetwork(8453, beacon); + params.beaconPerNetwork = both; + DeploySuite memory suite = LibRainDeployCloneMechanism.registryBeaconProxyCandidate( + LibRegistryBeaconProxyTest.declared( + "registry-beacon-proxy@0_0_1", params, LibRegistryBeaconProxyTest.runtimeOf(vm, params) + ) + ) + .snapshot; + for (uint256 i = 0; i < both.length; i++) { + vm.expectRevert(abi.encodeWithSelector(RegistryBeaconOwnedByDeployKey.selector, both[i].chainId, beacon)); + this.checkRegistryBroadcastSeatOn(suite, both[i].chainId); + } + vm.prank(DEPLOYER); + UpgradeableBeacon(beacon).transferOwnership(OWNER); + for (uint256 i = 0; i < both.length; i++) { + this.checkRegistryBroadcastSeatOn(suite, both[i].chainId); + } + } } diff --git a/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol b/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol index 484a07f..6553640 100644 --- a/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol +++ b/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol @@ -625,6 +625,55 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { assertEq(MockCloneableV2(deployed).sInitData(), TEST_DATA); } + function testRegistryBeaconProxyDeployStepWithOneBeaconListedPerChainDeploysOneProxyOnEach() external { + RegistryBeaconProxyParams memory params = liveParams(address(new MockCloneableV2()), TEST_DATA); + address beacon = params.beaconPerNetwork[0].beacon; + uint256[3] memory chainIds = [uint256(42161), 8453, 137]; + params.beaconPerNetwork = new RegistryBeaconOnNetwork[](3); + for (uint256 i = 0; i < 3; i++) { + params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.onNetwork(chainIds[i], beacon); + } + bytes memory expectedCode = LibRegistryBeaconProxyTest.runtimeOf(vm, params); + address expected = LibRainDeployRegistryBeaconProxy.registryBeaconProxyDeployedAddress(params); + uint256 state = vm.snapshotState(); + for (uint256 i = 0; i < 3; i++) { + vm.chainId(chainIds[i]); + address deployed = this.externalDeployStep(LibRainDeploy.ARBITRUM_ONE, DEPLOYER, abi.encode(params)); + assertEq(deployed, expected); + assertEq(deployed.code, expectedCode); + assertTrue(vm.revertToState(state)); + } + } + + function testRegistryBeaconProxyDeployStepDeploysEachChainsOwnBeaconAtOneAddress() external { + RegistryBeaconProxyParams memory params = liveParams(address(new MockCloneableV2()), TEST_DATA); + uint256[3] memory chainIds = [uint256(42161), 8453, 137]; + address[3] memory beacons = [ + params.beaconPerNetwork[0].beacon, + address(new MockOwnable2StepBeacon(address(new MockCloneableV2()), address(this))), + address(new UpgradeableBeacon(address(new MockCloneableV2()), address(0xB0B))) + ]; + params.beaconPerNetwork = new RegistryBeaconOnNetwork[](3); + for (uint256 i = 0; i < 3; i++) { + params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.onNetwork(chainIds[i], beacons[i]); + } + address expected = LibRainDeployRegistryBeaconProxy.registryBeaconProxyDeployedAddress(params); + uint256 state = vm.snapshotState(); + for (uint256 i = 0; i < 3; i++) { + vm.chainId(chainIds[i]); + vm.warp(block.timestamp + 1); + LibRegistryBeaconProxyTest.bind(vm, params.registry, beacons[i]); + address implementation = UpgradeableBeacon(beacons[i]).implementation(); + bytes memory simulated = LibRainDeployRegistryBeaconProxy.registryBeaconProxyRuntimeCodeOnNetwork( + vm, params, chainIds[i], implementation, implementation.code + ); + address deployed = this.externalDeployStep(LibRainDeploy.ARBITRUM_ONE, DEPLOYER, abi.encode(params)); + assertEq(deployed, expected); + assertEq(deployed.code, simulated); + assertTrue(vm.revertToState(state)); + } + } + function testRegistryBeaconProxyDeployStepReturnsWhereTheFactoryDeployed() external { RegistryBeaconProxyParams memory params = liveParams(address(new MockCloneableV2()), TEST_DATA); address elsewhere = From 536ed16b8730f6344c131aa5498fbcad5af6f47b Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 14:06:32 +0000 Subject: [PATCH 08/43] Consume rain.deploy #415: local deploy steps and per-chain expected code (WIP) Co-Authored-By: Claude Opus 5.5 --- foundry.toml | 2 +- soldeer.lock | 7 ----- src/lib/LibRainDeployBeaconProxy.sol | 7 +++++ src/lib/LibRainDeployBeaconResolution.sol | 28 +++++++++++++++++--- src/lib/LibRainDeployClone.sol | 7 +++++ src/lib/LibRainDeployCloneMechanism.sol | 16 +++++++++++ src/lib/LibRainDeployRegistryBeaconProxy.sol | 15 +++++++++++ 7 files changed, 70 insertions(+), 12 deletions(-) diff --git a/foundry.toml b/foundry.toml index 602df24..32d32f9 100644 --- a/foundry.toml +++ b/foundry.toml @@ -52,7 +52,7 @@ forge-std = "1.17.0" # a bump that changes `src/generated/` needs a new interface version. "@openzeppelin-contracts" = "5.7.0" rain-sol-codegen = "0.1.39" -rain-deploy = "0.1.43" +rain-deploy = { version = "0.1.43", git = "https://github.com/rainlanguage/rain.deploy.git", rev = "1ae4dcd0c357748fa3b3eaa8c6abf80cca099c33" } # rain-deploy imports it by path. rain-extrospection = "0.1.31" # rain-extrospection imports it by path. diff --git a/soldeer.lock b/soldeer.lock index 14f63c2..0d1fd38 100644 --- a/soldeer.lock +++ b/soldeer.lock @@ -12,13 +12,6 @@ url = "https://soldeer-revisions.s3.amazonaws.com/forge-std/1_17_0_01-10-2026_10 checksum = "a77ad38d5fbef0ec10d1f4d191698e5fbaa2bffbee5d1aced91a39da5e9b908c" integrity = "fa706c8a7caf3426c90f75e6aafa3224b0a6c899b490800cf6944e4ec42f9344" -[[dependencies]] -name = "rain-deploy" -version = "0.1.43" -url = "https://soldeer-revisions.s3.amazonaws.com/rain-deploy/0_1_43_27-11-2026_16:25:33_rain.zip" -checksum = "6b3502113b36819382320351c569bc7dc76106b9dbb141f904e6e8f9f61b7c53" -integrity = "8bedc496af60801ae3c540b23d8b7b036df7145091215e8b2deee0674ba97b69" - [[dependencies]] name = "rain-extrospection" version = "0.1.31" diff --git a/src/lib/LibRainDeployBeaconProxy.sol b/src/lib/LibRainDeployBeaconProxy.sol index d48eb2b..55a8e25 100644 --- a/src/lib/LibRainDeployBeaconProxy.sol +++ b/src/lib/LibRainDeployBeaconProxy.sol @@ -176,4 +176,11 @@ library LibRainDeployBeaconProxy { } return proxy; } + + /// `beaconProxyDeployStep` without the broadcast. + function beaconProxyDeployStepLocally(Vm, address, bytes memory paramsData) internal returns (address) { + CloneParams memory params = abi.decode(paramsData, (CloneParams)); + return ICloneableFactoryV6(params.factory) + .beaconProxyDeterministicOpenSalt(params.implementation, params.data, params.salt); + } } diff --git a/src/lib/LibRainDeployBeaconResolution.sol b/src/lib/LibRainDeployBeaconResolution.sol index 1f6b004..41c047a 100644 --- a/src/lib/LibRainDeployBeaconResolution.sol +++ b/src/lib/LibRainDeployBeaconResolution.sol @@ -9,7 +9,7 @@ import { DeploySuite, DerivationSnapshotRevertFailed } from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {DerivedDeploy, NoDerivedDeployment} from "rain-deploy-0.1.43/src/abstract/RainDeployVerifyBase.sol"; +import {DerivedDeploy, NoDerivedDeployment, NotDerivedOnChain} from "rain-deploy-0.1.43/src/abstract/RainDeployVerifyBase.sol"; import {LibRainDeploy, SupportedNetwork} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; import {DeploySuiteIndex, LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; import {ChainBeacon, DeployBeacon, LibRainDeployBeacon} from "./LibRainDeployBeacon.sol"; @@ -113,7 +113,7 @@ library LibRainDeployBeaconResolution { address deployedAddress ) internal view { LibRainDeploy.checkDeclaredDependencies(network, suite.dependencies); - LibRainDeploy.checkDeployedCode(network, deployedAddress, derived.bytecodeHash); + LibRainDeploy.checkDeployedCode(network, deployedAddress, derivedCodeHash(derived, block.chainid)); } /// When a beacon is declared, `BeaconOnUncheckedNetwork` for any beacon off `d.networks` before resolving any; then, @@ -221,7 +221,7 @@ library LibRainDeployBeaconResolution { (resolved.suite, resolved.derived) = resolveReleased(d, index, beacon.beaconSuite); beacon.beacon = LibRainDeployDeclaration.mechanismOf(d, resolved.suite).deployedAddress(d, resolved.suite, chainId); - beacon.beaconCodeHash = resolved.derived.bytecodeHash; + beacon.beaconCodeHash = derivedCodeHash(resolved.derived, chainId); } else if (beacon.beacon == address(0) || beacon.beaconCodeHash == bytes32(0)) { revert BeaconUnnamed(chainId, beaconIndex); } @@ -296,7 +296,10 @@ library LibRainDeployBeaconResolution { revert NoDerivedDeployment(suite.suite); } DerivedDeploy memory derivedDeploy = DerivedDeploy({ - suite: suite.suite, deployedAddresses: deployedAddresses, bytecodeHash: deployedAddresses[deployed].codehash + suite: suite.suite, + chainIds: LibRainDeploy.networkChainIds(LibRainDeploy.declaredNetworkConfigs(suite.networks)), + deployedAddresses: deployedAddresses, + bytecodeHashes: codeHashes(deployedAddresses) }); if (!vm.revertToState(snapshotId)) { revert DerivationSnapshotRevertFailed(suite.suite, snapshotId); @@ -330,4 +333,21 @@ library LibRainDeployBeaconResolution { revert BeaconSeatedImplementation(resolved.chainId, beaconIndex, probe.implementation); } } + + function codeHashes(address[] memory addresses) internal view returns (bytes32[] memory) { + bytes32[] memory hashes = new bytes32[](addresses.length); + for (uint256 i = 0; i < addresses.length; i++) { + hashes[i] = addresses[i].codehash; + } + return hashes; + } + + function derivedCodeHash(DerivedDeploy memory derived, uint256 chainId) internal pure returns (bytes32) { + for (uint256 i = 0; i < derived.chainIds.length; i++) { + if (derived.chainIds[i] == chainId && derived.deployedAddresses[i] != address(0)) { + return derived.bytecodeHashes[i]; + } + } + revert NotDerivedOnChain(derived.suite, chainId); + } } diff --git a/src/lib/LibRainDeployClone.sol b/src/lib/LibRainDeployClone.sol index c585812..f907f44 100644 --- a/src/lib/LibRainDeployClone.sol +++ b/src/lib/LibRainDeployClone.sol @@ -261,4 +261,11 @@ library LibRainDeployClone { vm.stopBroadcast(); return cloneDeployedAddr; } + + /// `cloneDeployStep` without the broadcast. + function cloneDeployStepLocally(Vm, address, bytes memory paramsData) internal returns (address) { + CloneParams memory params = abi.decode(paramsData, (CloneParams)); + return ICloneableFactoryV6(params.factory) + .cloneDeterministicOpenSalt(params.implementation, params.data, params.salt); + } } diff --git a/src/lib/LibRainDeployCloneMechanism.sol b/src/lib/LibRainDeployCloneMechanism.sol index decaeff..44cdf9f 100644 --- a/src/lib/LibRainDeployCloneMechanism.sol +++ b/src/lib/LibRainDeployCloneMechanism.sol @@ -171,6 +171,7 @@ library LibRainDeployCloneMechanism { recordedAddress: recordedAddress, deployStepData: deployStepData, deployStep: deployStep, + deployStepLocally: deployStepLocally, deployLocally: deployLocally, deployLocallyOnChain: deployLocallyOnChain, addUnrecordedNetworks: addUnrecordedNetworks, @@ -606,6 +607,21 @@ library LibRainDeployCloneMechanism { isBeaconProxy(suite) ? LibRainDeployBeaconProxy.beaconProxyDeployStep : LibRainDeployClone.cloneDeployStep; } + /// @param suite A clone or beacon proxy suite. + /// @return The local twin of its `deployStep`. + function deployStepLocally(DeployDeclaration memory, DeploySuite memory suite) + internal + pure + returns (function(Vm, address, bytes memory) internal returns (address)) + { + if (isRegistryBeaconProxy(suite)) { + return LibRainDeployRegistryBeaconProxy.registryBeaconProxyDeployStepLocally; + } + return isBeaconProxy(suite) + ? LibRainDeployBeaconProxy.beaconProxyDeployStepLocally + : LibRainDeployClone.cloneDeployStepLocally; + } + /// A per-network suite with an entry for every network in `chainIds` its candidate has and it lacks, each at the /// address the candidate's init data derives there. Any other suite, or one whose candidate is under another /// mechanism, is returned as it is. diff --git a/src/lib/LibRainDeployRegistryBeaconProxy.sol b/src/lib/LibRainDeployRegistryBeaconProxy.sol index a9b262d..db914a7 100644 --- a/src/lib/LibRainDeployRegistryBeaconProxy.sol +++ b/src/lib/LibRainDeployRegistryBeaconProxy.sol @@ -16,6 +16,9 @@ import {IConfigRegistryV5} from "rain-deploy-0.1.43/src/interface/IConfigRegistr /// @dev The artifact path a registry beacon proxy suite carries. string constant REGISTRY_BEACON_PROXY_ARTIFACT_PATH = "rain-factory/RegistryBeaconProxy.sol:RegistryBeaconProxy"; +/// @dev Where the local deploy step etches the stub implementation a registry beacon proxy is derived over. +address constant LOCAL_STUB_IMPLEMENTATION = address(uint160(uint256(keccak256("rain.factory.registry-beacon-proxy.local-stub")))); + string constant REGISTRY_BEACON_PROXY_UNANCHORABLE_REASON = "A RegistryBeaconProxy, deployed by the factory from " "rain-factory's generated creation code with the registry, authority and beacon name as its constructor " "arguments. Its source is not compiled here, so there is no artifact to anchor it to; the beacon the binding " @@ -286,4 +289,16 @@ library LibRainDeployRegistryBeaconProxy { } return proxy; } + + /// `registryBeaconProxyDeployStep` without the broadcast, placing the code the current chain id's beacon gives the + /// proxy. The beacon is its only immutable, so a stub serves as the implementation. + function registryBeaconProxyDeployStepLocally(Vm vm, address, bytes memory paramsData) internal returns (address) { + RegistryBeaconProxyParams memory params = abi.decode(paramsData, (RegistryBeaconProxyParams)); + bytes memory runtimeCode = registryBeaconProxyRuntimeCodeOnNetwork( + vm, params, block.chainid, LOCAL_STUB_IMPLEMENTATION, hex"00" + ); + address proxy = registryBeaconProxyDeployedAddress(params); + vm.etch(proxy, runtimeCode); + return proxy; + } } From 38f89b0ddfa1d5b1c995d115142df2578a4b7e4c Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 14:10:25 +0000 Subject: [PATCH 09/43] Read per-chain derived code hashes in tests Co-Authored-By: Claude Opus 5.5 --- test/src/abstract/RainDeployVerifyChainBeacon.t.sol | 4 ++-- ...RainDeployBeaconResolution.chainGatedPerNetworkClone.t.sol | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/src/abstract/RainDeployVerifyChainBeacon.t.sol b/test/src/abstract/RainDeployVerifyChainBeacon.t.sol index 7093f1f..d9c0b8c 100644 --- a/test/src/abstract/RainDeployVerifyChainBeacon.t.sol +++ b/test/src/abstract/RainDeployVerifyChainBeacon.t.sol @@ -583,7 +583,7 @@ contract RainDeployVerifyChainBeaconTest is BeaconVerifyFixture, RainDeployVerif vm.expectCall(LibRainDeploy.ZOLTU_FACTORY, type(MockDeployableV2).creationCode, 1); vm.expectCall(LibRainDeploy.ZOLTU_FACTORY, type(MockDeployable).creationCode, 1); DerivedDeploy memory derived = this.externalDeriveUnlessResolved(other, arbitrum()); - assertEq(derived.bytecodeHash, keccak256(type(MockDeployable).runtimeCode)); + assertEq(derived.bytecodeHashes[0], keccak256(type(MockDeployable).runtimeCode)); } function testSuiteWithAResolvedKeyButOtherDependenciesIsDerivedAfresh() external { @@ -699,7 +699,7 @@ contract RainDeployVerifyChainBeaconTest is BeaconVerifyFixture, RainDeployVerif ); vm.expectCall(LibRainDeploy.ZOLTU_FACTORY, type(MockDeployable).creationCode, 1); DerivedDeploy memory derived = this.externalDeriveUnlessResolved(other, arbitrum()); - assertEq(derived.bytecodeHash, keccak256(type(MockDeployable).runtimeCode)); + assertEq(derived.bytecodeHashes[0], keccak256(type(MockDeployable).runtimeCode)); } function testImplementationSuiteMustHaveItsDerivedCodeOffline() external { diff --git a/test/src/lib/LibRainDeployBeaconResolution.chainGatedPerNetworkClone.t.sol b/test/src/lib/LibRainDeployBeaconResolution.chainGatedPerNetworkClone.t.sol index 3f3c861..1784bf4 100644 --- a/test/src/lib/LibRainDeployBeaconResolution.chainGatedPerNetworkClone.t.sol +++ b/test/src/lib/LibRainDeployBeaconResolution.chainGatedPerNetworkClone.t.sol @@ -124,7 +124,7 @@ contract LibRainDeployBeaconResolutionChainGatedPerNetworkCloneTest is BeaconVer assertEq(derived.deployedAddresses.length, 2); assertEq(derived.deployedAddresses[0], arbitrumClone); assertEq(derived.deployedAddresses[1], baseClone); - assertEq(derived.bytecodeHash, keccak256(suite.storedRuntimeCode)); + assertEq(derived.bytecodeHashes[0], keccak256(suite.storedRuntimeCode)); assertEq(block.chainid, chainId); assertEq(arbitrumClone.code.length, 0); assertEq(baseClone.code.length, 0); @@ -164,7 +164,7 @@ contract LibRainDeployBeaconResolutionChainGatedPerNetworkCloneTest is BeaconVer assertEq(derived.deployedAddresses.length, 2); assertEq(derived.deployedAddresses[0], address(0)); assertEq(derived.deployedAddresses[1], baseClone); - assertEq(derived.bytecodeHash, keccak256(suite.storedRuntimeCode)); + assertEq(derived.bytecodeHashes[1], keccak256(suite.storedRuntimeCode)); } function testDerivationRecordingNoCloneOnAnyOfItsNetworksIsRefused() external { From 9ed63603c4e76f3b2231252a8bb21803dd1f97bf Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 14:18:33 +0000 Subject: [PATCH 10/43] forge fmt Co-Authored-By: Claude Opus 5.5 --- src/lib/LibRainDeployBeaconResolution.sol | 6 +++++- src/lib/LibRainDeployClone.sol | 5 +++-- src/lib/LibRainDeployCloneOnChainChecks.sol | 8 +++++--- src/lib/LibRainDeployRegistryBeaconProxy.sol | 12 +++++------- ...ifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol | 4 +--- test/src/lib/LibRainDeployCloneOnChainChecks.t.sol | 3 ++- 6 files changed, 21 insertions(+), 17 deletions(-) diff --git a/src/lib/LibRainDeployBeaconResolution.sol b/src/lib/LibRainDeployBeaconResolution.sol index 41c047a..e120090 100644 --- a/src/lib/LibRainDeployBeaconResolution.sol +++ b/src/lib/LibRainDeployBeaconResolution.sol @@ -9,7 +9,11 @@ import { DeploySuite, DerivationSnapshotRevertFailed } from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {DerivedDeploy, NoDerivedDeployment, NotDerivedOnChain} from "rain-deploy-0.1.43/src/abstract/RainDeployVerifyBase.sol"; +import { + DerivedDeploy, + NoDerivedDeployment, + NotDerivedOnChain +} from "rain-deploy-0.1.43/src/abstract/RainDeployVerifyBase.sol"; import {LibRainDeploy, SupportedNetwork} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; import {DeploySuiteIndex, LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; import {ChainBeacon, DeployBeacon, LibRainDeployBeacon} from "./LibRainDeployBeacon.sol"; diff --git a/src/lib/LibRainDeployClone.sol b/src/lib/LibRainDeployClone.sol index f907f44..a32f8d6 100644 --- a/src/lib/LibRainDeployClone.sol +++ b/src/lib/LibRainDeployClone.sol @@ -265,7 +265,8 @@ library LibRainDeployClone { /// `cloneDeployStep` without the broadcast. function cloneDeployStepLocally(Vm, address, bytes memory paramsData) internal returns (address) { CloneParams memory params = abi.decode(paramsData, (CloneParams)); - return ICloneableFactoryV6(params.factory) - .cloneDeterministicOpenSalt(params.implementation, params.data, params.salt); + return + ICloneableFactoryV6(params.factory) + .cloneDeterministicOpenSalt(params.implementation, params.data, params.salt); } } diff --git a/src/lib/LibRainDeployCloneOnChainChecks.sol b/src/lib/LibRainDeployCloneOnChainChecks.sol index d23e9ae..52e902c 100644 --- a/src/lib/LibRainDeployCloneOnChainChecks.sol +++ b/src/lib/LibRainDeployCloneOnChainChecks.sol @@ -192,9 +192,11 @@ library LibRainDeployCloneOnChainChecks { { bytes32 id = LibRainDeployDeclaration.mechanismIdOf(suite); if (id == REGISTRY_BEACON_PROXY_MECHANISM) { - address beacon = LibRainDeployRegistryBeaconProxy.beaconOnNetwork( - LibRainDeployCloneMechanism.registryBeaconProxyParams(suite), chainId - ).beacon; + address beacon = + LibRainDeployRegistryBeaconProxy.beaconOnNetwork( + LibRainDeployCloneMechanism.registryBeaconProxyParams(suite), chainId + ) + .beacon; if (IERC5313(beacon).owner() == deployer) { revert RegistryBeaconOwnedByDeployKey(chainId, beacon); } diff --git a/src/lib/LibRainDeployRegistryBeaconProxy.sol b/src/lib/LibRainDeployRegistryBeaconProxy.sol index db914a7..c2f9768 100644 --- a/src/lib/LibRainDeployRegistryBeaconProxy.sol +++ b/src/lib/LibRainDeployRegistryBeaconProxy.sol @@ -17,7 +17,8 @@ import {IConfigRegistryV5} from "rain-deploy-0.1.43/src/interface/IConfigRegistr string constant REGISTRY_BEACON_PROXY_ARTIFACT_PATH = "rain-factory/RegistryBeaconProxy.sol:RegistryBeaconProxy"; /// @dev Where the local deploy step etches the stub implementation a registry beacon proxy is derived over. -address constant LOCAL_STUB_IMPLEMENTATION = address(uint160(uint256(keccak256("rain.factory.registry-beacon-proxy.local-stub")))); +address constant LOCAL_STUB_IMPLEMENTATION = + address(uint160(uint256(keccak256("rain.factory.registry-beacon-proxy.local-stub")))); string constant REGISTRY_BEACON_PROXY_UNANCHORABLE_REASON = "A RegistryBeaconProxy, deployed by the factory from " "rain-factory's generated creation code with the registry, authority and beacon name as its constructor " @@ -162,9 +163,7 @@ library LibRainDeployRegistryBeaconProxy { vm.etch(params.registry, address(new ConfigRegistry()).code); vm.etch(implementation, implementationCode); // slither-disable-next-line too-many-digits - vm.etch( - beacon, bytes.concat(type(UpgradeableBeacon).creationCode, abi.encode(implementation, beacon)) - ); + vm.etch(beacon, bytes.concat(type(UpgradeableBeacon).creationCode, abi.encode(implementation, beacon))); // slither-disable-next-line low-level-calls (bool constructed, bytes memory beaconCode) = beacon.call(""); if (!constructed) { @@ -294,9 +293,8 @@ library LibRainDeployRegistryBeaconProxy { /// proxy. The beacon is its only immutable, so a stub serves as the implementation. function registryBeaconProxyDeployStepLocally(Vm vm, address, bytes memory paramsData) internal returns (address) { RegistryBeaconProxyParams memory params = abi.decode(paramsData, (RegistryBeaconProxyParams)); - bytes memory runtimeCode = registryBeaconProxyRuntimeCodeOnNetwork( - vm, params, block.chainid, LOCAL_STUB_IMPLEMENTATION, hex"00" - ); + bytes memory runtimeCode = + registryBeaconProxyRuntimeCodeOnNetwork(vm, params, block.chainid, LOCAL_STUB_IMPLEMENTATION, hex"00"); address proxy = registryBeaconProxyDeployedAddress(params); vm.etch(proxy, runtimeCode); return proxy; diff --git a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol index 05535cb..e457aca 100644 --- a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol +++ b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol @@ -85,9 +85,7 @@ contract RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetworkTest is RainDep } /// Selects `network`'s chain id and binds the name to `beacon` there. - function bindOn(RegistryBeaconProxyParams memory params, SupportedNetwork memory network, address beacon) - internal - { + function bindOn(RegistryBeaconProxyParams memory params, SupportedNetwork memory network, address beacon) internal { vm.chainId(network.chainId); vm.warp(block.timestamp + 1); LibRegistryBeaconProxyTest.bind(vm, params.registry, beacon); diff --git a/test/src/lib/LibRainDeployCloneOnChainChecks.t.sol b/test/src/lib/LibRainDeployCloneOnChainChecks.t.sol index 5134ccc..3da7eba 100644 --- a/test/src/lib/LibRainDeployCloneOnChainChecks.t.sol +++ b/test/src/lib/LibRainDeployCloneOnChainChecks.t.sol @@ -198,7 +198,8 @@ contract LibRainDeployCloneOnChainChecksBroadcastSeatTest is Test { both[0] = LibRegistryBeaconProxyTest.onNetwork(42161, beacon); both[1] = LibRegistryBeaconProxyTest.onNetwork(8453, beacon); params.beaconPerNetwork = both; - DeploySuite memory suite = LibRainDeployCloneMechanism.registryBeaconProxyCandidate( + DeploySuite memory suite = + LibRainDeployCloneMechanism.registryBeaconProxyCandidate( LibRegistryBeaconProxyTest.declared( "registry-beacon-proxy@0_0_1", params, LibRegistryBeaconProxyTest.runtimeOf(vm, params) ) From 21411a1699098adcc998acf988fcdbcf130b54f0 Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 14:25:11 +0000 Subject: [PATCH 11/43] Rename locals shadowing the beacon helper in on-chain checks tests Co-Authored-By: Claude Opus 5.5 --- .../src/lib/LibRainDeployCloneOnChainChecks.t.sol | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/test/src/lib/LibRainDeployCloneOnChainChecks.t.sol b/test/src/lib/LibRainDeployCloneOnChainChecks.t.sol index 3da7eba..ab67f68 100644 --- a/test/src/lib/LibRainDeployCloneOnChainChecks.t.sol +++ b/test/src/lib/LibRainDeployCloneOnChainChecks.t.sol @@ -152,8 +152,9 @@ contract LibRainDeployCloneOnChainChecksBroadcastSeatTest is Test { address first = params.beaconPerNetwork[0].beacon; params.beaconPerNetwork = new RegistryBeaconOnNetwork[](chainIds.length); for (uint256 i = 0; i < chainIds.length; i++) { - address beacon = i == 0 ? first : address(new UpgradeableBeacon(address(new MockCloneableV2()), owners[i])); - params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.onNetwork(chainIds[i], beacon); + address onChain = + i == 0 ? first : address(new UpgradeableBeacon(address(new MockCloneableV2()), owners[i])); + params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.onNetwork(chainIds[i], onChain); } DeploySuite memory suite = LibRainDeployCloneMechanism.registryBeaconProxyCandidate( @@ -193,10 +194,10 @@ contract LibRainDeployCloneOnChainChecksBroadcastSeatTest is Test { /// One beacon listed for each of two chains is read on each. function testBroadcastSeatReadsOneRegistryBeaconListedPerChain() external { (RegistryBeaconProxyParams memory params,) = registrySuite(DEPLOYER); - address beacon = params.beaconPerNetwork[0].beacon; + address shared = params.beaconPerNetwork[0].beacon; RegistryBeaconOnNetwork[] memory both = new RegistryBeaconOnNetwork[](2); - both[0] = LibRegistryBeaconProxyTest.onNetwork(42161, beacon); - both[1] = LibRegistryBeaconProxyTest.onNetwork(8453, beacon); + both[0] = LibRegistryBeaconProxyTest.onNetwork(42161, shared); + both[1] = LibRegistryBeaconProxyTest.onNetwork(8453, shared); params.beaconPerNetwork = both; DeploySuite memory suite = LibRainDeployCloneMechanism.registryBeaconProxyCandidate( @@ -206,11 +207,11 @@ contract LibRainDeployCloneOnChainChecksBroadcastSeatTest is Test { ) .snapshot; for (uint256 i = 0; i < both.length; i++) { - vm.expectRevert(abi.encodeWithSelector(RegistryBeaconOwnedByDeployKey.selector, both[i].chainId, beacon)); + vm.expectRevert(abi.encodeWithSelector(RegistryBeaconOwnedByDeployKey.selector, both[i].chainId, shared)); this.checkRegistryBroadcastSeatOn(suite, both[i].chainId); } vm.prank(DEPLOYER); - UpgradeableBeacon(beacon).transferOwnership(OWNER); + UpgradeableBeacon(shared).transferOwnership(OWNER); for (uint256 i = 0; i < both.length; i++) { this.checkRegistryBroadcastSeatOn(suite, both[i].chainId); } From bfd3435364e29f2daef05acf1b76982c003536b7 Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 14:30:14 +0000 Subject: [PATCH 12/43] Test per-chain derivation and internal consistency of per-chain registry beacon proxy suites Co-Authored-By: Claude Opus 5.5 --- ...eRegistryBeaconProxyBeaconPerNetwork.t.sol | 164 ++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 test/src/abstract/RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetwork.t.sol diff --git a/test/src/abstract/RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetwork.t.sol b/test/src/abstract/RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetwork.t.sol new file mode 100644 index 0000000..8b12615 --- /dev/null +++ b/test/src/abstract/RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetwork.t.sol @@ -0,0 +1,164 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {UpgradeableBeacon} from "@openzeppelin-contracts-5.7.0/proxy/beacon/UpgradeableBeacon.sol"; +import {DeployDeclaration, DeployDependency, DeploySuite} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; +import {DerivedDeploy} from "rain-deploy-0.1.43/src/abstract/RainDeployVerifyBase.sol"; +import {RainDeployVerifySnapshotBase} from "rain-deploy-0.1.43/src/abstract/RainDeployVerifySnapshotBase.sol"; +import {LibRainDeploy, SupportedNetwork} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; +import {LibRainDeployCloneMechanism} from "../../../src/lib/LibRainDeployCloneMechanism.sol"; +import { + LibRainDeployRegistryBeaconProxy, + RegistryBeaconOnNetwork, + RegistryBeaconProxyParams +} from "../../../src/lib/LibRainDeployRegistryBeaconProxy.sol"; +import {MockCloneableV2} from "../../concrete/MockCloneableV2.sol"; +import {MockOwnable2StepBeacon} from "../../concrete/MockOwnable2StepBeacon.sol"; +import {LibRegistryBeaconProxyTest} from "../../lib/LibRegistryBeaconProxyTest.sol"; +import {LibExternalDeployments} from "../../lib/LibExternalDeployments.sol"; + +/// @title RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetworkTest +/// @notice The snapshot group's derivation and internal consistency over one registry beacon proxy suite on Arbitrum +/// One, Base and Polygon, each chain on its own beacon. +contract RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetworkTest is RainDeployVerifySnapshotBase { + string constant PROXY_SUITE = "registry-beacon-proxy@0_0_1"; + + bytes internal sParamsData; + + function storedParams() internal view returns (RegistryBeaconProxyParams memory) { + return abi.decode(sParamsData, (RegistryBeaconProxyParams)); + } + + function networks() internal pure returns (string[] memory) { + string[] memory names = new string[](3); + names[0] = LibRainDeploy.ARBITRUM_ONE; + names[1] = LibRainDeploy.BASE; + names[2] = LibRainDeploy.POLYGON; + return names; + } + + function declaration() internal view override returns (DeployDeclaration memory) { + RegistryBeaconProxyParams memory params = storedParams(); + DeployDeclaration memory d; + LibRainDeployDeclaration.extend(d); + LibRainDeployDeclaration.setNetworks(d, networks()); + LibRainDeployCloneMechanism.extend(d); + DeployDependency[] memory externals = new DeployDependency[](2); + externals[0] = LibExternalDeployments.deployedNow(params.factory); + externals[1] = LibExternalDeployments.deployedNow(params.registry); + LibExternalDeployments.add(d, externals); + return d; + } + + /// A factory and registry, and a beacon per network: an `UpgradeableBeacon` on Arbitrum One, a + /// `MockOwnable2StepBeacon` on Base and an `UpgradeableBeacon` under another owner on Polygon. + function setUp() external { + RegistryBeaconProxyParams memory params = LibRegistryBeaconProxyTest.live( + vm, address(new MockCloneableV2()), address(this), hex"deadbeef", bytes32(uint256(5)) + ); + address[3] memory beacons = [ + params.beaconPerNetwork[0].beacon, + address(new MockOwnable2StepBeacon(address(new MockCloneableV2()), address(this))), + address(new UpgradeableBeacon(address(new MockCloneableV2()), address(0xB0B))) + ]; + SupportedNetwork[] memory configs = LibRainDeploy.declaredNetworkConfigs(networks()); + params.beaconPerNetwork = new RegistryBeaconOnNetwork[](3); + for (uint256 i = 0; i < 3; i++) { + params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.onNetwork(configs[i].chainId, beacons[i]); + } + sParamsData = abi.encode(params); + } + + /// `params` declared over the three networks, its runtime code generated on the first listed chain. + function proxySuite(RegistryBeaconProxyParams memory params) internal returns (DeploySuite memory) { + DeploySuite memory suite = LibRainDeployCloneMechanism.registryBeaconProxyCandidate( + LibRegistryBeaconProxyTest.declared(PROXY_SUITE, params, LibRegistryBeaconProxyTest.runtimeOf(vm, params)) + ) + .snapshot; + suite.networks = networks(); + return suite; + } + + /// `params`'s proxy code on `chainId`, its beacon there serving the implementation it serves now. + function codeOn(RegistryBeaconProxyParams memory params, uint256 chainId) internal returns (bytes memory) { + address implementation = + UpgradeableBeacon(LibRainDeployRegistryBeaconProxy.beaconOnNetwork(params, chainId).beacon).implementation(); + return LibRainDeployRegistryBeaconProxy.registryBeaconProxyRuntimeCodeOnNetwork( + vm, params, chainId, implementation, implementation.code + ); + } + + function externalDeriveDeployment(DeploySuite memory suite) external returns (DerivedDeploy memory) { + return deriveDeployment(declaration(), LibRainDeployDeclaration.emptyIndex(), suite); + } + + function externalCheckInternallyConsistent(DeploySuite memory suite) external { + checkInternallyConsistent(declaration(), LibRainDeployDeclaration.emptyIndex(), suite); + } + + /// Each chain derives the one address and the code its own beacon gives the proxy, the three codes distinct. + function testDerivationGivesEachChainItsOwnBeaconsCode() external { + RegistryBeaconProxyParams memory params = storedParams(); + DeploySuite memory suite = proxySuite(params); + DerivedDeploy memory derived = this.externalDeriveDeployment(suite); + SupportedNetwork[] memory configs = LibRainDeploy.declaredNetworkConfigs(networks()); + assertEq(derived.chainIds.length, 3); + for (uint256 i = 0; i < 3; i++) { + assertEq(derived.chainIds[i], configs[i].chainId, configs[i].name); + assertEq(derived.deployedAddresses[i], suite.storedDeployedAddress, configs[i].name); + assertEq(derived.bytecodeHashes[i], keccak256(codeOn(params, configs[i].chainId)), configs[i].name); + } + assertNotEq(derived.bytecodeHashes[0], derived.bytecodeHashes[1]); + assertNotEq(derived.bytecodeHashes[1], derived.bytecodeHashes[2]); + assertNotEq(derived.bytecodeHashes[0], derived.bytecodeHashes[2]); + } + + /// One beacon listed for every chain derives the same code on each, the code the suite records. + function testDerivationWithOneBeaconListedPerChainGivesEachChainTheRecordedCode() external { + RegistryBeaconProxyParams memory params = storedParams(); + address beacon = params.beaconPerNetwork[0].beacon; + for (uint256 i = 0; i < 3; i++) { + params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.onNetwork(params.beaconPerNetwork[i].chainId, beacon); + } + DeploySuite memory suite = proxySuite(params); + DerivedDeploy memory derived = this.externalDeriveDeployment(suite); + for (uint256 i = 0; i < 3; i++) { + assertEq(derived.deployedAddresses[i], suite.storedDeployedAddress); + assertEq(derived.bytecodeHashes[i], suite.storedBytecodeHash); + } + } + + /// A suite listing one beacon for every chain is internally consistent, as a single-beacon suite always was. + function testOneBeaconListedPerChainIsInternallyConsistent() external { + RegistryBeaconProxyParams memory params = storedParams(); + address beacon = params.beaconPerNetwork[0].beacon; + for (uint256 i = 0; i < 3; i++) { + params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.onNetwork(params.beaconPerNetwork[i].chainId, beacon); + } + this.externalCheckInternallyConsistent(proxySuite(params)); + } + + /// A suite whose chains each have their own beacon is internally consistent: each chain's derived code is checked + /// against the code that chain's beacon gives the proxy, not against one chain's. + function testEachChainOnItsOwnBeaconIsInternallyConsistent() external { + this.externalCheckInternallyConsistent(proxySuite(storedParams())); + } + + /// A chain the suite's networks name but its beacon list does not is refused while deriving. + function testDerivationRefusesANetworkWithNoBeaconListed() external { + RegistryBeaconProxyParams memory params = storedParams(); + RegistryBeaconOnNetwork[] memory two = new RegistryBeaconOnNetwork[](2); + two[0] = params.beaconPerNetwork[0]; + two[1] = params.beaconPerNetwork[2]; + params.beaconPerNetwork = two; + DeploySuite memory suite = proxySuite(params); + vm.expectRevert( + abi.encodeWithSelector( + LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyNoBeaconOnNetwork.selector, uint256(8453) + ) + ); + this.externalDeriveDeployment(suite); + } +} From 20bf7c2d607e37d001525b4d006508214a1f3f62 Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 14:35:13 +0000 Subject: [PATCH 13/43] Carry each chain's registry beacon proxy runtime code and code hash; expose expectedBytecodeHash lookup; lock rain-deploy Co-Authored-By: Claude Opus 5.5 --- src/lib/LibRainDeployCloneMechanism.sol | 17 ++++++++++++++++- src/lib/LibRainDeployRegistryBeaconProxy.sol | 10 ++++++---- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/lib/LibRainDeployCloneMechanism.sol b/src/lib/LibRainDeployCloneMechanism.sol index 44cdf9f..d0d3aae 100644 --- a/src/lib/LibRainDeployCloneMechanism.sol +++ b/src/lib/LibRainDeployCloneMechanism.sol @@ -755,6 +755,17 @@ library LibRainDeployCloneMechanism { return false; } + /// For a consumer's `expectedBytecodeHash` override. + /// @param suite The suite. + /// @param chainId The chain id. + /// @return A registry beacon proxy's stored proxy code hash on `chainId`, else `suite.storedBytecodeHash`. + function expectedBytecodeHash(DeploySuite memory suite, uint256 chainId) internal pure returns (bytes32) { + if (!isRegistryBeaconProxy(suite)) { + return suite.storedBytecodeHash; + } + return LibRainDeployRegistryBeaconProxy.beaconOnNetwork(registryBeaconProxyParams(suite), chainId).proxyCodeHash; + } + /// @param suite A clone or beacon proxy suite. /// @param data The new payload. /// @return A deep copy of `suite` whose mechanism data wraps `data` under its tag; `suite` is not changed. @@ -773,7 +784,11 @@ library LibRainDeployCloneMechanism { function deployParams(Vm vm, DeploySuite memory suite, uint256 chainId, address expected) internal { if (isRegistryBeaconProxy(suite)) { checkRegistryBeaconProxyCreationCode(suite); - vm.etch(expected, suite.storedRuntimeCode); + vm.etch( + expected, + LibRainDeployRegistryBeaconProxy.beaconOnNetwork(registryBeaconProxyParams(suite), chainId) + .proxyRuntimeCode + ); return; } CloneParams memory params = cloneParamsOn(suite, chainId); diff --git a/src/lib/LibRainDeployRegistryBeaconProxy.sol b/src/lib/LibRainDeployRegistryBeaconProxy.sol index c2f9768..5765438 100644 --- a/src/lib/LibRainDeployRegistryBeaconProxy.sol +++ b/src/lib/LibRainDeployRegistryBeaconProxy.sol @@ -25,11 +25,15 @@ string constant REGISTRY_BEACON_PROXY_UNANCHORABLE_REASON = "A RegistryBeaconPro "arguments. Its source is not compiled here, so there is no artifact to anchor it to; the beacon the binding " "resolves to, and each implementation it serves, are the anchored contracts."; -/// A registry beacon proxy's beacon and its expected code hash on one chain. +/// A registry beacon proxy's beacon, the beacon's expected code hash, and the proxy's expected runtime code and +/// code hash on one chain. struct RegistryBeaconOnNetwork { uint256 chainId; address beacon; bytes32 codeHash; + /// Stored independently of `proxyRuntimeCode` so neither is checked against a value derived from the other. + bytes32 proxyCodeHash; + bytes proxyRuntimeCode; } /// One contract a repo deploys as a registry beacon proxy. @@ -293,10 +297,8 @@ library LibRainDeployRegistryBeaconProxy { /// proxy. The beacon is its only immutable, so a stub serves as the implementation. function registryBeaconProxyDeployStepLocally(Vm vm, address, bytes memory paramsData) internal returns (address) { RegistryBeaconProxyParams memory params = abi.decode(paramsData, (RegistryBeaconProxyParams)); - bytes memory runtimeCode = - registryBeaconProxyRuntimeCodeOnNetwork(vm, params, block.chainid, LOCAL_STUB_IMPLEMENTATION, hex"00"); address proxy = registryBeaconProxyDeployedAddress(params); - vm.etch(proxy, runtimeCode); + vm.etch(proxy, beaconOnNetwork(params, block.chainid).proxyRuntimeCode); return proxy; } } From 54279a84e545dd25482cd0ff2d4a1fd8f03ae2f2 Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 14:38:40 +0000 Subject: [PATCH 14/43] Remove dead local stub implementation; add per-chain proxy fields at test call sites Co-Authored-By: Claude Opus 5.5 --- src/lib/LibRainDeployRegistryBeaconProxy.sol | 5 +---- test/lib/LibRegistryBeaconProxyTest.sol | 4 +++- test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol | 8 ++++---- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/lib/LibRainDeployRegistryBeaconProxy.sol b/src/lib/LibRainDeployRegistryBeaconProxy.sol index 5765438..94a7c78 100644 --- a/src/lib/LibRainDeployRegistryBeaconProxy.sol +++ b/src/lib/LibRainDeployRegistryBeaconProxy.sol @@ -16,9 +16,6 @@ import {IConfigRegistryV5} from "rain-deploy-0.1.43/src/interface/IConfigRegistr /// @dev The artifact path a registry beacon proxy suite carries. string constant REGISTRY_BEACON_PROXY_ARTIFACT_PATH = "rain-factory/RegistryBeaconProxy.sol:RegistryBeaconProxy"; -/// @dev Where the local deploy step etches the stub implementation a registry beacon proxy is derived over. -address constant LOCAL_STUB_IMPLEMENTATION = - address(uint160(uint256(keccak256("rain.factory.registry-beacon-proxy.local-stub")))); string constant REGISTRY_BEACON_PROXY_UNANCHORABLE_REASON = "A RegistryBeaconProxy, deployed by the factory from " "rain-factory's generated creation code with the registry, authority and beacon name as its constructor " @@ -294,7 +291,7 @@ library LibRainDeployRegistryBeaconProxy { } /// `registryBeaconProxyDeployStep` without the broadcast, placing the code the current chain id's beacon gives the - /// proxy. The beacon is its only immutable, so a stub serves as the implementation. + /// proxy. function registryBeaconProxyDeployStepLocally(Vm vm, address, bytes memory paramsData) internal returns (address) { RegistryBeaconProxyParams memory params = abi.decode(paramsData, (RegistryBeaconProxyParams)); address proxy = registryBeaconProxyDeployedAddress(params); diff --git a/test/lib/LibRegistryBeaconProxyTest.sol b/test/lib/LibRegistryBeaconProxyTest.sol index e3690f3..837793d 100644 --- a/test/lib/LibRegistryBeaconProxyTest.sol +++ b/test/lib/LibRegistryBeaconProxyTest.sol @@ -61,7 +61,9 @@ library LibRegistryBeaconProxyTest { /// @param beacon The beacon. /// @return `beacon` on `chainId`, at the hash of the code it holds now. function onNetwork(uint256 chainId, address beacon) internal view returns (RegistryBeaconOnNetwork memory) { - return RegistryBeaconOnNetwork({chainId: chainId, beacon: beacon, codeHash: beacon.codehash}); + return RegistryBeaconOnNetwork({ + chainId: chainId, beacon: beacon, codeHash: beacon.codehash, proxyCodeHash: bytes32(0), proxyRuntimeCode: "" + }); } /// @param chainId The chain id. diff --git a/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol b/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol index 6553640..b69f8c8 100644 --- a/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol +++ b/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol @@ -99,11 +99,11 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { function threeChains() internal pure returns (RegistryBeaconOnNetwork[] memory) { RegistryBeaconOnNetwork[] memory beaconPerNetwork = new RegistryBeaconOnNetwork[](3); beaconPerNetwork[0] = - RegistryBeaconOnNetwork({chainId: 42161, beacon: address(0xBEAC1), codeHash: keccak256("arbitrum")}); + RegistryBeaconOnNetwork({chainId: 42161, beacon: address(0xBEAC1), codeHash: keccak256("arbitrum"), proxyCodeHash: bytes32(0), proxyRuntimeCode: ""}); beaconPerNetwork[1] = - RegistryBeaconOnNetwork({chainId: 8453, beacon: address(0xBEAC2), codeHash: keccak256("base")}); + RegistryBeaconOnNetwork({chainId: 8453, beacon: address(0xBEAC2), codeHash: keccak256("base"), proxyCodeHash: bytes32(0), proxyRuntimeCode: ""}); beaconPerNetwork[2] = - RegistryBeaconOnNetwork({chainId: 137, beacon: address(0xBEAC3), codeHash: keccak256("polygon")}); + RegistryBeaconOnNetwork({chainId: 137, beacon: address(0xBEAC3), codeHash: keccak256("polygon"), proxyCodeHash: bytes32(0), proxyRuntimeCode: ""}); return beaconPerNetwork; } @@ -439,7 +439,7 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { RegistryBeaconOnNetwork memory twice = three[duplicated % 3]; if (!same) { twice = RegistryBeaconOnNetwork({ - chainId: twice.chainId, beacon: address(0xBEAC4), codeHash: keccak256("other") + chainId: twice.chainId, beacon: address(0xBEAC4), codeHash: keccak256("other"), proxyCodeHash: bytes32(0), proxyRuntimeCode: "" }); } RegistryBeaconOnNetwork[] memory four = new RegistryBeaconOnNetwork[](4); From ec6b12e6745b63e53954b5ce749ed3c1099f292e Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 14:39:30 +0000 Subject: [PATCH 15/43] Drop blank line left by stub removal Co-Authored-By: Claude Opus 5.5 --- src/lib/LibRainDeployRegistryBeaconProxy.sol | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib/LibRainDeployRegistryBeaconProxy.sol b/src/lib/LibRainDeployRegistryBeaconProxy.sol index 94a7c78..413293d 100644 --- a/src/lib/LibRainDeployRegistryBeaconProxy.sol +++ b/src/lib/LibRainDeployRegistryBeaconProxy.sol @@ -16,7 +16,6 @@ import {IConfigRegistryV5} from "rain-deploy-0.1.43/src/interface/IConfigRegistr /// @dev The artifact path a registry beacon proxy suite carries. string constant REGISTRY_BEACON_PROXY_ARTIFACT_PATH = "rain-factory/RegistryBeaconProxy.sol:RegistryBeaconProxy"; - string constant REGISTRY_BEACON_PROXY_UNANCHORABLE_REASON = "A RegistryBeaconProxy, deployed by the factory from " "rain-factory's generated creation code with the registry, authority and beacon name as its constructor " "arguments. Its source is not compiled here, so there is no artifact to anchor it to; the beacon the binding " From ef10a3495c22c94be2d57b25abfbb425737ba7d2 Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 14:45:19 +0000 Subject: [PATCH 16/43] Initialize the local registry beacon proxy through the real implementation Co-Authored-By: Claude Opus 5.5 --- src/lib/LibRainDeployCloneMechanism.sol | 4 ++- src/lib/LibRainDeployRegistryBeaconProxy.sol | 27 +++++++++++++++++--- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/lib/LibRainDeployCloneMechanism.sol b/src/lib/LibRainDeployCloneMechanism.sol index d0d3aae..99bebff 100644 --- a/src/lib/LibRainDeployCloneMechanism.sol +++ b/src/lib/LibRainDeployCloneMechanism.sol @@ -925,7 +925,9 @@ library LibRainDeployCloneMechanism { beaconName: proxy.beaconName, beaconPerNetwork: proxy.beaconPerNetwork, data: proxy.data, - salt: proxy.salt + salt: proxy.salt, + implementation: proxy.implementation, + implementationRuntimeCode: proxy.implementationRuntimeCode }); return DeployCandidate({ snapshot: DeploySuite({ diff --git a/src/lib/LibRainDeployRegistryBeaconProxy.sol b/src/lib/LibRainDeployRegistryBeaconProxy.sol index 413293d..2905082 100644 --- a/src/lib/LibRainDeployRegistryBeaconProxy.sol +++ b/src/lib/LibRainDeployRegistryBeaconProxy.sol @@ -8,6 +8,7 @@ import {IERC5313} from "@openzeppelin-contracts-5.7.0/interfaces/IERC5313.sol"; import {UpgradeableBeacon} from "@openzeppelin-contracts-5.7.0/proxy/beacon/UpgradeableBeacon.sol"; import {ICloneableFactoryV7} from "../interface/ICloneableFactoryV7.sol"; import {LibICloneableFactoryV7} from "./LibICloneableFactoryV7.sol"; +import {LibICloneableFactoryV5} from "./LibICloneableFactoryV5.sol"; import {DeployDependency} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; import {ConfigRegistry} from "rain-deploy-0.1.43/src/concrete/ConfigRegistry.sol"; @@ -51,6 +52,9 @@ struct RegistryBeaconProxyDeploy { DeployDependency[] dependencies; /// The proxy's runtime code, generated into `src/generated/` and checked by `Git is clean`. bytes runtimeCode; + /// The implementation a beacon serves, so a local deploy runs the real `initialize(data)`. + address implementation; + bytes implementationRuntimeCode; } /// The factory call a registry beacon proxy suite's `mechanismData` carries. @@ -62,6 +66,8 @@ struct RegistryBeaconProxyParams { RegistryBeaconOnNetwork[] beaconPerNetwork; bytes data; bytes32 salt; + address implementation; + bytes implementationRuntimeCode; } /// @title LibRainDeployRegistryBeaconProxy @@ -289,12 +295,27 @@ library LibRainDeployRegistryBeaconProxy { return proxy; } - /// `registryBeaconProxyDeployStep` without the broadcast, placing the code the current chain id's beacon gives the - /// proxy. + /// `registryBeaconProxyDeployStep` without the broadcast: places the current chain id's beacon serving + /// `params.implementation` and that chain's proxy code, then runs `initialize(data)` as the factory. function registryBeaconProxyDeployStepLocally(Vm vm, address, bytes memory paramsData) internal returns (address) { RegistryBeaconProxyParams memory params = abi.decode(paramsData, (RegistryBeaconProxyParams)); + RegistryBeaconOnNetwork memory onNetwork = beaconOnNetwork(params, block.chainid); address proxy = registryBeaconProxyDeployedAddress(params); - vm.etch(proxy, beaconOnNetwork(params, block.chainid).proxyRuntimeCode); + vm.etch(params.implementation, params.implementationRuntimeCode); + // slither-disable-next-line too-many-digits + vm.etch( + onNetwork.beacon, + bytes.concat(type(UpgradeableBeacon).creationCode, abi.encode(params.implementation, onNetwork.beacon)) + ); + // slither-disable-next-line low-level-calls + (bool constructed, bytes memory beaconCode) = onNetwork.beacon.call(""); + if (!constructed) { + revert RegistryBeaconProxyBeaconConstructionFailed(onNetwork.beacon, params.implementation); + } + vm.etch(onNetwork.beacon, beaconCode); + vm.etch(proxy, onNetwork.proxyRuntimeCode); + vm.prank(params.factory); + LibICloneableFactoryV5.initializeChild(proxy, params.data); return proxy; } } From 77ea2ac90b088d1c9a8191d433ae71596c2902d2 Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 14:45:38 +0000 Subject: [PATCH 17/43] Lock the rain-deploy git dependency Co-Authored-By: Claude Opus 5.5 --- soldeer.lock | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/soldeer.lock b/soldeer.lock index 0d1fd38..9e62c0a 100644 --- a/soldeer.lock +++ b/soldeer.lock @@ -12,6 +12,12 @@ url = "https://soldeer-revisions.s3.amazonaws.com/forge-std/1_17_0_01-10-2026_10 checksum = "a77ad38d5fbef0ec10d1f4d191698e5fbaa2bffbee5d1aced91a39da5e9b908c" integrity = "fa706c8a7caf3426c90f75e6aafa3224b0a6c899b490800cf6944e4ec42f9344" +[[dependencies]] +name = "rain-deploy" +version = "0.1.43" +git = "https://github.com/rainlanguage/rain.deploy.git" +rev = "1ae4dcd0c357748fa3b3eaa8c6abf80cca099c33" + [[dependencies]] name = "rain-extrospection" version = "0.1.31" From 35c8f0e28e9693eed9a57ee271f40f5878c2f2a7 Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 14:47:55 +0000 Subject: [PATCH 18/43] Carry the implementation through registry beacon proxy test literals Co-Authored-By: Claude Opus 5.5 --- test/lib/LibRegistryBeaconProxyTest.sol | 8 ++++++-- ...RainDeployCloneMechanismRegistryBeaconProxy.t.sol | 4 +++- test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol | 12 +++++++++--- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/test/lib/LibRegistryBeaconProxyTest.sol b/test/lib/LibRegistryBeaconProxyTest.sol index 837793d..503e2e4 100644 --- a/test/lib/LibRegistryBeaconProxyTest.sol +++ b/test/lib/LibRegistryBeaconProxyTest.sol @@ -53,7 +53,9 @@ library LibRegistryBeaconProxyTest { beaconName: BEACON_NAME, beaconPerNetwork: onlyOn(block.chainid, beacon), data: data, - salt: salt + salt: salt, + implementation: implementation, + implementationRuntimeCode: implementation.code }); } @@ -98,7 +100,9 @@ library LibRegistryBeaconProxyTest { data: params.data, salt: params.salt, dependencies: dependencies, - runtimeCode: runtimeCode + runtimeCode: runtimeCode, + implementation: params.implementation, + implementationRuntimeCode: params.implementationRuntimeCode }); } diff --git a/test/src/lib/LibRainDeployCloneMechanismRegistryBeaconProxy.t.sol b/test/src/lib/LibRainDeployCloneMechanismRegistryBeaconProxy.t.sol index eef93a4..5115361 100644 --- a/test/src/lib/LibRainDeployCloneMechanismRegistryBeaconProxy.t.sol +++ b/test/src/lib/LibRainDeployCloneMechanismRegistryBeaconProxy.t.sol @@ -94,7 +94,9 @@ contract LibRainDeployCloneMechanismRegistryBeaconProxyTest is Test { beaconName: proxy.beaconName, beaconPerNetwork: proxy.beaconPerNetwork, data: proxy.data, - salt: proxy.salt + salt: proxy.salt, + implementation: proxy.implementation, + implementationRuntimeCode: proxy.implementationRuntimeCode }); DeployCandidate memory candidate = LibRainDeployCloneMechanism.registryBeaconProxyCandidate(proxy); DeploySuite memory snapshot = candidate.snapshot; diff --git a/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol b/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol index b69f8c8..500decb 100644 --- a/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol +++ b/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol @@ -91,7 +91,9 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { beaconName: LibRegistryBeaconProxyTest.BEACON_NAME, beaconPerNetwork: new RegistryBeaconOnNetwork[](0), data: TEST_DATA, - salt: TEST_SALT + salt: TEST_SALT, + implementation: address(0), + implementationRuntimeCode: "" }); } @@ -115,7 +117,9 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { beaconName: params.beaconName, beaconPerNetwork: params.beaconPerNetwork, data: params.data, - salt: params.salt + salt: params.salt, + implementation: params.implementation, + implementationRuntimeCode: params.implementationRuntimeCode }); } @@ -241,7 +245,9 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { beaconName: LibRegistryBeaconProxyTest.BEACON_NAME, beaconPerNetwork: LibRegistryBeaconProxyTest.onlyOn(block.chainid, beaconAt), data: data, - salt: salt + salt: salt, + implementation: address(implementation), + implementationRuntimeCode: address(implementation).code }); bytes memory generated = LibRainDeployRegistryBeaconProxy.registryBeaconProxyRuntimeCodeOnNetwork( From 34c6d0bcd86dce2ed86754eb5edd2a6900cb1960 Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 14:49:14 +0000 Subject: [PATCH 19/43] Check per-network registry beacon proxy suites against each chain's proxy code hash Co-Authored-By: Claude Opus 5.5 --- ...yVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol | 9 +++++++++ ...SnapshotBaseRegistryBeaconProxyBeaconPerNetwork.t.sol | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol index e457aca..89af69f 100644 --- a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol +++ b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol @@ -45,6 +45,15 @@ contract RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetworkTest is RainDep return names; } + function expectedBytecodeHash(DeployDeclaration memory, DeploySuite memory suite, uint256 chainId) + internal + pure + override + returns (bytes32) + { + return LibRainDeployCloneMechanism.expectedBytecodeHash(suite, chainId); + } + function declaration() internal view override returns (DeployDeclaration memory) { RegistryBeaconProxyParams memory params = storedParams(); DeployDeclaration memory d; diff --git a/test/src/abstract/RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetwork.t.sol b/test/src/abstract/RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetwork.t.sol index 8b12615..a7c16a5 100644 --- a/test/src/abstract/RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetwork.t.sol +++ b/test/src/abstract/RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetwork.t.sol @@ -39,6 +39,15 @@ contract RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetworkTest is return names; } + function expectedBytecodeHash(DeployDeclaration memory, DeploySuite memory suite, uint256 chainId) + internal + pure + override + returns (bytes32) + { + return LibRainDeployCloneMechanism.expectedBytecodeHash(suite, chainId); + } + function declaration() internal view override returns (DeployDeclaration memory) { RegistryBeaconProxyParams memory params = storedParams(); DeployDeclaration memory d; From 609ff5ab5fe7411c0df974b39e1abd7a5b12e371 Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 14:51:08 +0000 Subject: [PATCH 20/43] Validate each chain's registry beacon proxy code record and the candidate's stored code against it Co-Authored-By: Claude Opus 5.5 --- src/lib/LibRainDeployCloneMechanism.sol | 1 + src/lib/LibRainDeployRegistryBeaconProxy.sol | 44 +++++++++++++++++++- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/src/lib/LibRainDeployCloneMechanism.sol b/src/lib/LibRainDeployCloneMechanism.sol index 99bebff..05e901f 100644 --- a/src/lib/LibRainDeployCloneMechanism.sol +++ b/src/lib/LibRainDeployCloneMechanism.sol @@ -929,6 +929,7 @@ library LibRainDeployCloneMechanism { implementation: proxy.implementation, implementationRuntimeCode: proxy.implementationRuntimeCode }); + LibRainDeployRegistryBeaconProxy.checkProxyCode(params, proxy.runtimeCode); return DeployCandidate({ snapshot: DeploySuite({ suite: proxy.suite, diff --git a/src/lib/LibRainDeployRegistryBeaconProxy.sol b/src/lib/LibRainDeployRegistryBeaconProxy.sol index 2905082..69218d3 100644 --- a/src/lib/LibRainDeployRegistryBeaconProxy.sol +++ b/src/lib/LibRainDeployRegistryBeaconProxy.sol @@ -92,6 +92,20 @@ library LibRainDeployRegistryBeaconProxy { /// @param chainId The chain id. error RegistryBeaconProxyNoBeaconOnNetwork(uint256 chainId); + /// Thrown when a chain's entry declares a zero proxy code hash or empty proxy runtime code. + /// @param chainId The chain id. + error RegistryBeaconProxyCodeNotDeclared(uint256 chainId); + + /// Thrown when a chain's proxy runtime code does not hash to its declared proxy code hash. + /// @param chainId The chain id. + /// @param declared The declared proxy code hash. + /// @param actual The hash of the declared proxy runtime code. + error RegistryBeaconProxyCodeHashIncoherent(uint256 chainId, bytes32 declared, bytes32 actual); + + /// Thrown when a suite's stored runtime code is no chain's declared proxy runtime code. + /// @param codeHash The hash of the stored runtime code. + error RegistryBeaconProxyRuntimeCodeOnNoNetwork(bytes32 codeHash); + /// Thrown when the beacon on a network does not carry its declared code hash. /// @param network The network. /// @param beacon The beacon. @@ -224,7 +238,8 @@ library LibRainDeployRegistryBeaconProxy { /// @param params The proxy's factory call. /// @param chainId The chain id. /// @return The one entry of `beaconPerNetwork` for `chainId`, refusing `RegistryBeaconProxyNoBeaconOnNetwork` for - /// none or several. + /// none or several, `RegistryBeaconProxyCodeNotDeclared` for a zero hash or empty code, and + /// `RegistryBeaconProxyCodeHashIncoherent` for code that does not hash to its hash. function beaconOnNetwork(RegistryBeaconProxyParams memory params, uint256 chainId) internal pure @@ -242,7 +257,32 @@ library LibRainDeployRegistryBeaconProxy { if (found == type(uint256).max) { revert RegistryBeaconProxyNoBeaconOnNetwork(chainId); } - return params.beaconPerNetwork[found]; + RegistryBeaconOnNetwork memory onNetwork = params.beaconPerNetwork[found]; + if (onNetwork.proxyCodeHash == bytes32(0) || onNetwork.proxyRuntimeCode.length == 0) { + revert RegistryBeaconProxyCodeNotDeclared(chainId); + } + bytes32 actual = keccak256(onNetwork.proxyRuntimeCode); + if (actual != onNetwork.proxyCodeHash) { + revert RegistryBeaconProxyCodeHashIncoherent(chainId, onNetwork.proxyCodeHash, actual); + } + return onNetwork; + } + + /// Refuses unless every entry of `beaconPerNetwork` passes `beaconOnNetwork` and `runtimeCode` is one entry's + /// proxy runtime code. + /// @param params The proxy's factory call. + /// @param runtimeCode The suite's stored runtime code. + function checkProxyCode(RegistryBeaconProxyParams memory params, bytes memory runtimeCode) internal pure { + bytes32 codeHash = keccak256(runtimeCode); + bool onSomeNetwork = false; + for (uint256 i = 0; i < params.beaconPerNetwork.length; i++) { + if (beaconOnNetwork(params, params.beaconPerNetwork[i].chainId).proxyCodeHash == codeHash) { + onSomeNetwork = true; + } + } + if (!onSomeNetwork) { + revert RegistryBeaconProxyRuntimeCodeOnNoNetwork(codeHash); + } } /// @param params The proxy's factory call. From 176da19d27c898f14d158384a3a42a6ba6df61d5 Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 14:51:36 +0000 Subject: [PATCH 21/43] Generate a registry beacon proxy's runtime code from its chain's entry without validating the code it generates Co-Authored-By: Claude Opus 5.5 --- src/lib/LibRainDeployRegistryBeaconProxy.sol | 29 +++++++++++++------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/src/lib/LibRainDeployRegistryBeaconProxy.sol b/src/lib/LibRainDeployRegistryBeaconProxy.sol index 69218d3..f1d7d3b 100644 --- a/src/lib/LibRainDeployRegistryBeaconProxy.sol +++ b/src/lib/LibRainDeployRegistryBeaconProxy.sol @@ -161,8 +161,9 @@ library LibRainDeployRegistryBeaconProxy { address implementation, bytes memory implementationCode ) internal returns (bytes memory) { + // The entry's proxy code is what this generates, so it is not validated here. return registryBeaconProxyRuntimeCode( - vm, params, beaconOnNetwork(params, chainId).beacon, implementation, implementationCode + vm, params, params.beaconPerNetwork[entryIndex(params, chainId)].beacon, implementation, implementationCode ); } @@ -245,6 +246,22 @@ library LibRainDeployRegistryBeaconProxy { pure returns (RegistryBeaconOnNetwork memory) { + RegistryBeaconOnNetwork memory onNetwork = params.beaconPerNetwork[entryIndex(params, chainId)]; + if (onNetwork.proxyCodeHash == bytes32(0) || onNetwork.proxyRuntimeCode.length == 0) { + revert RegistryBeaconProxyCodeNotDeclared(chainId); + } + bytes32 actual = keccak256(onNetwork.proxyRuntimeCode); + if (actual != onNetwork.proxyCodeHash) { + revert RegistryBeaconProxyCodeHashIncoherent(chainId, onNetwork.proxyCodeHash, actual); + } + return onNetwork; + } + + /// @param params The proxy's factory call. + /// @param chainId The chain id. + /// @return The index of the one entry of `beaconPerNetwork` for `chainId`, refusing + /// `RegistryBeaconProxyNoBeaconOnNetwork` for none or several. + function entryIndex(RegistryBeaconProxyParams memory params, uint256 chainId) internal pure returns (uint256) { uint256 found = type(uint256).max; for (uint256 i = 0; i < params.beaconPerNetwork.length; i++) { if (params.beaconPerNetwork[i].chainId == chainId) { @@ -257,15 +274,7 @@ library LibRainDeployRegistryBeaconProxy { if (found == type(uint256).max) { revert RegistryBeaconProxyNoBeaconOnNetwork(chainId); } - RegistryBeaconOnNetwork memory onNetwork = params.beaconPerNetwork[found]; - if (onNetwork.proxyCodeHash == bytes32(0) || onNetwork.proxyRuntimeCode.length == 0) { - revert RegistryBeaconProxyCodeNotDeclared(chainId); - } - bytes32 actual = keccak256(onNetwork.proxyRuntimeCode); - if (actual != onNetwork.proxyCodeHash) { - revert RegistryBeaconProxyCodeHashIncoherent(chainId, onNetwork.proxyCodeHash, actual); - } - return onNetwork; + return found; } /// Refuses unless every entry of `beaconPerNetwork` passes `beaconOnNetwork` and `runtimeCode` is one entry's From aec864a0e830f6f4eb732572395375c527e064ad Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 14:59:00 +0000 Subject: [PATCH 22/43] Fill per-chain proxy code in the registry test helpers (WIP, uncompiled) Co-Authored-By: Claude Opus 5.5 --- test/lib/LibRegistryBeaconProxyTest.sol | 58 +++++++++++++++---- ...DeployVerifyChainRegistryBeaconProxy.t.sol | 6 +- ...nRegistryBeaconProxyBeaconPerNetwork.t.sol | 4 +- ...eRegistryBeaconProxyBeaconPerNetwork.t.sol | 6 +- .../lib/LibRainDeployCloneOnChainChecks.t.sol | 6 +- .../LibRainDeployRegistryBeaconProxy.t.sol | 30 +++++++--- 6 files changed, 81 insertions(+), 29 deletions(-) diff --git a/test/lib/LibRegistryBeaconProxyTest.sol b/test/lib/LibRegistryBeaconProxyTest.sol index 503e2e4..b7b1d55 100644 --- a/test/lib/LibRegistryBeaconProxyTest.sol +++ b/test/lib/LibRegistryBeaconProxyTest.sol @@ -46,34 +46,72 @@ library LibRegistryBeaconProxyTest { address registry = address(new ConfigRegistry()); address beacon = address(new UpgradeableBeacon(implementation, beaconOwner)); bind(vm, registry, beacon); - return RegistryBeaconProxyParams({ + RegistryBeaconProxyParams memory params = RegistryBeaconProxyParams({ factory: address(new TestCloneFactory()), registry: registry, authority: AUTHORITY, beaconName: BEACON_NAME, - beaconPerNetwork: onlyOn(block.chainid, beacon), + beaconPerNetwork: new RegistryBeaconOnNetwork[](0), data: data, salt: salt, implementation: implementation, implementationRuntimeCode: implementation.code }); + params.beaconPerNetwork = onlyOn(vm, params, block.chainid, beacon); + return params; } - /// @param chainId The chain id. - /// @param beacon The beacon. - /// @return `beacon` on `chainId`, at the hash of the code it holds now. - function onNetwork(uint256 chainId, address beacon) internal view returns (RegistryBeaconOnNetwork memory) { + /// `entry` with the runtime code `params`'s proxy has with the name bound to the entry's beacon, simulated with + /// that beacon serving `params.implementation`, and that code's hash. + /// @param vm The Vm instance to simulate with. + /// @param params The factory call. + /// @param entry The entry. + /// @return `entry` with its proxy code. + function withProxyCode(Vm vm, RegistryBeaconProxyParams memory params, RegistryBeaconOnNetwork memory entry) + internal + returns (RegistryBeaconOnNetwork memory) + { + bytes memory proxyRuntimeCode = LibRainDeployRegistryBeaconProxy.registryBeaconProxyRuntimeCode( + vm, params, entry.beacon, params.implementation, params.implementationRuntimeCode + ); return RegistryBeaconOnNetwork({ - chainId: chainId, beacon: beacon, codeHash: beacon.codehash, proxyCodeHash: bytes32(0), proxyRuntimeCode: "" + chainId: entry.chainId, + beacon: entry.beacon, + codeHash: entry.codeHash, + proxyCodeHash: keccak256(proxyRuntimeCode), + proxyRuntimeCode: proxyRuntimeCode }); } + /// @param vm The Vm instance to simulate with. + /// @param params The factory call. /// @param chainId The chain id. /// @param beacon The beacon. - /// @return `onNetwork(chainId, beacon)` alone. - function onlyOn(uint256 chainId, address beacon) internal view returns (RegistryBeaconOnNetwork[] memory) { + /// @return `beacon` on `chainId`, at the hash of the code it holds now, with `params`'s proxy code there. + function onNetwork(Vm vm, RegistryBeaconProxyParams memory params, uint256 chainId, address beacon) + internal + returns (RegistryBeaconOnNetwork memory) + { + return withProxyCode( + vm, + params, + RegistryBeaconOnNetwork({ + chainId: chainId, beacon: beacon, codeHash: beacon.codehash, proxyCodeHash: bytes32(0), proxyRuntimeCode: "" + }) + ); + } + + /// @param vm The Vm instance to simulate with. + /// @param params The factory call. + /// @param chainId The chain id. + /// @param beacon The beacon. + /// @return `onNetwork(vm, params, chainId, beacon)` alone. + function onlyOn(Vm vm, RegistryBeaconProxyParams memory params, uint256 chainId, address beacon) + internal + returns (RegistryBeaconOnNetwork[] memory) + { RegistryBeaconOnNetwork[] memory beaconPerNetwork = new RegistryBeaconOnNetwork[](1); - beaconPerNetwork[0] = onNetwork(chainId, beacon); + beaconPerNetwork[0] = onNetwork(vm, params, chainId, beacon); return beaconPerNetwork; } diff --git a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxy.t.sol b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxy.t.sol index a4c7a5b..a655cb7 100644 --- a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxy.t.sol +++ b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxy.t.sol @@ -53,7 +53,7 @@ contract RainDeployVerifyChainRegistryBeaconProxyTest is PerNetworkCloneBeaconVe RegistryBeaconProxyParams memory params = LibRegistryBeaconProxyTest.live(vm, addresses[1], OWNER, hex"deadbeef", bytes32(uint256(5))); sBeacon = params.beaconPerNetwork[0].beacon; - params.beaconPerNetwork = LibRegistryBeaconProxyTest.onlyOn(PER_NETWORK_CLONE_POLYGON_CHAIN_ID, sBeacon); + params.beaconPerNetwork = LibRegistryBeaconProxyTest.onlyOn(vm, params, PER_NETWORK_CLONE_POLYGON_CHAIN_ID, sBeacon); sParamsData = abi.encode(params); vm.makePersistent(params.factory); vm.makePersistent(params.registry); @@ -106,8 +106,8 @@ contract RainDeployVerifyChainRegistryBeaconProxyTest is PerNetworkCloneBeaconVe function testRegistryBeaconProxyWithOneBeaconListedForEachChainPassesOnEach() external { RegistryBeaconProxyParams memory params = storedParams(); RegistryBeaconOnNetwork[] memory both = new RegistryBeaconOnNetwork[](2); - both[0] = LibRegistryBeaconProxyTest.onNetwork(PER_NETWORK_CLONE_ARBITRUM_ONE_CHAIN_ID, sBeacon); - both[1] = LibRegistryBeaconProxyTest.onNetwork(PER_NETWORK_CLONE_POLYGON_CHAIN_ID, sBeacon); + both[0] = LibRegistryBeaconProxyTest.onNetwork(vm, params, PER_NETWORK_CLONE_ARBITRUM_ONE_CHAIN_ID, sBeacon); + both[1] = LibRegistryBeaconProxyTest.onNetwork(vm, params, PER_NETWORK_CLONE_POLYGON_CHAIN_ID, sBeacon); params.beaconPerNetwork = both; sParamsData = abi.encode(params); this.externalCheckOnEveryLocalFork(liveProxySuite()); diff --git a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol index 89af69f..ca1bb57 100644 --- a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol +++ b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol @@ -81,7 +81,7 @@ contract RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetworkTest is RainDep SupportedNetwork[] memory configs = LibRainDeploy.declaredNetworkConfigs(networks()); params.beaconPerNetwork = new RegistryBeaconOnNetwork[](3); for (uint256 i = 0; i < 3; i++) { - params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.onNetwork(configs[i].chainId, beacons[i]); + params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.onNetwork(vm, params, configs[i].chainId, beacons[i]); } sParamsData = abi.encode(params); } @@ -142,7 +142,7 @@ contract RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetworkTest is RainDep RegistryBeaconProxyParams memory params = storedParams(); DeploySuite memory suite = proxySuite(params); RegistryBeaconProxyParams memory one = storedParams(); - one.beaconPerNetwork = LibRegistryBeaconProxyTest.onlyOn(42161, params.beaconPerNetwork[0].beacon); + one.beaconPerNetwork = LibRegistryBeaconProxyTest.onlyOn(vm, one, 42161, params.beaconPerNetwork[0].beacon); address expected = proxySuite(one).storedDeployedAddress; assertEq(suite.storedDeployedAddress, expected); SupportedNetwork[] memory configs = LibRainDeploy.declaredNetworkConfigs(networks()); diff --git a/test/src/abstract/RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetwork.t.sol b/test/src/abstract/RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetwork.t.sol index a7c16a5..5410b3b 100644 --- a/test/src/abstract/RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetwork.t.sol +++ b/test/src/abstract/RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetwork.t.sol @@ -75,7 +75,7 @@ contract RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetworkTest is SupportedNetwork[] memory configs = LibRainDeploy.declaredNetworkConfigs(networks()); params.beaconPerNetwork = new RegistryBeaconOnNetwork[](3); for (uint256 i = 0; i < 3; i++) { - params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.onNetwork(configs[i].chainId, beacons[i]); + params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.onNetwork(vm, params, configs[i].chainId, beacons[i]); } sParamsData = abi.encode(params); } @@ -129,7 +129,7 @@ contract RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetworkTest is RegistryBeaconProxyParams memory params = storedParams(); address beacon = params.beaconPerNetwork[0].beacon; for (uint256 i = 0; i < 3; i++) { - params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.onNetwork(params.beaconPerNetwork[i].chainId, beacon); + params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.onNetwork(vm, params, params.beaconPerNetwork[i].chainId, beacon); } DeploySuite memory suite = proxySuite(params); DerivedDeploy memory derived = this.externalDeriveDeployment(suite); @@ -144,7 +144,7 @@ contract RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetworkTest is RegistryBeaconProxyParams memory params = storedParams(); address beacon = params.beaconPerNetwork[0].beacon; for (uint256 i = 0; i < 3; i++) { - params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.onNetwork(params.beaconPerNetwork[i].chainId, beacon); + params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.onNetwork(vm, params, params.beaconPerNetwork[i].chainId, beacon); } this.externalCheckInternallyConsistent(proxySuite(params)); } diff --git a/test/src/lib/LibRainDeployCloneOnChainChecks.t.sol b/test/src/lib/LibRainDeployCloneOnChainChecks.t.sol index ab67f68..78e1031 100644 --- a/test/src/lib/LibRainDeployCloneOnChainChecks.t.sol +++ b/test/src/lib/LibRainDeployCloneOnChainChecks.t.sol @@ -154,7 +154,7 @@ contract LibRainDeployCloneOnChainChecksBroadcastSeatTest is Test { for (uint256 i = 0; i < chainIds.length; i++) { address onChain = i == 0 ? first : address(new UpgradeableBeacon(address(new MockCloneableV2()), owners[i])); - params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.onNetwork(chainIds[i], onChain); + params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.onNetwork(vm, params, chainIds[i], onChain); } DeploySuite memory suite = LibRainDeployCloneMechanism.registryBeaconProxyCandidate( @@ -196,8 +196,8 @@ contract LibRainDeployCloneOnChainChecksBroadcastSeatTest is Test { (RegistryBeaconProxyParams memory params,) = registrySuite(DEPLOYER); address shared = params.beaconPerNetwork[0].beacon; RegistryBeaconOnNetwork[] memory both = new RegistryBeaconOnNetwork[](2); - both[0] = LibRegistryBeaconProxyTest.onNetwork(42161, shared); - both[1] = LibRegistryBeaconProxyTest.onNetwork(8453, shared); + both[0] = LibRegistryBeaconProxyTest.onNetwork(vm, params, 42161, shared); + both[1] = LibRegistryBeaconProxyTest.onNetwork(vm, params, 8453, shared); params.beaconPerNetwork = both; DeploySuite memory suite = LibRainDeployCloneMechanism.registryBeaconProxyCandidate( diff --git a/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol b/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol index 500decb..c6d4ab6 100644 --- a/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol +++ b/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol @@ -109,6 +109,20 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { return beaconPerNetwork; } + /// `unlivedParams` over `threeChains`, each entry carrying the proxy code its beacon gives, the beacons serving a + /// `MockCloneableV2`. + function unlivedThreeChains() internal returns (RegistryBeaconProxyParams memory) { + RegistryBeaconProxyParams memory params = unlivedParams(); + MockCloneableV2 implementation = new MockCloneableV2(); + params.implementation = address(implementation); + params.implementationRuntimeCode = address(implementation).code; + params.beaconPerNetwork = threeChains(); + for (uint256 i = 0; i < params.beaconPerNetwork.length; i++) { + params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.withProxyCode(vm, params, params.beaconPerNetwork[i]); + } + return params; + } + function copy(RegistryBeaconProxyParams memory params) internal pure returns (RegistryBeaconProxyParams memory) { return RegistryBeaconProxyParams({ factory: params.factory, @@ -243,12 +257,13 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { registry: registryAt, authority: LibRegistryBeaconProxyTest.AUTHORITY, beaconName: LibRegistryBeaconProxyTest.BEACON_NAME, - beaconPerNetwork: LibRegistryBeaconProxyTest.onlyOn(block.chainid, beaconAt), + beaconPerNetwork: new RegistryBeaconOnNetwork[](0), data: data, salt: salt, implementation: address(implementation), implementationRuntimeCode: address(implementation).code }); + params.beaconPerNetwork = LibRegistryBeaconProxyTest.onlyOn(vm, params, block.chainid, beaconAt); bytes memory generated = LibRainDeployRegistryBeaconProxy.registryBeaconProxyRuntimeCodeOnNetwork( vm, params, block.chainid, address(implementation), address(implementation).code @@ -407,9 +422,8 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { this.externalCheckBeacon(LibRainDeploy.ARBITRUM_ONE, params); } - function testBeaconOnNetworkAnswersEachChainsOwnEntry() external view { - RegistryBeaconProxyParams memory params = unlivedParams(); - params.beaconPerNetwork = threeChains(); + function testBeaconOnNetworkAnswersEachChainsOwnEntry() external { + RegistryBeaconProxyParams memory params = unlivedThreeChains(); for (uint256 i = 0; i < params.beaconPerNetwork.length; i++) { assertEq( abi.encode(this.externalBeaconOnNetwork(params, params.beaconPerNetwork[i].chainId)), @@ -476,7 +490,7 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { ]; params.beaconPerNetwork = new RegistryBeaconOnNetwork[](3); for (uint256 i = 0; i < 3; i++) { - params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.onNetwork(chainIds[i], beacons[i]); + params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.onNetwork(vm, params, chainIds[i], beacons[i]); } for (uint256 i = 0; i < 3; i++) { vm.chainId(chainIds[i]); @@ -583,7 +597,7 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { vm.assume(codeless.code.length == 0 && uint160(codeless) > 0xffff); vm.warp(block.timestamp + 1); LibRegistryBeaconProxyTest.bind(vm, params.registry, codeless); - params.beaconPerNetwork = LibRegistryBeaconProxyTest.onlyOn(block.chainid, codeless); + params.beaconPerNetwork = LibRegistryBeaconProxyTest.onlyOn(vm, params, block.chainid, codeless); address expected = LibRainDeployRegistryBeaconProxy.registryBeaconProxyDeployedAddress(params); vm.expectRevert(abi.encodeWithSelector(ZeroBeaconCodeSize.selector)); this.externalDeployStep(LibRainDeploy.ARBITRUM_ONE, DEPLOYER, abi.encode(params)); @@ -637,7 +651,7 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { uint256[3] memory chainIds = [uint256(42161), 8453, 137]; params.beaconPerNetwork = new RegistryBeaconOnNetwork[](3); for (uint256 i = 0; i < 3; i++) { - params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.onNetwork(chainIds[i], beacon); + params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.onNetwork(vm, params, chainIds[i], beacon); } bytes memory expectedCode = LibRegistryBeaconProxyTest.runtimeOf(vm, params); address expected = LibRainDeployRegistryBeaconProxy.registryBeaconProxyDeployedAddress(params); @@ -661,7 +675,7 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { ]; params.beaconPerNetwork = new RegistryBeaconOnNetwork[](3); for (uint256 i = 0; i < 3; i++) { - params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.onNetwork(chainIds[i], beacons[i]); + params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.onNetwork(vm, params, chainIds[i], beacons[i]); } address expected = LibRainDeployRegistryBeaconProxy.registryBeaconProxyDeployedAddress(params); uint256 state = vm.snapshotState(); From 4ece5f5d6211861446f3f4612f6751e6e3446199 Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 18:12:08 +0000 Subject: [PATCH 23/43] Bump rain-deploy to the 0.1.44 release Co-Authored-By: Claude Opus 5.5 --- foundry.toml | 2 +- script/Build.sol | 4 ++-- soldeer.lock | 7 ++++--- src/lib/LibCloneCandidates.sol | 6 +++--- src/lib/LibICloneableFactoryV7.sol | 2 +- src/lib/LibRainDeployBeacon.sol | 6 +++--- src/lib/LibRainDeployBeaconDeclarationChecks.sol | 2 +- src/lib/LibRainDeployBeaconProxy.sol | 2 +- src/lib/LibRainDeployBeaconResolution.sol | 8 ++++---- src/lib/LibRainDeployClone.sol | 2 +- src/lib/LibRainDeployCloneBuild.sol | 2 +- src/lib/LibRainDeployCloneMechanism.sol | 8 ++++---- src/lib/LibRainDeployCloneOnChainChecks.sol | 6 +++--- src/lib/LibRainDeployCloneSnapshot.sol | 6 +++--- src/lib/LibRainDeployExtendedNetworks.sol | 2 +- src/lib/LibRainDeployRegistryBeaconProxy.sol | 6 +++--- test/abstract/BeaconVerifyFixture.sol | 14 +++++++------- test/abstract/ExampleCloneDeploys.sol | 8 ++++---- test/abstract/ExternalDeployBroadcast.sol | 4 ++-- test/abstract/ExternalDeploySuites.sol | 6 +++--- test/abstract/PerNetworkCloneBeaconVerifyChain.sol | 10 +++++----- test/abstract/PerNetworkCloneDeploys.sol | 8 ++++---- ...loyVerifyChainBeaconPerNetworkCloneTestBase.sol | 6 +++--- test/abstract/UpgradedPerNetworkCloneDeploys.sol | 6 +++--- test/abstract/ZoltuDeployOrAdopt.sol | 2 +- test/concrete/BeaconOwnerDeploy.sol | 6 +++--- test/concrete/BeaconProxyOnlyDeploySuites.sol | 6 +++--- test/concrete/CloneBuildScriptHarness.sol | 12 ++++++------ test/concrete/ExampleCloneDeploy.sol | 4 ++-- test/concrete/LocalForkVm.sol | 2 +- .../concrete/MixedCloneBeaconProxyDeploySuites.sol | 2 +- test/concrete/MockRegistryReadingCloneable.sol | 2 +- test/concrete/OriginOwnedCloneDeploy.sol | 8 ++++---- .../concrete/PerNetworkCloneBuildScriptHarness.sol | 12 ++++++------ test/concrete/PerNetworkCloneDeploy.sol | 6 +++--- ...TwoReleasePerNetworkCloneBuildScriptHarness.sol | 2 +- test/concrete/UpgradedPerNetworkCloneDeploy.sol | 6 +++--- .../WideCandidatePerNetworkCloneDeploy.sol | 8 ++++---- .../lib/LibMockCloneableReleased.sol | 4 ++-- test/lib/LibBeaconProxyTest.sol | 2 +- test/lib/LibBeaconTest.sol | 12 ++++++------ test/lib/LibExternalDeployments.sol | 2 +- test/lib/LibRegistryBeaconProxyTest.sol | 6 +++--- test/lib/LibSuiteIndexPointers.sol | 4 ++-- test/src/abstract/BuildScriptClone.t.sol | 2 +- .../abstract/RainDeployBroadcastBeaconSeat.t.sol | 6 +++--- test/src/abstract/RainDeployBroadcastClone.t.sol | 6 +++--- .../RainDeployBroadcastClonePerNetwork.t.sol | 4 ++-- .../abstract/RainDeployBroadcastSingleClone.t.sol | 4 ++-- test/src/abstract/RainDeployVerifyBaseBeacon.t.sol | 6 +++--- .../RainDeployVerifyBaseBeaconChainSeated.t.sol | 4 ++-- ...ployVerifyBaseBeaconPerNetworkCloneSeated.t.sol | 4 ++-- .../RainDeployVerifyBaseBeaconRevertingRead.t.sol | 4 ++-- .../src/abstract/RainDeployVerifyChainBeacon.t.sol | 12 ++++++------ ...erifyChainBeaconPerNetworkCloneUnrecorded.t.sol | 2 +- .../RainDeployVerifyChainBeaconProxy.t.sol | 4 ++-- test/src/abstract/RainDeployVerifyChainClone.t.sol | 6 +++--- .../RainDeployVerifyChainCloneDependencies.t.sol | 8 ++++---- .../RainDeployVerifyChainClonePerNetwork.t.sol | 6 +++--- ...nDeployVerifyChainClonePerNetworkExtended.t.sol | 10 +++++----- ...ainDeployVerifyChainClonePerNetworkSubset.t.sol | 6 +++--- ...eployVerifyChainClonePerNetworkUndeclared.t.sol | 8 ++++---- ...eployVerifyChainClonePerNetworkUnrecorded.t.sol | 6 +++--- ...ifyChainClonePerNetworkUnrecordedUpgraded.t.sol | 6 +++--- .../RainDeployVerifyChainRegistryBeaconProxy.t.sol | 4 ++-- ...yChainRegistryBeaconProxyBeaconPerNetwork.t.sol | 8 ++++---- .../RainDeployVerifyDeclarationClone.t.sol | 8 ++++---- .../RainDeployVerifySnapshotBaseBeacon.t.sol | 12 ++++++------ .../RainDeployVerifySnapshotBaseClone.t.sol | 8 ++++---- ...inDeployVerifySnapshotBaseClonePerNetwork.t.sol | 8 ++++---- ...otBaseRegistryBeaconProxyBeaconPerNetwork.t.sol | 10 +++++----- test/src/lib/LibCloneCandidates.t.sol | 6 +++--- ...ibICloneableFactoryV7.registryBeaconProxy.t.sol | 2 +- test/src/lib/LibRainDeployBeacon.t.sol | 10 +++++----- test/src/lib/LibRainDeployBeaconProxy.t.sol | 2 +- ...eaconResolution.chainGatedPerNetworkClone.t.sol | 8 ++++---- ...LibRainDeployBeaconResolution.sharedIndex.t.sol | 8 ++++---- test/src/lib/LibRainDeployBeaconResolution.t.sol | 2 +- ...oyBeaconResolution.unrevertableDerivation.t.sol | 8 ++++---- test/src/lib/LibRainDeployClone.t.sol | 2 +- ...inDeployCloneMechanism.configRegistryRead.t.sol | 12 ++++++------ ...ainDeployCloneMechanism.dependencyClosure.t.sol | 8 ++++---- ...LibRainDeployCloneMechanism.deployLocally.t.sol | 6 +++--- .../lib/LibRainDeployCloneMechanism.handlers.t.sol | 4 ++-- ...bRainDeployCloneMechanism.recordedAddress.t.sol | 2 +- test/src/lib/LibRainDeployCloneMechanism.t.sol | 10 +++++----- .../LibRainDeployCloneMechanismBeaconProxy.t.sol | 8 ++++---- .../lib/LibRainDeployCloneMechanismBroadcast.t.sol | 6 +++--- .../LibRainDeployCloneMechanismCandidates.t.sol | 2 +- ...inDeployCloneMechanismRegistryBeaconProxy.t.sol | 6 +++--- ...yCloneOnChainChecks.declarationPerNetwork.t.sol | 2 +- ...bRainDeployCloneOnChainChecks.probeBeacon.t.sol | 6 +++--- ...loyCloneOnChainChecks.registryBeaconProxy.t.sol | 4 ++-- .../LibRainDeployCloneOnChainChecks.released.t.sol | 4 ++-- test/src/lib/LibRainDeployCloneOnChainChecks.t.sol | 4 ++-- test/src/lib/LibRainDeployClonePerNetwork.t.sol | 2 +- .../LibRainDeployCloneSnapshot.beaconProxy.t.sol | 8 ++++---- ...inDeployCloneSnapshot.registryBeaconProxy.t.sol | 6 +++--- test/src/lib/LibRainDeployCloneSnapshot.t.sol | 10 +++++----- test/src/lib/LibRainDeployExtendedNetworks.t.sol | 2 +- .../src/lib/LibRainDeployRegistryBeaconProxy.t.sol | 4 ++-- ...bRainDeploySnapshotRecordedMechanismClone.t.sol | 10 +++++----- 102 files changed, 294 insertions(+), 293 deletions(-) diff --git a/foundry.toml b/foundry.toml index 32d32f9..9ce667b 100644 --- a/foundry.toml +++ b/foundry.toml @@ -52,7 +52,7 @@ forge-std = "1.17.0" # a bump that changes `src/generated/` needs a new interface version. "@openzeppelin-contracts" = "5.7.0" rain-sol-codegen = "0.1.39" -rain-deploy = { version = "0.1.43", git = "https://github.com/rainlanguage/rain.deploy.git", rev = "1ae4dcd0c357748fa3b3eaa8c6abf80cca099c33" } +rain-deploy = "0.1.44" # rain-deploy imports it by path. rain-extrospection = "0.1.31" # rain-extrospection imports it by path. diff --git a/script/Build.sol b/script/Build.sol index 8ce5d76..519b241 100644 --- a/script/Build.sol +++ b/script/Build.sol @@ -7,8 +7,8 @@ import {BeaconProxy} from "@openzeppelin-contracts-5.7.0/proxy/beacon/BeaconProx import {RegistryBeaconProxy} from "./RegistryBeaconProxy.sol"; import {LibCodeGen} from "rain-sol-codegen-0.1.39/src/lib/LibCodeGen.sol"; import {LibFs} from "rain-sol-codegen-0.1.39/src/lib/LibFs.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {LibRainDeployConfig} from "rain-deploy-0.1.43/src/lib/LibRainDeployConfig.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {LibRainDeployConfig} from "rain-deploy-0.1.44/src/lib/LibRainDeployConfig.sol"; /// @title Build /// @notice Writes `src/generated/BeaconProxy.sol`: OpenZeppelin `BeaconProxy`'s diff --git a/soldeer.lock b/soldeer.lock index 9e62c0a..8eaadf3 100644 --- a/soldeer.lock +++ b/soldeer.lock @@ -14,9 +14,10 @@ integrity = "fa706c8a7caf3426c90f75e6aafa3224b0a6c899b490800cf6944e4ec42f9344" [[dependencies]] name = "rain-deploy" -version = "0.1.43" -git = "https://github.com/rainlanguage/rain.deploy.git" -rev = "1ae4dcd0c357748fa3b3eaa8c6abf80cca099c33" +version = "0.1.44" +url = "https://soldeer-revisions.s3.amazonaws.com/rain-deploy/0_1_44_30-11-2026_18:00:04_rain.zip" +checksum = "2d014abdc7c24f538b3fe681aca69bd90da02cc98f7f483eeaf0e8cef910a994" +integrity = "46a335fae8cf3ca9aa60cb3d7240426af770ce2c2abd7543991c98e6c8991379" [[dependencies]] name = "rain-extrospection" diff --git a/src/lib/LibCloneCandidates.sol b/src/lib/LibCloneCandidates.sol index 6a20b4c..9c49d30 100644 --- a/src/lib/LibCloneCandidates.sol +++ b/src/lib/LibCloneCandidates.sol @@ -2,9 +2,9 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity ^0.8.25; -import {DeployCandidate, DeployDeclaration} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; +import {DeployCandidate, DeployDeclaration} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; import {CloneDeploy} from "./LibRainDeployClone.sol"; import {BeaconProxyDeploy} from "./LibRainDeployBeaconProxy.sol"; import {RegistryBeaconProxyDeploy} from "./LibRainDeployRegistryBeaconProxy.sol"; diff --git a/src/lib/LibICloneableFactoryV7.sol b/src/lib/LibICloneableFactoryV7.sol index 4c38cd0..ccf484f 100644 --- a/src/lib/LibICloneableFactoryV7.sol +++ b/src/lib/LibICloneableFactoryV7.sol @@ -8,7 +8,7 @@ import { } from "../interface/ICloneableFactoryV7.sol"; import {LibICloneableFactoryV5} from "./LibICloneableFactoryV5.sol"; import {REGISTRY_BEACON_PROXY_CREATION_CODE} from "../generated/RegistryBeaconProxy.sol"; -import {IConfigRegistryV5} from "rain-deploy-0.1.43/src/interface/IConfigRegistryV5.sol"; +import {IConfigRegistryV5} from "rain-deploy-0.1.44/src/interface/IConfigRegistryV5.sol"; /// @dev The value type hash a beacon binding must carry. bytes32 constant BEACON_BINDING_VALUE_TYPE_HASH = keccak256("address"); diff --git a/src/lib/LibRainDeployBeacon.sol b/src/lib/LibRainDeployBeacon.sol index 44cff59..feab10c 100644 --- a/src/lib/LibRainDeployBeacon.sol +++ b/src/lib/LibRainDeployBeacon.sol @@ -5,9 +5,9 @@ pragma solidity ^0.8.25; import {IBeacon} from "@openzeppelin-contracts-5.7.0/proxy/beacon/IBeacon.sol"; import {IERC5313} from "@openzeppelin-contracts-5.7.0/interfaces/IERC5313.sol"; import {Ownable2Step} from "@openzeppelin-contracts-5.7.0/access/Ownable2Step.sol"; -import {MIGRATION_HEAD_GENESIS, Prerequisite} from "rain-deploy-0.1.43/src/interface/IMigrationRegistryV5.sol"; -import {LibMigrationRegistry} from "rain-deploy-0.1.43/src/lib/LibMigrationRegistry.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {MIGRATION_HEAD_GENESIS, Prerequisite} from "rain-deploy-0.1.44/src/interface/IMigrationRegistryV5.sol"; +import {LibMigrationRegistry} from "rain-deploy-0.1.44/src/lib/LibMigrationRegistry.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; /// The declared suite a beacon points at, by key, and its owner. /// @param implementation The key of the released suite `implementation()` MUST return the address of. diff --git a/src/lib/LibRainDeployBeaconDeclarationChecks.sol b/src/lib/LibRainDeployBeaconDeclarationChecks.sol index 32e6a1c..316973b 100644 --- a/src/lib/LibRainDeployBeaconDeclarationChecks.sol +++ b/src/lib/LibRainDeployBeaconDeclarationChecks.sol @@ -2,7 +2,7 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity ^0.8.25; -import {DeployDeclaration} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; +import {DeployDeclaration} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; import {LibRainDeployBeaconResolution} from "./LibRainDeployBeaconResolution.sol"; /// @param chainId The beacon's chain id. diff --git a/src/lib/LibRainDeployBeaconProxy.sol b/src/lib/LibRainDeployBeaconProxy.sol index 55a8e25..07231a0 100644 --- a/src/lib/LibRainDeployBeaconProxy.sol +++ b/src/lib/LibRainDeployBeaconProxy.sol @@ -10,7 +10,7 @@ import {ICloneableFactoryV6} from "../interface/deprecated/ICloneableFactoryV6.s import {BEACON_PROXY_CREATION_CODE} from "../generated/BeaconProxy.sol"; import {LibICloneableFactoryV5} from "./LibICloneableFactoryV5.sol"; -import {DeployDependency} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {DeployDependency} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import {CloneParams} from "./LibRainDeployClone.sol"; /// @dev The artifact path a beacon proxy suite carries. It names no compiled source here: see diff --git a/src/lib/LibRainDeployBeaconResolution.sol b/src/lib/LibRainDeployBeaconResolution.sol index e120090..7a7e377 100644 --- a/src/lib/LibRainDeployBeaconResolution.sol +++ b/src/lib/LibRainDeployBeaconResolution.sol @@ -8,14 +8,14 @@ import { DeployDeclaration, DeploySuite, DerivationSnapshotRevertFailed -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; import { DerivedDeploy, NoDerivedDeployment, NotDerivedOnChain -} from "rain-deploy-0.1.43/src/abstract/RainDeployVerifyBase.sol"; -import {LibRainDeploy, SupportedNetwork} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {DeploySuiteIndex, LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeployVerifyBase.sol"; +import {LibRainDeploy, SupportedNetwork} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {DeploySuiteIndex, LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; import {ChainBeacon, DeployBeacon, LibRainDeployBeacon} from "./LibRainDeployBeacon.sol"; import {LibRainDeployCloneMechanism} from "./LibRainDeployCloneMechanism.sol"; import { diff --git a/src/lib/LibRainDeployClone.sol b/src/lib/LibRainDeployClone.sol index a32f8d6..3425f8f 100644 --- a/src/lib/LibRainDeployClone.sol +++ b/src/lib/LibRainDeployClone.sol @@ -7,7 +7,7 @@ import {console2} from "forge-std-1.17.0/src/console2.sol"; import {ICloneableFactoryV6} from "../interface/deprecated/ICloneableFactoryV6.sol"; import {LibICloneableFactoryV5} from "./LibICloneableFactoryV5.sol"; -import {DeployDependency} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {DeployDependency} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import {ChainDeploy} from "./LibRainDeployExtendedNetworks.sol"; uint256 constant EIP1167_CREATION_CODE_PREFIX_LENGTH = 10; diff --git a/src/lib/LibRainDeployCloneBuild.sol b/src/lib/LibRainDeployCloneBuild.sol index a6d2de4..91a52f2 100644 --- a/src/lib/LibRainDeployCloneBuild.sol +++ b/src/lib/LibRainDeployCloneBuild.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.25; import {Vm} from "forge-std-1.17.0/src/Vm.sol"; import {RAIN_COPYRIGHT_TEXT, RAIN_SPDX_LICENSE_IDENTIFIER} from "rain-sol-codegen-0.1.39/src/lib/LibCodeGen.sol"; -import {DeployDeclaration} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; +import {DeployDeclaration} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; import {ChainDeploy, LibRainDeployExtendedNetworks} from "./LibRainDeployExtendedNetworks.sol"; import {CloneLayerConfig, LibRainDeployCloneMechanism} from "./LibRainDeployCloneMechanism.sol"; diff --git a/src/lib/LibRainDeployCloneMechanism.sol b/src/lib/LibRainDeployCloneMechanism.sol index 05e901f..0052469 100644 --- a/src/lib/LibRainDeployCloneMechanism.sol +++ b/src/lib/LibRainDeployCloneMechanism.sol @@ -11,12 +11,12 @@ import { DeployDeclaration, DeployMechanismHandler, DeploySuite -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeploy, SupportedNetwork} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {DeploySuiteIndex, LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeploy, SupportedNetwork} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {DeploySuiteIndex, LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; import {ChainDeploy, LibRainDeployExtendedNetworks} from "./LibRainDeployExtendedNetworks.sol"; import {ChainBeacon} from "./LibRainDeployBeacon.sol"; -import {LibRainDeploySnapshot} from "rain-deploy-0.1.43/src/lib/LibRainDeploySnapshot.sol"; +import {LibRainDeploySnapshot} from "rain-deploy-0.1.44/src/lib/LibRainDeploySnapshot.sol"; import { CLONE_ARTIFACT_PATH, CLONE_UNANCHORABLE_REASON, diff --git a/src/lib/LibRainDeployCloneOnChainChecks.sol b/src/lib/LibRainDeployCloneOnChainChecks.sol index 52e902c..59018a9 100644 --- a/src/lib/LibRainDeployCloneOnChainChecks.sol +++ b/src/lib/LibRainDeployCloneOnChainChecks.sol @@ -10,9 +10,9 @@ import { DeployDeclaration, DeployMechanismHandler, DeploySuite -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {DeploySuiteIndex, LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {DeploySuiteIndex, LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import {ChainBeacon, LibRainDeployBeacon} from "./LibRainDeployBeacon.sol"; import { BEACON_PROXY_MECHANISM, diff --git a/src/lib/LibRainDeployCloneSnapshot.sol b/src/lib/LibRainDeployCloneSnapshot.sol index 568ef78..10372b4 100644 --- a/src/lib/LibRainDeployCloneSnapshot.sol +++ b/src/lib/LibRainDeployCloneSnapshot.sol @@ -5,14 +5,14 @@ pragma solidity ^0.8.25; import {Vm} from "forge-std-1.17.0/src/Vm.sol"; import {LibCodeGen} from "rain-sol-codegen-0.1.39/src/lib/LibCodeGen.sol"; import {LibFs} from "rain-sol-codegen-0.1.39/src/lib/LibFs.sol"; -import {DeployDeclaration, DeploySuite, SnapshotFile} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {DeploySuiteIndex} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; +import {DeployDeclaration, DeploySuite, SnapshotFile} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {DeploySuiteIndex} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; import { FrozenSnapshotMechanismDataAmbiguous, FrozenSnapshotMechanismDataMissing, FrozenSnapshotUnreadable, LibRainDeploySnapshot -} from "rain-deploy-0.1.43/src/lib/LibRainDeploySnapshot.sol"; +} from "rain-deploy-0.1.44/src/lib/LibRainDeploySnapshot.sol"; import {CloneNetworks} from "./LibRainDeployClone.sol"; import { BEACON_PROXY_MECHANISM, diff --git a/src/lib/LibRainDeployExtendedNetworks.sol b/src/lib/LibRainDeployExtendedNetworks.sol index ff59da1..cf7a8b8 100644 --- a/src/lib/LibRainDeployExtendedNetworks.sol +++ b/src/lib/LibRainDeployExtendedNetworks.sol @@ -8,7 +8,7 @@ import { RAIN_COPYRIGHT_TEXT, RAIN_SPDX_LICENSE_IDENTIFIER } from "rain-sol-codegen-0.1.39/src/lib/LibCodeGen.sol"; -import {LibRainDeploySnapshot} from "rain-deploy-0.1.43/src/lib/LibRainDeploySnapshot.sol"; +import {LibRainDeploySnapshot} from "rain-deploy-0.1.44/src/lib/LibRainDeploySnapshot.sol"; /// One network a suite deploys to with its own data, and therefore its own address. struct ChainDeploy { diff --git a/src/lib/LibRainDeployRegistryBeaconProxy.sol b/src/lib/LibRainDeployRegistryBeaconProxy.sol index f1d7d3b..c2432fa 100644 --- a/src/lib/LibRainDeployRegistryBeaconProxy.sol +++ b/src/lib/LibRainDeployRegistryBeaconProxy.sol @@ -10,9 +10,9 @@ import {ICloneableFactoryV7} from "../interface/ICloneableFactoryV7.sol"; import {LibICloneableFactoryV7} from "./LibICloneableFactoryV7.sol"; import {LibICloneableFactoryV5} from "./LibICloneableFactoryV5.sol"; -import {DeployDependency} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {ConfigRegistry} from "rain-deploy-0.1.43/src/concrete/ConfigRegistry.sol"; -import {IConfigRegistryV5} from "rain-deploy-0.1.43/src/interface/IConfigRegistryV5.sol"; +import {DeployDependency} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {ConfigRegistry} from "rain-deploy-0.1.44/src/concrete/ConfigRegistry.sol"; +import {IConfigRegistryV5} from "rain-deploy-0.1.44/src/interface/IConfigRegistryV5.sol"; /// @dev The artifact path a registry beacon proxy suite carries. string constant REGISTRY_BEACON_PROXY_ARTIFACT_PATH = "rain-factory/RegistryBeaconProxy.sol:RegistryBeaconProxy"; diff --git a/test/abstract/BeaconVerifyFixture.sol b/test/abstract/BeaconVerifyFixture.sol index 461c205..24b8864 100644 --- a/test/abstract/BeaconVerifyFixture.sol +++ b/test/abstract/BeaconVerifyFixture.sol @@ -9,15 +9,15 @@ import { DeployDependency, DeploySuite, RainDeploySuitesBase -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {RainDeployVerifyBase} from "rain-deploy-0.1.43/src/abstract/RainDeployVerifyBase.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; -import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.43/src/lib/LibRainDeployZoltuMechanism.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {RainDeployVerifyBase} from "rain-deploy-0.1.44/src/abstract/RainDeployVerifyBase.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; +import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.44/src/lib/LibRainDeployZoltuMechanism.sol"; import {BeaconState, BeaconTransition, ChainBeacon, DeployBeacon} from "../../src/lib/LibRainDeployBeacon.sol"; import {LibRainDeployCloneMechanism} from "../../src/lib/LibRainDeployCloneMechanism.sol"; -import {LibRainDeploy, SupportedNetwork} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {Prerequisite} from "rain-deploy-0.1.43/src/interface/IMigrationRegistryV5.sol"; -import {MigrationRegistry} from "rain-deploy-0.1.43/src/concrete/MigrationRegistry.sol"; +import {LibRainDeploy, SupportedNetwork} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {Prerequisite} from "rain-deploy-0.1.44/src/interface/IMigrationRegistryV5.sol"; +import {MigrationRegistry} from "rain-deploy-0.1.44/src/concrete/MigrationRegistry.sol"; import {MockDeployable} from "../concrete/MockDeployable.sol"; import {MockDeployableV2} from "../concrete/MockDeployableV2.sol"; import {LibBeaconTest} from "../lib/LibBeaconTest.sol"; diff --git a/test/abstract/ExampleCloneDeploys.sol b/test/abstract/ExampleCloneDeploys.sol index 3e05d52..a9611c1 100644 --- a/test/abstract/ExampleCloneDeploys.sol +++ b/test/abstract/ExampleCloneDeploys.sol @@ -7,12 +7,12 @@ import { DeployDeclaration, DeploySuite, RainDeploySuitesBase -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; -import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.43/src/lib/LibRainDeployZoltuMechanism.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; +import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.44/src/lib/LibRainDeployZoltuMechanism.sol"; import {LibCloneCandidates} from "../../src/lib/LibCloneCandidates.sol"; import {CLONE_ARTIFACT_PATH, CloneDeploy, LibRainDeployClone} from "../../src/lib/LibRainDeployClone.sol"; -import {DeployDependency, LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {DeployDependency, LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import {MockCloneFactory} from "../concrete/MockCloneFactory.sol"; import {MockCloneable} from "../concrete/MockCloneable.sol"; import {LibExternalDeployments} from "../lib/LibExternalDeployments.sol"; diff --git a/test/abstract/ExternalDeployBroadcast.sol b/test/abstract/ExternalDeployBroadcast.sol index b35f7e0..fa16a42 100644 --- a/test/abstract/ExternalDeployBroadcast.sol +++ b/test/abstract/ExternalDeployBroadcast.sol @@ -2,9 +2,9 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity ^0.8.25; -import {RainDeployBroadcast} from "rain-deploy-0.1.43/src/abstract/RainDeployBroadcast.sol"; +import {RainDeployBroadcast} from "rain-deploy-0.1.44/src/abstract/RainDeployBroadcast.sol"; import {ExternalDeploySuites} from "./ExternalDeploySuites.sol"; -import {DeploySuite} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; +import {DeploySuite} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; import {MockOriginOwned} from "../concrete/MockOriginOwned.sol"; import {Vm} from "forge-std-1.17.0/src/Vm.sol"; diff --git a/test/abstract/ExternalDeploySuites.sol b/test/abstract/ExternalDeploySuites.sol index 6b765b9..374375f 100644 --- a/test/abstract/ExternalDeploySuites.sol +++ b/test/abstract/ExternalDeploySuites.sol @@ -8,9 +8,9 @@ import { DeploySuite, RainDeploySuitesBase, SnapshotFile -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; -import {LibRainDeploySnapshot} from "rain-deploy-0.1.43/src/lib/LibRainDeploySnapshot.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; +import {LibRainDeploySnapshot} from "rain-deploy-0.1.44/src/lib/LibRainDeploySnapshot.sol"; import {Vm} from "forge-std-1.17.0/src/Vm.sol"; /// @title ExternalDeploySuites diff --git a/test/abstract/PerNetworkCloneBeaconVerifyChain.sol b/test/abstract/PerNetworkCloneBeaconVerifyChain.sol index 4c8f370..37956f5 100644 --- a/test/abstract/PerNetworkCloneBeaconVerifyChain.sol +++ b/test/abstract/PerNetworkCloneBeaconVerifyChain.sol @@ -6,11 +6,11 @@ import { DeployDeclaration, DeployDependency, DeploySuite -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {RainDeployVerifyChain} from "rain-deploy-0.1.43/src/abstract/RainDeployVerifyChain.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; -import {LibRainDeploySnapshot} from "rain-deploy-0.1.43/src/lib/LibRainDeploySnapshot.sol"; -import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.43/src/lib/LibRainDeployZoltuMechanism.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {RainDeployVerifyChain} from "rain-deploy-0.1.44/src/abstract/RainDeployVerifyChain.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; +import {LibRainDeploySnapshot} from "rain-deploy-0.1.44/src/lib/LibRainDeploySnapshot.sol"; +import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.44/src/lib/LibRainDeployZoltuMechanism.sol"; import {BeaconState, ChainBeacon} from "../../src/lib/LibRainDeployBeacon.sol"; import {LibRainDeployCloneMechanism} from "../../src/lib/LibRainDeployCloneMechanism.sol"; import {LibCloneCandidates} from "../../src/lib/LibCloneCandidates.sol"; diff --git a/test/abstract/PerNetworkCloneDeploys.sol b/test/abstract/PerNetworkCloneDeploys.sol index dff0fef..7f4614e 100644 --- a/test/abstract/PerNetworkCloneDeploys.sol +++ b/test/abstract/PerNetworkCloneDeploys.sol @@ -3,8 +3,8 @@ pragma solidity ^0.8.25; import {LibRainDeployCloneMechanism} from "../../src/lib/LibRainDeployCloneMechanism.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; -import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.43/src/lib/LibRainDeployZoltuMechanism.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; +import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.44/src/lib/LibRainDeployZoltuMechanism.sol"; import {LibCloneCandidates} from "../../src/lib/LibCloneCandidates.sol"; import {LibExternalDeployments} from "../lib/LibExternalDeployments.sol"; import {Vm} from "forge-std-1.17.0/src/Vm.sol"; @@ -12,7 +12,7 @@ import { DeployDeclaration, DeploySuite, RainDeploySuitesBase -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; import { CLONE_ARTIFACT_PATH, CloneDeploy, @@ -21,7 +21,7 @@ import { LibRainDeployClone } from "../../src/lib/LibRainDeployClone.sol"; import {ChainDeploy} from "../../src/lib/LibRainDeployExtendedNetworks.sol"; -import {DeployDependency, LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {DeployDependency, LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import {exampleCloneDependencies, exampleCloneFactory, exampleCloneImplementation} from "./ExampleCloneDeploys.sol"; import { BYTECODE_HASH as PER_NETWORK_CLONE_BYTECODE_HASH, diff --git a/test/abstract/RainDeployVerifyChainBeaconPerNetworkCloneTestBase.sol b/test/abstract/RainDeployVerifyChainBeaconPerNetworkCloneTestBase.sol index 9a2987d..79ef49c 100644 --- a/test/abstract/RainDeployVerifyChainBeaconPerNetworkCloneTestBase.sol +++ b/test/abstract/RainDeployVerifyChainBeaconPerNetworkCloneTestBase.sol @@ -3,9 +3,9 @@ pragma solidity ^0.8.25; import {UpgradeableBeacon} from "@openzeppelin-contracts-5.7.0/proxy/beacon/UpgradeableBeacon.sol"; -import {DeployDeclaration, DeploySuite} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; +import {DeployDeclaration, DeploySuite} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; import {LibRainDeployBeaconResolution} from "../../src/lib/LibRainDeployBeaconResolution.sol"; import { PER_NETWORK_CLONE_ARBITRUM_ONE_CHAIN_ID, diff --git a/test/abstract/UpgradedPerNetworkCloneDeploys.sol b/test/abstract/UpgradedPerNetworkCloneDeploys.sol index f9966a1..5c7a6d8 100644 --- a/test/abstract/UpgradedPerNetworkCloneDeploys.sol +++ b/test/abstract/UpgradedPerNetworkCloneDeploys.sol @@ -2,11 +2,11 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity ^0.8.25; -import {DeployDeclaration, RainDeploySuitesBase} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; +import {DeployDeclaration, RainDeploySuitesBase} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; import {LibCloneCandidates} from "../../src/lib/LibCloneCandidates.sol"; import {CloneDeploy, CloneParams, LibRainDeployClone} from "../../src/lib/LibRainDeployClone.sol"; -import {DeployDependency, LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {DeployDependency, LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import {MockCloneFactory} from "../concrete/MockCloneFactory.sol"; import {MockCloneableV2} from "../concrete/MockCloneableV2.sol"; import {perNetworkCloneInitData, perNetworkCloneLayers, perNetworkCloneReleased} from "./PerNetworkCloneDeploys.sol"; diff --git a/test/abstract/ZoltuDeployOrAdopt.sol b/test/abstract/ZoltuDeployOrAdopt.sol index 39d756d..5291e52 100644 --- a/test/abstract/ZoltuDeployOrAdopt.sol +++ b/test/abstract/ZoltuDeployOrAdopt.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.25; import {Test} from "forge-std-1.17.0/src/Test.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; /// @title ZoltuDeployOrAdopt /// @notice Puts a clone fixture's factory or implementation at its Zoltu address on a fork, for diff --git a/test/concrete/BeaconOwnerDeploy.sol b/test/concrete/BeaconOwnerDeploy.sol index 889efb0..3f5c067 100644 --- a/test/concrete/BeaconOwnerDeploy.sol +++ b/test/concrete/BeaconOwnerDeploy.sol @@ -6,9 +6,9 @@ import { DeployCandidate, DeployDeclaration, DeploySuite -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; -import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.43/src/lib/LibRainDeployZoltuMechanism.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; +import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.44/src/lib/LibRainDeployZoltuMechanism.sol"; import {ChainBeacon, DeployBeacon} from "../../src/lib/LibRainDeployBeacon.sol"; import {LibRainDeployCloneMechanism} from "../../src/lib/LibRainDeployCloneMechanism.sol"; import {ExternalDeployBroadcast} from "../abstract/ExternalDeployBroadcast.sol"; diff --git a/test/concrete/BeaconProxyOnlyDeploySuites.sol b/test/concrete/BeaconProxyOnlyDeploySuites.sol index e3b507c..5da4db7 100644 --- a/test/concrete/BeaconProxyOnlyDeploySuites.sol +++ b/test/concrete/BeaconProxyOnlyDeploySuites.sol @@ -2,9 +2,9 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity =0.8.25; -import {DeployCandidate, DeployDeclaration} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; -import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.43/src/lib/LibRainDeployZoltuMechanism.sol"; +import {DeployCandidate, DeployDeclaration} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; +import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.44/src/lib/LibRainDeployZoltuMechanism.sol"; import {BeaconProxyDeploy} from "../../src/lib/LibRainDeployBeaconProxy.sol"; import {LibRainDeployCloneMechanism} from "../../src/lib/LibRainDeployCloneMechanism.sol"; import {ExternalDeploySuites} from "../abstract/ExternalDeploySuites.sol"; diff --git a/test/concrete/CloneBuildScriptHarness.sol b/test/concrete/CloneBuildScriptHarness.sol index 4075626..c65fb05 100644 --- a/test/concrete/CloneBuildScriptHarness.sol +++ b/test/concrete/CloneBuildScriptHarness.sol @@ -2,12 +2,12 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity =0.8.25; -import {BuildScript, GeneratedContract} from "rain-deploy-0.1.43/src/abstract/BuildScript.sol"; -import {DeployDeclaration, DeploySuite, SnapshotFile} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; -import {LibRainDeploySnapshot} from "rain-deploy-0.1.43/src/lib/LibRainDeploySnapshot.sol"; -import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.43/src/lib/LibRainDeployZoltuMechanism.sol"; +import {BuildScript, GeneratedContract} from "rain-deploy-0.1.44/src/abstract/BuildScript.sol"; +import {DeployDeclaration, DeploySuite, SnapshotFile} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; +import {LibRainDeploySnapshot} from "rain-deploy-0.1.44/src/lib/LibRainDeploySnapshot.sol"; +import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.44/src/lib/LibRainDeployZoltuMechanism.sol"; import {RAIN_COPYRIGHT_TEXT, RAIN_SPDX_LICENSE_IDENTIFIER} from "rain-sol-codegen-0.1.39/src/lib/LibCodeGen.sol"; import {LibRainDeployCloneBuild} from "../../src/lib/LibRainDeployCloneBuild.sol"; import {ExtendedNetworksDeclaration, LibRainDeployCloneMechanism} from "../../src/lib/LibRainDeployCloneMechanism.sol"; diff --git a/test/concrete/ExampleCloneDeploy.sol b/test/concrete/ExampleCloneDeploy.sol index 03b98d3..91ca1cc 100644 --- a/test/concrete/ExampleCloneDeploy.sol +++ b/test/concrete/ExampleCloneDeploy.sol @@ -4,8 +4,8 @@ pragma solidity =0.8.25; import {ExampleCloneDeploys} from "../abstract/ExampleCloneDeploys.sol"; import {ExternalDeployBroadcast} from "../abstract/ExternalDeployBroadcast.sol"; -import {DeployDeclaration, RainDeploySuitesBase} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {DeployDependency} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {DeployDeclaration, RainDeploySuitesBase} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {DeployDependency} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import {LibExternalDeployments} from "../lib/LibExternalDeployments.sol"; /// @title ExampleCloneDeploy diff --git a/test/concrete/LocalForkVm.sol b/test/concrete/LocalForkVm.sol index 0e4b89c..e6cdd5c 100644 --- a/test/concrete/LocalForkVm.sol +++ b/test/concrete/LocalForkVm.sol @@ -3,7 +3,7 @@ pragma solidity =0.8.25; import {Vm} from "forge-std-1.17.0/src/Vm.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; /// @title LocalForkVm /// @notice Forks each catalogue alias as the local EVM at its catalogue chain id, or at `sReportedChainId` once set, diff --git a/test/concrete/MixedCloneBeaconProxyDeploySuites.sol b/test/concrete/MixedCloneBeaconProxyDeploySuites.sol index 24d167e..79845ba 100644 --- a/test/concrete/MixedCloneBeaconProxyDeploySuites.sol +++ b/test/concrete/MixedCloneBeaconProxyDeploySuites.sol @@ -6,7 +6,7 @@ import { DeployCandidate, DeployDeclaration, RainDeploySuitesBase -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; import {BeaconProxyDeploy} from "../../src/lib/LibRainDeployBeaconProxy.sol"; import {LibRainDeployCloneMechanism} from "../../src/lib/LibRainDeployCloneMechanism.sol"; import {ExampleCloneDeploys, exampleCloneDeploys} from "../abstract/ExampleCloneDeploys.sol"; diff --git a/test/concrete/MockRegistryReadingCloneable.sol b/test/concrete/MockRegistryReadingCloneable.sol index 75f0ceb..d115a38 100644 --- a/test/concrete/MockRegistryReadingCloneable.sol +++ b/test/concrete/MockRegistryReadingCloneable.sol @@ -3,7 +3,7 @@ pragma solidity =0.8.25; import {ICloneableV2, ICLONEABLE_V2_SUCCESS} from "../../src/interface/ICloneableV2.sol"; -import {IConfigRegistryV5} from "rain-deploy-0.1.43/src/interface/IConfigRegistryV5.sol"; +import {IConfigRegistryV5} from "rain-deploy-0.1.44/src/interface/IConfigRegistryV5.sol"; /// @title MockRegistryReadingCloneable /// @notice A cloneable whose `initialize` keeps the value a registry binds to a name. diff --git a/test/concrete/OriginOwnedCloneDeploy.sol b/test/concrete/OriginOwnedCloneDeploy.sol index b22f39e..10de204 100644 --- a/test/concrete/OriginOwnedCloneDeploy.sol +++ b/test/concrete/OriginOwnedCloneDeploy.sol @@ -2,10 +2,10 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity =0.8.25; -import {DeployDeclaration} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {DeployDependency, LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; -import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.43/src/lib/LibRainDeployZoltuMechanism.sol"; +import {DeployDeclaration} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {DeployDependency, LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; +import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.44/src/lib/LibRainDeployZoltuMechanism.sol"; import {CloneDeploy} from "../../src/lib/LibRainDeployClone.sol"; import {LibRainDeployCloneMechanism} from "../../src/lib/LibRainDeployCloneMechanism.sol"; import {ExternalDeployBroadcast} from "../abstract/ExternalDeployBroadcast.sol"; diff --git a/test/concrete/PerNetworkCloneBuildScriptHarness.sol b/test/concrete/PerNetworkCloneBuildScriptHarness.sol index 08ad9b4..56c90c2 100644 --- a/test/concrete/PerNetworkCloneBuildScriptHarness.sol +++ b/test/concrete/PerNetworkCloneBuildScriptHarness.sol @@ -2,12 +2,12 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity =0.8.25; -import {BuildScript, GeneratedContract} from "rain-deploy-0.1.43/src/abstract/BuildScript.sol"; -import {DeployDeclaration, DeploySuite, SnapshotFile} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeployConfig} from "rain-deploy-0.1.43/src/lib/LibRainDeployConfig.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; -import {LibRainDeploySnapshot} from "rain-deploy-0.1.43/src/lib/LibRainDeploySnapshot.sol"; -import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.43/src/lib/LibRainDeployZoltuMechanism.sol"; +import {BuildScript, GeneratedContract} from "rain-deploy-0.1.44/src/abstract/BuildScript.sol"; +import {DeployDeclaration, DeploySuite, SnapshotFile} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeployConfig} from "rain-deploy-0.1.44/src/lib/LibRainDeployConfig.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; +import {LibRainDeploySnapshot} from "rain-deploy-0.1.44/src/lib/LibRainDeploySnapshot.sol"; +import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.44/src/lib/LibRainDeployZoltuMechanism.sol"; import {RAIN_COPYRIGHT_TEXT, RAIN_SPDX_LICENSE_IDENTIFIER} from "rain-sol-codegen-0.1.39/src/lib/LibCodeGen.sol"; import {LibRainDeployCloneBuild} from "../../src/lib/LibRainDeployCloneBuild.sol"; import {ExtendedNetworksDeclaration, LibRainDeployCloneMechanism} from "../../src/lib/LibRainDeployCloneMechanism.sol"; diff --git a/test/concrete/PerNetworkCloneDeploy.sol b/test/concrete/PerNetworkCloneDeploy.sol index 9f05b65..5ccf7d6 100644 --- a/test/concrete/PerNetworkCloneDeploy.sol +++ b/test/concrete/PerNetworkCloneDeploy.sol @@ -7,9 +7,9 @@ import { DeployDeclaration, DeploySuite, RainDeploySuitesBase -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; -import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.43/src/lib/LibRainDeployZoltuMechanism.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; +import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.44/src/lib/LibRainDeployZoltuMechanism.sol"; import {ChainDeploy, LibRainDeployExtendedNetworks} from "../../src/lib/LibRainDeployExtendedNetworks.sol"; import {ExtendedNetworksDeclaration, LibRainDeployCloneMechanism} from "../../src/lib/LibRainDeployCloneMechanism.sol"; import {ExternalDeployBroadcast} from "../abstract/ExternalDeployBroadcast.sol"; diff --git a/test/concrete/TwoReleasePerNetworkCloneBuildScriptHarness.sol b/test/concrete/TwoReleasePerNetworkCloneBuildScriptHarness.sol index a275058..0e892fb 100644 --- a/test/concrete/TwoReleasePerNetworkCloneBuildScriptHarness.sol +++ b/test/concrete/TwoReleasePerNetworkCloneBuildScriptHarness.sol @@ -2,7 +2,7 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity =0.8.25; -import {DeploySuite} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; +import {DeploySuite} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; import {ExtendedNetworksDeclaration} from "../../src/lib/LibRainDeployCloneMechanism.sol"; import {ChainDeploy} from "../../src/lib/LibRainDeployExtendedNetworks.sol"; import {PerNetworkCloneBuildScriptHarness} from "./PerNetworkCloneBuildScriptHarness.sol"; diff --git a/test/concrete/UpgradedPerNetworkCloneDeploy.sol b/test/concrete/UpgradedPerNetworkCloneDeploy.sol index da931e5..2f12cca 100644 --- a/test/concrete/UpgradedPerNetworkCloneDeploy.sol +++ b/test/concrete/UpgradedPerNetworkCloneDeploy.sol @@ -7,9 +7,9 @@ import { DeployDeclaration, DeploySuite, RainDeploySuitesBase -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; -import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.43/src/lib/LibRainDeployZoltuMechanism.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; +import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.44/src/lib/LibRainDeployZoltuMechanism.sol"; import {CloneDeploy} from "../../src/lib/LibRainDeployClone.sol"; import {ChainDeploy, LibRainDeployExtendedNetworks} from "../../src/lib/LibRainDeployExtendedNetworks.sol"; import {ExtendedNetworksDeclaration, LibRainDeployCloneMechanism} from "../../src/lib/LibRainDeployCloneMechanism.sol"; diff --git a/test/concrete/WideCandidatePerNetworkCloneDeploy.sol b/test/concrete/WideCandidatePerNetworkCloneDeploy.sol index 0fe13a5..13b89e3 100644 --- a/test/concrete/WideCandidatePerNetworkCloneDeploy.sol +++ b/test/concrete/WideCandidatePerNetworkCloneDeploy.sol @@ -2,10 +2,10 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity =0.8.25; -import {DeployCandidate, DeployDeclaration} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; -import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.43/src/lib/LibRainDeployZoltuMechanism.sol"; +import {DeployCandidate, DeployDeclaration} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; +import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.44/src/lib/LibRainDeployZoltuMechanism.sol"; import {LibRainDeployCloneMechanism} from "../../src/lib/LibRainDeployCloneMechanism.sol"; import {exampleCloneDependencies} from "../abstract/ExampleCloneDeploys.sol"; import {ExternalDeployBroadcast} from "../abstract/ExternalDeployBroadcast.sol"; diff --git a/test/fixture-mechanism-change/lib/LibMockCloneableReleased.sol b/test/fixture-mechanism-change/lib/LibMockCloneableReleased.sol index 55572aa..a0849a0 100644 --- a/test/fixture-mechanism-change/lib/LibMockCloneableReleased.sol +++ b/test/fixture-mechanism-change/lib/LibMockCloneableReleased.sol @@ -4,8 +4,8 @@ pragma solidity ^0.8.25; // THIS FILE IS AUTOGENERATED BY THE BUILD SCRIPT. DO NOT EDIT BY HAND. -import {DeployDependency, DeploySuite} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.43/src/lib/LibRainDeployZoltuMechanism.sol"; +import {DeployDependency, DeploySuite} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.44/src/lib/LibRainDeployZoltuMechanism.sol"; import {CLONE_MECHANISM} from "../../../src/lib/LibRainDeployCloneMechanism.sol"; import {CLONE_PER_NETWORK_MECHANISM} from "../../../src/lib/LibRainDeployCloneMechanism.sol"; diff --git a/test/lib/LibBeaconProxyTest.sol b/test/lib/LibBeaconProxyTest.sol index f028693..65b7df9 100644 --- a/test/lib/LibBeaconProxyTest.sol +++ b/test/lib/LibBeaconProxyTest.sol @@ -6,7 +6,7 @@ import {UpgradeableBeacon} from "@openzeppelin-contracts-5.7.0/proxy/beacon/Upgr import {LibRainDeployClone} from "../../src/lib/LibRainDeployClone.sol"; import {Vm} from "forge-std-1.17.0/src/Vm.sol"; import {BeaconProxyDeploy, LibRainDeployBeaconProxy} from "../../src/lib/LibRainDeployBeaconProxy.sol"; -import {DeployDependency, LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {DeployDependency, LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import {MockBeaconProxyFactory} from "../concrete/MockBeaconProxyFactory.sol"; import {perNetworkCloneInitData} from "../abstract/PerNetworkCloneDeploys.sol"; diff --git a/test/lib/LibBeaconTest.sol b/test/lib/LibBeaconTest.sol index 04b94cc..4f4e874 100644 --- a/test/lib/LibBeaconTest.sol +++ b/test/lib/LibBeaconTest.sol @@ -4,12 +4,12 @@ pragma solidity ^0.8.25; import {Vm} from "forge-std-1.17.0/src/Vm.sol"; import {UpgradeableBeacon} from "@openzeppelin-contracts-5.7.0/proxy/beacon/UpgradeableBeacon.sol"; -import {DeployDependency, DeploySuite} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.43/src/lib/LibRainDeployZoltuMechanism.sol"; -import {LibMigrationRegistry} from "rain-deploy-0.1.43/src/lib/LibMigrationRegistry.sol"; -import {LibMigrationRegistryDeploy} from "rain-deploy-0.1.43/src/lib/LibMigrationRegistryDeploy.sol"; -import {IMigrationRegistryV5, Prerequisite} from "rain-deploy-0.1.43/src/interface/IMigrationRegistryV5.sol"; +import {DeployDependency, DeploySuite} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.44/src/lib/LibRainDeployZoltuMechanism.sol"; +import {LibMigrationRegistry} from "rain-deploy-0.1.44/src/lib/LibMigrationRegistry.sol"; +import {LibMigrationRegistryDeploy} from "rain-deploy-0.1.44/src/lib/LibMigrationRegistryDeploy.sol"; +import {IMigrationRegistryV5, Prerequisite} from "rain-deploy-0.1.44/src/interface/IMigrationRegistryV5.sol"; /// @title LibBeaconTest /// @notice The fixtures and assertions the beacon tests share. diff --git a/test/lib/LibExternalDeployments.sol b/test/lib/LibExternalDeployments.sol index a2f7df7..bf80722 100644 --- a/test/lib/LibExternalDeployments.sol +++ b/test/lib/LibExternalDeployments.sol @@ -6,7 +6,7 @@ import { DeployDeclaration, DeployDependency, ExternalDeployment -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; /// @title LibExternalDeployments /// @notice Declares deployments outside a fixture's suites as its external deployments. diff --git a/test/lib/LibRegistryBeaconProxyTest.sol b/test/lib/LibRegistryBeaconProxyTest.sol index b7b1d55..5448c8c 100644 --- a/test/lib/LibRegistryBeaconProxyTest.sol +++ b/test/lib/LibRegistryBeaconProxyTest.sol @@ -4,9 +4,9 @@ pragma solidity ^0.8.25; import {Vm} from "forge-std-1.17.0/src/Vm.sol"; import {UpgradeableBeacon} from "@openzeppelin-contracts-5.7.0/proxy/beacon/UpgradeableBeacon.sol"; -import {ConfigRegistry} from "rain-deploy-0.1.43/src/concrete/ConfigRegistry.sol"; -import {IConfigRegistryV5} from "rain-deploy-0.1.43/src/interface/IConfigRegistryV5.sol"; -import {DeployDependency} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {ConfigRegistry} from "rain-deploy-0.1.44/src/concrete/ConfigRegistry.sol"; +import {IConfigRegistryV5} from "rain-deploy-0.1.44/src/interface/IConfigRegistryV5.sol"; +import {DeployDependency} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import {TestCloneFactory} from "../../src/test/TestCloneFactory.sol"; import { LibRainDeployRegistryBeaconProxy, diff --git a/test/lib/LibSuiteIndexPointers.sol b/test/lib/LibSuiteIndexPointers.sol index 1e05d2c..25ec303 100644 --- a/test/lib/LibSuiteIndexPointers.sol +++ b/test/lib/LibSuiteIndexPointers.sol @@ -2,8 +2,8 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity ^0.8.25; -import {DeploySuite} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {DeploySuiteIndex} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; +import {DeploySuite} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {DeploySuiteIndex} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; /// @title LibSuiteIndexPointers /// @notice Where an index and its built arrays live in memory, to tell one index, and one build of it, from another. diff --git a/test/src/abstract/BuildScriptClone.t.sol b/test/src/abstract/BuildScriptClone.t.sol index 767516d..df8839f 100644 --- a/test/src/abstract/BuildScriptClone.t.sol +++ b/test/src/abstract/BuildScriptClone.t.sol @@ -3,7 +3,7 @@ pragma solidity =0.8.25; import {Test} from "forge-std-1.17.0/src/Test.sol"; -import {LibRainDeploySnapshot} from "rain-deploy-0.1.43/src/lib/LibRainDeploySnapshot.sol"; +import {LibRainDeploySnapshot} from "rain-deploy-0.1.44/src/lib/LibRainDeploySnapshot.sol"; import { LibCodeGen, RAIN_COPYRIGHT_TEXT, diff --git a/test/src/abstract/RainDeployBroadcastBeaconSeat.t.sol b/test/src/abstract/RainDeployBroadcastBeaconSeat.t.sol index f226ff8..91e2e55 100644 --- a/test/src/abstract/RainDeployBroadcastBeaconSeat.t.sol +++ b/test/src/abstract/RainDeployBroadcastBeaconSeat.t.sol @@ -4,9 +4,9 @@ pragma solidity =0.8.25; import {Test} from "forge-std-1.17.0/src/Test.sol"; import {UpgradeableBeacon} from "@openzeppelin-contracts-5.7.0/proxy/beacon/UpgradeableBeacon.sol"; -import {DeploySuite} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {Prerequisite} from "rain-deploy-0.1.43/src/interface/IMigrationRegistryV5.sol"; +import {DeploySuite} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {Prerequisite} from "rain-deploy-0.1.44/src/interface/IMigrationRegistryV5.sol"; import {BeaconState, BeaconTransition, DeployBeacon} from "../../../src/lib/LibRainDeployBeacon.sol"; import {LibRainDeployCloneMechanism} from "../../../src/lib/LibRainDeployCloneMechanism.sol"; import {perNetworkCloneChainIds} from "../../abstract/PerNetworkCloneDeploys.sol"; diff --git a/test/src/abstract/RainDeployBroadcastClone.t.sol b/test/src/abstract/RainDeployBroadcastClone.t.sol index a723a7a..3d7a082 100644 --- a/test/src/abstract/RainDeployBroadcastClone.t.sol +++ b/test/src/abstract/RainDeployBroadcastClone.t.sol @@ -3,9 +3,9 @@ pragma solidity =0.8.25; import {Test} from "forge-std-1.17.0/src/Test.sol"; -import {SuiteSeatsDeployKey} from "rain-deploy-0.1.43/src/abstract/RainDeployBroadcast.sol"; -import {DeploySuite} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {DeployDependency, LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {SuiteSeatsDeployKey} from "rain-deploy-0.1.44/src/abstract/RainDeployBroadcast.sol"; +import {DeploySuite} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {DeployDependency, LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import { CLONE_ARTIFACT_PATH, CloneNetworks, diff --git a/test/src/abstract/RainDeployBroadcastClonePerNetwork.t.sol b/test/src/abstract/RainDeployBroadcastClonePerNetwork.t.sol index 6aedd1c..35e6c76 100644 --- a/test/src/abstract/RainDeployBroadcastClonePerNetwork.t.sol +++ b/test/src/abstract/RainDeployBroadcastClonePerNetwork.t.sol @@ -2,8 +2,8 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity =0.8.25; -import {DeploySuite} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {DeploySuite} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import { ExtendedNetworkAddressMismatch, ExtendedNetworkUnfrozen, diff --git a/test/src/abstract/RainDeployBroadcastSingleClone.t.sol b/test/src/abstract/RainDeployBroadcastSingleClone.t.sol index 1b889b6..52c78bc 100644 --- a/test/src/abstract/RainDeployBroadcastSingleClone.t.sol +++ b/test/src/abstract/RainDeployBroadcastSingleClone.t.sol @@ -2,8 +2,8 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity =0.8.25; -import {DeploySuite} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {DeploySuite} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import {ZoltuDeployOrAdopt} from "../../abstract/ZoltuDeployOrAdopt.sol"; import {ExampleCloneDeploy} from "../../concrete/ExampleCloneDeploy.sol"; import {MockCloneFactory} from "../../concrete/MockCloneFactory.sol"; diff --git a/test/src/abstract/RainDeployVerifyBaseBeacon.t.sol b/test/src/abstract/RainDeployVerifyBaseBeacon.t.sol index bfcea37..e93e252 100644 --- a/test/src/abstract/RainDeployVerifyBaseBeacon.t.sol +++ b/test/src/abstract/RainDeployVerifyBaseBeacon.t.sol @@ -19,9 +19,9 @@ import { LibRainDeployBeacon } from "../../../src/lib/LibRainDeployBeacon.sol"; import {LibRainDeployBeaconResolution} from "../../../src/lib/LibRainDeployBeaconResolution.sol"; -import {DeployDeclaration} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeploy, SupportedNetwork} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; +import {DeployDeclaration} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeploy, SupportedNetwork} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; import {MockDeployable} from "../../concrete/MockDeployable.sol"; import {MockDeployableV2} from "../../concrete/MockDeployableV2.sol"; import {LibBeaconDeclarations} from "../../lib/LibBeaconDeclarations.sol"; diff --git a/test/src/abstract/RainDeployVerifyBaseBeaconChainSeated.t.sol b/test/src/abstract/RainDeployVerifyBaseBeaconChainSeated.t.sol index fae5d1f..f6acbf8 100644 --- a/test/src/abstract/RainDeployVerifyBaseBeaconChainSeated.t.sol +++ b/test/src/abstract/RainDeployVerifyBaseBeaconChainSeated.t.sol @@ -2,8 +2,8 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity =0.8.25; -import {DeploySuite} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {DeploySuite} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import {LibRainDeployBeaconDeclarationChecks} from "../../../src/lib/LibRainDeployBeaconDeclarationChecks.sol"; import {BeaconSeatedOwner} from "../../../src/lib/LibRainDeployCloneOnChainChecks.sol"; import {ChainBeacon} from "../../../src/lib/LibRainDeployBeacon.sol"; diff --git a/test/src/abstract/RainDeployVerifyBaseBeaconPerNetworkCloneSeated.t.sol b/test/src/abstract/RainDeployVerifyBaseBeaconPerNetworkCloneSeated.t.sol index 4b33707..5a2ae75 100644 --- a/test/src/abstract/RainDeployVerifyBaseBeaconPerNetworkCloneSeated.t.sol +++ b/test/src/abstract/RainDeployVerifyBaseBeaconPerNetworkCloneSeated.t.sol @@ -8,11 +8,11 @@ import { DeployDeclaration, DeployDependency, DeploySuite -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; import {ChainBeacon} from "../../../src/lib/LibRainDeployBeacon.sol"; import {CLONE_ARTIFACT_PATH, CloneNetworks, LibRainDeployClone} from "../../../src/lib/LibRainDeployClone.sol"; import {ChainDeploy} from "../../../src/lib/LibRainDeployExtendedNetworks.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import {MockCloneFactory} from "../../concrete/MockCloneFactory.sol"; import {MockChainRefusingCloneable} from "../../concrete/MockChainRefusingCloneable.sol"; import {LibBeaconDeclarations} from "../../lib/LibBeaconDeclarations.sol"; diff --git a/test/src/abstract/RainDeployVerifyBaseBeaconRevertingRead.t.sol b/test/src/abstract/RainDeployVerifyBaseBeaconRevertingRead.t.sol index 44e025f..aba42dd 100644 --- a/test/src/abstract/RainDeployVerifyBaseBeaconRevertingRead.t.sol +++ b/test/src/abstract/RainDeployVerifyBaseBeaconRevertingRead.t.sol @@ -2,8 +2,8 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity =0.8.25; -import {DeploySuite} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {DeploySuite} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import {LibRainDeployBeaconDeclarationChecks} from "../../../src/lib/LibRainDeployBeaconDeclarationChecks.sol"; import {ChainBeacon} from "../../../src/lib/LibRainDeployBeacon.sol"; import {MockDeployableV2} from "../../concrete/MockDeployableV2.sol"; diff --git a/test/src/abstract/RainDeployVerifyChainBeacon.t.sol b/test/src/abstract/RainDeployVerifyChainBeacon.t.sol index d9c0b8c..3595687 100644 --- a/test/src/abstract/RainDeployVerifyChainBeacon.t.sol +++ b/test/src/abstract/RainDeployVerifyChainBeacon.t.sol @@ -4,12 +4,12 @@ pragma solidity =0.8.25; import {UpgradeableBeacon} from "@openzeppelin-contracts-5.7.0/proxy/beacon/UpgradeableBeacon.sol"; import {Vm} from "forge-std-1.17.0/src/Vm.sol"; -import {DeployDeclaration, DeploySuite} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {DerivedDeploy} from "rain-deploy-0.1.43/src/abstract/RainDeployVerifyBase.sol"; -import {RainDeployVerifyChain} from "rain-deploy-0.1.43/src/abstract/RainDeployVerifyChain.sol"; -import {LibRainDeploy, SupportedNetwork} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; -import {MIGRATION_HEAD_GENESIS, Prerequisite} from "rain-deploy-0.1.43/src/interface/IMigrationRegistryV5.sol"; +import {DeployDeclaration, DeploySuite} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {DerivedDeploy} from "rain-deploy-0.1.44/src/abstract/RainDeployVerifyBase.sol"; +import {RainDeployVerifyChain} from "rain-deploy-0.1.44/src/abstract/RainDeployVerifyChain.sol"; +import {LibRainDeploy, SupportedNetwork} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; +import {MIGRATION_HEAD_GENESIS, Prerequisite} from "rain-deploy-0.1.44/src/interface/IMigrationRegistryV5.sol"; import { BeaconState, BeaconTransition, diff --git a/test/src/abstract/RainDeployVerifyChainBeaconPerNetworkCloneUnrecorded.t.sol b/test/src/abstract/RainDeployVerifyChainBeaconPerNetworkCloneUnrecorded.t.sol index e8c714a..99eff5a 100644 --- a/test/src/abstract/RainDeployVerifyChainBeaconPerNetworkCloneUnrecorded.t.sol +++ b/test/src/abstract/RainDeployVerifyChainBeaconPerNetworkCloneUnrecorded.t.sol @@ -2,7 +2,7 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity =0.8.25; -import {DeploySuite} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; +import {DeploySuite} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; import {ChainDeploy, LibRainDeployExtendedNetworks} from "../../../src/lib/LibRainDeployExtendedNetworks.sol"; import { PER_NETWORK_CLONE_POLYGON_CHAIN_ID, diff --git a/test/src/abstract/RainDeployVerifyChainBeaconProxy.t.sol b/test/src/abstract/RainDeployVerifyChainBeaconProxy.t.sol index 95a34f1..50ab8ca 100644 --- a/test/src/abstract/RainDeployVerifyChainBeaconProxy.t.sol +++ b/test/src/abstract/RainDeployVerifyChainBeaconProxy.t.sol @@ -8,9 +8,9 @@ import { } from "../../../src/lib/LibRainDeployCloneMechanism.sol"; import {Vm} from "forge-std-1.17.0/src/Vm.sol"; import {UpgradeableBeacon} from "@openzeppelin-contracts-5.7.0/proxy/beacon/UpgradeableBeacon.sol"; -import {DeployDeclaration, DeploySuite} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; +import {DeployDeclaration, DeploySuite} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; import {BeaconProxyBeaconUndeclared} from "../../../src/lib/LibRainDeployCloneOnChainChecks.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import { PER_NETWORK_CLONE_ARBITRUM_ONE_CHAIN_ID, PER_NETWORK_CLONE_POLYGON_CHAIN_ID, diff --git a/test/src/abstract/RainDeployVerifyChainClone.t.sol b/test/src/abstract/RainDeployVerifyChainClone.t.sol index b3271ae..21da7e8 100644 --- a/test/src/abstract/RainDeployVerifyChainClone.t.sol +++ b/test/src/abstract/RainDeployVerifyChainClone.t.sol @@ -7,9 +7,9 @@ import { DeployDeclaration, DeploySuite, RainDeploySuitesBase -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {RainDeployVerifyChain} from "rain-deploy-0.1.43/src/abstract/RainDeployVerifyChain.sol"; -import {DeployDependency, LibRainDeploy, SupportedNetwork} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {RainDeployVerifyChain} from "rain-deploy-0.1.44/src/abstract/RainDeployVerifyChain.sol"; +import {DeployDependency, LibRainDeploy, SupportedNetwork} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import {ExampleCloneDeploys} from "../../abstract/ExampleCloneDeploys.sol"; import {CloneParams} from "../../../src/lib/LibRainDeployClone.sol"; import {LibRainDeployCloneMechanism} from "../../../src/lib/LibRainDeployCloneMechanism.sol"; diff --git a/test/src/abstract/RainDeployVerifyChainCloneDependencies.t.sol b/test/src/abstract/RainDeployVerifyChainCloneDependencies.t.sol index 956b139..2e563c7 100644 --- a/test/src/abstract/RainDeployVerifyChainCloneDependencies.t.sol +++ b/test/src/abstract/RainDeployVerifyChainCloneDependencies.t.sol @@ -2,10 +2,10 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity =0.8.25; -import {DeployDeclaration, RainDeploySuitesBase} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {RainDeployVerifyChain} from "rain-deploy-0.1.43/src/abstract/RainDeployVerifyChain.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; +import {DeployDeclaration, RainDeploySuitesBase} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {RainDeployVerifyChain} from "rain-deploy-0.1.44/src/abstract/RainDeployVerifyChain.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; import {LibCloneCandidates} from "../../../src/lib/LibCloneCandidates.sol"; import { PerNetworkCloneDeploys, diff --git a/test/src/abstract/RainDeployVerifyChainClonePerNetwork.t.sol b/test/src/abstract/RainDeployVerifyChainClonePerNetwork.t.sol index 1ea4e39..d9887c6 100644 --- a/test/src/abstract/RainDeployVerifyChainClonePerNetwork.t.sol +++ b/test/src/abstract/RainDeployVerifyChainClonePerNetwork.t.sol @@ -2,9 +2,9 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity =0.8.25; -import {DeployDeclaration, DeploySuite} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {RainDeployVerifyChain} from "rain-deploy-0.1.43/src/abstract/RainDeployVerifyChain.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {DeployDeclaration, DeploySuite} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {RainDeployVerifyChain} from "rain-deploy-0.1.44/src/abstract/RainDeployVerifyChain.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import {LibRainDeployCloneMechanism} from "../../../src/lib/LibRainDeployCloneMechanism.sol"; import {PerNetworkCloneDeploys, etchPerNetworkCloneRelease} from "../../abstract/PerNetworkCloneDeploys.sol"; diff --git a/test/src/abstract/RainDeployVerifyChainClonePerNetworkExtended.t.sol b/test/src/abstract/RainDeployVerifyChainClonePerNetworkExtended.t.sol index 98e00f5..d91dec0 100644 --- a/test/src/abstract/RainDeployVerifyChainClonePerNetworkExtended.t.sol +++ b/test/src/abstract/RainDeployVerifyChainClonePerNetworkExtended.t.sol @@ -7,11 +7,11 @@ import { DeployDeclaration, DeploySuite, RainDeploySuitesBase -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {RainDeployVerifyChain} from "rain-deploy-0.1.43/src/abstract/RainDeployVerifyChain.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; -import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.43/src/lib/LibRainDeployZoltuMechanism.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {RainDeployVerifyChain} from "rain-deploy-0.1.44/src/abstract/RainDeployVerifyChain.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; +import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.44/src/lib/LibRainDeployZoltuMechanism.sol"; import {CloneDeploy} from "../../../src/lib/LibRainDeployClone.sol"; import {ChainDeploy, LibRainDeployExtendedNetworks} from "../../../src/lib/LibRainDeployExtendedNetworks.sol"; import { diff --git a/test/src/abstract/RainDeployVerifyChainClonePerNetworkSubset.t.sol b/test/src/abstract/RainDeployVerifyChainClonePerNetworkSubset.t.sol index 64a83dd..f5988c1 100644 --- a/test/src/abstract/RainDeployVerifyChainClonePerNetworkSubset.t.sol +++ b/test/src/abstract/RainDeployVerifyChainClonePerNetworkSubset.t.sol @@ -4,9 +4,9 @@ pragma solidity =0.8.25; import {Vm} from "forge-std-1.17.0/src/Vm.sol"; import {ICloneableFactoryV4} from "../../../src/interface/deprecated/ICloneableFactoryV4.sol"; -import {DeployDeclaration, DeploySuite} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {RainDeployVerifyChain} from "rain-deploy-0.1.43/src/abstract/RainDeployVerifyChain.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {DeployDeclaration, DeploySuite} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {RainDeployVerifyChain} from "rain-deploy-0.1.44/src/abstract/RainDeployVerifyChain.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import {CloneNetworks} from "../../../src/lib/LibRainDeployClone.sol"; import {LibRainDeployCloneMechanism} from "../../../src/lib/LibRainDeployCloneMechanism.sol"; import { diff --git a/test/src/abstract/RainDeployVerifyChainClonePerNetworkUndeclared.t.sol b/test/src/abstract/RainDeployVerifyChainClonePerNetworkUndeclared.t.sol index daffebc..0b031c6 100644 --- a/test/src/abstract/RainDeployVerifyChainClonePerNetworkUndeclared.t.sol +++ b/test/src/abstract/RainDeployVerifyChainClonePerNetworkUndeclared.t.sol @@ -6,10 +6,10 @@ import { DeployDeclaration, DeploySuite, RainDeploySuitesBase -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {RainDeployVerifyChain} from "rain-deploy-0.1.43/src/abstract/RainDeployVerifyChain.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {RainDeployVerifyChain} from "rain-deploy-0.1.44/src/abstract/RainDeployVerifyChain.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; import {LibCloneCandidates} from "../../../src/lib/LibCloneCandidates.sol"; import { NoPerNetworkCloneAdmin, diff --git a/test/src/abstract/RainDeployVerifyChainClonePerNetworkUnrecorded.t.sol b/test/src/abstract/RainDeployVerifyChainClonePerNetworkUnrecorded.t.sol index 53e9a17..234de53 100644 --- a/test/src/abstract/RainDeployVerifyChainClonePerNetworkUnrecorded.t.sol +++ b/test/src/abstract/RainDeployVerifyChainClonePerNetworkUnrecorded.t.sol @@ -3,10 +3,10 @@ pragma solidity =0.8.25; import {Vm} from "forge-std-1.17.0/src/Vm.sol"; -import {DeployDeclaration, DeploySuite} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; +import {DeployDeclaration, DeploySuite} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; import {ICloneableFactoryV4} from "../../../src/interface/deprecated/ICloneableFactoryV4.sol"; -import {RainDeployVerifyChain, SuiteRequiredNowhere} from "rain-deploy-0.1.43/src/abstract/RainDeployVerifyChain.sol"; -import {LibRainDeploy, SupportedNetwork} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {RainDeployVerifyChain, SuiteRequiredNowhere} from "rain-deploy-0.1.44/src/abstract/RainDeployVerifyChain.sol"; +import {LibRainDeploy, SupportedNetwork} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import {ExtendedNetworkUnfrozen, LibRainDeployCloneMechanism} from "../../../src/lib/LibRainDeployCloneMechanism.sol"; import {CloneNetworks, LibRainDeployClone} from "../../../src/lib/LibRainDeployClone.sol"; import { diff --git a/test/src/abstract/RainDeployVerifyChainClonePerNetworkUnrecordedUpgraded.t.sol b/test/src/abstract/RainDeployVerifyChainClonePerNetworkUnrecordedUpgraded.t.sol index 506337b..b4ac2ec 100644 --- a/test/src/abstract/RainDeployVerifyChainClonePerNetworkUnrecordedUpgraded.t.sol +++ b/test/src/abstract/RainDeployVerifyChainClonePerNetworkUnrecordedUpgraded.t.sol @@ -2,9 +2,9 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity =0.8.25; -import {DeployDeclaration, DeploySuite} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {RainDeployVerifyChain} from "rain-deploy-0.1.43/src/abstract/RainDeployVerifyChain.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {DeployDeclaration, DeploySuite} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {RainDeployVerifyChain} from "rain-deploy-0.1.44/src/abstract/RainDeployVerifyChain.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import {ExtendedNetworkUnfrozen, LibRainDeployCloneMechanism} from "../../../src/lib/LibRainDeployCloneMechanism.sol"; import {CloneDeploy, CloneNetworks} from "../../../src/lib/LibRainDeployClone.sol"; import { diff --git a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxy.t.sol b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxy.t.sol index a655cb7..39733cf 100644 --- a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxy.t.sol +++ b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxy.t.sol @@ -4,8 +4,8 @@ pragma solidity =0.8.25; import {Vm} from "forge-std-1.17.0/src/Vm.sol"; import {UpgradeableBeacon} from "@openzeppelin-contracts-5.7.0/proxy/beacon/UpgradeableBeacon.sol"; -import {DeployDeclaration, DeploySuite} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {DeployDeclaration, DeploySuite} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import {LibRainDeployCloneMechanism} from "../../../src/lib/LibRainDeployCloneMechanism.sol"; import { LibRainDeployRegistryBeaconProxy, diff --git a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol index ca1bb57..277695c 100644 --- a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol +++ b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol @@ -8,10 +8,10 @@ import { DeployDeclaration, DeployDependency, DeploySuite -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {RainDeployVerifyChain} from "rain-deploy-0.1.43/src/abstract/RainDeployVerifyChain.sol"; -import {LibRainDeploy, SupportedNetwork} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {RainDeployVerifyChain} from "rain-deploy-0.1.44/src/abstract/RainDeployVerifyChain.sol"; +import {LibRainDeploy, SupportedNetwork} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; import {ICloneableFactoryV7} from "../../../src/interface/ICloneableFactoryV7.sol"; import {LibRainDeployCloneMechanism} from "../../../src/lib/LibRainDeployCloneMechanism.sol"; import { diff --git a/test/src/abstract/RainDeployVerifyDeclarationClone.t.sol b/test/src/abstract/RainDeployVerifyDeclarationClone.t.sol index cfc4b89..64e1686 100644 --- a/test/src/abstract/RainDeployVerifyDeclarationClone.t.sol +++ b/test/src/abstract/RainDeployVerifyDeclarationClone.t.sol @@ -7,13 +7,13 @@ import { DeployDeclaration, DeployDependency, ExternalDeployment -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; import { RainDeployDeclarationChecks, UndeclaredDependency -} from "rain-deploy-0.1.43/src/abstract/RainDeployDeclarationChecks.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; -import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.43/src/lib/LibRainDeployZoltuMechanism.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeployDeclarationChecks.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; +import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.44/src/lib/LibRainDeployZoltuMechanism.sol"; import {CloneDeploy, LibRainDeployClone} from "../../../src/lib/LibRainDeployClone.sol"; import {LibRainDeployCloneMechanism} from "../../../src/lib/LibRainDeployCloneMechanism.sol"; import { diff --git a/test/src/abstract/RainDeployVerifySnapshotBaseBeacon.t.sol b/test/src/abstract/RainDeployVerifySnapshotBaseBeacon.t.sol index 361d8d8..d08ad6e 100644 --- a/test/src/abstract/RainDeployVerifySnapshotBaseBeacon.t.sol +++ b/test/src/abstract/RainDeployVerifySnapshotBaseBeacon.t.sol @@ -14,8 +14,8 @@ import { DeployDeclaration, DeployDependency, DeploySuite -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {RainDeployVerifySnapshotBase} from "rain-deploy-0.1.43/src/abstract/RainDeployVerifySnapshotBase.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {RainDeployVerifySnapshotBase} from "rain-deploy-0.1.44/src/abstract/RainDeployVerifySnapshotBase.sol"; import { BeaconState, BeaconTransition, @@ -24,12 +24,12 @@ import { LibRainDeployBeacon } from "../../../src/lib/LibRainDeployBeacon.sol"; import {LibRainDeployCloneMechanism} from "../../../src/lib/LibRainDeployCloneMechanism.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; -import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.43/src/lib/LibRainDeployZoltuMechanism.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; +import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.44/src/lib/LibRainDeployZoltuMechanism.sol"; import {LibBeaconDeclarations} from "../../lib/LibBeaconDeclarations.sol"; import {LibBeaconTest} from "../../lib/LibBeaconTest.sol"; -import {MIGRATION_HEAD_GENESIS, Prerequisite} from "rain-deploy-0.1.43/src/interface/IMigrationRegistryV5.sol"; +import {MIGRATION_HEAD_GENESIS, Prerequisite} from "rain-deploy-0.1.44/src/interface/IMigrationRegistryV5.sol"; import {MockDeployable} from "../../concrete/MockDeployable.sol"; contract RainDeployVerifySnapshotBaseBeaconTest is RainDeployVerifySnapshotBase { diff --git a/test/src/abstract/RainDeployVerifySnapshotBaseClone.t.sol b/test/src/abstract/RainDeployVerifySnapshotBaseClone.t.sol index de4c705..2b89bcc 100644 --- a/test/src/abstract/RainDeployVerifySnapshotBaseClone.t.sol +++ b/test/src/abstract/RainDeployVerifySnapshotBaseClone.t.sol @@ -2,14 +2,14 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity =0.8.25; -import {DeployDeclaration, DeploySuite} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; +import {DeployDeclaration, DeploySuite} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; import { FrozenSnapshotNotReleased, RainDeployVerifySnapshotBase -} from "rain-deploy-0.1.43/src/abstract/RainDeployVerifySnapshotBase.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeployVerifySnapshotBase.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import {LibRainDeployCloneMechanism} from "../../../src/lib/LibRainDeployCloneMechanism.sol"; -import {LibRainDeploySnapshot} from "rain-deploy-0.1.43/src/lib/LibRainDeploySnapshot.sol"; +import {LibRainDeploySnapshot} from "rain-deploy-0.1.44/src/lib/LibRainDeploySnapshot.sol"; import { EXAMPLE_CLONE_RECORD_ROOT, ExampleCloneDeploys, diff --git a/test/src/abstract/RainDeployVerifySnapshotBaseClonePerNetwork.t.sol b/test/src/abstract/RainDeployVerifySnapshotBaseClonePerNetwork.t.sol index b52caa4..44c6e42 100644 --- a/test/src/abstract/RainDeployVerifySnapshotBaseClonePerNetwork.t.sol +++ b/test/src/abstract/RainDeployVerifySnapshotBaseClonePerNetwork.t.sol @@ -2,14 +2,14 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity =0.8.25; -import {DeployDeclaration, DeploySuite} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; +import {DeployDeclaration, DeploySuite} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; import { FrozenSnapshotNotReleased, FrozenSnapshotsOutnumberReleases, RainDeployVerifySnapshotBase, StoredAddressMismatch -} from "rain-deploy-0.1.43/src/abstract/RainDeployVerifySnapshotBase.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeployVerifySnapshotBase.sol"; import {CloneNetworks} from "../../../src/lib/LibRainDeployClone.sol"; import {LibRainDeployCloneMechanism} from "../../../src/lib/LibRainDeployCloneMechanism.sol"; import {LibRainDeployCloneSnapshot} from "../../../src/lib/LibRainDeployCloneSnapshot.sol"; @@ -17,7 +17,7 @@ import { FrozenSnapshotAmbiguous, FrozenSnapshotUnreadable, LibRainDeploySnapshot -} from "rain-deploy-0.1.43/src/lib/LibRainDeploySnapshot.sol"; +} from "rain-deploy-0.1.44/src/lib/LibRainDeploySnapshot.sol"; import { PER_NETWORK_CLONE_ARBITRUM_ONE_CHAIN_ID, PER_NETWORK_CLONE_POLYGON_CHAIN_ID, diff --git a/test/src/abstract/RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetwork.t.sol b/test/src/abstract/RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetwork.t.sol index 5410b3b..c84ce1b 100644 --- a/test/src/abstract/RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetwork.t.sol +++ b/test/src/abstract/RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetwork.t.sol @@ -3,11 +3,11 @@ pragma solidity =0.8.25; import {UpgradeableBeacon} from "@openzeppelin-contracts-5.7.0/proxy/beacon/UpgradeableBeacon.sol"; -import {DeployDeclaration, DeployDependency, DeploySuite} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {DerivedDeploy} from "rain-deploy-0.1.43/src/abstract/RainDeployVerifyBase.sol"; -import {RainDeployVerifySnapshotBase} from "rain-deploy-0.1.43/src/abstract/RainDeployVerifySnapshotBase.sol"; -import {LibRainDeploy, SupportedNetwork} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; +import {DeployDeclaration, DeployDependency, DeploySuite} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {DerivedDeploy} from "rain-deploy-0.1.44/src/abstract/RainDeployVerifyBase.sol"; +import {RainDeployVerifySnapshotBase} from "rain-deploy-0.1.44/src/abstract/RainDeployVerifySnapshotBase.sol"; +import {LibRainDeploy, SupportedNetwork} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; import {LibRainDeployCloneMechanism} from "../../../src/lib/LibRainDeployCloneMechanism.sol"; import { LibRainDeployRegistryBeaconProxy, diff --git a/test/src/lib/LibCloneCandidates.t.sol b/test/src/lib/LibCloneCandidates.t.sol index f1dfca2..d09f203 100644 --- a/test/src/lib/LibCloneCandidates.t.sol +++ b/test/src/lib/LibCloneCandidates.t.sol @@ -7,8 +7,8 @@ import { DeployCandidate, DeployDeclaration, DeploySuite -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; import {BeaconProxyDeploy} from "../../../src/lib/LibRainDeployBeaconProxy.sol"; import {CloneDeploy, CloneNetworks, CloneParams, LibRainDeployClone} from "../../../src/lib/LibRainDeployClone.sol"; import { @@ -16,7 +16,7 @@ import { LibRainDeployCloneMechanism } from "../../../src/lib/LibRainDeployCloneMechanism.sol"; import {LibCloneCandidates, NoFactoryDeploys} from "../../../src/lib/LibCloneCandidates.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import { exampleCloneDeploys, exampleCloneFactory, diff --git a/test/src/lib/LibICloneableFactoryV7.registryBeaconProxy.t.sol b/test/src/lib/LibICloneableFactoryV7.registryBeaconProxy.t.sol index d02977e..a8ca827 100644 --- a/test/src/lib/LibICloneableFactoryV7.registryBeaconProxy.t.sol +++ b/test/src/lib/LibICloneableFactoryV7.registryBeaconProxy.t.sol @@ -14,7 +14,7 @@ import {TestCloneFactory} from "../../../src/test/TestCloneFactory.sol"; import {TestCloneable} from "../../../src/test/TestCloneable.sol"; import {RegistryBeaconProxy} from "../../../script/RegistryBeaconProxy.sol"; import {TestRegistryBeaconSource, TestNameNotRegistered} from "../../concrete/TestRegistryBeaconSource.sol"; -import {IConfigRegistryV5} from "rain-deploy-0.1.43/src/interface/IConfigRegistryV5.sol"; +import {IConfigRegistryV5} from "rain-deploy-0.1.44/src/interface/IConfigRegistryV5.sol"; /// @title LibICloneableFactoryV7RegistryBeaconProxyTest /// `registryBeaconProxy` through `TestCloneFactory`: the beacon comes from the diff --git a/test/src/lib/LibRainDeployBeacon.t.sol b/test/src/lib/LibRainDeployBeacon.t.sol index 25d6d76..9d30122 100644 --- a/test/src/lib/LibRainDeployBeacon.t.sol +++ b/test/src/lib/LibRainDeployBeacon.t.sol @@ -10,15 +10,15 @@ import { DeployBeacon, LibRainDeployBeacon } from "../../../src/lib/LibRainDeployBeacon.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {LibMigrationRegistry} from "rain-deploy-0.1.43/src/lib/LibMigrationRegistry.sol"; -import {LibMigrationRegistryDeploy} from "rain-deploy-0.1.43/src/lib/LibMigrationRegistryDeploy.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {LibMigrationRegistry} from "rain-deploy-0.1.44/src/lib/LibMigrationRegistry.sol"; +import {LibMigrationRegistryDeploy} from "rain-deploy-0.1.44/src/lib/LibMigrationRegistryDeploy.sol"; import { IMigrationRegistryV5, MIGRATION_HEAD_GENESIS, Prerequisite -} from "rain-deploy-0.1.43/src/interface/IMigrationRegistryV5.sol"; -import {MigrationRegistry} from "rain-deploy-0.1.43/src/concrete/MigrationRegistry.sol"; +} from "rain-deploy-0.1.44/src/interface/IMigrationRegistryV5.sol"; +import {MigrationRegistry} from "rain-deploy-0.1.44/src/concrete/MigrationRegistry.sol"; import {MockDeployableV2} from "../../concrete/MockDeployableV2.sol"; import {MockOwnable2StepBeacon} from "../../concrete/MockOwnable2StepBeacon.sol"; import {MockFallbackBeacon} from "../../concrete/MockFallbackBeacon.sol"; diff --git a/test/src/lib/LibRainDeployBeaconProxy.t.sol b/test/src/lib/LibRainDeployBeaconProxy.t.sol index d48681a..8d1427d 100644 --- a/test/src/lib/LibRainDeployBeaconProxy.t.sol +++ b/test/src/lib/LibRainDeployBeaconProxy.t.sol @@ -10,7 +10,7 @@ import { import {ICloneableFactoryV7} from "../../../src/interface/ICloneableFactoryV7.sol"; import {BEACON_PROXY_CREATION_CODE} from "../../../src/generated/BeaconProxy.sol"; import {DelegatedBeacon} from "../../../src/lib/LibICloneableFactoryV5.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import {CloneParams} from "../../../src/lib/LibRainDeployClone.sol"; import {BEACON_PROXY_ARTIFACT_PATH, LibRainDeployBeaconProxy} from "../../../src/lib/LibRainDeployBeaconProxy.sol"; import {EXAMPLE_BEACON_PROXY_RUNTIME_CODE, LibBeaconProxyTest} from "../../lib/LibBeaconProxyTest.sol"; diff --git a/test/src/lib/LibRainDeployBeaconResolution.chainGatedPerNetworkClone.t.sol b/test/src/lib/LibRainDeployBeaconResolution.chainGatedPerNetworkClone.t.sol index 1784bf4..5d805b7 100644 --- a/test/src/lib/LibRainDeployBeaconResolution.chainGatedPerNetworkClone.t.sol +++ b/test/src/lib/LibRainDeployBeaconResolution.chainGatedPerNetworkClone.t.sol @@ -6,10 +6,10 @@ import { DeployDeclaration, DeployDependency, DeploySuite -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {DerivedDeploy, NoDerivedDeployment} from "rain-deploy-0.1.43/src/abstract/RainDeployVerifyBase.sol"; -import {LibRainDeploy, SupportedNetwork} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {DerivedDeploy, NoDerivedDeployment} from "rain-deploy-0.1.44/src/abstract/RainDeployVerifyBase.sol"; +import {LibRainDeploy, SupportedNetwork} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; import {ChainBeacon} from "../../../src/lib/LibRainDeployBeacon.sol"; import {LibRainDeployBeaconResolution} from "../../../src/lib/LibRainDeployBeaconResolution.sol"; import {CLONE_ARTIFACT_PATH, CloneNetworks, LibRainDeployClone} from "../../../src/lib/LibRainDeployClone.sol"; diff --git a/test/src/lib/LibRainDeployBeaconResolution.sharedIndex.t.sol b/test/src/lib/LibRainDeployBeaconResolution.sharedIndex.t.sol index d022022..6afe107 100644 --- a/test/src/lib/LibRainDeployBeaconResolution.sharedIndex.t.sol +++ b/test/src/lib/LibRainDeployBeaconResolution.sharedIndex.t.sol @@ -3,13 +3,13 @@ pragma solidity =0.8.25; import {Vm} from "forge-std-1.17.0/src/Vm.sol"; -import {DeployDeclaration, DeploySuite} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {DeploySuiteIndex} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; +import {DeployDeclaration, DeploySuite} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {DeploySuiteIndex} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; import { LibRainDeployZoltuMechanism, ZOLTU_MECHANISM_ID -} from "rain-deploy-0.1.43/src/lib/LibRainDeployZoltuMechanism.sol"; +} from "rain-deploy-0.1.44/src/lib/LibRainDeployZoltuMechanism.sol"; import {ChainBeacon} from "../../../src/lib/LibRainDeployBeacon.sol"; import {LibRainDeployBeaconResolution, ResolvedBeacon} from "../../../src/lib/LibRainDeployBeaconResolution.sol"; import {LibBeaconDeclarations} from "../../lib/LibBeaconDeclarations.sol"; diff --git a/test/src/lib/LibRainDeployBeaconResolution.t.sol b/test/src/lib/LibRainDeployBeaconResolution.t.sol index 53889a2..d3b3130 100644 --- a/test/src/lib/LibRainDeployBeaconResolution.t.sol +++ b/test/src/lib/LibRainDeployBeaconResolution.t.sol @@ -2,7 +2,7 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity =0.8.25; -import {SupportedNetwork} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {SupportedNetwork} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import {ChainBeacon, DeployBeacon} from "../../../src/lib/LibRainDeployBeacon.sol"; import {BeaconDeclaredTwice} from "../../../src/lib/LibRainDeployBeaconDeclarationChecks.sol"; import {BeaconNamedTwice} from "../../../src/lib/LibRainDeployCloneOnChainChecks.sol"; diff --git a/test/src/lib/LibRainDeployBeaconResolution.unrevertableDerivation.t.sol b/test/src/lib/LibRainDeployBeaconResolution.unrevertableDerivation.t.sol index 52b4935..fffc4cc 100644 --- a/test/src/lib/LibRainDeployBeaconResolution.unrevertableDerivation.t.sol +++ b/test/src/lib/LibRainDeployBeaconResolution.unrevertableDerivation.t.sol @@ -2,10 +2,10 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity =0.8.25; -import {DeploySuite, DerivationSnapshotRevertFailed} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {DerivedDeploy} from "rain-deploy-0.1.43/src/abstract/RainDeployVerifyBase.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; +import {DeploySuite, DerivationSnapshotRevertFailed} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {DerivedDeploy} from "rain-deploy-0.1.44/src/abstract/RainDeployVerifyBase.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; import {LibRainDeployBeaconResolution} from "../../../src/lib/LibRainDeployBeaconResolution.sol"; import {MockSnapshotDeletingCreation} from "../../concrete/MockSnapshotDeletingCreation.sol"; import {LibBeaconTest} from "../../lib/LibBeaconTest.sol"; diff --git a/test/src/lib/LibRainDeployClone.t.sol b/test/src/lib/LibRainDeployClone.t.sol index 8cd5e84..ac96869 100644 --- a/test/src/lib/LibRainDeployClone.t.sol +++ b/test/src/lib/LibRainDeployClone.t.sol @@ -9,7 +9,7 @@ import { } from "../../../src/lib/LibICloneableFactoryV5.sol"; import {ICloneableFactoryV4} from "../../../src/interface/deprecated/ICloneableFactoryV4.sol"; import {Vm, VmSafe} from "forge-std-1.17.0/src/Vm.sol"; -import {DeployDependency, LibRainDeploy, SupportedNetwork} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {DeployDependency, LibRainDeploy, SupportedNetwork} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import { CLONE_ARTIFACT_PATH, CloneParams, diff --git a/test/src/lib/LibRainDeployCloneMechanism.configRegistryRead.t.sol b/test/src/lib/LibRainDeployCloneMechanism.configRegistryRead.t.sol index 144376a..58b2e1f 100644 --- a/test/src/lib/LibRainDeployCloneMechanism.configRegistryRead.t.sol +++ b/test/src/lib/LibRainDeployCloneMechanism.configRegistryRead.t.sol @@ -3,14 +3,14 @@ pragma solidity =0.8.25; import {Test} from "forge-std-1.17.0/src/Test.sol"; -import {DeployDeclaration, DeploySuite} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {DeployDependency, LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; -import {IConfigRegistryV5} from "rain-deploy-0.1.43/src/interface/IConfigRegistryV5.sol"; -import {LibConfigRegistryDeploy} from "rain-deploy-0.1.43/src/lib/LibConfigRegistryDeploy.sol"; +import {DeployDeclaration, DeploySuite} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {DeployDependency, LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; +import {IConfigRegistryV5} from "rain-deploy-0.1.44/src/interface/IConfigRegistryV5.sol"; +import {LibConfigRegistryDeploy} from "rain-deploy-0.1.44/src/lib/LibConfigRegistryDeploy.sol"; import { RUNTIME_CODE as CONFIG_REGISTRY_RUNTIME_CODE -} from "rain-deploy-0.1.43/src/generated/candidate/ConfigRegistry.sol"; +} from "rain-deploy-0.1.44/src/generated/candidate/ConfigRegistry.sol"; import {CloneDeploy, LibRainDeployClone} from "../../../src/lib/LibRainDeployClone.sol"; import {LibRainDeployCloneMechanism} from "../../../src/lib/LibRainDeployCloneMechanism.sol"; import {MockCloneFactory} from "../../concrete/MockCloneFactory.sol"; diff --git a/test/src/lib/LibRainDeployCloneMechanism.dependencyClosure.t.sol b/test/src/lib/LibRainDeployCloneMechanism.dependencyClosure.t.sol index ce8f15c..7031c74 100644 --- a/test/src/lib/LibRainDeployCloneMechanism.dependencyClosure.t.sol +++ b/test/src/lib/LibRainDeployCloneMechanism.dependencyClosure.t.sol @@ -9,10 +9,10 @@ import { DeployDependency, DeploySuite, ExternalDeployment -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {DeploySuiteIndex, LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; -import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.43/src/lib/LibRainDeployZoltuMechanism.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {DeploySuiteIndex, LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; +import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.44/src/lib/LibRainDeployZoltuMechanism.sol"; import {CloneDeploy, CloneParams, LibRainDeployClone} from "../../../src/lib/LibRainDeployClone.sol"; import {LibRainDeployCloneMechanism} from "../../../src/lib/LibRainDeployCloneMechanism.sol"; import { diff --git a/test/src/lib/LibRainDeployCloneMechanism.deployLocally.t.sol b/test/src/lib/LibRainDeployCloneMechanism.deployLocally.t.sol index 28331d3..0a10644 100644 --- a/test/src/lib/LibRainDeployCloneMechanism.deployLocally.t.sol +++ b/test/src/lib/LibRainDeployCloneMechanism.deployLocally.t.sol @@ -7,9 +7,9 @@ import { DeployDeclaration, DeployDependency, DeploySuite -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; import {CLONE_ARTIFACT_PATH, CloneNetworks, LibRainDeployClone} from "../../../src/lib/LibRainDeployClone.sol"; import { CLONE_PER_NETWORK_MECHANISM, diff --git a/test/src/lib/LibRainDeployCloneMechanism.handlers.t.sol b/test/src/lib/LibRainDeployCloneMechanism.handlers.t.sol index a81f126..5e81b2d 100644 --- a/test/src/lib/LibRainDeployCloneMechanism.handlers.t.sol +++ b/test/src/lib/LibRainDeployCloneMechanism.handlers.t.sol @@ -3,8 +3,8 @@ pragma solidity =0.8.25; import {Test} from "forge-std-1.17.0/src/Test.sol"; -import {DeployDeclaration} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; +import {DeployDeclaration} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; import { BEACON_PROXY_MECHANISM, BEACON_PROXY_PER_NETWORK_MECHANISM, diff --git a/test/src/lib/LibRainDeployCloneMechanism.recordedAddress.t.sol b/test/src/lib/LibRainDeployCloneMechanism.recordedAddress.t.sol index c13dc07..9f319e3 100644 --- a/test/src/lib/LibRainDeployCloneMechanism.recordedAddress.t.sol +++ b/test/src/lib/LibRainDeployCloneMechanism.recordedAddress.t.sol @@ -7,7 +7,7 @@ import { DeployDeclaration, DeploySuite, UnrecordedOnNetwork -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; import { BEACON_PROXY_PER_NETWORK_MECHANISM, LibRainDeployCloneMechanism diff --git a/test/src/lib/LibRainDeployCloneMechanism.t.sol b/test/src/lib/LibRainDeployCloneMechanism.t.sol index 437d4ce..0db3ca4 100644 --- a/test/src/lib/LibRainDeployCloneMechanism.t.sol +++ b/test/src/lib/LibRainDeployCloneMechanism.t.sol @@ -11,14 +11,14 @@ import { DeploySuite, MechanismUnclaimed, UnexpectedMechanismData -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {DeployDependency, LibRainDeploy, SupportedNetwork} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; -import {LibRainDeploySnapshot} from "rain-deploy-0.1.43/src/lib/LibRainDeploySnapshot.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {DeployDependency, LibRainDeploy, SupportedNetwork} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; +import {LibRainDeploySnapshot} from "rain-deploy-0.1.44/src/lib/LibRainDeploySnapshot.sol"; import { LibRainDeployZoltuMechanism, ZOLTU_MECHANISM_ID -} from "rain-deploy-0.1.43/src/lib/LibRainDeployZoltuMechanism.sol"; +} from "rain-deploy-0.1.44/src/lib/LibRainDeployZoltuMechanism.sol"; import { CLONE_ARTIFACT_PATH, CLONE_UNANCHORABLE_REASON, diff --git a/test/src/lib/LibRainDeployCloneMechanismBeaconProxy.t.sol b/test/src/lib/LibRainDeployCloneMechanismBeaconProxy.t.sol index ef25151..c5ed29c 100644 --- a/test/src/lib/LibRainDeployCloneMechanismBeaconProxy.t.sol +++ b/test/src/lib/LibRainDeployCloneMechanismBeaconProxy.t.sol @@ -9,10 +9,10 @@ import { DeployCandidate, DeployDeclaration, DeploySuite -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {DeployDependency, LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; -import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.43/src/lib/LibRainDeployZoltuMechanism.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {DeployDependency, LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; +import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.44/src/lib/LibRainDeployZoltuMechanism.sol"; import { CLONE_ARTIFACT_PATH, CloneNetworks, diff --git a/test/src/lib/LibRainDeployCloneMechanismBroadcast.t.sol b/test/src/lib/LibRainDeployCloneMechanismBroadcast.t.sol index 680dd27..c5425a1 100644 --- a/test/src/lib/LibRainDeployCloneMechanismBroadcast.t.sol +++ b/test/src/lib/LibRainDeployCloneMechanismBroadcast.t.sol @@ -2,7 +2,7 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity =0.8.25; -import {DeployDependency, LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {DeployDependency, LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import { CLONE_ARTIFACT_PATH, CloneNetworks, @@ -21,11 +21,11 @@ import { DeploySuite, UnexpectedMechanismData, UnrecordedOnNetwork -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; import { LibRainDeployZoltuMechanism, ZOLTU_MECHANISM_ID -} from "rain-deploy-0.1.43/src/lib/LibRainDeployZoltuMechanism.sol"; +} from "rain-deploy-0.1.44/src/lib/LibRainDeployZoltuMechanism.sol"; import {LibRainDeployBeaconProxy} from "../../../src/lib/LibRainDeployBeaconProxy.sol"; import {UpgradeableBeacon} from "@openzeppelin-contracts-5.7.0/proxy/beacon/UpgradeableBeacon.sol"; import {MockBeaconProxyFactory} from "../../concrete/MockBeaconProxyFactory.sol"; diff --git a/test/src/lib/LibRainDeployCloneMechanismCandidates.t.sol b/test/src/lib/LibRainDeployCloneMechanismCandidates.t.sol index 02d8efb..0bf95d9 100644 --- a/test/src/lib/LibRainDeployCloneMechanismCandidates.t.sol +++ b/test/src/lib/LibRainDeployCloneMechanismCandidates.t.sol @@ -7,7 +7,7 @@ import { DeployCandidate, DeployDeclaration, DeploySuite -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; import {BEACON_PROXY_ARTIFACT_PATH} from "../../../src/lib/LibRainDeployBeaconProxy.sol"; import {CLONE_ARTIFACT_PATH, CloneDeploy} from "../../../src/lib/LibRainDeployClone.sol"; import {BEACON_PROXY_MECHANISM, LibRainDeployCloneMechanism} from "../../../src/lib/LibRainDeployCloneMechanism.sol"; diff --git a/test/src/lib/LibRainDeployCloneMechanismRegistryBeaconProxy.t.sol b/test/src/lib/LibRainDeployCloneMechanismRegistryBeaconProxy.t.sol index 5115361..6441105 100644 --- a/test/src/lib/LibRainDeployCloneMechanismRegistryBeaconProxy.t.sol +++ b/test/src/lib/LibRainDeployCloneMechanismRegistryBeaconProxy.t.sol @@ -5,9 +5,9 @@ pragma solidity =0.8.25; import {Test} from "forge-std-1.17.0/src/Test.sol"; import {Vm} from "forge-std-1.17.0/src/Vm.sol"; import {UpgradeableBeacon} from "@openzeppelin-contracts-5.7.0/proxy/beacon/UpgradeableBeacon.sol"; -import {DeployCandidate, DeploySuite} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {DeployDependency, LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.43/src/lib/LibRainDeployZoltuMechanism.sol"; +import {DeployCandidate, DeploySuite} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {DeployDependency, LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.44/src/lib/LibRainDeployZoltuMechanism.sol"; import {ICloneableFactoryV7} from "../../../src/interface/ICloneableFactoryV7.sol"; import {CloneParams, LibRainDeployClone} from "../../../src/lib/LibRainDeployClone.sol"; import {LibRainDeployBeaconProxy} from "../../../src/lib/LibRainDeployBeaconProxy.sol"; diff --git a/test/src/lib/LibRainDeployCloneOnChainChecks.declarationPerNetwork.t.sol b/test/src/lib/LibRainDeployCloneOnChainChecks.declarationPerNetwork.t.sol index eec6d84..f7645b7 100644 --- a/test/src/lib/LibRainDeployCloneOnChainChecks.declarationPerNetwork.t.sol +++ b/test/src/lib/LibRainDeployCloneOnChainChecks.declarationPerNetwork.t.sol @@ -3,7 +3,7 @@ pragma solidity =0.8.25; import {Test} from "forge-std-1.17.0/src/Test.sol"; -import {DeployDeclaration} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; +import {DeployDeclaration} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; import { ChainDeploy, ExtendedNetworksUnrecorded, diff --git a/test/src/lib/LibRainDeployCloneOnChainChecks.probeBeacon.t.sol b/test/src/lib/LibRainDeployCloneOnChainChecks.probeBeacon.t.sol index e148ab0..7ef043b 100644 --- a/test/src/lib/LibRainDeployCloneOnChainChecks.probeBeacon.t.sol +++ b/test/src/lib/LibRainDeployCloneOnChainChecks.probeBeacon.t.sol @@ -3,9 +3,9 @@ pragma solidity =0.8.25; import {Test} from "forge-std-1.17.0/src/Test.sol"; -import {DeployDeclaration, DeploySuite} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; -import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.43/src/lib/LibRainDeployZoltuMechanism.sol"; +import {DeployDeclaration, DeploySuite} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; +import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.44/src/lib/LibRainDeployZoltuMechanism.sol"; import {LibRainDeployCloneMechanism} from "../../../src/lib/LibRainDeployCloneMechanism.sol"; import { BeaconProbe, diff --git a/test/src/lib/LibRainDeployCloneOnChainChecks.registryBeaconProxy.t.sol b/test/src/lib/LibRainDeployCloneOnChainChecks.registryBeaconProxy.t.sol index b0769ee..c10aeab 100644 --- a/test/src/lib/LibRainDeployCloneOnChainChecks.registryBeaconProxy.t.sol +++ b/test/src/lib/LibRainDeployCloneOnChainChecks.registryBeaconProxy.t.sol @@ -4,8 +4,8 @@ pragma solidity =0.8.25; import {Test} from "forge-std-1.17.0/src/Test.sol"; import {UpgradeableBeacon} from "@openzeppelin-contracts-5.7.0/proxy/beacon/UpgradeableBeacon.sol"; -import {DeployDeclaration, DeploySuite} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {DeployDeclaration, DeploySuite} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import {LibRainDeployCloneMechanism} from "../../../src/lib/LibRainDeployCloneMechanism.sol"; import {LibRainDeployCloneOnChainChecks} from "../../../src/lib/LibRainDeployCloneOnChainChecks.sol"; import { diff --git a/test/src/lib/LibRainDeployCloneOnChainChecks.released.t.sol b/test/src/lib/LibRainDeployCloneOnChainChecks.released.t.sol index 20ffa10..5107564 100644 --- a/test/src/lib/LibRainDeployCloneOnChainChecks.released.t.sol +++ b/test/src/lib/LibRainDeployCloneOnChainChecks.released.t.sol @@ -7,8 +7,8 @@ import { DeployCandidate, DeployDeclaration, DeploySuite -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; import {CloneNetworks} from "../../../src/lib/LibRainDeployClone.sol"; import {ChainDeploy, LibRainDeployExtendedNetworks} from "../../../src/lib/LibRainDeployExtendedNetworks.sol"; import {LibRainDeployCloneMechanism} from "../../../src/lib/LibRainDeployCloneMechanism.sol"; diff --git a/test/src/lib/LibRainDeployCloneOnChainChecks.t.sol b/test/src/lib/LibRainDeployCloneOnChainChecks.t.sol index 78e1031..fdbe16c 100644 --- a/test/src/lib/LibRainDeployCloneOnChainChecks.t.sol +++ b/test/src/lib/LibRainDeployCloneOnChainChecks.t.sol @@ -3,8 +3,8 @@ pragma solidity =0.8.25; import {Test} from "forge-std-1.17.0/src/Test.sol"; -import {DeployDeclaration, DeploySuite} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {Prerequisite} from "rain-deploy-0.1.43/src/interface/IMigrationRegistryV5.sol"; +import {DeployDeclaration, DeploySuite} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {Prerequisite} from "rain-deploy-0.1.44/src/interface/IMigrationRegistryV5.sol"; import {BeaconState, BeaconTransition, ChainBeacon, DeployBeacon} from "../../../src/lib/LibRainDeployBeacon.sol"; import { BEACON_PROXY_MECHANISM, diff --git a/test/src/lib/LibRainDeployClonePerNetwork.t.sol b/test/src/lib/LibRainDeployClonePerNetwork.t.sol index 981ec5f..2210a53 100644 --- a/test/src/lib/LibRainDeployClonePerNetwork.t.sol +++ b/test/src/lib/LibRainDeployClonePerNetwork.t.sol @@ -3,7 +3,7 @@ pragma solidity =0.8.25; import {Test} from "forge-std-1.17.0/src/Test.sol"; -import {DeployDependency, LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {DeployDependency, LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import {CloneNetworks, CloneParams, LibRainDeployClone} from "../../../src/lib/LibRainDeployClone.sol"; import {ChainDeploy} from "../../../src/lib/LibRainDeployExtendedNetworks.sol"; import { diff --git a/test/src/lib/LibRainDeployCloneSnapshot.beaconProxy.t.sol b/test/src/lib/LibRainDeployCloneSnapshot.beaconProxy.t.sol index 67d3415..7935065 100644 --- a/test/src/lib/LibRainDeployCloneSnapshot.beaconProxy.t.sol +++ b/test/src/lib/LibRainDeployCloneSnapshot.beaconProxy.t.sol @@ -10,15 +10,15 @@ import { MechanismUnclaimed, RainDeploySuitesBase, SnapshotFile -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; import {RAIN_COPYRIGHT_TEXT, RAIN_SPDX_LICENSE_IDENTIFIER} from "rain-sol-codegen-0.1.39/src/lib/LibCodeGen.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; import { FrozenSnapshotMechanismDataAmbiguous, FrozenSnapshotMechanismDataMissing, FrozenSnapshotUnreadable, LibRainDeploySnapshot -} from "rain-deploy-0.1.43/src/lib/LibRainDeploySnapshot.sol"; +} from "rain-deploy-0.1.44/src/lib/LibRainDeploySnapshot.sol"; import {LibRainDeployClone} from "../../../src/lib/LibRainDeployClone.sol"; import {BEACON_PROXY_ARTIFACT_PATH, BeaconProxyDeploy} from "../../../src/lib/LibRainDeployBeaconProxy.sol"; import { @@ -33,7 +33,7 @@ import { FrozenSnapshotBeaconProxyMechanismDataMissing, LibRainDeployCloneSnapshot } from "../../../src/lib/LibRainDeployCloneSnapshot.sol"; -import {DeployDependency, LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; +import {DeployDependency, LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import {MockBeaconProxyFactory} from "../../concrete/MockBeaconProxyFactory.sol"; import {MockCloneableV2} from "../../concrete/MockCloneableV2.sol"; import {exampleCloneImplementation} from "../../abstract/ExampleCloneDeploys.sol"; diff --git a/test/src/lib/LibRainDeployCloneSnapshot.registryBeaconProxy.t.sol b/test/src/lib/LibRainDeployCloneSnapshot.registryBeaconProxy.t.sol index a6efd27..dd342f2 100644 --- a/test/src/lib/LibRainDeployCloneSnapshot.registryBeaconProxy.t.sol +++ b/test/src/lib/LibRainDeployCloneSnapshot.registryBeaconProxy.t.sol @@ -9,14 +9,14 @@ import { DeploySuite, RainDeploySuitesBase, SnapshotFile -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; import {RAIN_COPYRIGHT_TEXT, RAIN_SPDX_LICENSE_IDENTIFIER} from "rain-sol-codegen-0.1.39/src/lib/LibCodeGen.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; import { FrozenSnapshotMechanismDataAmbiguous, FrozenSnapshotUnreadable, LibRainDeploySnapshot -} from "rain-deploy-0.1.43/src/lib/LibRainDeploySnapshot.sol"; +} from "rain-deploy-0.1.44/src/lib/LibRainDeploySnapshot.sol"; import { LibRainDeployRegistryBeaconProxy, REGISTRY_BEACON_PROXY_ARTIFACT_PATH, diff --git a/test/src/lib/LibRainDeployCloneSnapshot.t.sol b/test/src/lib/LibRainDeployCloneSnapshot.t.sol index 15c8eb5..7ed6f54 100644 --- a/test/src/lib/LibRainDeployCloneSnapshot.t.sol +++ b/test/src/lib/LibRainDeployCloneSnapshot.t.sol @@ -9,15 +9,15 @@ import { DeploySuite, RainDeploySuitesBase, SnapshotFile -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; import {RAIN_COPYRIGHT_TEXT, RAIN_SPDX_LICENSE_IDENTIFIER} from "rain-sol-codegen-0.1.39/src/lib/LibCodeGen.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {DeploySuiteIndex, LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; -import {LibRainDeploySnapshot} from "rain-deploy-0.1.43/src/lib/LibRainDeploySnapshot.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {DeploySuiteIndex, LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; +import {LibRainDeploySnapshot} from "rain-deploy-0.1.44/src/lib/LibRainDeploySnapshot.sol"; import { FrozenSnapshotMechanismDataMissing, LibRainDeploySnapshot -} from "rain-deploy-0.1.43/src/lib/LibRainDeploySnapshot.sol"; +} from "rain-deploy-0.1.44/src/lib/LibRainDeploySnapshot.sol"; import {CLONE_ARTIFACT_PATH, CloneNetworks, LibRainDeployClone} from "../../../src/lib/LibRainDeployClone.sol"; import { CLONE_PER_NETWORK_MECHANISM, diff --git a/test/src/lib/LibRainDeployExtendedNetworks.t.sol b/test/src/lib/LibRainDeployExtendedNetworks.t.sol index 7b24f09..d903041 100644 --- a/test/src/lib/LibRainDeployExtendedNetworks.t.sol +++ b/test/src/lib/LibRainDeployExtendedNetworks.t.sol @@ -15,7 +15,7 @@ import { ExtendedNetworksUnrecorded, LibRainDeployExtendedNetworks } from "../../../src/lib/LibRainDeployExtendedNetworks.sol"; -import {InvalidRecordRoot} from "rain-deploy-0.1.43/src/lib/LibRainDeploySnapshot.sol"; +import {InvalidRecordRoot} from "rain-deploy-0.1.44/src/lib/LibRainDeploySnapshot.sol"; import {LibExtendedNetworksFixture} from "../../lib/LibExtendedNetworksFixture.sol"; /// @title LibRainDeployExtendedNetworksTest diff --git a/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol b/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol index c6d4ab6..ae6707e 100644 --- a/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol +++ b/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol @@ -9,8 +9,8 @@ import {REGISTRY_BEACON_PROXY_CREATION_CODE} from "../../../src/generated/Regist import {DelegatedBeacon, ZeroBeaconCodeSize} from "../../../src/lib/LibICloneableFactoryV5.sol"; import {BeaconBindingTypeMismatch} from "../../../src/lib/LibICloneableFactoryV7.sol"; import {TestCloneFactory} from "../../../src/test/TestCloneFactory.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {IConfigRegistryV5} from "rain-deploy-0.1.43/src/interface/IConfigRegistryV5.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {IConfigRegistryV5} from "rain-deploy-0.1.44/src/interface/IConfigRegistryV5.sol"; import { LibRainDeployRegistryBeaconProxy, REGISTRY_BEACON_PROXY_ARTIFACT_PATH, diff --git a/test/src/lib/LibRainDeploySnapshotRecordedMechanismClone.t.sol b/test/src/lib/LibRainDeploySnapshotRecordedMechanismClone.t.sol index 30c3200..5e0811d 100644 --- a/test/src/lib/LibRainDeploySnapshotRecordedMechanismClone.t.sol +++ b/test/src/lib/LibRainDeploySnapshotRecordedMechanismClone.t.sol @@ -8,14 +8,14 @@ import { DeployDependency, DeployMechanismHandler, DeploySuite -} from "rain-deploy-0.1.43/src/abstract/RainDeploySuitesBase.sol"; -import {LibRainDeploy} from "rain-deploy-0.1.43/src/lib/LibRainDeploy.sol"; -import {LibRainDeployDeclaration} from "rain-deploy-0.1.43/src/lib/LibRainDeployDeclaration.sol"; -import {LibRainDeploySnapshot} from "rain-deploy-0.1.43/src/lib/LibRainDeploySnapshot.sol"; +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; +import {LibRainDeploySnapshot} from "rain-deploy-0.1.44/src/lib/LibRainDeploySnapshot.sol"; import { LibRainDeployZoltuMechanism, ZOLTU_MECHANISM_ID -} from "rain-deploy-0.1.43/src/lib/LibRainDeployZoltuMechanism.sol"; +} from "rain-deploy-0.1.44/src/lib/LibRainDeployZoltuMechanism.sol"; import {CLONE_ARTIFACT_PATH} from "../../../src/lib/LibRainDeployClone.sol"; import { CLONE_MECHANISM, From c5d24a5aaf90e4c45dbb99f7db521edcc36e16d2 Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 18:12:48 +0000 Subject: [PATCH 24/43] Restore the caller's startPrank around the registry beacon proxy local initialize Co-Authored-By: Claude Opus 5.5 --- src/lib/LibRainDeployRegistryBeaconProxy.sol | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lib/LibRainDeployRegistryBeaconProxy.sol b/src/lib/LibRainDeployRegistryBeaconProxy.sol index c2432fa..b3687ff 100644 --- a/src/lib/LibRainDeployRegistryBeaconProxy.sol +++ b/src/lib/LibRainDeployRegistryBeaconProxy.sol @@ -2,7 +2,7 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity ^0.8.25; -import {Vm} from "forge-std-1.17.0/src/Vm.sol"; +import {Vm, VmSafe} from "forge-std-1.17.0/src/Vm.sol"; import {console2} from "forge-std-1.17.0/src/console2.sol"; import {IERC5313} from "@openzeppelin-contracts-5.7.0/interfaces/IERC5313.sol"; import {UpgradeableBeacon} from "@openzeppelin-contracts-5.7.0/proxy/beacon/UpgradeableBeacon.sol"; @@ -363,8 +363,14 @@ library LibRainDeployRegistryBeaconProxy { } vm.etch(onNetwork.beacon, beaconCode); vm.etch(proxy, onNetwork.proxyRuntimeCode); - vm.prank(params.factory); + // Foundry rejects a single prank under the caller's active startPrank, so it is overridden then restored. + (VmSafe.CallerMode mode, address sender, address origin) = vm.readCallers(); + vm.startPrank(params.factory); LibICloneableFactoryV5.initializeChild(proxy, params.data); + vm.stopPrank(); + if (mode == VmSafe.CallerMode.RecurrentPrank) { + vm.startPrank(sender, origin); + } return proxy; } } From 2a47ebfc1e01aa27047b1f827539c8743fae1537 Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 18:19:14 +0000 Subject: [PATCH 25/43] Format the registry beacon proxy tests Co-Authored-By: Claude Opus 5.5 --- test/lib/LibRegistryBeaconProxyTest.sol | 6 +++- ...DeployVerifyChainRegistryBeaconProxy.t.sol | 3 +- ...nRegistryBeaconProxyBeaconPerNetwork.t.sol | 3 +- ...eRegistryBeaconProxyBeaconPerNetwork.t.sol | 23 ++++++++---- .../lib/LibRainDeployCloneOnChainChecks.t.sol | 3 +- .../LibRainDeployRegistryBeaconProxy.t.sol | 36 ++++++++++++++----- 6 files changed, 54 insertions(+), 20 deletions(-) diff --git a/test/lib/LibRegistryBeaconProxyTest.sol b/test/lib/LibRegistryBeaconProxyTest.sol index 5448c8c..f5fb869 100644 --- a/test/lib/LibRegistryBeaconProxyTest.sol +++ b/test/lib/LibRegistryBeaconProxyTest.sol @@ -96,7 +96,11 @@ library LibRegistryBeaconProxyTest { vm, params, RegistryBeaconOnNetwork({ - chainId: chainId, beacon: beacon, codeHash: beacon.codehash, proxyCodeHash: bytes32(0), proxyRuntimeCode: "" + chainId: chainId, + beacon: beacon, + codeHash: beacon.codehash, + proxyCodeHash: bytes32(0), + proxyRuntimeCode: "" }) ); } diff --git a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxy.t.sol b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxy.t.sol index 39733cf..b69bca7 100644 --- a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxy.t.sol +++ b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxy.t.sol @@ -53,7 +53,8 @@ contract RainDeployVerifyChainRegistryBeaconProxyTest is PerNetworkCloneBeaconVe RegistryBeaconProxyParams memory params = LibRegistryBeaconProxyTest.live(vm, addresses[1], OWNER, hex"deadbeef", bytes32(uint256(5))); sBeacon = params.beaconPerNetwork[0].beacon; - params.beaconPerNetwork = LibRegistryBeaconProxyTest.onlyOn(vm, params, PER_NETWORK_CLONE_POLYGON_CHAIN_ID, sBeacon); + params.beaconPerNetwork = + LibRegistryBeaconProxyTest.onlyOn(vm, params, PER_NETWORK_CLONE_POLYGON_CHAIN_ID, sBeacon); sParamsData = abi.encode(params); vm.makePersistent(params.factory); vm.makePersistent(params.registry); diff --git a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol index 277695c..7366ab8 100644 --- a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol +++ b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol @@ -81,7 +81,8 @@ contract RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetworkTest is RainDep SupportedNetwork[] memory configs = LibRainDeploy.declaredNetworkConfigs(networks()); params.beaconPerNetwork = new RegistryBeaconOnNetwork[](3); for (uint256 i = 0; i < 3; i++) { - params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.onNetwork(vm, params, configs[i].chainId, beacons[i]); + params.beaconPerNetwork[i] = + LibRegistryBeaconProxyTest.onNetwork(vm, params, configs[i].chainId, beacons[i]); } sParamsData = abi.encode(params); } diff --git a/test/src/abstract/RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetwork.t.sol b/test/src/abstract/RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetwork.t.sol index c84ce1b..f5537a3 100644 --- a/test/src/abstract/RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetwork.t.sol +++ b/test/src/abstract/RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetwork.t.sol @@ -3,7 +3,11 @@ pragma solidity =0.8.25; import {UpgradeableBeacon} from "@openzeppelin-contracts-5.7.0/proxy/beacon/UpgradeableBeacon.sol"; -import {DeployDeclaration, DeployDependency, DeploySuite} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import { + DeployDeclaration, + DeployDependency, + DeploySuite +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; import {DerivedDeploy} from "rain-deploy-0.1.44/src/abstract/RainDeployVerifyBase.sol"; import {RainDeployVerifySnapshotBase} from "rain-deploy-0.1.44/src/abstract/RainDeployVerifySnapshotBase.sol"; import {LibRainDeploy, SupportedNetwork} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; @@ -75,14 +79,16 @@ contract RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetworkTest is SupportedNetwork[] memory configs = LibRainDeploy.declaredNetworkConfigs(networks()); params.beaconPerNetwork = new RegistryBeaconOnNetwork[](3); for (uint256 i = 0; i < 3; i++) { - params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.onNetwork(vm, params, configs[i].chainId, beacons[i]); + params.beaconPerNetwork[i] = + LibRegistryBeaconProxyTest.onNetwork(vm, params, configs[i].chainId, beacons[i]); } sParamsData = abi.encode(params); } /// `params` declared over the three networks, its runtime code generated on the first listed chain. function proxySuite(RegistryBeaconProxyParams memory params) internal returns (DeploySuite memory) { - DeploySuite memory suite = LibRainDeployCloneMechanism.registryBeaconProxyCandidate( + DeploySuite memory suite = + LibRainDeployCloneMechanism.registryBeaconProxyCandidate( LibRegistryBeaconProxyTest.declared(PROXY_SUITE, params, LibRegistryBeaconProxyTest.runtimeOf(vm, params)) ) .snapshot; @@ -92,8 +98,9 @@ contract RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetworkTest is /// `params`'s proxy code on `chainId`, its beacon there serving the implementation it serves now. function codeOn(RegistryBeaconProxyParams memory params, uint256 chainId) internal returns (bytes memory) { - address implementation = - UpgradeableBeacon(LibRainDeployRegistryBeaconProxy.beaconOnNetwork(params, chainId).beacon).implementation(); + address implementation = UpgradeableBeacon( + LibRainDeployRegistryBeaconProxy.beaconOnNetwork(params, chainId).beacon + ).implementation(); return LibRainDeployRegistryBeaconProxy.registryBeaconProxyRuntimeCodeOnNetwork( vm, params, chainId, implementation, implementation.code ); @@ -129,7 +136,8 @@ contract RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetworkTest is RegistryBeaconProxyParams memory params = storedParams(); address beacon = params.beaconPerNetwork[0].beacon; for (uint256 i = 0; i < 3; i++) { - params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.onNetwork(vm, params, params.beaconPerNetwork[i].chainId, beacon); + params.beaconPerNetwork[i] = + LibRegistryBeaconProxyTest.onNetwork(vm, params, params.beaconPerNetwork[i].chainId, beacon); } DeploySuite memory suite = proxySuite(params); DerivedDeploy memory derived = this.externalDeriveDeployment(suite); @@ -144,7 +152,8 @@ contract RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetworkTest is RegistryBeaconProxyParams memory params = storedParams(); address beacon = params.beaconPerNetwork[0].beacon; for (uint256 i = 0; i < 3; i++) { - params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.onNetwork(vm, params, params.beaconPerNetwork[i].chainId, beacon); + params.beaconPerNetwork[i] = + LibRegistryBeaconProxyTest.onNetwork(vm, params, params.beaconPerNetwork[i].chainId, beacon); } this.externalCheckInternallyConsistent(proxySuite(params)); } diff --git a/test/src/lib/LibRainDeployCloneOnChainChecks.t.sol b/test/src/lib/LibRainDeployCloneOnChainChecks.t.sol index fdbe16c..26b3a0c 100644 --- a/test/src/lib/LibRainDeployCloneOnChainChecks.t.sol +++ b/test/src/lib/LibRainDeployCloneOnChainChecks.t.sol @@ -152,8 +152,7 @@ contract LibRainDeployCloneOnChainChecksBroadcastSeatTest is Test { address first = params.beaconPerNetwork[0].beacon; params.beaconPerNetwork = new RegistryBeaconOnNetwork[](chainIds.length); for (uint256 i = 0; i < chainIds.length; i++) { - address onChain = - i == 0 ? first : address(new UpgradeableBeacon(address(new MockCloneableV2()), owners[i])); + address onChain = i == 0 ? first : address(new UpgradeableBeacon(address(new MockCloneableV2()), owners[i])); params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.onNetwork(vm, params, chainIds[i], onChain); } DeploySuite memory suite = diff --git a/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol b/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol index ae6707e..4e6bde8 100644 --- a/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol +++ b/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol @@ -100,12 +100,27 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { /// Three chains, each on its own beacon at its own address and code hash. function threeChains() internal pure returns (RegistryBeaconOnNetwork[] memory) { RegistryBeaconOnNetwork[] memory beaconPerNetwork = new RegistryBeaconOnNetwork[](3); - beaconPerNetwork[0] = - RegistryBeaconOnNetwork({chainId: 42161, beacon: address(0xBEAC1), codeHash: keccak256("arbitrum"), proxyCodeHash: bytes32(0), proxyRuntimeCode: ""}); - beaconPerNetwork[1] = - RegistryBeaconOnNetwork({chainId: 8453, beacon: address(0xBEAC2), codeHash: keccak256("base"), proxyCodeHash: bytes32(0), proxyRuntimeCode: ""}); - beaconPerNetwork[2] = - RegistryBeaconOnNetwork({chainId: 137, beacon: address(0xBEAC3), codeHash: keccak256("polygon"), proxyCodeHash: bytes32(0), proxyRuntimeCode: ""}); + beaconPerNetwork[0] = RegistryBeaconOnNetwork({ + chainId: 42161, + beacon: address(0xBEAC1), + codeHash: keccak256("arbitrum"), + proxyCodeHash: bytes32(0), + proxyRuntimeCode: "" + }); + beaconPerNetwork[1] = RegistryBeaconOnNetwork({ + chainId: 8453, + beacon: address(0xBEAC2), + codeHash: keccak256("base"), + proxyCodeHash: bytes32(0), + proxyRuntimeCode: "" + }); + beaconPerNetwork[2] = RegistryBeaconOnNetwork({ + chainId: 137, + beacon: address(0xBEAC3), + codeHash: keccak256("polygon"), + proxyCodeHash: bytes32(0), + proxyRuntimeCode: "" + }); return beaconPerNetwork; } @@ -118,7 +133,8 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { params.implementationRuntimeCode = address(implementation).code; params.beaconPerNetwork = threeChains(); for (uint256 i = 0; i < params.beaconPerNetwork.length; i++) { - params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.withProxyCode(vm, params, params.beaconPerNetwork[i]); + params.beaconPerNetwork[i] = + LibRegistryBeaconProxyTest.withProxyCode(vm, params, params.beaconPerNetwork[i]); } return params; } @@ -459,7 +475,11 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { RegistryBeaconOnNetwork memory twice = three[duplicated % 3]; if (!same) { twice = RegistryBeaconOnNetwork({ - chainId: twice.chainId, beacon: address(0xBEAC4), codeHash: keccak256("other"), proxyCodeHash: bytes32(0), proxyRuntimeCode: "" + chainId: twice.chainId, + beacon: address(0xBEAC4), + codeHash: keccak256("other"), + proxyCodeHash: bytes32(0), + proxyRuntimeCode: "" }); } RegistryBeaconOnNetwork[] memory four = new RegistryBeaconOnNetwork[](4); From e8c4032af28514327fa80bdc8bc9d6c5c9fb5a73 Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 18:23:54 +0000 Subject: [PATCH 26/43] Keep tx.origin when pranking the factory in the local registry beacon proxy step Co-Authored-By: Claude Opus 5.5 --- src/lib/LibRainDeployRegistryBeaconProxy.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/LibRainDeployRegistryBeaconProxy.sol b/src/lib/LibRainDeployRegistryBeaconProxy.sol index b3687ff..be12263 100644 --- a/src/lib/LibRainDeployRegistryBeaconProxy.sol +++ b/src/lib/LibRainDeployRegistryBeaconProxy.sol @@ -365,7 +365,7 @@ library LibRainDeployRegistryBeaconProxy { vm.etch(proxy, onNetwork.proxyRuntimeCode); // Foundry rejects a single prank under the caller's active startPrank, so it is overridden then restored. (VmSafe.CallerMode mode, address sender, address origin) = vm.readCallers(); - vm.startPrank(params.factory); + vm.startPrank(params.factory, origin); LibICloneableFactoryV5.initializeChild(proxy, params.data); vm.stopPrank(); if (mode == VmSafe.CallerMode.RecurrentPrank) { From eeead20d0c19691d071a8407f05705e4278fd17c Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 18:24:18 +0000 Subject: [PATCH 27/43] Format LibRainDeployCloneMechanism Co-Authored-By: Claude Opus 5.5 --- src/lib/LibRainDeployCloneMechanism.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/LibRainDeployCloneMechanism.sol b/src/lib/LibRainDeployCloneMechanism.sol index 0052469..112e556 100644 --- a/src/lib/LibRainDeployCloneMechanism.sol +++ b/src/lib/LibRainDeployCloneMechanism.sol @@ -787,7 +787,7 @@ library LibRainDeployCloneMechanism { vm.etch( expected, LibRainDeployRegistryBeaconProxy.beaconOnNetwork(registryBeaconProxyParams(suite), chainId) - .proxyRuntimeCode + .proxyRuntimeCode ); return; } From 3319d40a2e41d5dc484c96f5fae73e3669241ba5 Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 18:26:28 +0000 Subject: [PATCH 28/43] Test each chain's proxy code record is refused wherever a registry beacon proxy is read Co-Authored-By: Claude Opus 5.5 --- ...yRegistryBeaconProxy.proxyCodeRecord.t.sol | 204 ++++++++++++++++++ 1 file changed, 204 insertions(+) create mode 100644 test/src/lib/LibRainDeployRegistryBeaconProxy.proxyCodeRecord.t.sol diff --git a/test/src/lib/LibRainDeployRegistryBeaconProxy.proxyCodeRecord.t.sol b/test/src/lib/LibRainDeployRegistryBeaconProxy.proxyCodeRecord.t.sol new file mode 100644 index 0000000..5fc5f2a --- /dev/null +++ b/test/src/lib/LibRainDeployRegistryBeaconProxy.proxyCodeRecord.t.sol @@ -0,0 +1,204 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {Test} from "forge-std-1.17.0/src/Test.sol"; +import {DeployCandidate, DeploySuite} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeployCloneMechanism} from "../../../src/lib/LibRainDeployCloneMechanism.sol"; +import { + LibRainDeployRegistryBeaconProxy, + RegistryBeaconOnNetwork, + RegistryBeaconProxyDeploy, + RegistryBeaconProxyParams +} from "../../../src/lib/LibRainDeployRegistryBeaconProxy.sol"; +import {LibRegistryBeaconProxyTest} from "../../lib/LibRegistryBeaconProxyTest.sol"; +import {MockCloneableV2} from "../../concrete/MockCloneableV2.sol"; + +/// @title LibRainDeployRegistryBeaconProxyProxyCodeRecordTest +/// @notice One chain's undeclared or incoherent proxy code is refused wherever a registry beacon proxy suite is read. +contract LibRainDeployRegistryBeaconProxyProxyCodeRecordTest is Test { + string constant SUITE = "registry-beacon-proxy"; + + bytes internal sParamsData; + + /// Arbitrum One, Base and Polygon, each on its own beacon with the proxy code that beacon gives. + function setUp() external { + RegistryBeaconProxyParams memory params = RegistryBeaconProxyParams({ + factory: address(0xFAC7), + registry: address(0x12E6), + authority: LibRegistryBeaconProxyTest.AUTHORITY, + beaconName: LibRegistryBeaconProxyTest.BEACON_NAME, + beaconPerNetwork: new RegistryBeaconOnNetwork[](3), + data: hex"deadbeef", + salt: bytes32(uint256(5)), + implementation: address(new MockCloneableV2()), + implementationRuntimeCode: "" + }); + params.implementationRuntimeCode = params.implementation.code; + uint256[3] memory chainIds = [uint256(42161), 8453, 137]; + for (uint256 i = 0; i < 3; i++) { + params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.withProxyCode( + vm, + params, + RegistryBeaconOnNetwork({ + chainId: chainIds[i], + beacon: address(uint160(0xBEAC1 + i)), + codeHash: keccak256(abi.encode(chainIds[i])), + proxyCodeHash: bytes32(0), + proxyRuntimeCode: "" + }) + ); + } + sParamsData = abi.encode(params); + } + + function threeChains() internal view returns (RegistryBeaconProxyParams memory) { + return abi.decode(sParamsData, (RegistryBeaconProxyParams)); + } + + function goodSuite() internal view returns (DeploySuite memory) { + RegistryBeaconProxyParams memory params = threeChains(); + return externalCandidate( + LibRegistryBeaconProxyTest.declared(SUITE, params, params.beaconPerNetwork[0].proxyRuntimeCode) + ) + .snapshot; + } + + function externalBeaconOnNetwork(RegistryBeaconProxyParams memory params, uint256 chainId) + external + pure + returns (RegistryBeaconOnNetwork memory) + { + return LibRainDeployRegistryBeaconProxy.beaconOnNetwork(params, chainId); + } + + function externalCheckProxyCode(RegistryBeaconProxyParams memory params, bytes memory runtimeCode) external pure { + LibRainDeployRegistryBeaconProxy.checkProxyCode(params, runtimeCode); + } + + function externalCandidate(RegistryBeaconProxyDeploy memory proxy) public pure returns (DeployCandidate memory) { + return LibRainDeployCloneMechanism.registryBeaconProxyCandidate(proxy); + } + + function externalExpectedBytecodeHash(DeploySuite memory suite, uint256 chainId) external pure returns (bytes32) { + return LibRainDeployCloneMechanism.expectedBytecodeHash(suite, chainId); + } + + function externalDeployParams(DeploySuite memory suite, uint256 chainId, address expected) external { + LibRainDeployCloneMechanism.deployParams(vm, suite, chainId, expected); + } + + function externalDeployStepLocally(bytes memory paramsData) external returns (address) { + return LibRainDeployRegistryBeaconProxy.registryBeaconProxyDeployStepLocally(vm, address(this), paramsData); + } + + function externalCheckBeacon(string memory network, RegistryBeaconProxyParams memory params) external view { + LibRainDeployRegistryBeaconProxy.checkBeacon(network, params); + } + + /// The stored runtime code is another chain's good code, so only entry `k` can be refused. + function expectRefusedEverywhere(RegistryBeaconProxyParams memory spoiled, uint256 k, bytes memory refusal) + internal + { + uint256 chainId = spoiled.beaconPerNetwork[k].chainId; + bytes memory otherCode = threeChains().beaconPerNetwork[(k + 1) % 3].proxyRuntimeCode; + DeploySuite memory suite = LibRainDeployCloneMechanism.withPayload(goodSuite(), abi.encode(spoiled)); + vm.chainId(chainId); + + vm.expectRevert(refusal); + this.externalBeaconOnNetwork(spoiled, chainId); + + vm.expectRevert(refusal); + this.externalCheckProxyCode(spoiled, otherCode); + + vm.expectRevert(refusal); + this.externalCandidate(LibRegistryBeaconProxyTest.declared(SUITE, spoiled, otherCode)); + + vm.expectRevert(refusal); + this.externalExpectedBytecodeHash(suite, chainId); + + vm.expectRevert(refusal); + this.externalDeployParams(suite, chainId, suite.storedDeployedAddress); + + vm.expectRevert(refusal); + this.externalDeployStepLocally(abi.encode(spoiled)); + + vm.expectRevert(refusal); + this.externalCheckBeacon("spoiled", spoiled); + } + + function testAZeroProxyCodeHashOnOneChainIsRefusedEverywhere(uint8 at) external { + uint256 k = at % 3; + RegistryBeaconProxyParams memory spoiled = threeChains(); + spoiled.beaconPerNetwork[k].proxyCodeHash = bytes32(0); + expectRefusedEverywhere( + spoiled, + k, + abi.encodeWithSelector( + LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyCodeNotDeclared.selector, + spoiled.beaconPerNetwork[k].chainId + ) + ); + } + + function testEmptyProxyRuntimeCodeOnOneChainIsRefusedEverywhere(uint8 at) external { + uint256 k = at % 3; + RegistryBeaconProxyParams memory spoiled = threeChains(); + spoiled.beaconPerNetwork[k].proxyRuntimeCode = ""; + expectRefusedEverywhere( + spoiled, + k, + abi.encodeWithSelector( + LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyCodeNotDeclared.selector, + spoiled.beaconPerNetwork[k].chainId + ) + ); + } + + function testProxyRuntimeCodeNotHashingToItsHashOnOneChainIsRefusedEverywhere( + uint8 at, + bytes32 declared, + bytes memory code + ) external { + vm.assume(declared != bytes32(0) && code.length > 0 && keccak256(code) != declared); + uint256 k = at % 3; + RegistryBeaconProxyParams memory spoiled = threeChains(); + spoiled.beaconPerNetwork[k].proxyCodeHash = declared; + spoiled.beaconPerNetwork[k].proxyRuntimeCode = code; + expectRefusedEverywhere( + spoiled, + k, + abi.encodeWithSelector( + LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyCodeHashIncoherent.selector, + spoiled.beaconPerNetwork[k].chainId, + declared, + keccak256(code) + ) + ); + } + + function testStoredRuntimeCodeThatIsNoChainsProxyCodeIsRefused(bytes memory runtimeCode) external { + RegistryBeaconProxyParams memory params = threeChains(); + for (uint256 i = 0; i < 3; i++) { + vm.assume(keccak256(runtimeCode) != params.beaconPerNetwork[i].proxyCodeHash); + } + bytes memory refusal = abi.encodeWithSelector( + LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyRuntimeCodeOnNoNetwork.selector, keccak256(runtimeCode) + ); + vm.expectRevert(refusal); + this.externalCheckProxyCode(params, runtimeCode); + vm.expectRevert(refusal); + this.externalCandidate(LibRegistryBeaconProxyTest.declared(SUITE, params, runtimeCode)); + } + + function testStoredRuntimeCodeThatIsAnyChainsProxyCodeIsAccepted() external view { + RegistryBeaconProxyParams memory params = threeChains(); + for (uint256 i = 0; i < 3; i++) { + bytes memory runtimeCode = params.beaconPerNetwork[i].proxyRuntimeCode; + this.externalCheckProxyCode(params, runtimeCode); + DeploySuite memory suite = + this.externalCandidate(LibRegistryBeaconProxyTest.declared(SUITE, params, runtimeCode)).snapshot; + assertEq(suite.storedRuntimeCode, runtimeCode); + } + } +} From 48929a96c18717bc207d85b2afe99455b8b459b8 Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 18:27:16 +0000 Subject: [PATCH 29/43] Test each chain of a registry beacon proxy suite on its own proxy code and on another chain's Co-Authored-By: Claude Opus 5.5 --- ...nRegistryBeaconProxyBeaconPerNetwork.t.sol | 43 ++++++++++++++++++- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol index 7366ab8..afb2d3d 100644 --- a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol +++ b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol @@ -153,12 +153,51 @@ contract RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetworkTest is RainDep } } - /// The proxy etched at its address on network `i`'s chain, the name bound to `beacon` there. + /// Network `i`'s own proxy code etched at the suite's address on its chain, the name bound to `beacon` there. function liveOn(RegistryBeaconProxyParams memory params, DeploySuite memory suite, uint256 i, address beacon) internal { bindOn(params, LibRainDeploy.declaredNetworkConfigs(networks())[i], beacon); - vm.etch(suite.storedDeployedAddress, suite.storedRuntimeCode); + vm.etch(suite.storedDeployedAddress, storedParams().beaconPerNetwork[i].proxyRuntimeCode); + } + + function testOneSuiteOverThreeChainsPassesOnEachChainHoldingItsOwnProxyCode() external { + RegistryBeaconProxyParams memory params = storedParams(); + DeploySuite memory suite = proxySuite(params); + string[] memory names = networks(); + uint256 state = vm.snapshotState(); + for (uint256 i = 0; i < names.length; i++) { + liveOn(params, suite, i, params.beaconPerNetwork[i].beacon); + this.externalCheckOnLocalForks(suite, names[i]); + assertTrue(vm.revertToState(state)); + } + } + + function testOneSuiteOverThreeChainsIsRefusedOnEachChainHoldingAnotherChainsProxyCode() external { + RegistryBeaconProxyParams memory params = storedParams(); + DeploySuite memory suite = proxySuite(params); + string[] memory names = networks(); + uint256 state = vm.snapshotState(); + for (uint256 i = 0; i < names.length; i++) { + for (uint256 j = 0; j < names.length; j++) { + if (i == j) { + continue; + } + liveOn(params, suite, i, params.beaconPerNetwork[i].beacon); + vm.etch(suite.storedDeployedAddress, params.beaconPerNetwork[j].proxyRuntimeCode); + vm.expectRevert( + abi.encodeWithSelector( + LibRainDeploy.CodeHashMismatchOnNetwork.selector, + names[i], + suite.storedDeployedAddress, + params.beaconPerNetwork[i].proxyCodeHash, + params.beaconPerNetwork[j].proxyCodeHash + ) + ); + this.externalCheckOnLocalForks(suite, names[i]); + assertTrue(vm.revertToState(state)); + } + } } function testOneSuiteOverThreeChainsIsRefusedOnAChainBoundToAnotherChainsBeacon() external { From faa5b8f024af3249ef87ab211a18862ed9b30a82 Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 18:27:28 +0000 Subject: [PATCH 30/43] Test each mechanism's local deploy step against its broadcast step Co-Authored-By: Claude Opus 5.5 --- ...ployCloneMechanism.deployStepLocally.t.sol | 257 ++++++++++++++++++ 1 file changed, 257 insertions(+) create mode 100644 test/src/lib/LibRainDeployCloneMechanism.deployStepLocally.t.sol diff --git a/test/src/lib/LibRainDeployCloneMechanism.deployStepLocally.t.sol b/test/src/lib/LibRainDeployCloneMechanism.deployStepLocally.t.sol new file mode 100644 index 0000000..355a918 --- /dev/null +++ b/test/src/lib/LibRainDeployCloneMechanism.deployStepLocally.t.sol @@ -0,0 +1,257 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {Test} from "forge-std-1.17.0/src/Test.sol"; +import {VmSafe} from "forge-std-1.17.0/src/Vm.sol"; +import {IERC5313} from "@openzeppelin-contracts-5.7.0/interfaces/IERC5313.sol"; +import {UpgradeableBeacon} from "@openzeppelin-contracts-5.7.0/proxy/beacon/UpgradeableBeacon.sol"; +import { + DeployDeclaration, + DeployDependency, + DeployMechanismHandler, + DeploySuite +} from "rain-deploy-0.1.44/src/abstract/RainDeploySuitesBase.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; +import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; +import {TestCloneFactory} from "../../../src/test/TestCloneFactory.sol"; +import {CloneDeploy} from "../../../src/lib/LibRainDeployClone.sol"; +import {BeaconProxyDeploy, LibRainDeployBeaconProxy} from "../../../src/lib/LibRainDeployBeaconProxy.sol"; +import { + LibRainDeployRegistryBeaconProxy, + RegistryBeaconProxyParams +} from "../../../src/lib/LibRainDeployRegistryBeaconProxy.sol"; +import { + BEACON_PROXY_MECHANISM, + BEACON_PROXY_PER_NETWORK_MECHANISM, + CLONE_MECHANISM, + CLONE_PER_NETWORK_MECHANISM, + LibRainDeployCloneMechanism, + REGISTRY_BEACON_PROXY_MECHANISM +} from "../../../src/lib/LibRainDeployCloneMechanism.sol"; +import {MockOriginOwnedCloneable} from "../../concrete/MockOriginOwnedCloneable.sol"; +import {LibRegistryBeaconProxyTest} from "../../lib/LibRegistryBeaconProxyTest.sol"; + +/// @title LibRainDeployCloneMechanismDeployStepLocallyTest +/// @notice Each mechanism's `deployStepLocally` under the deploy key as sender and origin, against its `deployStep`. +contract LibRainDeployCloneMechanismDeployStepLocallyTest is Test { + address constant DEPLOYER = address(0xD3910E8); + + bytes32 constant SALT = bytes32(uint256(7)); + + string constant SUITE = "deploy-step-locally"; + + bytes internal sData; + + function initDataOf(uint256) internal view returns (bytes memory) { + return sData; + } + + function declaration() internal view returns (DeployDeclaration memory) { + DeployDeclaration memory d; + LibRainDeployCloneMechanism.extend(d); + return d; + } + + function handlerOf(DeployDeclaration memory d, DeploySuite memory suite) + internal + pure + returns (DeployMechanismHandler memory) + { + return LibRainDeployDeclaration.mechanismById( + d, LibRainDeployCloneMechanism.mechanismTag(suite.mechanismData), suite.suite + ); + } + + function externalDeployStep(DeploySuite memory suite) external returns (address) { + DeployDeclaration memory d = declaration(); + DeployMechanismHandler memory h = handlerOf(d, suite); + return h.deployStep(d, suite)( + vm, LibRainDeploy.ARBITRUM_ONE, DEPLOYER, h.deployStepData(d, suite, block.chainid) + ); + } + + function expectedAddress(DeploySuite memory suite) internal view returns (address) { + DeployDeclaration memory d = declaration(); + return handlerOf(d, suite).deployedAddress(d, suite, block.chainid); + } + + function chainIds() internal view returns (uint256[] memory) { + uint256[] memory ids = new uint256[](2); + ids[0] = block.chainid; + ids[1] = 137; + return ids; + } + + function cloneDeploy(address implementation, bytes memory data, bool perNetwork) + internal + returns (CloneDeploy memory) + { + sData = data; + address factory = address(new TestCloneFactory()); + DeployDependency[] memory dependencies = new DeployDependency[](2); + dependencies[0] = DeployDependency({deployedAddress: factory, runtimeCode: factory.code}); + dependencies[1] = DeployDependency({deployedAddress: implementation, runtimeCode: implementation.code}); + return CloneDeploy({ + suite: SUITE, + factory: factory, + implementation: implementation, + data: perNetwork ? bytes("") : data, + initDataPerNetwork: perNetwork, + initData: initDataOf, + salt: SALT, + dependencies: dependencies + }); + } + + function cloneSuite(bytes memory data, bool perNetwork) internal returns (DeploySuite memory) { + return LibRainDeployCloneMechanism.cloneCandidate( + cloneDeploy(address(new MockOriginOwnedCloneable()), data, perNetwork), chainIds() + ).snapshot; + } + + function beaconProxySuite(bytes memory data, bool perNetwork) internal returns (DeploySuite memory) { + address implementation = address(new MockOriginOwnedCloneable()); + address beacon = address(new UpgradeableBeacon(implementation, address(this))); + CloneDeploy memory clone = cloneDeploy(beacon, data, perNetwork); + BeaconProxyDeploy memory proxy = BeaconProxyDeploy({ + suite: clone.suite, + factory: clone.factory, + beacon: beacon, + data: clone.data, + initDataPerNetwork: clone.initDataPerNetwork, + initData: clone.initData, + salt: clone.salt, + dependencies: clone.dependencies, + runtimeCode: LibRainDeployBeaconProxy.beaconProxyRuntimeCode(vm, beacon, implementation, implementation.code) + }); + return LibRainDeployCloneMechanism.beaconProxyCandidate(proxy, chainIds()).snapshot; + } + + function registryBeaconProxySuite(bytes memory data) internal returns (DeploySuite memory) { + RegistryBeaconProxyParams memory params = + LibRegistryBeaconProxyTest.live(vm, address(new MockOriginOwnedCloneable()), address(this), data, SALT); + return LibRainDeployCloneMechanism.registryBeaconProxyCandidate( + LibRegistryBeaconProxyTest.declared(SUITE, params, LibRegistryBeaconProxyTest.runtimeOf(vm, params)) + ).snapshot; + } + + /// The real step's address, code and owner, its state reverted. + function broadcastStep(DeploySuite memory suite) internal returns (address, bytes memory, address) { + uint256 state = vm.snapshotState(); + address deployed = this.externalDeployStep(suite); + bytes memory code = deployed.code; + address seated = IERC5313(deployed).owner(); + assertTrue(vm.revertToState(state)); + return (deployed, code, seated); + } + + function localStep(DeploySuite memory suite) internal returns (address) { + DeployDeclaration memory d = declaration(); + DeployMechanismHandler memory h = handlerOf(d, suite); + bytes memory data = h.deployStepData(d, suite, block.chainid); + vm.startPrank(DEPLOYER, DEPLOYER); + address deployed = h.deployStepLocally(d, suite)(vm, DEPLOYER, data); + (VmSafe.CallerMode mode, address sender, address origin) = vm.readCallers(); + vm.stopPrank(); + assertEq(uint256(mode), uint256(VmSafe.CallerMode.RecurrentPrank)); + assertEq(sender, DEPLOYER); + assertEq(origin, DEPLOYER); + return deployed; + } + + function checkLocalStepMatchesBroadcastStep(DeploySuite memory suite, bytes32 id) internal returns (address) { + assertEq(LibRainDeployCloneMechanism.mechanismTag(suite.mechanismData), id); + (address deployed, bytes memory code, address seated) = broadcastStep(suite); + address local = localStep(suite); + assertEq(local, deployed); + assertEq(local.code, code); + assertEq(IERC5313(local).owner(), seated); + return local; + } + + function checkLocalStepSeatsTheDeployKeyTheBroadcastStepRefuses( + DeploySuite memory suite, + bytes32 id, + bytes4 refusal + ) internal { + assertEq(LibRainDeployCloneMechanism.mechanismTag(suite.mechanismData), id); + address expected = expectedAddress(suite); + vm.expectRevert(abi.encodeWithSelector(refusal, LibRainDeploy.ARBITRUM_ONE, expected)); + this.externalDeployStep(suite); + address local = localStep(suite); + assertEq(local, expected); + assertEq(IERC5313(local).owner(), DEPLOYER); + } + + function testCloneLocalStepMatchesTheBroadcastStep(address owner) external { + vm.assume(owner != address(0) && owner != DEPLOYER); + address local = checkLocalStepMatchesBroadcastStep(cloneSuite(abi.encode(owner), false), CLONE_MECHANISM); + assertEq(IERC5313(local).owner(), owner); + } + + function testClonePerNetworkLocalStepMatchesTheBroadcastStep(address owner) external { + vm.assume(owner != address(0) && owner != DEPLOYER); + address local = + checkLocalStepMatchesBroadcastStep(cloneSuite(abi.encode(owner), true), CLONE_PER_NETWORK_MECHANISM); + assertEq(IERC5313(local).owner(), owner); + } + + function testBeaconProxyLocalStepMatchesTheBroadcastStep(address owner) external { + vm.assume(owner != address(0) && owner != DEPLOYER); + address local = + checkLocalStepMatchesBroadcastStep(beaconProxySuite(abi.encode(owner), false), BEACON_PROXY_MECHANISM); + assertEq(IERC5313(local).owner(), owner); + } + + function testBeaconProxyPerNetworkLocalStepMatchesTheBroadcastStep(address owner) external { + vm.assume(owner != address(0) && owner != DEPLOYER); + address local = checkLocalStepMatchesBroadcastStep( + beaconProxySuite(abi.encode(owner), true), BEACON_PROXY_PER_NETWORK_MECHANISM + ); + assertEq(IERC5313(local).owner(), owner); + } + + function testRegistryBeaconProxyLocalStepMatchesTheBroadcastStep(address owner) external { + vm.assume(owner != address(0) && owner != DEPLOYER); + address local = checkLocalStepMatchesBroadcastStep( + registryBeaconProxySuite(abi.encode(owner)), REGISTRY_BEACON_PROXY_MECHANISM + ); + assertEq(IERC5313(local).owner(), owner); + } + + function testCloneLocalStepSeatsTheDeployKeyAsTheBroadcastStepDoes() external { + address local = checkLocalStepMatchesBroadcastStep(cloneSuite(abi.encode(address(0)), false), CLONE_MECHANISM); + assertEq(IERC5313(local).owner(), DEPLOYER); + } + + function testClonePerNetworkLocalStepSeatsTheDeployKeyAsTheBroadcastStepDoes() external { + address local = + checkLocalStepMatchesBroadcastStep(cloneSuite(abi.encode(address(0)), true), CLONE_PER_NETWORK_MECHANISM); + assertEq(IERC5313(local).owner(), DEPLOYER); + } + + function testBeaconProxyLocalStepSeatsTheDeployKeyTheBroadcastStepRefuses() external { + checkLocalStepSeatsTheDeployKeyTheBroadcastStepRefuses( + beaconProxySuite(abi.encode(address(0)), false), + BEACON_PROXY_MECHANISM, + LibRainDeployBeaconProxy.BeaconProxySeatsDeployKey.selector + ); + } + + function testBeaconProxyPerNetworkLocalStepSeatsTheDeployKeyTheBroadcastStepRefuses() external { + checkLocalStepSeatsTheDeployKeyTheBroadcastStepRefuses( + beaconProxySuite(abi.encode(address(0)), true), + BEACON_PROXY_PER_NETWORK_MECHANISM, + LibRainDeployBeaconProxy.BeaconProxySeatsDeployKey.selector + ); + } + + function testRegistryBeaconProxyLocalStepSeatsTheDeployKeyTheBroadcastStepRefuses() external { + checkLocalStepSeatsTheDeployKeyTheBroadcastStepRefuses( + registryBeaconProxySuite(abi.encode(address(0))), + REGISTRY_BEACON_PROXY_MECHANISM, + LibRainDeployRegistryBeaconProxy.RegistryBeaconProxySeatsDeployKey.selector + ); + } +} From 501861ee6f2e296f5dad68a13d6f89956d5347ce Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 18:27:58 +0000 Subject: [PATCH 31/43] Format the local deploy step tests Co-Authored-By: Claude Opus 5.5 --- ...ployCloneMechanism.deployStepLocally.t.sol | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/test/src/lib/LibRainDeployCloneMechanism.deployStepLocally.t.sol b/test/src/lib/LibRainDeployCloneMechanism.deployStepLocally.t.sol index 355a918..254d3d5 100644 --- a/test/src/lib/LibRainDeployCloneMechanism.deployStepLocally.t.sol +++ b/test/src/lib/LibRainDeployCloneMechanism.deployStepLocally.t.sol @@ -66,9 +66,8 @@ contract LibRainDeployCloneMechanismDeployStepLocallyTest is Test { function externalDeployStep(DeploySuite memory suite) external returns (address) { DeployDeclaration memory d = declaration(); DeployMechanismHandler memory h = handlerOf(d, suite); - return h.deployStep(d, suite)( - vm, LibRainDeploy.ARBITRUM_ONE, DEPLOYER, h.deployStepData(d, suite, block.chainid) - ); + return + h.deployStep(d, suite)(vm, LibRainDeploy.ARBITRUM_ONE, DEPLOYER, h.deployStepData(d, suite, block.chainid)); } function expectedAddress(DeploySuite memory suite) internal view returns (address) { @@ -106,8 +105,9 @@ contract LibRainDeployCloneMechanismDeployStepLocallyTest is Test { function cloneSuite(bytes memory data, bool perNetwork) internal returns (DeploySuite memory) { return LibRainDeployCloneMechanism.cloneCandidate( - cloneDeploy(address(new MockOriginOwnedCloneable()), data, perNetwork), chainIds() - ).snapshot; + cloneDeploy(address(new MockOriginOwnedCloneable()), data, perNetwork), chainIds() + ) + .snapshot; } function beaconProxySuite(bytes memory data, bool perNetwork) internal returns (DeploySuite memory) { @@ -123,7 +123,9 @@ contract LibRainDeployCloneMechanismDeployStepLocallyTest is Test { initData: clone.initData, salt: clone.salt, dependencies: clone.dependencies, - runtimeCode: LibRainDeployBeaconProxy.beaconProxyRuntimeCode(vm, beacon, implementation, implementation.code) + runtimeCode: LibRainDeployBeaconProxy.beaconProxyRuntimeCode( + vm, beacon, implementation, implementation.code + ) }); return LibRainDeployCloneMechanism.beaconProxyCandidate(proxy, chainIds()).snapshot; } @@ -132,8 +134,9 @@ contract LibRainDeployCloneMechanismDeployStepLocallyTest is Test { RegistryBeaconProxyParams memory params = LibRegistryBeaconProxyTest.live(vm, address(new MockOriginOwnedCloneable()), address(this), data, SALT); return LibRainDeployCloneMechanism.registryBeaconProxyCandidate( - LibRegistryBeaconProxyTest.declared(SUITE, params, LibRegistryBeaconProxyTest.runtimeOf(vm, params)) - ).snapshot; + LibRegistryBeaconProxyTest.declared(SUITE, params, LibRegistryBeaconProxyTest.runtimeOf(vm, params)) + ) + .snapshot; } /// The real step's address, code and owner, its state reverted. From 5cbafb6cb70e67ad3ad578e051903439fae1674f Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 18:31:48 +0000 Subject: [PATCH 32/43] Give registry beacon proxy test params an entry per listed chain and fix expectRevert ordering Co-Authored-By: Claude Opus 5.5 --- test/lib/LibRegistryBeaconProxyTest.sol | 20 ++++++++ ...DeployVerifyChainRegistryBeaconProxy.t.sol | 3 +- ...loyCloneMechanismRegistryBeaconProxy.t.sol | 47 +++++++++++++++---- ...loyCloneSnapshot.registryBeaconProxy.t.sol | 5 +- 4 files changed, 65 insertions(+), 10 deletions(-) diff --git a/test/lib/LibRegistryBeaconProxyTest.sol b/test/lib/LibRegistryBeaconProxyTest.sol index f5fb869..699cd22 100644 --- a/test/lib/LibRegistryBeaconProxyTest.sol +++ b/test/lib/LibRegistryBeaconProxyTest.sol @@ -119,6 +119,26 @@ library LibRegistryBeaconProxyTest { return beaconPerNetwork; } + /// @param vm The Vm instance to simulate with. + /// @param params The factory call. + /// @param chainIds The chain ids. + /// @param beacon The beacon. + /// @return `params.beaconPerNetwork` then `onNetwork(vm, params, chainId, beacon)` for each of `chainIds`. + function alsoOn(Vm vm, RegistryBeaconProxyParams memory params, uint256[] memory chainIds, address beacon) + internal + returns (RegistryBeaconOnNetwork[] memory) + { + uint256 listed = params.beaconPerNetwork.length; + RegistryBeaconOnNetwork[] memory beaconPerNetwork = new RegistryBeaconOnNetwork[](listed + chainIds.length); + for (uint256 i = 0; i < listed; i++) { + beaconPerNetwork[i] = params.beaconPerNetwork[i]; + } + for (uint256 i = 0; i < chainIds.length; i++) { + beaconPerNetwork[listed + i] = onNetwork(vm, params, chainIds[i], beacon); + } + return beaconPerNetwork; + } + /// `params` declared, its factory and registry its dependencies with the code they hold now. /// @param suite The suite key. /// @param params The factory call. diff --git a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxy.t.sol b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxy.t.sol index b69bca7..d125c91 100644 --- a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxy.t.sol +++ b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxy.t.sol @@ -115,13 +115,14 @@ contract RainDeployVerifyChainRegistryBeaconProxyTest is PerNetworkCloneBeaconVe } function testRegistryBeaconProxyRequiredOnAChainItDoesNotListIsRefused() external { + DeploySuite memory suite = liveProxySuite(); vm.expectRevert( abi.encodeWithSelector( LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyNoBeaconOnNetwork.selector, PER_NETWORK_CLONE_ARBITRUM_ONE_CHAIN_ID ) ); - this.externalCheckOnEveryLocalFork(liveProxySuite()); + this.externalCheckOnEveryLocalFork(suite); } function testRegistryBeaconProxyWhoseBindingResolvesToAnotherBeaconIsRefused() external { diff --git a/test/src/lib/LibRainDeployCloneMechanismRegistryBeaconProxy.t.sol b/test/src/lib/LibRainDeployCloneMechanismRegistryBeaconProxy.t.sol index 6441105..1b2cfe8 100644 --- a/test/src/lib/LibRainDeployCloneMechanismRegistryBeaconProxy.t.sol +++ b/test/src/lib/LibRainDeployCloneMechanismRegistryBeaconProxy.t.sol @@ -9,6 +9,7 @@ import {DeployCandidate, DeploySuite} from "rain-deploy-0.1.44/src/abstract/Rain import {DeployDependency, LibRainDeploy} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import {LibRainDeployZoltuMechanism} from "rain-deploy-0.1.44/src/lib/LibRainDeployZoltuMechanism.sol"; import {ICloneableFactoryV7} from "../../../src/interface/ICloneableFactoryV7.sol"; +import {ICLONEABLE_V2_SUCCESS} from "../../../src/interface/ICloneableV2.sol"; import {CloneParams, LibRainDeployClone} from "../../../src/lib/LibRainDeployClone.sol"; import {LibRainDeployBeaconProxy} from "../../../src/lib/LibRainDeployBeaconProxy.sol"; import {ChainDeploy} from "../../../src/lib/LibRainDeployExtendedNetworks.sol"; @@ -16,6 +17,7 @@ import { LibRainDeployRegistryBeaconProxy, REGISTRY_BEACON_PROXY_ARTIFACT_PATH, REGISTRY_BEACON_PROXY_UNANCHORABLE_REASON, + RegistryBeaconOnNetwork, RegistryBeaconProxyDeploy, RegistryBeaconProxyParams } from "../../../src/lib/LibRainDeployRegistryBeaconProxy.sol"; @@ -52,10 +54,14 @@ contract LibRainDeployCloneMechanismRegistryBeaconProxyTest is Test { sDeploy = new ExampleCloneDeploy(); } - /// `LibRegistryBeaconProxyTest.live`, its factory and registry declared external deployments of `sDeploy`. + /// `LibRegistryBeaconProxyTest.live`, its beacon also listed on each per-network clone chain, its factory and + /// registry declared external deployments of `sDeploy`. function liveParams() internal returns (RegistryBeaconProxyParams memory) { RegistryBeaconProxyParams memory params = LibRegistryBeaconProxyTest.live(vm, address(new MockCloneableV2()), address(this), TEST_DATA, TEST_SALT); + params.beaconPerNetwork = LibRegistryBeaconProxyTest.alsoOn( + vm, params, perNetworkCloneChainIds(), params.beaconPerNetwork[0].beacon + ); sDeploy.addExternalDeployment(LibExternalDeployments.deployedNow(params.factory)); sDeploy.addExternalDeployment(LibExternalDeployments.deployedNow(params.registry)); return params; @@ -83,10 +89,29 @@ contract LibRainDeployCloneMechanismRegistryBeaconProxyTest is Test { return LibRainDeployCloneMechanism.appendExtendedNetworks(suite, extended); } + /// `proxy` with a coherent per-chain code record: at least one entry, distinct chain ids, each entry's non-empty + /// code under its hash, and the stored runtime code entry `pick`'s. + function coherent(RegistryBeaconProxyDeploy memory proxy, uint256 pick) internal pure { + if (proxy.beaconPerNetwork.length == 0) { + proxy.beaconPerNetwork = new RegistryBeaconOnNetwork[](1); + } + for (uint256 i = 0; i < proxy.beaconPerNetwork.length; i++) { + RegistryBeaconOnNetwork memory entry = proxy.beaconPerNetwork[i]; + entry.chainId = uint256(keccak256(abi.encode(i, entry.chainId))); + if (entry.proxyRuntimeCode.length == 0) { + entry.proxyRuntimeCode = abi.encodePacked(i); + } + entry.proxyCodeHash = keccak256(entry.proxyRuntimeCode); + } + proxy.runtimeCode = proxy.beaconPerNetwork[pick % proxy.beaconPerNetwork.length].proxyRuntimeCode; + } + function testRegistryBeaconProxyCandidateDerivesEveryFieldFromTheDeclaration( RegistryBeaconProxyDeploy memory proxy, - address beacon + address beacon, + uint256 pick ) external pure { + coherent(proxy, pick); RegistryBeaconProxyParams memory params = RegistryBeaconProxyParams({ factory: proxy.factory, registry: proxy.registry, @@ -203,15 +228,21 @@ contract LibRainDeployCloneMechanismRegistryBeaconProxyTest is Test { assertEq(suite.storedDeployedAddress.code, suite.storedRuntimeCode); } - function testRegistryBeaconProxyLocalDeployEtchesItsStoredRuntimeCodeWithoutCallingFactoryOrRegistry(bytes memory runtimeCode) + /// The local step initializes the proxy, so the recorded code answers `initialize` with success before `tail`. + function testRegistryBeaconProxyLocalDeployEtchesItsStoredRuntimeCodeWithoutCallingFactoryOrRegistry(bytes memory tail) external { - vm.assume(runtimeCode.length > 0); - vm.assume(runtimeCode[0] != 0xef); + bytes memory runtimeCode = bytes.concat(hex"7f", ICLONEABLE_V2_SUCCESS, hex"60005260206000f3", tail); RegistryBeaconProxyParams memory params = liveParams(); - DeploySuite memory suite = suiteOf(params); - suite.storedRuntimeCode = runtimeCode; - suite.storedBytecodeHash = keccak256(runtimeCode); + for (uint256 i = 0; i < params.beaconPerNetwork.length; i++) { + params.beaconPerNetwork[i].proxyRuntimeCode = runtimeCode; + params.beaconPerNetwork[i].proxyCodeHash = keccak256(runtimeCode); + } + DeploySuite memory suite = LibRainDeployCloneMechanism.registryBeaconProxyCandidate( + LibRegistryBeaconProxyTest.declared(SUITE, params, runtimeCode) + ) + .snapshot; + suite.networks = perNetworkCloneNetworks(); suite.dependencies[0].runtimeCode = hex"fe"; suite.dependencies[1].runtimeCode = hex"fe"; diff --git a/test/src/lib/LibRainDeployCloneSnapshot.registryBeaconProxy.t.sol b/test/src/lib/LibRainDeployCloneSnapshot.registryBeaconProxy.t.sol index dd342f2..9806466 100644 --- a/test/src/lib/LibRainDeployCloneSnapshot.registryBeaconProxy.t.sol +++ b/test/src/lib/LibRainDeployCloneSnapshot.registryBeaconProxy.t.sol @@ -33,7 +33,7 @@ import { } from "../../../src/lib/LibRainDeployCloneSnapshot.sol"; import {LibRegistryBeaconProxyTest} from "../../lib/LibRegistryBeaconProxyTest.sol"; import {MockCloneableV2} from "../../concrete/MockCloneableV2.sol"; -import {perNetworkCloneLayers} from "../../abstract/PerNetworkCloneDeploys.sol"; +import {perNetworkCloneChainIds, perNetworkCloneLayers} from "../../abstract/PerNetworkCloneDeploys.sol"; import {LibExternalDeployments} from "../../lib/LibExternalDeployments.sol"; /// @title LibRainDeployCloneSnapshotRegistryBeaconProxyTest @@ -224,6 +224,9 @@ contract LibRainDeployCloneSnapshotRegistryBeaconProxyTest is Test, RainDeploySu RegistryBeaconProxyParams memory params = LibRegistryBeaconProxyTest.live( vm, address(new MockCloneableV2()), address(this), hex"deadbeef", bytes32(uint256(7)) ); + params.beaconPerNetwork = LibRegistryBeaconProxyTest.alsoOn( + vm, params, perNetworkCloneChainIds(), params.beaconPerNetwork[0].beacon + ); sExternalDeployments.push(LibExternalDeployments.deployedNow(params.factory)); sExternalDeployments.push(LibExternalDeployments.deployedNow(params.registry)); DeploySuite memory suite = From 81f22feb100f809fbcef738a2c6ff691db539acf Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 18:33:43 +0000 Subject: [PATCH 33/43] Check resolved beacons against the chain id they resolved on checkSuiteOnNetwork and appliedState take the resolved beacon's chain id instead of reading block.chainid, so offline checks hold suites to the derivation for the beacon's network. Co-Authored-By: Claude Opus 5.5 --- src/lib/LibRainDeployBeacon.sol | 9 +++++++-- src/lib/LibRainDeployBeaconResolution.sol | 9 ++++++--- test/src/lib/LibRainDeployBeacon.t.sol | 2 +- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/lib/LibRainDeployBeacon.sol b/src/lib/LibRainDeployBeacon.sol index feab10c..dc29546 100644 --- a/src/lib/LibRainDeployBeacon.sol +++ b/src/lib/LibRainDeployBeacon.sol @@ -111,10 +111,15 @@ library LibRainDeployBeacon { /// `LibMigrationRegistry.UnexpectedMigrationRegistryCodeHash` when a transition is declared and the registry is /// not deployed, and `BeaconTransitionsOutOfOrder`. /// @param network The network's name, for the refusal. + /// @param chainId The beacon's network's chain id, for `checkTransitionMigrations`' refusals. /// @param beacon The beacon, resolved: `beacon` set, as `RainDeployVerifyBase.resolveBeacon` sets it. /// @return The state index, as `stateAt` takes it. - function appliedState(string memory network, DeployBeacon memory beacon) internal view returns (uint256) { - checkTransitionMigrations(block.chainid, beacon); + function appliedState(string memory network, uint256 chainId, DeployBeacon memory beacon) + internal + view + returns (uint256) + { + checkTransitionMigrations(chainId, beacon); uint256 state = 0; for (uint256 i = 0; i < beacon.transitions.length; i++) { Prerequisite memory migration = beacon.transitions[i].migration; diff --git a/src/lib/LibRainDeployBeaconResolution.sol b/src/lib/LibRainDeployBeaconResolution.sol index 7a7e377..c1e21eb 100644 --- a/src/lib/LibRainDeployBeaconResolution.sol +++ b/src/lib/LibRainDeployBeaconResolution.sol @@ -92,14 +92,15 @@ library LibRainDeployBeaconResolution { DeployBeacon memory beacon = resolved.beacon; // Deliberately rechecked by `checkBeacon`, which holds a beacon to its code hash on its own. if (bytes(beacon.beaconSuite).length != 0) { - checkSuiteOnNetwork(network, resolved.suite, resolved.derived, beacon.beacon); + checkSuiteOnNetwork(network, resolved.chainId, resolved.suite, resolved.derived, beacon.beacon); } - uint256 state = LibRainDeployBeacon.appliedState(network, beacon); + uint256 state = LibRainDeployBeacon.appliedState(network, resolved.chainId, beacon); LibRainDeployBeacon.checkBeacon( network, beacon, resolved.implementationAddresses[state], LibRainDeployBeacon.stateAt(beacon, state).owner ); checkSuiteOnNetwork( network, + resolved.chainId, resolved.implementations[state], resolved.implementationDerived[state], resolved.implementationAddresses[state] @@ -107,17 +108,19 @@ library LibRainDeployBeaconResolution { } /// @param network The selected fork's network. + /// @param chainId The chain id the suite was resolved on, whose derived code hash it is held to. /// @param suite The suite. /// @param derived Its derivation. /// @param deployedAddress Its address on the selected fork. function checkSuiteOnNetwork( string memory network, + uint256 chainId, DeploySuite memory suite, DerivedDeploy memory derived, address deployedAddress ) internal view { LibRainDeploy.checkDeclaredDependencies(network, suite.dependencies); - LibRainDeploy.checkDeployedCode(network, deployedAddress, derivedCodeHash(derived, block.chainid)); + LibRainDeploy.checkDeployedCode(network, deployedAddress, derivedCodeHash(derived, chainId)); } /// When a beacon is declared, `BeaconOnUncheckedNetwork` for any beacon off `d.networks` before resolving any; then, diff --git a/test/src/lib/LibRainDeployBeacon.t.sol b/test/src/lib/LibRainDeployBeacon.t.sol index 9d30122..1da25c9 100644 --- a/test/src/lib/LibRainDeployBeacon.t.sol +++ b/test/src/lib/LibRainDeployBeacon.t.sol @@ -130,7 +130,7 @@ contract LibRainDeployBeaconTest is Test { } function externalAppliedState(DeployBeacon memory beacon) external view returns (uint256) { - return LibRainDeployBeacon.appliedState(NETWORK, beacon); + return LibRainDeployBeacon.appliedState(NETWORK, block.chainid, beacon); } function externalCheckBeacon(DeployBeacon memory beacon, address implementation, address owner) external view { From cd4d8b122164b8bc32714030460c3c37095b3a5c Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 18:34:04 +0000 Subject: [PATCH 34/43] Check registry beacon proxies against the checked network's beacon LibRainDeployRegistryBeaconProxy.checkBeacon takes the chain id whose declared beacon to hold the binding to; checkOnChain passes the checked network's chain id instead of block.chainid. Co-Authored-By: Claude Opus 5.5 --- src/lib/LibRainDeployCloneOnChainChecks.sol | 2 +- src/lib/LibRainDeployRegistryBeaconProxy.sol | 12 ++++++++---- ...inDeployRegistryBeaconProxy.proxyCodeRecord.t.sol | 2 +- test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol | 2 +- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/lib/LibRainDeployCloneOnChainChecks.sol b/src/lib/LibRainDeployCloneOnChainChecks.sol index 59018a9..465bb1c 100644 --- a/src/lib/LibRainDeployCloneOnChainChecks.sol +++ b/src/lib/LibRainDeployCloneOnChainChecks.sol @@ -155,7 +155,7 @@ library LibRainDeployCloneOnChainChecks { bytes32 id = LibRainDeployDeclaration.mechanismIdOf(suite); if (id == REGISTRY_BEACON_PROXY_MECHANISM) { LibRainDeployRegistryBeaconProxy.checkBeacon( - network, LibRainDeployCloneMechanism.registryBeaconProxyParams(suite) + network, chainId, LibRainDeployCloneMechanism.registryBeaconProxyParams(suite) ); return; } diff --git a/src/lib/LibRainDeployRegistryBeaconProxy.sol b/src/lib/LibRainDeployRegistryBeaconProxy.sol index be12263..fb3bc37 100644 --- a/src/lib/LibRainDeployRegistryBeaconProxy.sol +++ b/src/lib/LibRainDeployRegistryBeaconProxy.sol @@ -220,11 +220,15 @@ library LibRainDeployRegistryBeaconProxy { } /// Refuses `RegistryBeaconProxyBeaconMismatch` unless the binding on the current network resolves to the - /// declared beacon. + /// beacon declared on `chainId`. /// @param network The network. + /// @param chainId The network's chain id. /// @param params The proxy's factory call. - function checkBeacon(string memory network, RegistryBeaconProxyParams memory params) internal view { - RegistryBeaconOnNetwork memory onNetwork = beaconOnNetwork(params, block.chainid); + function checkBeacon(string memory network, uint256 chainId, RegistryBeaconProxyParams memory params) + internal + view + { + RegistryBeaconOnNetwork memory onNetwork = beaconOnNetwork(params, chainId); address resolved = LibICloneableFactoryV7.resolveBeacon(params.registry, params.authority, params.beaconName); if (resolved != onNetwork.beacon) { revert RegistryBeaconProxyBeaconMismatch(network, onNetwork.beacon, resolved); @@ -319,7 +323,7 @@ library LibRainDeployRegistryBeaconProxy { RegistryBeaconProxyParams memory params = abi.decode(paramsData, (RegistryBeaconProxyParams)); console2.log(" - Registry Beacon Proxy Factory:", params.factory); - checkBeacon(network, params); + checkBeacon(network, block.chainid, params); address expectedAddress = registryBeaconProxyDeployedAddress(params); address factoryPredictedAddress = ICloneableFactoryV7(params.factory) .predictRegistryBeaconProxyAddress( diff --git a/test/src/lib/LibRainDeployRegistryBeaconProxy.proxyCodeRecord.t.sol b/test/src/lib/LibRainDeployRegistryBeaconProxy.proxyCodeRecord.t.sol index 5fc5f2a..e404a38 100644 --- a/test/src/lib/LibRainDeployRegistryBeaconProxy.proxyCodeRecord.t.sol +++ b/test/src/lib/LibRainDeployRegistryBeaconProxy.proxyCodeRecord.t.sol @@ -93,7 +93,7 @@ contract LibRainDeployRegistryBeaconProxyProxyCodeRecordTest is Test { } function externalCheckBeacon(string memory network, RegistryBeaconProxyParams memory params) external view { - LibRainDeployRegistryBeaconProxy.checkBeacon(network, params); + LibRainDeployRegistryBeaconProxy.checkBeacon(network, block.chainid, params); } /// The stored runtime code is another chain's good code, so only entry `k` can be refused. diff --git a/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol b/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol index 4e6bde8..654caf2 100644 --- a/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol +++ b/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol @@ -68,7 +68,7 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { } function externalCheckBeacon(string memory network, RegistryBeaconProxyParams memory params) external view { - LibRainDeployRegistryBeaconProxy.checkBeacon(network, params); + LibRainDeployRegistryBeaconProxy.checkBeacon(network, block.chainid, params); } function externalBeaconOnNetwork(RegistryBeaconProxyParams memory params, uint256 chainId) From a7a404536393a8b0b415e0e57d73638746e5e973 Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 18:34:31 +0000 Subject: [PATCH 35/43] Declare the registry beacon proxy candidate in the per-network verify tests and refuse a twice-listed chain at the candidate Co-Authored-By: Claude Opus 5.5 --- ...nRegistryBeaconProxyBeaconPerNetwork.t.sol | 31 +++++++++++++++++-- ...eRegistryBeaconProxyBeaconPerNetwork.t.sol | 13 ++++++++ 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol index afb2d3d..d38a89c 100644 --- a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol +++ b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol @@ -5,6 +5,7 @@ pragma solidity =0.8.25; import {Vm} from "forge-std-1.17.0/src/Vm.sol"; import {UpgradeableBeacon} from "@openzeppelin-contracts-5.7.0/proxy/beacon/UpgradeableBeacon.sol"; import { + DeployCandidate, DeployDeclaration, DeployDependency, DeploySuite @@ -13,7 +14,10 @@ import {RainDeployVerifyChain} from "rain-deploy-0.1.44/src/abstract/RainDeployV import {LibRainDeploy, SupportedNetwork} from "rain-deploy-0.1.44/src/lib/LibRainDeploy.sol"; import {LibRainDeployDeclaration} from "rain-deploy-0.1.44/src/lib/LibRainDeployDeclaration.sol"; import {ICloneableFactoryV7} from "../../../src/interface/ICloneableFactoryV7.sol"; -import {LibRainDeployCloneMechanism} from "../../../src/lib/LibRainDeployCloneMechanism.sol"; +import { + LibRainDeployCloneMechanism, + REGISTRY_BEACON_PROXY_MECHANISM +} from "../../../src/lib/LibRainDeployCloneMechanism.sol"; import { LibRainDeployRegistryBeaconProxy, RegistryBeaconOnNetwork, @@ -30,8 +34,10 @@ import {LibExternalDeployments} from "../../lib/LibExternalDeployments.sol"; /// each chain binding the name to its own beacon. contract RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetworkTest is RainDeployVerifyChain { string constant PROXY_SUITE = "registry-beacon-proxy@0_0_1"; + string constant PROXY_CANDIDATE = "registry-beacon-proxy"; bytes internal sParamsData; + bytes internal sCandidateData; function storedParams() internal view returns (RegistryBeaconProxyParams memory) { return abi.decode(sParamsData, (RegistryBeaconProxyParams)); @@ -64,6 +70,9 @@ contract RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetworkTest is RainDep externals[0] = LibExternalDeployments.deployedNow(params.factory); externals[1] = LibExternalDeployments.deployedNow(params.registry); LibExternalDeployments.add(d, externals); + DeployCandidate[] memory candidates = new DeployCandidate[](1); + candidates[0] = abi.decode(sCandidateData, (DeployCandidate)); + LibRainDeployDeclaration.addCandidates(d, candidates); return d; } @@ -85,6 +94,13 @@ contract RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetworkTest is RainDep LibRegistryBeaconProxyTest.onNetwork(vm, params, configs[i].chainId, beacons[i]); } sParamsData = abi.encode(params); + sCandidateData = abi.encode( + LibRainDeployCloneMechanism.registryBeaconProxyCandidate( + LibRegistryBeaconProxyTest.declared( + PROXY_CANDIDATE, params, LibRegistryBeaconProxyTest.runtimeOf(vm, params) + ) + ) + ); } function proxySuite(RegistryBeaconProxyParams memory params) internal returns (DeploySuite memory) { @@ -94,6 +110,10 @@ contract RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetworkTest is RainDep .snapshot; } + function externalProxySuite(RegistryBeaconProxyParams memory params) external returns (DeploySuite memory) { + return proxySuite(params); + } + /// Selects `network`'s chain id and binds the name to `beacon` there. function bindOn(RegistryBeaconProxyParams memory params, SupportedNetwork memory network, address beacon) internal { vm.chainId(network.chainId); @@ -269,13 +289,20 @@ contract RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetworkTest is RainDep function testOneSuiteOverThreeChainsIsRefusedOnAChainItListsTwice() external { RegistryBeaconProxyParams memory params = storedParams(); + DeploySuite memory suite = proxySuite(params); RegistryBeaconOnNetwork[] memory four = new RegistryBeaconOnNetwork[](4); for (uint256 i = 0; i < 3; i++) { four[i] = params.beaconPerNetwork[i]; } four[3] = params.beaconPerNetwork[1]; params.beaconPerNetwork = four; - DeploySuite memory suite = proxySuite(params); + vm.expectRevert( + abi.encodeWithSelector( + LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyNoBeaconOnNetwork.selector, uint256(8453) + ) + ); + this.externalProxySuite(params); + suite.mechanismData = abi.encode(REGISTRY_BEACON_PROXY_MECHANISM, abi.encode(params)); liveOn(params, suite, 1, four[1].beacon); vm.expectRevert( abi.encodeWithSelector( diff --git a/test/src/abstract/RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetwork.t.sol b/test/src/abstract/RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetwork.t.sol index f5537a3..88255f8 100644 --- a/test/src/abstract/RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetwork.t.sol +++ b/test/src/abstract/RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetwork.t.sol @@ -4,6 +4,7 @@ pragma solidity =0.8.25; import {UpgradeableBeacon} from "@openzeppelin-contracts-5.7.0/proxy/beacon/UpgradeableBeacon.sol"; import { + DeployCandidate, DeployDeclaration, DeployDependency, DeploySuite @@ -28,8 +29,10 @@ import {LibExternalDeployments} from "../../lib/LibExternalDeployments.sol"; /// One, Base and Polygon, each chain on its own beacon. contract RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetworkTest is RainDeployVerifySnapshotBase { string constant PROXY_SUITE = "registry-beacon-proxy@0_0_1"; + string constant PROXY_CANDIDATE = "registry-beacon-proxy"; bytes internal sParamsData; + bytes internal sCandidateData; function storedParams() internal view returns (RegistryBeaconProxyParams memory) { return abi.decode(sParamsData, (RegistryBeaconProxyParams)); @@ -62,6 +65,9 @@ contract RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetworkTest is externals[0] = LibExternalDeployments.deployedNow(params.factory); externals[1] = LibExternalDeployments.deployedNow(params.registry); LibExternalDeployments.add(d, externals); + DeployCandidate[] memory candidates = new DeployCandidate[](1); + candidates[0] = abi.decode(sCandidateData, (DeployCandidate)); + LibRainDeployDeclaration.addCandidates(d, candidates); return d; } @@ -83,6 +89,13 @@ contract RainDeployVerifySnapshotBaseRegistryBeaconProxyBeaconPerNetworkTest is LibRegistryBeaconProxyTest.onNetwork(vm, params, configs[i].chainId, beacons[i]); } sParamsData = abi.encode(params); + DeployCandidate memory candidate = LibRainDeployCloneMechanism.registryBeaconProxyCandidate( + LibRegistryBeaconProxyTest.declared( + PROXY_CANDIDATE, params, LibRegistryBeaconProxyTest.runtimeOf(vm, params) + ) + ); + candidate.snapshot.networks = networks(); + sCandidateData = abi.encode(candidate); } /// `params` declared over the three networks, its runtime code generated on the first listed chain. From 4468f73d6b4c790ebba8afc57f6df3d315daa524 Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 18:37:46 +0000 Subject: [PATCH 36/43] Run the registry beacon proxy chain matrix on the factory's code from a state without its storage Co-Authored-By: Claude Opus 5.5 --- ...eployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol index d38a89c..e81a5a1 100644 --- a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol +++ b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol @@ -153,6 +153,11 @@ contract RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetworkTest is RainDep assertEq(proxy, suite.storedDeployedAddress, configs[i].name); assertEq(proxy.code, simulated, configs[i].name); assertEq(MockCloneableV2(proxy).sInitData(), params.data, configs[i].name); + bytes memory deployed = proxy.code; + // `LocalForkVm`'s forks are the local EVM the derivation initializes into, so it must not hold the proxy's storage. + assertTrue(vm.revertToState(state)); + bindOn(params, configs[i], onNetwork.beacon); + vm.etch(proxy, deployed); this.externalCheckOnLocalForks(suite, configs[i].name); assertTrue(vm.revertToState(state)); } From c4d599475ba763962c9fe64de2f47a501de12c29 Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 18:38:01 +0000 Subject: [PATCH 37/43] Fit the chain matrix storage comment to the line length Co-Authored-By: Claude Opus 5.5 --- ...inDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol index e81a5a1..da74494 100644 --- a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol +++ b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol @@ -154,7 +154,7 @@ contract RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetworkTest is RainDep assertEq(proxy.code, simulated, configs[i].name); assertEq(MockCloneableV2(proxy).sInitData(), params.data, configs[i].name); bytes memory deployed = proxy.code; - // `LocalForkVm`'s forks are the local EVM the derivation initializes into, so it must not hold the proxy's storage. + // `LocalForkVm`'s forks are the local EVM the derivation initializes into, so no proxy storage there. assertTrue(vm.revertToState(state)); bindOn(params, configs[i], onNetwork.beacon); vm.etch(proxy, deployed); From 2750227af914c6af99dbecb20bd314b58e00adf4 Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 18:43:29 +0000 Subject: [PATCH 38/43] Declare the on-chain check test's registry beacon on the chain it checks Co-Authored-By: Claude Opus 5.5 --- .../LibRainDeployCloneOnChainChecks.registryBeaconProxy.t.sol | 1 + 1 file changed, 1 insertion(+) diff --git a/test/src/lib/LibRainDeployCloneOnChainChecks.registryBeaconProxy.t.sol b/test/src/lib/LibRainDeployCloneOnChainChecks.registryBeaconProxy.t.sol index c10aeab..a1d07e9 100644 --- a/test/src/lib/LibRainDeployCloneOnChainChecks.registryBeaconProxy.t.sol +++ b/test/src/lib/LibRainDeployCloneOnChainChecks.registryBeaconProxy.t.sol @@ -31,6 +31,7 @@ contract LibRainDeployCloneOnChainChecksRegistryBeaconProxyTest is Test { } function liveSuite() internal returns (RegistryBeaconProxyParams memory, DeploySuite memory) { + vm.chainId(ARBITRUM_ONE_CHAIN_ID); RegistryBeaconProxyParams memory params = LibRegistryBeaconProxyTest.live( vm, address(new MockCloneableV2()), address(this), hex"deadbeef", bytes32(uint256(5)) ); From 63f92f29c110b4ed730e57c520e56068ac6e3ac0 Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 18:44:59 +0000 Subject: [PATCH 39/43] Format the registry beacon proxy mechanism and snapshot tests Co-Authored-By: Claude Opus 5.5 --- .../LibRainDeployCloneMechanismRegistryBeaconProxy.t.sol | 8 ++++---- .../LibRainDeployCloneSnapshot.registryBeaconProxy.t.sol | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/test/src/lib/LibRainDeployCloneMechanismRegistryBeaconProxy.t.sol b/test/src/lib/LibRainDeployCloneMechanismRegistryBeaconProxy.t.sol index 1b2cfe8..6910f8f 100644 --- a/test/src/lib/LibRainDeployCloneMechanismRegistryBeaconProxy.t.sol +++ b/test/src/lib/LibRainDeployCloneMechanismRegistryBeaconProxy.t.sol @@ -59,9 +59,8 @@ contract LibRainDeployCloneMechanismRegistryBeaconProxyTest is Test { function liveParams() internal returns (RegistryBeaconProxyParams memory) { RegistryBeaconProxyParams memory params = LibRegistryBeaconProxyTest.live(vm, address(new MockCloneableV2()), address(this), TEST_DATA, TEST_SALT); - params.beaconPerNetwork = LibRegistryBeaconProxyTest.alsoOn( - vm, params, perNetworkCloneChainIds(), params.beaconPerNetwork[0].beacon - ); + params.beaconPerNetwork = + LibRegistryBeaconProxyTest.alsoOn(vm, params, perNetworkCloneChainIds(), params.beaconPerNetwork[0].beacon); sDeploy.addExternalDeployment(LibExternalDeployments.deployedNow(params.factory)); sDeploy.addExternalDeployment(LibExternalDeployments.deployedNow(params.registry)); return params; @@ -238,7 +237,8 @@ contract LibRainDeployCloneMechanismRegistryBeaconProxyTest is Test { params.beaconPerNetwork[i].proxyRuntimeCode = runtimeCode; params.beaconPerNetwork[i].proxyCodeHash = keccak256(runtimeCode); } - DeploySuite memory suite = LibRainDeployCloneMechanism.registryBeaconProxyCandidate( + DeploySuite memory suite = + LibRainDeployCloneMechanism.registryBeaconProxyCandidate( LibRegistryBeaconProxyTest.declared(SUITE, params, runtimeCode) ) .snapshot; diff --git a/test/src/lib/LibRainDeployCloneSnapshot.registryBeaconProxy.t.sol b/test/src/lib/LibRainDeployCloneSnapshot.registryBeaconProxy.t.sol index 9806466..43613f0 100644 --- a/test/src/lib/LibRainDeployCloneSnapshot.registryBeaconProxy.t.sol +++ b/test/src/lib/LibRainDeployCloneSnapshot.registryBeaconProxy.t.sol @@ -224,9 +224,8 @@ contract LibRainDeployCloneSnapshotRegistryBeaconProxyTest is Test, RainDeploySu RegistryBeaconProxyParams memory params = LibRegistryBeaconProxyTest.live( vm, address(new MockCloneableV2()), address(this), hex"deadbeef", bytes32(uint256(7)) ); - params.beaconPerNetwork = LibRegistryBeaconProxyTest.alsoOn( - vm, params, perNetworkCloneChainIds(), params.beaconPerNetwork[0].beacon - ); + params.beaconPerNetwork = + LibRegistryBeaconProxyTest.alsoOn(vm, params, perNetworkCloneChainIds(), params.beaconPerNetwork[0].beacon); sExternalDeployments.push(LibExternalDeployments.deployedNow(params.factory)); sExternalDeployments.push(LibExternalDeployments.deployedNow(params.registry)); DeploySuite memory suite = From d1b083427db3fe578074fac77a96d716e8605ce8 Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 18:53:30 +0000 Subject: [PATCH 40/43] Name the proxy code record test's beacons without a truncating cast Co-Authored-By: Claude Opus 5.5 --- .../lib/LibRainDeployRegistryBeaconProxy.proxyCodeRecord.t.sol | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/src/lib/LibRainDeployRegistryBeaconProxy.proxyCodeRecord.t.sol b/test/src/lib/LibRainDeployRegistryBeaconProxy.proxyCodeRecord.t.sol index e404a38..7418aea 100644 --- a/test/src/lib/LibRainDeployRegistryBeaconProxy.proxyCodeRecord.t.sol +++ b/test/src/lib/LibRainDeployRegistryBeaconProxy.proxyCodeRecord.t.sol @@ -36,13 +36,14 @@ contract LibRainDeployRegistryBeaconProxyProxyCodeRecordTest is Test { }); params.implementationRuntimeCode = params.implementation.code; uint256[3] memory chainIds = [uint256(42161), 8453, 137]; + address[3] memory beacons = [address(0xBEAC1), address(0xBEAC2), address(0xBEAC3)]; for (uint256 i = 0; i < 3; i++) { params.beaconPerNetwork[i] = LibRegistryBeaconProxyTest.withProxyCode( vm, params, RegistryBeaconOnNetwork({ chainId: chainIds[i], - beacon: address(uint160(0xBEAC1 + i)), + beacon: beacons[i], codeHash: keccak256(abi.encode(chainIds[i])), proxyCodeHash: bytes32(0), proxyRuntimeCode: "" From 34378dad9e51b74d7034afc8a6f1b2bc75513793 Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 19:02:41 +0000 Subject: [PATCH 41/43] Refuse a chain listed twice with RegistryBeaconProxyBeaconListedTwice Co-Authored-By: Claude Opus 5.5 --- src/lib/LibRainDeployRegistryBeaconProxy.sol | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/lib/LibRainDeployRegistryBeaconProxy.sol b/src/lib/LibRainDeployRegistryBeaconProxy.sol index fb3bc37..a982a8f 100644 --- a/src/lib/LibRainDeployRegistryBeaconProxy.sol +++ b/src/lib/LibRainDeployRegistryBeaconProxy.sol @@ -88,10 +88,14 @@ library LibRainDeployRegistryBeaconProxy { /// @param resolved The beacon the binding resolves to. error RegistryBeaconProxyBeaconMismatch(string network, address expected, address resolved); - /// Thrown when a suite names no beacon for a chain, or names one twice. + /// Thrown when a suite names no beacon for a chain. /// @param chainId The chain id. error RegistryBeaconProxyNoBeaconOnNetwork(uint256 chainId); + /// Thrown when a suite lists a chain more than once. + /// @param chainId The chain id. + error RegistryBeaconProxyBeaconListedTwice(uint256 chainId); + /// Thrown when a chain's entry declares a zero proxy code hash or empty proxy runtime code. /// @param chainId The chain id. error RegistryBeaconProxyCodeNotDeclared(uint256 chainId); @@ -243,7 +247,8 @@ library LibRainDeployRegistryBeaconProxy { /// @param params The proxy's factory call. /// @param chainId The chain id. /// @return The one entry of `beaconPerNetwork` for `chainId`, refusing `RegistryBeaconProxyNoBeaconOnNetwork` for - /// none or several, `RegistryBeaconProxyCodeNotDeclared` for a zero hash or empty code, and + /// none, `RegistryBeaconProxyBeaconListedTwice` for several, `RegistryBeaconProxyCodeNotDeclared` for a zero hash + /// or empty code, and /// `RegistryBeaconProxyCodeHashIncoherent` for code that does not hash to its hash. function beaconOnNetwork(RegistryBeaconProxyParams memory params, uint256 chainId) internal @@ -264,13 +269,13 @@ library LibRainDeployRegistryBeaconProxy { /// @param params The proxy's factory call. /// @param chainId The chain id. /// @return The index of the one entry of `beaconPerNetwork` for `chainId`, refusing - /// `RegistryBeaconProxyNoBeaconOnNetwork` for none or several. + /// `RegistryBeaconProxyNoBeaconOnNetwork` for none and `RegistryBeaconProxyBeaconListedTwice` for several. function entryIndex(RegistryBeaconProxyParams memory params, uint256 chainId) internal pure returns (uint256) { uint256 found = type(uint256).max; for (uint256 i = 0; i < params.beaconPerNetwork.length; i++) { if (params.beaconPerNetwork[i].chainId == chainId) { if (found != type(uint256).max) { - revert RegistryBeaconProxyNoBeaconOnNetwork(chainId); + revert RegistryBeaconProxyBeaconListedTwice(chainId); } found = i; } From 1f5c7187bd51278995afe2ddcb0089bab57ad3a0 Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 19:02:52 +0000 Subject: [PATCH 42/43] Drop false proxyCodeHash field comment Co-Authored-By: Claude Opus 5.5 --- src/lib/LibRainDeployRegistryBeaconProxy.sol | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib/LibRainDeployRegistryBeaconProxy.sol b/src/lib/LibRainDeployRegistryBeaconProxy.sol index a982a8f..3eaa438 100644 --- a/src/lib/LibRainDeployRegistryBeaconProxy.sol +++ b/src/lib/LibRainDeployRegistryBeaconProxy.sol @@ -28,7 +28,6 @@ struct RegistryBeaconOnNetwork { uint256 chainId; address beacon; bytes32 codeHash; - /// Stored independently of `proxyRuntimeCode` so neither is checked against a value derived from the other. bytes32 proxyCodeHash; bytes proxyRuntimeCode; } From 6e529b89be4f37b57b22eb2dc38c34e66b498d4d Mon Sep 17 00:00:00 2001 From: David Meister Date: Mon, 30 Nov 2026 19:04:10 +0000 Subject: [PATCH 43/43] test: expect RegistryBeaconProxyBeaconListedTwice for a chain listed twice Co-Authored-By: Claude Opus 5.5 --- ...DeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol | 4 ++-- test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol index da74494..664d795 100644 --- a/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol +++ b/test/src/abstract/RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetwork.t.sol @@ -303,7 +303,7 @@ contract RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetworkTest is RainDep params.beaconPerNetwork = four; vm.expectRevert( abi.encodeWithSelector( - LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyNoBeaconOnNetwork.selector, uint256(8453) + LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyBeaconListedTwice.selector, uint256(8453) ) ); this.externalProxySuite(params); @@ -311,7 +311,7 @@ contract RainDeployVerifyChainRegistryBeaconProxyBeaconPerNetworkTest is RainDep liveOn(params, suite, 1, four[1].beacon); vm.expectRevert( abi.encodeWithSelector( - LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyNoBeaconOnNetwork.selector, uint256(8453) + LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyBeaconListedTwice.selector, uint256(8453) ) ); this.externalCheckOnLocalForks(suite, LibRainDeploy.BASE); diff --git a/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol b/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol index 654caf2..2aa4d91 100644 --- a/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol +++ b/test/src/lib/LibRainDeployRegistryBeaconProxy.t.sol @@ -492,7 +492,7 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { params.beaconPerNetwork = four; vm.expectRevert( abi.encodeWithSelector( - LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyNoBeaconOnNetwork.selector, twice.chainId + LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyBeaconListedTwice.selector, twice.chainId ) ); this.externalBeaconOnNetwork(params, twice.chainId); @@ -553,7 +553,7 @@ contract LibRainDeployRegistryBeaconProxyTest is Test { params.beaconPerNetwork = twice; vm.expectRevert( abi.encodeWithSelector( - LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyNoBeaconOnNetwork.selector, block.chainid + LibRainDeployRegistryBeaconProxy.RegistryBeaconProxyBeaconListedTwice.selector, block.chainid ) ); this.externalCheckBeacon(LibRainDeploy.ARBITRUM_ONE, params);