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 @@ -61,4 +61,9 @@ jobs:
DEPLOY_BROADCAST: ""
DEPLOY_VERIFIER: ""
DEPLOY_METABOARD_ADDRESS: ${{ vars.CI_DEPLOY_SEPOLIA_METABOARD_ADDRESS }}
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 }}
2 changes: 1 addition & 1 deletion foundry.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"rev": "83e607990be8b3e06549338043c6b18f430f6bd2"
},
"lib/rain.metadata": {
"rev": "a823381df1a118fe0e217150a416566e0c182210"
"rev": "cda61a682e6cbc954d3ad8b50913a9058c834283"
},
"lib/rain.string": {
"rev": "488f237cd59874e4eb91b5a4f747bd57578fec7f"
Expand Down
2 changes: 1 addition & 1 deletion lib/rain.metadata
69 changes: 69 additions & 0 deletions test/src/lib/deploy/LibInterpreterDeployProd.t.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
// 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 {LibRainDeploy} from "rain.deploy/lib/LibRainDeploy.sol";
import {LibInterpreterDeploy} from "../../../../src/lib/deploy/LibInterpreterDeploy.sol";

/// @title LibInterpreterDeployProdTest
/// @notice Forks each supported network and verifies that all five interpreter
/// contracts are deployed at the expected addresses with the expected codehash.
contract LibInterpreterDeployProdTest is Test {
function _checkAllContracts() internal view {
assertTrue(LibInterpreterDeploy.PARSER_DEPLOYED_ADDRESS.code.length > 0, "Parser not deployed");
assertEq(LibInterpreterDeploy.PARSER_DEPLOYED_ADDRESS.codehash, LibInterpreterDeploy.PARSER_DEPLOYED_CODEHASH);

assertTrue(LibInterpreterDeploy.STORE_DEPLOYED_ADDRESS.code.length > 0, "Store not deployed");
assertEq(LibInterpreterDeploy.STORE_DEPLOYED_ADDRESS.codehash, LibInterpreterDeploy.STORE_DEPLOYED_CODEHASH);

assertTrue(LibInterpreterDeploy.INTERPRETER_DEPLOYED_ADDRESS.code.length > 0, "Interpreter not deployed");
assertEq(
LibInterpreterDeploy.INTERPRETER_DEPLOYED_ADDRESS.codehash,
LibInterpreterDeploy.INTERPRETER_DEPLOYED_CODEHASH
);

assertTrue(
LibInterpreterDeploy.EXPRESSION_DEPLOYER_DEPLOYED_ADDRESS.code.length > 0, "ExpressionDeployer not deployed"
);
assertEq(
LibInterpreterDeploy.EXPRESSION_DEPLOYER_DEPLOYED_ADDRESS.codehash,
LibInterpreterDeploy.EXPRESSION_DEPLOYER_DEPLOYED_CODEHASH
);

assertTrue(LibInterpreterDeploy.RAINLANG_DEPLOYED_ADDRESS.code.length > 0, "Rainlang not deployed");
assertEq(
LibInterpreterDeploy.RAINLANG_DEPLOYED_ADDRESS.codehash, LibInterpreterDeploy.RAINLANG_DEPLOYED_CODEHASH
);
}

/// All five contracts MUST be deployed on Arbitrum.
function testProdDeployArbitrum() external {
vm.createSelectFork(LibRainDeploy.ARBITRUM_ONE);
_checkAllContracts();
}

/// All five contracts MUST be deployed on Base.
function testProdDeployBase() external {
vm.createSelectFork(LibRainDeploy.BASE);
_checkAllContracts();
}

/// All five contracts MUST be deployed on Base Sepolia.
function testProdDeployBaseSepolia() external {
vm.createSelectFork(LibRainDeploy.BASE_SEPOLIA);
_checkAllContracts();
}

/// All five contracts MUST be deployed on Flare.
function testProdDeployFlare() external {
vm.createSelectFork(LibRainDeploy.FLARE);
_checkAllContracts();
}

/// All five contracts MUST be deployed on Polygon.
function testProdDeployPolygon() external {
vm.createSelectFork(LibRainDeploy.POLYGON);
_checkAllContracts();
}
}
Loading