Deploy a Workflow

Setup Requirements

  1. Set up Inverter Network SDK: Refer to the Quick Start Guide for detailed instructions.

Retrieve the Deployment Functions

To deploy your initial workflow, you will need to retrieve the deployment functions. Please ensure that you adjust the requestedModules to match the ones you want to include in your workflow. Retrieve the getDeploy function as shown below:

import { RequestedModules } from '@inverter-network/sdk'

const { getDeploy } = sdk

// Should either be `as const` or be passed dirrectly in the `estimateGas`, `run` or `simulate` function args
const requestedModules = {
    fundingManager: 'FM_DepositVault_v1',
    paymentProcessor: 'PP_Simple_v1',
    authorizer: 'AUT_Roles_v1',
    optionalModules: [
        'LM_PC_Bounties_v1', 'LM_PC_RecurringPayments_v1'
    ]
} as const satisfies RequestedModules

const { inputs, estimateGas, run, simulate } = await getDeploy({
    requestedModules
})

Deploying the Workflow

After setting up your deployment with the getDeploy function, you can proceed to deploy the workflow with the specified modules by calling the run function and passing the configuration arguments, as shown below:

// Should either be `as const` or be passed dirrectly in the `estimateGas`, `run` or `simulate` function args
const args = {
    orchestrator: {
        independentUpdates: true,
        independentUpdatesAdmin: "0x5eb14c2e7D0cD925327d74ae4ce3fC692ff8ABEF",
    },
    fundingManager: {
        orchestratorTokenAddress: "0x5eb14c2e7D0cD925327d74ae4ce3fC692ff8ABEF",
    },
    authorizer: {
        initialAdmin: "0x7AcaF5360474b8E40f619770c7e8803cf3ED1053",
    },
    optionalModules: {
        LM_PC_RecurringPayments_v1: {
            epochLength: "70000000",
        },
    },
} as const satisfies GetUserArgs<typeof requestedModules>

const { orchestratorAddress, transactionHash } = await run(args);

Last updated