Deploy & Run
Last updated
Last updated
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.
The Deployment section allows you to:
Deploy Contracts: Locally using a test VM or on blockchain networks via MetaMask
Interact with Deployed Contracts: Test and invoke smart contract functions
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.
There are three main sections in the deploy & run section
Environment
Account
Contract
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
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.
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
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.
This section lists:
The most recently compiled contract
All previously compiled contracts within the session
To Deploy a Contract:
Select the compiled contract from the dropdown.
Review the contract and verify any constructor parameters, if applicable.
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
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.
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.