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
1 change: 1 addition & 0 deletions .github/workflows/rainix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
1 change: 1 addition & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
10 changes: 7 additions & 3 deletions src/lib/LibRainDeploy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -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;
}

Expand Down
17 changes: 7 additions & 10 deletions test/src/lib/LibRainDeploy.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down