Skip to main content

Deployment Creation

Follow the steps in first app deployment if you want to deploy apps with the Acurast CLI.

Alternatively, use the Acurast Console create a deployment.

Protocol and Templates Selection

Select the protocol / chain the deployment should fulfill on and select a deployment template as a starting point. Alternatively it is possible to just start with a blank template.

App Code

Adapt the app code that it performs the task you need. The above images show the template for publishing a price on Ethereum.

Deployment Schedule

Specify if the deployment should be matched to the available public processors or if it should run on a specific ones.

Additionally, specify start and end times for the deployment, the execution interval and the duration.

It is recommended to not have a start time sooner than 10 minutes from the present.

Deployment Environment Variables

It is possible to specify environment variables that the script can access at runtime. This is useful when the script needs to use data that should be secret, for example an API key allowing permissioned access to the API.

If an environment variable is specified like in pictured above, it will be accessible from the script with:

const myApiKey = _STD_.env["MY_API_KEY"];
info

The environment variables will be encrypted and only the Processor assigned to the deployment will be able to use them. Not even the owner of the device will be able to access this variable as it can only be encrypted within the Trusted Execution Environment of the devices.

Using environment variables will require a processor with the DataEncryption module enabled which wille be activated automatically in your deployment when adding one or more environment variables.

Deployment Reward and Publish

Specify the number of processors that should be assigned to run the deployment, the minimum reputation each processor needs to have and the reward per deployment execution, then publish the deployment.

Deployment Creation Progress

After publishing the deployment, a deployment creation progress screen is displayed, showing the various initial stage of the deployment creation:

  • Deployment is registered on chain
  • Deployment is matched to one or more processors
  • Deployment is acknowledged by the matched processors
    • At this point, if environment variables were specified, then the Set or Set All buttons should be pressed to encrypt and publish those variables on chain.

Go to Deployment will open the deployment details page where all the deployment's details are displayed and the environment variables can be updated.

In the Assigned Processors section, the list of assigned processors is displayed.

Each processor will use a dedicated account for the user creating the deployment, thus here you can see the various addresses the processor will use when interacting with the various chains (selected from the drop down menus).

If you see the Transaction Fees Required warning, it means that the chain has a Level 1 integration with Acurast and the user is responsible for those accounts to have enough balance to pay for the transaction fees.