From f4694daae12b945d54808ba8c7e07c3d72e1c8da Mon Sep 17 00:00:00 2001 From: Josh Hardy Date: Thu, 10 Sep 2026 17:17:55 +0000 Subject: [PATCH] Record the audited rain-factory 0.1.1 CloneFactory as a frozen release MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `src/generated/0_1_1/CloneFactory.sol` freezes the 0.1.1 factory at `0x444acC…`: creation code (reproduces the address through Zoltu), runtime code read from Base, and the codehash `0xf21b813c…` that `rain-factory-0.1.1`'s `LibCloneFactoryDeploy` pins. It predates this repo's release lifecycle, is live on every supported network but the two newest, and is what S01-Issuer/st0x.deploy makes its authoriser clones through (0.1.10 is unaudited; 0.1.1 was audited). Recording it makes `clone-factory@0_1_1` a dispatchable, liveness-tested suite here instead of a frozen blob in a consumer. Released libs regenerated by `script/Build.sol`; the dispatcher lists the new key. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01HiqQdxokJ4edjAFyAkN9G3 --- .github/workflows/manual-sol-artifacts.yaml | 1 + src/generated/0_1_1/CloneFactory.sol | 26 +++++++++++++++++++++ src/lib/LibCloneFactoryReleased.sol | 21 +++++++++++++++-- 3 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 src/generated/0_1_1/CloneFactory.sol diff --git a/.github/workflows/manual-sol-artifacts.yaml b/.github/workflows/manual-sol-artifacts.yaml index 85320b0..1bef9df 100644 --- a/.github/workflows/manual-sol-artifacts.yaml +++ b/.github/workflows/manual-sol-artifacts.yaml @@ -8,6 +8,7 @@ on: type: choice options: - clone-factory + - clone-factory@0_1_1 - clone-factory@0_1_9 - clone-factory@0_1_10 jobs: diff --git a/src/generated/0_1_1/CloneFactory.sol b/src/generated/0_1_1/CloneFactory.sol new file mode 100644 index 0000000..4b6c94c --- /dev/null +++ b/src/generated/0_1_1/CloneFactory.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +// THIS FILE IS AUTOGENERATED BY THE BUILD SCRIPT. DO NOT EDIT BY HAND. + +/// @dev Hash of the known bytecode. +bytes32 constant BYTECODE_HASH = bytes32(0xf21b813c7075a1621285df3a8369d0652c31ea80cb807be1aaadafeecd134475); + +/// @dev The deterministic deploy address of the contract when deployed via +/// the Zoltu factory. +address constant DEPLOYED_ADDRESS = address(0x444acC29d63fa643E8adCC35FD9aa6DE111dCb39); + +/// @dev The creation bytecode of the contract. +bytes constant CREATION_CODE = + hex"6080604052348015600e575f80fd5b506103f48061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c80630fbe133c1461002d575b5f80fd5b61004061003b3660046102fb565b610069565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b5f8373ffffffffffffffffffffffffffffffffffffffff163b5f036100ba576040517ff432283200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6100c485610213565b6040805133815273ffffffffffffffffffffffffffffffffffffffff888116602083015283168183015290519192507f274b5f356634f32a865af65bdc3d8205939d9413d75e1f367652e4f3b24d0c3a919081900360600190a16040517f439fab910000000000000000000000000000000000000000000000000000000081527fe0e57eda3f08f2a93bbe980d3df7f9c315eac41181f58b865a13d917fe769fc39073ffffffffffffffffffffffffffffffffffffffff83169063439fab91906101949088908890600401610391565b6020604051808303815f875af11580156101b0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101d491906103dd565b1461020b576040517f19b991a800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b949350505050565b5f61021e825f610224565b92915050565b5f8147101561026c576040517fcf4791810000000000000000000000000000000000000000000000000000000081524760048201526024810183905260440160405180910390fd5b763d602d80600a3d3981f3363d3d373d3d3d363d730000008360601b60e81c175f526e5af43d82803e903d91602b57fd5bf38360781b176020526037600983f0905073ffffffffffffffffffffffffffffffffffffffff811661021e576040517fb06ebf3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f805f6040848603121561030d575f80fd5b833573ffffffffffffffffffffffffffffffffffffffff81168114610330575f80fd5b9250602084013567ffffffffffffffff8082111561034c575f80fd5b818601915086601f83011261035f575f80fd5b81358181111561036d575f80fd5b87602082850101111561037e575f80fd5b6020830194508093505050509250925092565b60208152816020820152818360408301375f818301604090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160101919050565b5f602082840312156103ed575f80fd5b505191905056"; + +/// @dev The runtime bytecode of the contract. +bytes constant RUNTIME_CODE = + hex"608060405234801561000f575f80fd5b5060043610610029575f3560e01c80630fbe133c1461002d575b5f80fd5b61004061003b3660046102fb565b610069565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b5f8373ffffffffffffffffffffffffffffffffffffffff163b5f036100ba576040517ff432283200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6100c485610213565b6040805133815273ffffffffffffffffffffffffffffffffffffffff888116602083015283168183015290519192507f274b5f356634f32a865af65bdc3d8205939d9413d75e1f367652e4f3b24d0c3a919081900360600190a16040517f439fab910000000000000000000000000000000000000000000000000000000081527fe0e57eda3f08f2a93bbe980d3df7f9c315eac41181f58b865a13d917fe769fc39073ffffffffffffffffffffffffffffffffffffffff83169063439fab91906101949088908890600401610391565b6020604051808303815f875af11580156101b0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101d491906103dd565b1461020b576040517f19b991a800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b949350505050565b5f61021e825f610224565b92915050565b5f8147101561026c576040517fcf4791810000000000000000000000000000000000000000000000000000000081524760048201526024810183905260440160405180910390fd5b763d602d80600a3d3981f3363d3d373d3d3d363d730000008360601b60e81c175f526e5af43d82803e903d91602b57fd5bf38360781b176020526037600983f0905073ffffffffffffffffffffffffffffffffffffffff811661021e576040517fb06ebf3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f805f6040848603121561030d575f80fd5b833573ffffffffffffffffffffffffffffffffffffffff81168114610330575f80fd5b9250602084013567ffffffffffffffff8082111561034c575f80fd5b818601915086601f83011261035f575f80fd5b81358181111561036d575f80fd5b87602082850101111561037e575f80fd5b6020830194508093505050509250925092565b60208152816020820152818360408301375f818301604090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160101919050565b5f602082840312156103ed575f80fd5b505191905056"; + +/// @dev The addresses that MUST already have code on a network before +/// this release can be broadcast there, `abi.encode`d as an `address[]` +/// because Solidity has no file-scope constant of dynamic array type. +bytes constant DEPENDENCIES = + hex"00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000"; diff --git a/src/lib/LibCloneFactoryReleased.sol b/src/lib/LibCloneFactoryReleased.sol index eb62c76..8c1fcb0 100644 --- a/src/lib/LibCloneFactoryReleased.sol +++ b/src/lib/LibCloneFactoryReleased.sol @@ -6,6 +6,14 @@ pragma solidity ^0.8.25; import {DeploySuite} from "../abstract/RainDeploySuitesBase.sol"; +import { + DEPLOYED_ADDRESS as CloneFactory_0_1_1_DEPLOYED_ADDRESS, + BYTECODE_HASH as CloneFactory_0_1_1_BYTECODE_HASH, + CREATION_CODE as CloneFactory_0_1_1_CREATION_CODE, + RUNTIME_CODE as CloneFactory_0_1_1_RUNTIME_CODE, + DEPENDENCIES as CloneFactory_0_1_1_DEPENDENCIES +} from "../generated/0_1_1/CloneFactory.sol"; + import { DEPLOYED_ADDRESS as CloneFactory_0_1_9_DEPLOYED_ADDRESS, BYTECODE_HASH as CloneFactory_0_1_9_BYTECODE_HASH, @@ -42,8 +50,17 @@ library LibCloneFactoryReleased { /// Every frozen release, in tag order. /// @return The released suites. function releasedSuites() internal pure returns (DeploySuite[] memory) { - DeploySuite[] memory suites = new DeploySuite[](2); + DeploySuite[] memory suites = new DeploySuite[](3); suites[0] = DeploySuite({ + suite: "clone-factory@0_1_1", + creationCode: CloneFactory_0_1_1_CREATION_CODE, + storedDeployedAddress: CloneFactory_0_1_1_DEPLOYED_ADDRESS, + storedBytecodeHash: CloneFactory_0_1_1_BYTECODE_HASH, + storedRuntimeCode: CloneFactory_0_1_1_RUNTIME_CODE, + artifactPath: "src/concrete/CloneFactory.sol:CloneFactory", + dependencies: abi.decode(CloneFactory_0_1_1_DEPENDENCIES, (address[])) + }); + suites[1] = DeploySuite({ suite: "clone-factory@0_1_9", creationCode: CloneFactory_0_1_9_CREATION_CODE, storedDeployedAddress: CloneFactory_0_1_9_DEPLOYED_ADDRESS, @@ -52,7 +69,7 @@ library LibCloneFactoryReleased { artifactPath: "src/concrete/CloneFactory.sol:CloneFactory", dependencies: abi.decode(CloneFactory_0_1_9_DEPENDENCIES, (address[])) }); - suites[1] = DeploySuite({ + suites[2] = DeploySuite({ suite: "clone-factory@0_1_10", creationCode: CloneFactory_0_1_10_CREATION_CODE, storedDeployedAddress: CloneFactory_0_1_10_DEPLOYED_ADDRESS,