Skip to content

2026 02 06 deploy#165

Open
thedavidmeister wants to merge 5 commits intomainfrom
2026-02-06-deploy
Open

2026 02 06 deploy#165
thedavidmeister wants to merge 5 commits intomainfrom
2026-02-06-deploy

Conversation

@thedavidmeister
Copy link
Contributor

@thedavidmeister thedavidmeister commented Feb 6, 2026

Motivation

Solution

Checks

By submitting this for review, I'm confirming I've done the following:

  • made this PR as small as possible
  • unit-tested any new functionality
  • linked any relevant issues or PRs
  • included screenshots (if this involves a front-end change)

Summary by CodeRabbit

  • Chores

    • Added a new git submodule for an external library.
    • Updated CI workflow to use Forge-based deployment and explicit per-network secret mappings.
  • Refactor

    • Consolidated and simplified deployment logic into a single centralized routine, removing prior per-suite branching and conditional steps.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 6, 2026

Warning

Rate limit exceeded

@thedavidmeister has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 4 minutes and 34 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Walkthrough

Adds a new git submodule lib/rain.deploy, refactors script/Deploy.sol to call LibRainDeploy.deployAndBroadcastToSupportedNetworks (removing prior suite-based branches), and updates the CI workflow to run Forge deployment steps with new per-network secret mappings.

Changes

Cohort / File(s) Summary
Submodule Configuration
\.gitmodules, lib/rain.deploy
Adds rain.deploy submodule entry and a subproject commit file for the new submodule.
Deployment Script
script/Deploy.sol
Replaces prior suite-driven conditional deployment and per-suite broadcast logic with a single LibRainDeploy.deployAndBroadcastToSupportedNetworks call; old logic retained as comments.
CI Workflow
.github/workflows/manual-sol-artifacts.yaml
Removes network/suite inputs and env-export step; replaces previous deployment job with Forge runs and introduces explicit per-network CI secret names for RPC and Etherscan API keys.

Sequence Diagram(s)

sequenceDiagram
    participant CI as CI workflow
    participant Forge as Forge (forge script)
    participant LibDeploy as LibRainDeploy
    participant Network as Target networks

    CI->>Forge: run "selectors up --all"
    CI->>Forge: run "Deploy.sol:Deploy" with flags
    Forge->>LibDeploy: invoke deployAndBroadcastToSupportedNetworks(context, artifacts, hashes)
    LibDeploy->>Network: broadcast deployments to supported networks
    Network-->>LibDeploy: confirmations / receipts
    LibDeploy-->>Forge: return results
    Forge-->>CI: exit status / logs
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • suites #157: Modifies suite-driven deployment logic in script/Deploy.sol, related to the refactor that centralizes deployment into LibRainDeploy.
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title '2026 02 06 deploy' is a date-based identifier with minimal descriptive value; it does not clearly convey the actual changes (submodule addition, deployment script refactoring, and workflow migration to Forge). Use a descriptive title that captures the main changes, such as 'Migrate deployment to use LibRainDeploy and Forge-based workflows' or 'Add rain.deploy submodule and refactor deployment process'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 2026-02-06-deploy

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
script/Deploy.sol (2)

9-11: 🧹 Nitpick | 🔵 Trivial

Dead constants: DEPLOYMENT_SUITE_* are now unused.

These three constants are only referenced in commented-out code (lines 37, 41). They should be removed along with the commented-out code to keep the file clean.


6-6: 🧹 Nitpick | 🔵 Trivial

Unused import and using directive.

DataContractMemoryContainer and LibDataContract (line 6) and the using directive (line 14) are no longer referenced by any active code — they only appear in commented-out lines. Remove them if the commented-out code is deleted.

Also applies to: 14-14

🤖 Fix all issues with AI agents
In `@lib/rain.deploy`:
- Line 1: The repo pins rain.deploy to a WIP commit
(1120ee36cfb74e228a4aa6fbba02b515fe14f172) in lib/rain.deploy; replace this with
a non-WIP reference by switching the submodule pointer to a tagged release
(preferred) or a stable release branch, or add a clear justification in the repo
for why this exact WIP commit is required. Update the submodule configuration
(e.g., .gitmodules and the lib/rain.deploy pointer) to reference the chosen tag
or branch, run git submodule sync && git submodule update --init --recursive to
verify, and commit the updated submodule SHA and .gitmodules change; if keeping
the WIP commit, add a note in the repo explaining the risk and why it's
acceptable.

