Skip to content

Commit

Permalink
unified deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
thedavidmeister committed Jan 8, 2024
1 parent 002435b commit 70a65fa
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 87 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/rainix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
- os: ubuntu-latest
task: ci-rs-static
runs-on: ${{ matrix.os }}
env:
DEPLOYMENT_KEY: ${{ github.ref == 'refs/heads/main' && secrets.PRIVATE_KEY || secrets.PRIVATE_KEY_DEV }}
steps:
- uses: actions/checkout@v3

Expand All @@ -27,4 +29,8 @@ jobs:
- uses: DeterminateSystems/magic-nix-cache-action@v2

- run: nix run .#ci-prep
- run: nix run .#${{ matrix.task }}
- name: Run ${{ matrix.task }}
env:
CI_DEPLOY_RPC_URL: ${{ secrets.CI_DEPLOY_RPC_URL }}
EXPLORER_VERIFICATION_KEY: ${{ secrets.EXPLORER_VERIFICATION_KEY }}
run: nix run .#${{ matrix.task }}
31 changes: 31 additions & 0 deletions script/Deploy.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// SPDX-License-Identifier: CAL
pragma solidity =0.8.19;

import {Script} from "forge-std/Script.sol";

// hardcoded from CI https://github.com/rainprotocol/rain.interpreter/actions/runs/6953107467/job/18917750124
address constant I9R_DEPLOYER = 0xa5aDC3F2A7A8Cf7b5172D76d8b26c3d49272297B;

/// @title Deploy
/// @notice A script that deploys all contracts. This is intended to be run on
/// every commit by CI to a testnet such as mumbai.
contract Deploy is Script {
function run() external {
uint256 deployerPrivateKey = vm.envUint("DEPLOYMENT_KEY");

vm.startBroadcast(deployerPrivateKey);

// OB.
new OrderBook(I9R_DEPLOYER);


// Order takers.
new GenericPoolOrderBookV3ArbOrderTaker(I9R_DEPLOYER);
new RouteProcessorOrderBookV3ArbOrderTaker(I9R_DEPLOYER);

// Flash borrowers.
new GenericPoolOrderBookV3FlashBorrower(I9R_DEPLOYER);

vm.stopBroadcast();
}
}
6 changes: 0 additions & 6 deletions script/DeployConstants.sol

This file was deleted.

21 changes: 0 additions & 21 deletions script/DeployGenericPoolOrderBookV3ArbOrderTaker.sol

This file was deleted.

21 changes: 0 additions & 21 deletions script/DeployGenericPoolOrderBookV3FlashBorrower.sol

This file was deleted.

17 changes: 0 additions & 17 deletions script/DeployOrderBook.sol

This file was deleted.

21 changes: 0 additions & 21 deletions script/DeployRouteProcessorOrderBookV3ArbOrderTaker.sol

This file was deleted.

0 comments on commit 70a65fa

Please sign in to comment.