From 4b8c93d2762cfd0b697ffbfb5598ce124fe3a8b2 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Mon, 11 May 2026 16:37:24 +0400 Subject: [PATCH 1/3] feat: migrate to soldeer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaces git-submodule plumbing with soldeer dependencies: - forge-std@1.16.1 - @openzeppelin-contracts@5.6.1 (was 5.5.0 submodule) - rain-extrospection@0.1.0 - rain-deploy@0.1.2 Drops `lib/` submodules, `.gitmodules`, `foundry.lock`, the `remappings = [...]` line, the `libs = ['lib']`, and the `no_match_path = "lib/**/test/**"` exclusion. soldeer auto-generates `remappings.txt` (gitignored). Imports rewritten: - `rain.X/lib/...` → `rain-X-/src/lib/...` - `forge-std/...` → `forge-std-1.16.1/src/...` - `openzeppelin-contracts/contracts/...` → `@openzeppelin-contracts-5.6.1/...` CI workflow modernized: drops the pre-soldeer `rainix.yaml` matrix (which still used `submodules: recursive` + `DeterminateSystems/nix-installer-action` + `rainix-sol-prelude`) in favour of a one-line wrapper calling the upstream `rainix-sol` composite reusable. Adds `publish-soldeer.yaml` so v* tags push the package to soldeer.xyz via rainix's reusable. .soldeerignore mirrors rain.math.float's: excludes CI/dev config, audit prose, build caches, and the soldeer-managed dependencies/ directory itself. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/publish-soldeer.yaml | 8 +++++ .github/workflows/rainix-sol.yaml | 6 ++++ .github/workflows/rainix.yaml | 37 -------------------- .gitignore | 5 ++- .gitmodules | 12 ------- .soldeerignore | 24 +++++++++++++ foundry.lock | 14 -------- foundry.toml | 31 ++++++++-------- lib/forge-std | 1 - lib/openzeppelin-contracts | 1 - lib/rain.deploy | 1 - lib/rain.extrospection | 1 - script/Deploy.sol | 4 +-- soldeer.lock | 27 ++++++++++++++ src/concrete/CloneFactory.sol | 2 +- test/src/concrete/CloneFactory.t.sol | 4 +-- test/src/lib/LibCloneFactoryDeploy.t.sol | 4 +-- test/src/lib/LibCloneFactoryDeployProd.t.sol | 4 +-- 18 files changed, 95 insertions(+), 91 deletions(-) create mode 100644 .github/workflows/publish-soldeer.yaml create mode 100644 .github/workflows/rainix-sol.yaml delete mode 100644 .github/workflows/rainix.yaml delete mode 100644 .gitmodules create mode 100644 .soldeerignore delete mode 100644 foundry.lock delete mode 160000 lib/forge-std delete mode 160000 lib/openzeppelin-contracts delete mode 160000 lib/rain.deploy delete mode 160000 lib/rain.extrospection create mode 100644 soldeer.lock diff --git a/.github/workflows/publish-soldeer.yaml b/.github/workflows/publish-soldeer.yaml new file mode 100644 index 0000000..066aa41 --- /dev/null +++ b/.github/workflows/publish-soldeer.yaml @@ -0,0 +1,8 @@ +name: Publish to Soldeer +on: + push: + tags: ["v*"] +jobs: + publish: + uses: rainlanguage/rainix/.github/workflows/publish-soldeer.yaml@main + secrets: inherit diff --git a/.github/workflows/rainix-sol.yaml b/.github/workflows/rainix-sol.yaml new file mode 100644 index 0000000..827ab30 --- /dev/null +++ b/.github/workflows/rainix-sol.yaml @@ -0,0 +1,6 @@ +name: rainix-sol +on: [push] +jobs: + rainix-sol: + uses: rainlanguage/rainix/.github/workflows/rainix-sol.yaml@main + secrets: inherit diff --git a/.github/workflows/rainix.yaml b/.github/workflows/rainix.yaml deleted file mode 100644 index e1afa9d..0000000 --- a/.github/workflows/rainix.yaml +++ /dev/null @@ -1,37 +0,0 @@ -name: Rainix CI -on: [push] - -jobs: - standard-tests: - strategy: - matrix: - os: [ubuntu-latest] - task: [rainix-sol-test, rainix-sol-static, rainix-sol-legal] - fail-fast: false - runs-on: ${{ matrix.os }} - env: - DEPLOYMENT_KEY: ${{ github.ref == 'refs/heads/main' && secrets.PRIVATE_KEY || secrets.PRIVATE_KEY_DEV }} - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - fetch-depth: 0 - - - name: Install Nix - uses: DeterminateSystems/nix-installer-action@v4 - - uses: DeterminateSystems/magic-nix-cache-action@v2 - - - run: nix develop -c rainix-sol-prelude - - - name: Run ${{ matrix.task }} - env: - ETH_RPC_URL: ${{ secrets.CI_DEPLOY_BASE_RPC_URL || vars.CI_DEPLOY_BASE_RPC_URL || '' }} - CI_FORK_ETH_RPC_URL: ${{ secrets.RPC_URL_ETHEREUM_FORK || vars.RPC_URL_ETHEREUM_FORK || '' }} - CI_DEPLOY_ARBITRUM_RPC_URL: ${{ secrets.CI_DEPLOY_ARBITRUM_RPC_URL || vars.CI_DEPLOY_ARBITRUM_RPC_URL || '' }} - CI_DEPLOY_BASE_RPC_URL: ${{ secrets.CI_DEPLOY_BASE_RPC_URL || vars.CI_DEPLOY_BASE_RPC_URL || '' }} - CI_DEPLOY_BASE_SEPOLIA_RPC_URL: ${{ secrets.CI_DEPLOY_BASE_SEPOLIA_RPC_URL || vars.CI_DEPLOY_BASE_SEPOLIA_RPC_URL || '' }} - CI_DEPLOY_FLARE_RPC_URL: ${{ secrets.CI_DEPLOY_FLARE_RPC_URL || vars.CI_DEPLOY_FLARE_RPC_URL || '' }} - CI_DEPLOY_POLYGON_RPC_URL: ${{ secrets.CI_DEPLOY_POLYGON_RPC_URL || vars.CI_DEPLOY_POLYGON_RPC_URL || '' }} - ETHERSCAN_API_KEY: ${{ secrets.EXPLORER_VERIFICATION_KEY }} - DEPLOY_VERIFIER: 'etherscan' - run: nix develop -c ${{ matrix.task }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index ba9ddef..b3141ed 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,7 @@ out cache result .env -.fixes \ No newline at end of file +.fixes +dependencies +remappings.txt +.pre-commit-config.yaml diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 3ea327c..0000000 --- a/.gitmodules +++ /dev/null @@ -1,12 +0,0 @@ -[submodule "lib/rain.extrospection"] - path = lib/rain.extrospection - url = https://github.com/rainlanguage/rain.extrospection -[submodule "lib/openzeppelin-contracts"] - path = lib/openzeppelin-contracts - url = https://github.com/OpenZeppelin/openzeppelin-contracts -[submodule "lib/forge-std"] - path = lib/forge-std - url = https://github.com/foundry-rs/forge-std -[submodule "lib/rain.deploy"] - path = lib/rain.deploy - url = https://github.com/rainlanguage/rain.deploy diff --git a/.soldeerignore b/.soldeerignore new file mode 100644 index 0000000..51a07d1 --- /dev/null +++ b/.soldeerignore @@ -0,0 +1,24 @@ +.DS_Store +.coderabbitai.yaml +.gas-snapshot +.git +.github +.gitignore +.gitmodules +.pre-commit-config.yaml +.soldeerignore +.vscode +CLAUDE.md +/audit +/cache +/dependencies +/flake.lock +/flake.nix +/foundry.lock +/foundry.toml +/meta +/out +/remappings.txt +/slither.config.json +/soldeer.lock +/REUSE.toml diff --git a/foundry.lock b/foundry.lock deleted file mode 100644 index 363e12d..0000000 --- a/foundry.lock +++ /dev/null @@ -1,14 +0,0 @@ -{ - "lib/forge-std": { - "rev": "1801b0541f4fda118a10798fd3486bb7051c5dd6" - }, - "lib/openzeppelin-contracts": { - "rev": "fcbae5394ae8ad52d8e580a3477db99814b9d565" - }, - "lib/rain.deploy": { - "rev": "43a6ed3a98f0141e1963b4b9136e8c80e2889bd1" - }, - "lib/rain.extrospection": { - "rev": "6445dbc995a923cbec32860cc84a88dbfea3ba68" - } -} \ No newline at end of file diff --git a/foundry.toml b/foundry.toml index c91f1f2..37fe123 100644 --- a/foundry.toml +++ b/foundry.toml @@ -2,7 +2,6 @@ src = 'src' test = 'test' out = 'out' -libs = ['lib'] # See more config options https://github.com/foundry-rs/foundry/tree/master/config @@ -17,27 +16,31 @@ cbor_metadata = false # Build metadata used for testing rain meta aware contracts in this folder rather # than expose ffi to forge. -fs_permissions = [{ access = "read", path = "./meta"}] - -remappings = [ - "rain.deploy/=lib/rain.deploy/src/" -] - -no_match_path = "lib/**/test/**" +fs_permissions = [{ access = "read", path = "./meta" }] +libs = ["dependencies"] [fuzz] runs = 2048 +[dependencies] +forge-std = "1.16.1" +"@openzeppelin-contracts" = "5.6.1" +"rain-extrospection" = "0.1.0" +"rain-deploy" = "0.1.2" + +[soldeer] +recursive_deps = false + [rpc_endpoints] -arbitrum = "${CI_DEPLOY_ARBITRUM_RPC_URL}" -base = "${CI_DEPLOY_BASE_RPC_URL}" -base_sepolia = "${CI_DEPLOY_BASE_SEPOLIA_RPC_URL}" -flare = "${CI_DEPLOY_FLARE_RPC_URL}" -polygon = "${CI_DEPLOY_POLYGON_RPC_URL}" +arbitrum = "${ARBITRUM_RPC_URL}" +base = "${BASE_RPC_URL}" +base_sepolia = "${BASE_SEPOLIA_RPC_URL}" +flare = "${FLARE_RPC_URL}" +polygon = "${POLYGON_RPC_URL}" [etherscan] arbitrum = { key = "${CI_DEPLOY_ARBITRUM_ETHERSCAN_API_KEY}" } base = { key = "${CI_DEPLOY_BASE_ETHERSCAN_API_KEY}" } base_sepolia = { key = "${CI_DEPLOY_BASE_SEPOLIA_ETHERSCAN_API_KEY}" } flare = { key = "${CI_DEPLOY_FLARE_ETHERSCAN_API_KEY}" } -polygon = { key = "${CI_DEPLOY_POLYGON_ETHERSCAN_API_KEY}" } \ No newline at end of file +polygon = { key = "${CI_DEPLOY_POLYGON_ETHERSCAN_API_KEY}" } diff --git a/lib/forge-std b/lib/forge-std deleted file mode 160000 index 1801b05..0000000 --- a/lib/forge-std +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1801b0541f4fda118a10798fd3486bb7051c5dd6 diff --git a/lib/openzeppelin-contracts b/lib/openzeppelin-contracts deleted file mode 160000 index fcbae53..0000000 --- a/lib/openzeppelin-contracts +++ /dev/null @@ -1 +0,0 @@ -Subproject commit fcbae5394ae8ad52d8e580a3477db99814b9d565 diff --git a/lib/rain.deploy b/lib/rain.deploy deleted file mode 160000 index 43a6ed3..0000000 --- a/lib/rain.deploy +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 43a6ed3a98f0141e1963b4b9136e8c80e2889bd1 diff --git a/lib/rain.extrospection b/lib/rain.extrospection deleted file mode 160000 index 6445dbc..0000000 --- a/lib/rain.extrospection +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6445dbc995a923cbec32860cc84a88dbfea3ba68 diff --git a/script/Deploy.sol b/script/Deploy.sol index 3c2d290..903284b 100644 --- a/script/Deploy.sol +++ b/script/Deploy.sol @@ -2,9 +2,9 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity =0.8.25; -import {Script} from "forge-std/Script.sol"; +import {Script} from "forge-std-1.16.1/src/Script.sol"; import {CloneFactory} from "../src/concrete/CloneFactory.sol"; -import {LibRainDeploy} from "rain.deploy/lib/LibRainDeploy.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.2/src/lib/LibRainDeploy.sol"; import {LibCloneFactoryDeploy} from "../src/lib/LibCloneFactoryDeploy.sol"; /// @title Deploy diff --git a/soldeer.lock b/soldeer.lock new file mode 100644 index 0000000..be23222 --- /dev/null +++ b/soldeer.lock @@ -0,0 +1,27 @@ +[[dependencies]] +name = "@openzeppelin-contracts" +version = "5.6.1" +url = "https://soldeer-revisions.s3.amazonaws.com/@openzeppelin-contracts/5_6_1_15-03-2026_09:19:50_contracts.zip" +checksum = "a3b6bc661be858c7c27f60a1708cbebe8c71034b4cc1e9fe270d0a05b069352f" +integrity = "bce03af7ada1eee21a7fff393f238bcd7cd75a022a4db55ffb6b0dbb32433d35" + +[[dependencies]] +name = "forge-std" +version = "1.16.1" +url = "https://soldeer-revisions.s3.amazonaws.com/forge-std/1_16_1_08-05-2026_08:51:16_forge-std-1.16.zip" +checksum = "839b61832925c7152c7b6dffbfa4998d9e606211179bd8f604733124e8a7cb57" +integrity = "60e55d10150354ca4a1e2985c5456c834b92b82ef85ab0e1d92a7786cddbd219" + +[[dependencies]] +name = "rain-deploy" +version = "0.1.2" +url = "https://soldeer-revisions.s3.amazonaws.com/rain-deploy/0_1_2_09-05-2026_19:49:20_rain.zip" +checksum = "94d3daf2f9f90062d2e676077c2b4ccd2bdd66201665a2209e98016e155f619a" +integrity = "10bff708d9e5d8b77655b8a8fc0c755cef8e3fc876cc3ff100425d27b08294a0" + +[[dependencies]] +name = "rain-extrospection" +version = "0.1.0" +url = "https://soldeer-revisions.s3.amazonaws.com/rain-extrospection/0_1_0_11-05-2026_12:26:12_rain.zip" +checksum = "97297c3f1d623c63f5996b4266a4c26f895a1ca17ab271a619af601f8950521d" +integrity = "30f7e23c71b24267d2db46085049aec5baaa693825ff8bc8fd72bd685da479ad" diff --git a/src/concrete/CloneFactory.sol b/src/concrete/CloneFactory.sol index 66ef0b2..acbbcf7 100644 --- a/src/concrete/CloneFactory.sol +++ b/src/concrete/CloneFactory.sol @@ -4,7 +4,7 @@ pragma solidity =0.8.25; import {ICloneableV2, ICLONEABLE_V2_SUCCESS} from "../interface/ICloneableV2.sol"; import {ICloneableFactoryV2} from "../interface/ICloneableFactoryV2.sol"; -import {Clones} from "openzeppelin-contracts/contracts/proxy/Clones.sol"; +import {Clones} from "@openzeppelin-contracts-5.6.1/proxy/Clones.sol"; /// Thrown when an implementation has zero code size which is always a mistake. error ZeroImplementationCodeSize(); diff --git a/test/src/concrete/CloneFactory.t.sol b/test/src/concrete/CloneFactory.t.sol index ea9faca..d54a394 100644 --- a/test/src/concrete/CloneFactory.t.sol +++ b/test/src/concrete/CloneFactory.t.sol @@ -2,9 +2,9 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity =0.8.25; -import {Test, Vm} from "forge-std/Test.sol"; +import {Test, Vm} from "forge-std-1.16.1/src/Test.sol"; -import {LibExtrospectERC1167Proxy} from "rain.extrospection/lib/LibExtrospectERC1167Proxy.sol"; +import {LibExtrospectERC1167Proxy} from "rain-extrospection-0.1.0/src/lib/LibExtrospectERC1167Proxy.sol"; import {ICloneableV2, ICLONEABLE_V2_SUCCESS} from "../../../src/interface/ICloneableV2.sol"; import {CloneFactory, ZeroImplementationCodeSize, InitializationFailed} from "../../../src/concrete/CloneFactory.sol"; diff --git a/test/src/lib/LibCloneFactoryDeploy.t.sol b/test/src/lib/LibCloneFactoryDeploy.t.sol index 0876c84..f071a93 100644 --- a/test/src/lib/LibCloneFactoryDeploy.t.sol +++ b/test/src/lib/LibCloneFactoryDeploy.t.sol @@ -2,8 +2,8 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity =0.8.25; -import {Test} from "forge-std/Test.sol"; -import {LibRainDeploy} from "rain.deploy/lib/LibRainDeploy.sol"; +import {Test} from "forge-std-1.16.1/src/Test.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.2/src/lib/LibRainDeploy.sol"; import {LibCloneFactoryDeploy} from "../../../src/lib/LibCloneFactoryDeploy.sol"; import {CloneFactory} from "../../../src/concrete/CloneFactory.sol"; diff --git a/test/src/lib/LibCloneFactoryDeployProd.t.sol b/test/src/lib/LibCloneFactoryDeployProd.t.sol index 40d3bf7..2785813 100644 --- a/test/src/lib/LibCloneFactoryDeployProd.t.sol +++ b/test/src/lib/LibCloneFactoryDeployProd.t.sol @@ -2,8 +2,8 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity =0.8.25; -import {Test} from "forge-std/Test.sol"; -import {LibRainDeploy} from "rain.deploy/lib/LibRainDeploy.sol"; +import {Test} from "forge-std-1.16.1/src/Test.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.2/src/lib/LibRainDeploy.sol"; import {LibCloneFactoryDeploy} from "../../../src/lib/LibCloneFactoryDeploy.sol"; /// @title LibCloneFactoryDeployProdTest From 7cd9d2693245877dbd96e5998ea433ae043aa873 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Mon, 11 May 2026 17:03:59 +0400 Subject: [PATCH 2/3] fix(ci): point slither filter_paths at soldeer dirs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Slither was flagging too-many-digits inside dependencies/@openzeppelin-contracts-5.6.1/proxy/Clones.sol — the post-migration soldeer location. The old filter targeted lib/openzeppelin-contracts, which no longer exists. Replaces with the soldeer-pinned paths (dependencies/forge-std-1.16.1, dependencies/@openzeppelin-contracts-5.6.1). Drops `test` from filter_paths — CLAUDE.md rule: do not exclude test/ from slither analysis. Co-Authored-By: Claude Opus 4.7 (1M context) --- slither.config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slither.config.json b/slither.config.json index 9f26872..1e19395 100644 --- a/slither.config.json +++ b/slither.config.json @@ -1,4 +1,4 @@ { "detectors_to_exclude": "assembly-usage,solc-version,pragma,unindexed-event-address", - "filter_paths": "lib/forge-std,test,lib/openzeppelin-contracts" + "filter_paths": "dependencies/forge-std-1.16.1,dependencies/@openzeppelin-contracts-5.6.1" } From 52fd82e37476cd1c6320e0f77415b3dea379a723 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Tue, 12 May 2026 11:07:40 +0400 Subject: [PATCH 3/3] fix(ci): cover .soldeerignore and soldeer.lock in REUSE.toml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit reuse lint flagged the new soldeer metadata files as missing copyright/license info. Add them to the umbrella annotation alongside .gitignore, foundry.lock, etc. — same shape as float's REUSE.toml. Co-Authored-By: Claude Opus 4.7 (1M context) --- REUSE.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/REUSE.toml b/REUSE.toml index cd6abb8..0c042e3 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -17,6 +17,8 @@ path = [ "slither.config.json", "REUSE.toml", "foundry.lock", + "soldeer.lock", + ".soldeerignore", ] SPDX-FileCopyrightText = "Copyright (c) 2020 Rain Open Source Software Ltd" SPDX-License-Identifier = "LicenseRef-DCL-1.0"