Make a Deploy Request

Initiate and manage contract deployments on Loki.code directly from your existing development environment, all while enjoying access to team approvals and an extensive suite of DevOps tools.

What is a Deploy Request?

By connecting your GitHub account to Loki.code, you gain access to our platform's comprehensive suite of DevOps tools, including deployment history, contract playground, and team deployment approvals, each time you make a contract deployment.

For most developers, it is more convenient to use Loki.code in conjunction with their existing development environment, such as Hardhat or Foundry. This is where deploy requests come into play. Deploy requests allow you to initiate a deployment on Loki.code from your existing development environment and enable teams to delineate the roles of developers who initiate deployments and authorized individuals who approve those deployments (for instance, on the mainnet).

By incorporating one of our deploy request scripts into your project, you can send deploy requests for your contract to one of your projects on Loki.code. From there, you or an authorized team member can approve the deployment. Once approved, the deployment details will be added to the project's history, and you will have the ability to interact with it in Loki.code's playground.

Video Demonstration


Step 1: Generate an API Key

  1. Start in the dashboard.

  2. Click the "Projects" tab in the side bar.

  3. Select the project you want the deploy request to be associated with.

  4. Click the "API Keys" tab in the side bar.

  5. Click "Generate new token", and follow the steps.

  6. Save your API key in a secure location.

  7. Save the project ID on the top right of the page to use in the deploy request script.

Step 2: Execute the Deploy Request

Deploy requests are essentially API calls that transmit your contract data and deployment options to your project on Loki.code. To facilitate this process, you may refer to this repository, which includes examples of Hardhat and Foundry projects that implement this in a script.

  1. If you already possess a project, click on the appropriate example script link in the README, and copy that file into your project. For instance, this is the script for Hardhat.

  2. If you do not have a pre-existing project, click on the appropriate example project link and follow the instructions in that project's README file. For instance, this is the reference project for Hardhat.

Step 3: Confirm the Deploy Request

  1. Once you have successfully sent the deploy request to your project, return to your project's page on Loki.code's website.

  2. Click on "Deploy" in the sidebar.

  3. Select the "Deploy Requests" tab.

  4. Within this tab, you will now see all of your deploy requests associated with this project.

  5. Click the "Review" button.

  6. Confirm the network for deployment.

  7. Set constructor arguments if necessary.

  8. Click the "Deploy" button to deploy your contract. If you are part of an organization, you may delegate the authorization for the final deployment decision.

  9. You can now view the details and history of your deployment in the "Deployments" tab on the same page.

Last updated