In `@script/Deploy.sol`:
- Around line 30-45: Remove the sixteen lines of commented-out deployment code
in Deploy.sol (the block referencing suiteString, suite,
DataContractMemoryContainer/container, LibDecimalFloatDeploy.dataContract(),
vm.startBroadcast/deployerPrivateKey, container.writeZoltu(),
LibDecimalFloatDeploy.decimalFloatZoltu(), and vm.stopBroadcast()); delete the
entire commented block so only active deployment logic remains and history is
preserved in version control.
- Around line 19-28: Add the missing Solidity import statements for the
referenced symbols so the script compiles: import LibRainDeploy (used in
LibRainDeploy.deployAndBroadcastToSupportedNetworks and
LibRainDeploy.supportedNetworks) and import the DecimalFloat contract/type (used
via type(DecimalFloat).creationCode); place these imports at the top of
Deploy.sol using the correct project-relative paths for your LibRainDeploy and
DecimalFloat source files and confirm there are no naming collisions with
LibDecimalFloatDeploy symbols already present.

@@ -0,0 +1 @@
Subproject commit 1120ee36cfb74e228a4aa6fbba02b515fe14f172
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# Check for .gitmodules to see the submodule URL and configuration
find . -name ".gitmodules" -type f | head -20

Repository: rainlanguage/rain.math.float

Length of output: 85


🏁 Script executed:

# Also check the git configuration for the submodule
git config --file .gitmodules --name-only --get-regexp path 2>/dev/null || echo "No .gitmodules found or readable"

Repository: rainlanguage/rain.math.float

Length of output: 275


🏁 Script executed:

# Look for any documentation about rain.deploy dependency
fd -i -e md -e txt | xargs grep -l "rain.deploy" 2>/dev/null | head -10

Repository: rainlanguage/rain.math.float

Length of output: 54


🏁 Script executed:

cat -n .gitmodules

Repository: rainlanguage/rain.math.float

Length of output: 879


🏁 Script executed:

# Check if the commit exists in the rain.deploy repository or if there are any tags
git ls-remote https://github.com/rainlanguage/rain.deploy 2>/dev/null | grep "1120ee36cfb74e228a4aa6fbba02b515fe14f172" || echo "Commit not directly found in refs"

Repository: rainlanguage/rain.math.float

Length of output: 174


🏁 Script executed:

# Look for any references to the rain.deploy commit in commit messages or changelogs
rg "1120ee36cfb74e228a4aa6fbba02b515fe14f172" --type md --type txt 2>/dev/null || echo "No references found"

Repository: rainlanguage/rain.math.float

Length of output: 91


🏁 Script executed:

# Check git history for when this submodule was added/modified
git log --oneline lib/rain.deploy 2>/dev/null | head -10 || echo "No git history available"

Repository: rainlanguage/rain.math.float

Length of output: 97


🏁 Script executed:

# Get detailed information about the commit from the git history
git log --format="%H %ai %s %b" -1 -- lib/rain.deploy 2>/dev/null | head -20

Repository: rainlanguage/rain.math.float

Length of output: 157


🏁 Script executed:

# Check if there are any tags in the rain.deploy repository
git ls-remote --tags https://github.com/rainlanguage/rain.deploy 2>/dev/null | grep -E "v[0-9]+\.[0-9]+\.[0-9]+" | tail -5

Repository: rainlanguage/rain.math.float

Length of output: 54


🏁 Script executed:

# Look for any LICENSE file or dependency documentation in the repo
fd -i -e license -e license.txt -e license.md | head -10

Repository: rainlanguage/rain.math.float

Length of output: 54


🏁 Script executed:

# Check if Deploy.sol or related files mention rain.deploy dependency
rg "rain.deploy|LibRainDeploy" -t sol --max-count 20 2>/dev/null | head -30

Repository: rainlanguage/rain.math.float

Length of output: 54


Do not pin a work-in-progress commit as a submodule dependency.

The pinned commit 1120ee36cfb74e228a4aa6fbba02b515fe14f172 is the current HEAD of rain.deploy's main branch with the commit message "wip on new deploy"—indicating work-in-progress status. There are no release tags or stable version markers in the rain.deploy repository. Using a WIP commit as a pinned dependency introduces risk of incomplete or unstable code. Either use a tagged release version if available, or clarify why this WIP state is appropriate for production use.

