Q Remix Documentation
  • INTRODUCTION
    • Welcome to Q-Remix IDE's documentation
    • Navigating Q-Remix
    • Using Q-Remix Safely
    • Q-Remix Links
    • FAQ
  • CORE MODULES
    • File Explorer
    • Search in Files
    • Settings
    • Editor
    • Autocompletion & Suggestions in Editor
    • Contract Creation & Compiling
    • Deploy & Run
    • Accessing and Interacting with the Deployed Contracts
    • Terminal
  • Solidity modules
    • Solidity Compiler
    • AI Assistant
    • Q-Remix Chatbot
    • AI Code Generation
    • Multi AI Models switch
    • AI Project Generation
    • Debugger
  • Guide
    • Creating and Deploying a Contract
    • Importing and Loading Source Files in Solidity
  • Unit Testing
    • Testing by Example
  • MISCELLANEOUS
    • Q-Remix as Code Viewer
    • Code Contribution Guide
Powered by GitBook
On this page
  • Deploy & Run Interface Overview
  • 1. Environment
  • 2. Accounts
  • 3. Contracts
  • Interacting with Deployed Contracts
  • Best Practices
  1. CORE MODULES

Deploy & Run

PreviousContract Creation & CompilingNextAccessing and Interacting with the Deployed Contracts

Last updated 13 days ago

The Deployment Module in Q-Remix IDE enables developers to deploy, interact, and manage smart contracts efficiently, both locally and on-chain. This module is crucial for testing contract behavior and pushing production-ready contracts to the blockchain.

Key Functionalities:

The Deployment section allows you to:

  1. Deploy Contracts: Locally using a test VM or on blockchain networks via MetaMask

  2. Interact with Deployed Contracts: Test and invoke smart contract functions

  3. Access Previously Deployed Contracts: Use their addresses to continue interaction

You can access this module by clicking the third icon on the far-left sidebar.

Deploy & Run Interface Overview

There are three main sections in the deploy & run section

  1. Environment

  2. Account

  3. Contract

1. Environment

This section defines where your contract will be deployed. The current environments supported in Q-Remix IDE are:

a. Q-Remix VM (Local Test Environment)

  • Powered by Hardhat.

  • Simulates a local Ethereum environment.

  • Automatically generates 20 test accounts.

  • Each account has 10,000 ETH for simulation purposes.

  • Persistent across browser refreshes (contract state is preserved).

  • Resets to the original state if the browser tab is closed.

b. Injected Provider - MetaMask

  • Connects your MetaMask wallet to the IDE.

  • Supports deployment on:

    • Ethereum Mainnet

    • Various Testnets (e.g., Goerli, Sepolia)

  • Requires MetaMask extension and authentication.

  • After successful login, the selected MetaMask account appears in the Accounts tab.

Make sure MetaMask is unlocked and the correct network is selected before proceeding.

For now Q-Remix IDE supports the first two options

  1. Q-Remix VM: Uses Hardhat to generate 10 test addresses with 10,000 ETHs in each address. The user can switch the addresses anytime and test or deploy with them. The states of each of the contracts remain the same even after refreshing the entire page. This ensures that no progress made is lost during the session. However, if the session is closed all the accounts are reset to have the original 10,000 ETHs.

  2. Injected Provider MetaMask: This connects the wallet metamask with the remix IDE allowing teh contracts to be deployed either Mainnet or in the Testnet.

After giving your MetaMask password, the selected address or account will be reflected in the Account section of the Deploy & Run

2. Accounts

The Accounts section reflects the currently available accounts based on the selected environment.

In Q-Remix VM:

  • Displays 20 pre-funded test accounts

  • Users can switch between accounts using the dropdown

  • Each account retains its state until the browser tab is closed

In MetaMask (Injected Provider):

  • Displays the connected MetaMask address

  • Reflects real token balances and actual network info

You can choose any available account for deploying or interacting with contracts.

For deploying the selected contract one can use any of the accounts. In the above example one contract has been deployed using the first account.

3. Contracts

This section lists:

  • The most recently compiled contract

  • All previously compiled contracts within the session

To Deploy a Contract:

  1. Select the compiled contract from the dropdown.

  2. Review the contract and verify any constructor parameters, if applicable.

  3. Click Deploy.

Upon successful deployment:

  • The contract will appear in the Deployed Contracts list below.

  • Deployment logs (address, gas usage, etc.) are shown in the terminal.

  • Each contract instance includes:

    • Public and external function buttons for interaction

    • Options to copy the contract address

    • Collapse/expand details

Always review your code and verify constructor arguments before deploying on a live network.

One must review the code or understand the code before completely deploying it on the chain.

Once the contracts has been selected, clicking on the deploy button would deploy the contract on the said chain or network. The details of the deployment including the contract address would be shown on the terminal

Interacting with Deployed Contracts

Once deployed, contracts can be interacted with directly from the Q-Remix interface:

  • Input fields are automatically created for each public/external function

  • Clickable buttons allow calling view, pure, payable, or state-changing functions

  • All interactions and return values are shown in the terminal output

This is a crucial step in debugging and testing your smart contract logic in a real-world simulation.

Best Practices

  • Use the Q-Remix VM for early development and rapid iteration.

  • Switch to MetaMask when testing contract deployment on testnets.

  • Always compile your contract before attempting deployment.

  • Keep a copy of your contract address after deployment for reference or frontend integration.