diff --git a/.github/workflows/rainix.yaml b/.github/workflows/rainix.yaml index 7507589..05e4310 100644 --- a/.github/workflows/rainix.yaml +++ b/.github/workflows/rainix.yaml @@ -55,6 +55,7 @@ jobs: CI_DEPLOY_SEPOLIA_RPC_URL: ${{ secrets.CI_DEPLOY_SEPOLIA_RPC_URL || vars.CI_DEPLOY_SEPOLIA_RPC_URL }} ARBITRUM_RPC_URL: ${{ secrets.RPC_URL_ARBITRUM_FORK || vars.RPC_URL_ARBITRUM_FORK }} BASE_RPC_URL: ${{ secrets.RPC_URL_BASE_FORK || vars.RPC_URL_BASE_FORK }} + BASE_SEPOLIA_RPC_URL: ${{ secrets.RPC_URL_BASE_SEPOLIA_FORK || vars.RPC_URL_BASE_SEPOLIA_FORK }} FLARE_RPC_URL: ${{ secrets.RPC_URL_FLARE_FORK || vars.RPC_URL_FLARE_FORK }} POLYGON_RPC_URL: ${{ secrets.RPC_URL_POLYGON_FORK || vars.RPC_URL_POLYGON_FORK }} run: nix develop -c ${{ matrix.task }} diff --git a/foundry.toml b/foundry.toml index c1b60e9..ad271be 100644 --- a/foundry.toml +++ b/foundry.toml @@ -11,5 +11,6 @@ bytecode_hash = "none" [rpc_endpoints] arbitrum = "${ARBITRUM_RPC_URL}" base = "${BASE_RPC_URL}" +base_sepolia = "${BASE_SEPOLIA_RPC_URL}" flare = "${FLARE_RPC_URL}" polygon = "${POLYGON_RPC_URL}" diff --git a/src/lib/LibRainDeploy.sol b/src/lib/LibRainDeploy.sol index 2401792..186f67a 100644 --- a/src/lib/LibRainDeploy.sol +++ b/src/lib/LibRainDeploy.sol @@ -47,6 +47,9 @@ library LibRainDeploy { /// Config name for Base network. string constant BASE = "base"; + /// Config name for Base Sepolia testnet. + string constant BASE_SEPOLIA = "base_sepolia"; + /// Config name for Flare network. string constant FLARE = "flare"; @@ -88,11 +91,12 @@ library LibRainDeploy { /// Returns the list of networks currently supported by Rain deployments. /// @return networks The list of supported network names. function supportedNetworks() internal pure returns (string[] memory) { - string[] memory networks = new string[](4); + string[] memory networks = new string[](5); networks[0] = ARBITRUM_ONE; networks[1] = BASE; - networks[2] = FLARE; - networks[3] = POLYGON; + networks[2] = BASE_SEPOLIA; + networks[3] = FLARE; + networks[4] = POLYGON; return networks; } diff --git a/test/src/lib/LibRainDeploy.t.sol b/test/src/lib/LibRainDeploy.t.sol index 10293cb..a7bea67 100644 --- a/test/src/lib/LibRainDeploy.t.sol +++ b/test/src/lib/LibRainDeploy.t.sol @@ -28,15 +28,16 @@ contract MockReverter { contract LibRainDeployTest is Test { mapping(string => mapping(address => bytes32)) internal sDepCodeHashes; - /// `supportedNetworks` MUST return exactly 4 networks in the expected + /// `supportedNetworks` MUST return exactly 5 networks in the expected /// order matching the library constants. function testSupportedNetworks() external pure { string[] memory networks = LibRainDeploy.supportedNetworks(); - assertEq(networks.length, 4); + assertEq(networks.length, 5); assertEq(networks[0], LibRainDeploy.ARBITRUM_ONE); assertEq(networks[1], LibRainDeploy.BASE); - assertEq(networks[2], LibRainDeploy.FLARE); - assertEq(networks[3], LibRainDeploy.POLYGON); + assertEq(networks[2], LibRainDeploy.BASE_SEPOLIA); + assertEq(networks[3], LibRainDeploy.FLARE); + assertEq(networks[4], LibRainDeploy.POLYGON); } /// `ZOLTU_FACTORY_CODEHASH` MUST match the actual codehash of the Zoltu @@ -362,9 +363,7 @@ contract LibRainDeployTest is Test { vm.expectRevert( abi.encodeWithSelector( - LibRainDeploy.MissingDependency.selector, - LibRainDeploy.ARBITRUM_ONE, - LibRainDeploy.ZOLTU_FACTORY + LibRainDeploy.MissingDependency.selector, LibRainDeploy.ARBITRUM_ONE, LibRainDeploy.ZOLTU_FACTORY ) ); this.externalDeployToNetworks(networks, address(this), hex"", "", address(0), bytes32(0), dependencies); @@ -439,9 +438,7 @@ contract LibRainDeployTest is Test { vm.expectRevert( abi.encodeWithSelector( - LibRainDeploy.MissingDependency.selector, - LibRainDeploy.ARBITRUM_ONE, - address(0xdead) + LibRainDeploy.MissingDependency.selector, LibRainDeploy.ARBITRUM_ONE, address(0xdead) ) ); this.externalDeployToNetworks(networks, address(this), hex"", "", address(0), bytes32(0), dependencies);