Deploy a Contract
Last updated
Last updated
Loki.code offers an effortless experience for compiling and deploying your contracts through its user interface. The primary advantage of deploying with Loki.code is the ability to meticulously track your deployment history and access Loki.code's Playground, which provides an interface to interact with your contracts post-deployment.
From the Dashboard, click on "Projects" in the left sidebar, and then select the project that contains the contract you wish to deploy.
You will observe three tabs within the left sidebar; ensure that you are in the "Files" tab. On your screen, you should now see the contents of your linked GitHub repository. If you click on a Solidity file within the file tree, the contents of that file will be displayed on the right. Additionally, you should see a "Compile" button in the top right corner.
Click on the "Compile" button, and a dialog will appear, allowing you to confirm the compilation of the Solidity file. Click "Compile."
Now that your Solidity file has been successfully compiled, let us proceed to deploy it. Click on the "Deploy" tab in the left sidebar, and you will see a user interface similar to the example below.
A brief explanation on each tab:
Recent Events: A summary of the instances found in all other tabs.
Workflow Runs: Your GitHub workflow executions.
Compilations: The compilations you have made on Loki.code, from which you can initiate deployments.
Deployments: Your deployment history and details.
Deploy Requests: Incoming requests to deploy contracts, sent by yourself or team members via API call.
If you have not yet linked your Ethereum wallet to Loki.code, kindly sign into it via the "Connect Wallet" button located at the top right. This step is essential for deploying your contract.
To deploy your compiled contract, locate its card within the "Recent Events" tab or the "Compilations" tab.
Select the network to which you wish to deploy, input constructor arguments if applicable, and, if all appears satisfactory, click "Deploy" to proceed with deploying your contract.
Your wallet provider should then present a confirmation dialog to finalize the deployment. Below, you will find an example using Metamask.
To view the details of that deployment, click on the "Deployments" tab. Here, you will find a history of all your successful contract deployments. Each instance also features a "Playground" button at the bottom-right, which navigates you to that contract's Playground—a user interface where you can interact with the deployed contract.
Congratulations on successfully deploying your first contract through Loki.code!