🤖 Prompt for AI Agents
In `@lib/rain.deploy` at line 1, The repo pins rain.deploy to a WIP commit
(1120ee36cfb74e228a4aa6fbba02b515fe14f172) in lib/rain.deploy; replace this with
a non-WIP reference by switching the submodule pointer to a tagged release
(preferred) or a stable release branch, or add a clear justification in the repo
for why this exact WIP commit is required. Update the submodule configuration
(e.g., .gitmodules and the lib/rain.deploy pointer) to reference the chosen tag
or branch, run git submodule sync && git submodule update --init --recursive to
verify, and commit the updated submodule SHA and .gitmodules change; if keeping
the WIP commit, add a note in the repo explaining the risk and why it's
acceptable.

Comment on lines +30 to +45
// string memory suiteString = vm.envOr("DEPLOYMENT_SUITE", string("all"));
// bytes32 suite = keccak256(bytes(suiteString));

if (suite == DEPLOYMENT_SUITE_ALL || suite == DEPLOYMENT_SUITE_TABLES) {
container.writeZoltu();
}
// DataContractMemoryContainer container = LibDecimalFloatDeploy.dataContract();

if (suite == DEPLOYMENT_SUITE_ALL || suite == DEPLOYMENT_SUITE_CONTRACT) {
LibDecimalFloatDeploy.decimalFloatZoltu();
}
// vm.startBroadcast(deployerPrivateKey);

vm.stopBroadcast();
// if (suite == DEPLOYMENT_SUITE_ALL || suite == DEPLOYMENT_SUITE_TABLES) {
// container.writeZoltu();
// }

// if (suite == DEPLOYMENT_SUITE_ALL || suite == DEPLOYMENT_SUITE_CONTRACT) {
// LibDecimalFloatDeploy.decimalFloatZoltu();
// }

// vm.stopBroadcast();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Remove commented-out code before merging.

Sixteen lines of commented-out old deployment logic should be removed. Version control preserves the history; leaving dead code as comments adds noise and maintenance burden.

♻️ Proposed cleanup
         new address[](0)
         );
 
-        // string memory suiteString = vm.envOr("DEPLOYMENT_SUITE", string("all"));
-        // bytes32 suite = keccak256(bytes(suiteString));
-
-        // DataContractMemoryContainer container = LibDecimalFloatDeploy.dataContract();
-
-        // vm.startBroadcast(deployerPrivateKey);
-
-        // if (suite == DEPLOYMENT_SUITE_ALL || suite == DEPLOYMENT_SUITE_TABLES) {
-        //     container.writeZoltu();
-        // }
-
-        // if (suite == DEPLOYMENT_SUITE_ALL || suite == DEPLOYMENT_SUITE_CONTRACT) {
-        //     LibDecimalFloatDeploy.decimalFloatZoltu();
-        // }
-
-        // vm.stopBroadcast();
     }
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// string memory suiteString = vm.envOr("DEPLOYMENT_SUITE", string("all"));
// bytes32 suite = keccak256(bytes(suiteString));
if (suite == DEPLOYMENT_SUITE_ALL || suite == DEPLOYMENT_SUITE_TABLES) {
container.writeZoltu();
}
// DataContractMemoryContainer container = LibDecimalFloatDeploy.dataContract();
if (suite == DEPLOYMENT_SUITE_ALL || suite == DEPLOYMENT_SUITE_CONTRACT) {
LibDecimalFloatDeploy.decimalFloatZoltu();
}
// vm.startBroadcast(deployerPrivateKey);
vm.stopBroadcast();
// if (suite == DEPLOYMENT_SUITE_ALL || suite == DEPLOYMENT_SUITE_TABLES) {
// container.writeZoltu();
// }
// if (suite == DEPLOYMENT_SUITE_ALL || suite == DEPLOYMENT_SUITE_CONTRACT) {
// LibDecimalFloatDeploy.decimalFloatZoltu();
// }
// vm.stopBroadcast();
🤖 Prompt for AI Agents
In `@script/Deploy.sol` around lines 30 - 45, Remove the sixteen lines of
commented-out deployment code in Deploy.sol (the block referencing suiteString,
suite, DataContractMemoryContainer/container,
LibDecimalFloatDeploy.dataContract(), vm.startBroadcast/deployerPrivateKey,
container.writeZoltu(), LibDecimalFloatDeploy.decimalFloatZoltu(), and
vm.stopBroadcast()); delete the entire commented block so only active deployment
logic remains and history is preserved in version control.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/manual-sol-artifacts.yaml (1)

3-5: 🧹 Nitpick | 🔵 Trivial

Nit: Remove the empty inputs: key.

The inputs: key with no children is a leftover from the removed network and suite inputs. It can be cleaned up:

Suggested cleanup
 on:
-  workflow_dispatch:
-    inputs:
+  workflow_dispatch:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant