Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/rainix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,9 @@ jobs:
CI_FORK_SEPOLIA_BLOCK_NUMBER: ${{ vars.CI_FORK_SEPOLIA_BLOCK_NUMBER }}
CI_FORK_SEPOLIA_DEPLOYER_ADDRESS: ${{ vars.CI_FORK_SEPOLIA_DEPLOYER_ADDRESS }}
CI_DEPLOY_SEPOLIA_RPC_URL: ${{ secrets.CI_DEPLOY_SEPOLIA_RPC_URL || vars.CI_DEPLOY_SEPOLIA_RPC_URL }}
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 || '' }}
run: nix develop -c ${{ matrix.task }}
53 changes: 53 additions & 0 deletions test/src/lib/deploy/LibDecimalFloatDeployProd.t.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// 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/Test.sol";
import {LibDecimalFloatDeploy} from "src/lib/deploy/LibDecimalFloatDeploy.sol";
import {LibRainDeploy} from "rain.deploy/lib/LibRainDeploy.sol";
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

Unused import: LibRainDeploy

LibRainDeploy is imported but never referenced in this file. Remove it to keep the codebase clean.

🧹 Remove unused import
 import {Test} from "forge-std/Test.sol";
 import {LibDecimalFloatDeploy} from "src/lib/deploy/LibDecimalFloatDeploy.sol";
-import {LibRainDeploy} from "rain.deploy/lib/LibRainDeploy.sol";
📝 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
import {LibRainDeploy} from "rain.deploy/lib/LibRainDeploy.sol";
import {Test} from "forge-std/Test.sol";
import {LibDecimalFloatDeploy} from "src/lib/deploy/LibDecimalFloatDeploy.sol";
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/src/lib/deploy/LibDecimalFloatDeployProd.t.sol` at line 7, Remove the
unused import LibRainDeploy from the top of the test file; locate the import
statement referencing LibRainDeploy in LibDecimalFloatDeployProd.t.sol and
delete that import line so the file no longer imports LibRainDeploy (ensure no
other references to LibRainDeploy remain).


/// @title LibDecimalFloatDeployProdTest
/// @notice Verifies that both the log tables data contract and the DecimalFloat
/// contract are deployed on every supported production network with the expected
/// addresses and code hashes.
contract LibDecimalFloatDeployProdTest is Test {
function checkProdDeployment(string memory network) internal {
vm.createSelectFork(network);

address logTables = LibDecimalFloatDeploy.ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS;
assertTrue(logTables.code.length > 0, string.concat(network, ": log tables not deployed"));
assertEq(
logTables.codehash,
LibDecimalFloatDeploy.LOG_TABLES_DATA_CONTRACT_HASH,
string.concat(network, ": log tables code hash mismatch")
);

address decimalFloat = LibDecimalFloatDeploy.ZOLTU_DEPLOYED_DECIMAL_FLOAT_ADDRESS;
assertTrue(decimalFloat.code.length > 0, string.concat(network, ": DecimalFloat not deployed"));
assertEq(
decimalFloat.codehash,
LibDecimalFloatDeploy.DECIMAL_FLOAT_CONTRACT_HASH,
string.concat(network, ": DecimalFloat code hash mismatch")
);
}

function testProdDeploymentArbitrum() external {
checkProdDeployment("arbitrum");
}

function testProdDeploymentBase() external {
checkProdDeployment("base");
}

function testProdDeploymentBaseSepolia() external {
checkProdDeployment("base_sepolia");
}

function testProdDeploymentFlare() external {
checkProdDeployment("flare");
}

function testProdDeploymentPolygon() external {
checkProdDeployment("polygon");
}
}