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
10 changes: 10 additions & 0 deletions .github/workflows/manual-sol-artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ on:
- sepolia
- songbird

suite:
description: "Suite to deploy"
required: true
type: choice
options:
- all
- deployment.suite.tables
- deployment.suite.contract
Comment thread
thedavidmeister marked this conversation as resolved.

jobs:
deploy:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -59,6 +68,7 @@ jobs:
- name: deploy to ${{ inputs.network }}
run: nix develop -c rainix-sol-artifacts
env:
DEPLOYMENT_SUITE: ${{ inputs.suite }}
DEPLOY_BROADCAST: '1'
DEPLOYMENT_KEY: ${{ github.ref == 'refs/heads/main' && secrets.PRIVATE_KEY || secrets.PRIVATE_KEY_DEV }}
ETH_RPC_URL: ${{ secrets[env.rpc_secret_name] || vars[env.rpc_secret_name] || '' }}
Expand Down
14 changes: 12 additions & 2 deletions script/Deploy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,29 @@ import {Script} from "forge-std/Script.sol";
import {DataContractMemoryContainer, LibDataContract} from "rain.datacontract/lib/LibDataContract.sol";
import {LibDecimalFloatDeploy} from "../src/lib/deploy/LibDecimalFloatDeploy.sol";

bytes32 constant DEPLOYMENT_SUITE_ALL = keccak256("all");
bytes32 constant DEPLOYMENT_SUITE_TABLES = keccak256("deployment.suite.tables");
bytes32 constant DEPLOYMENT_SUITE_CONTRACT = keccak256("deployment.suite.contract");
Comment thread
thedavidmeister marked this conversation as resolved.

contract Deploy is Script {
using LibDataContract for DataContractMemoryContainer;

function run() external {
uint256 deployerPrivateKey = vm.envUint("DEPLOYMENT_KEY");
string memory suiteString = vm.envOr("DEPLOYMENT_SUITE", string("all"));
bytes32 suite = keccak256(bytes(suiteString));
Comment thread
thedavidmeister marked this conversation as resolved.

DataContractMemoryContainer container = LibDecimalFloatDeploy.dataContract();

vm.startBroadcast(deployerPrivateKey);

container.writeZoltu();
if (suite == DEPLOYMENT_SUITE_ALL || suite == DEPLOYMENT_SUITE_TABLES) {
container.writeZoltu();
}

LibDecimalFloatDeploy.decimalFloatZoltu();
if (suite == DEPLOYMENT_SUITE_ALL || suite == DEPLOYMENT_SUITE_CONTRACT) {
LibDecimalFloatDeploy.decimalFloatZoltu();
}

vm.stopBroadcast();
}
Expand Down