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
  • Features
  • Solidity Compiler Basics
  1. Solidity modules

Solidity Compiler

PreviousTerminalNextAI Assistant

Last updated 12 days ago

The Solidity Compiler lets you compile your smart contracts directly in your browser without installing external tools. It’s a powerful and flexible tool tailored for Ethereum developers who want an integrated, smooth experience for compiling .sol files within a smart contract IDE.

Features

  • Smart file detection – automatically shows all .sol files in your workspace

  • Multiple compiler versions – choose the version that fits your contract requirements

  • Advanced compilation settings – set optimizer, EVM version, and more

  • Auto-compile – contracts can compile automatically when edited

  • Artifact generation – generates and saves ABI and Bytecode for your contracts

  • Warnings and error handling – shows helpful feedback for fixing your code

Solidity Compiler Basics

To compile a smart contract, first select a .sol file in the File Explorer. If you have multiple files open, make sure the one you want to compile is the active tab in the Editor.

If no file is currently active or no contract has been compiled yet, the Solidity Compiler panel will appear empty, prompting you to choose or open a contract file.

1. Select a File

Once you open a workspace, all Solidity (.sol) files will be listed in the file dropdown. Select the one you want to compile.

2. Choose a Compiler Version

Select the Solidity version your contract requires. The list includes popular stable releases.

3. Set Your Preferences

You can configure the following:

  • Auto-compile: Automatically compile the contract when it changes.

  • Advanced Settings (optional):

    • Language: Solidity or Yul

    • EVM Version: Select the Ethereum Virtual Machine version

    • Enable Optimizer: Optimize contract size and gas usage

    • Optimizer Runs: Number of optimizer iterations.

4. Compile the Contract

Click the "Compile" button to manually compile the contract. If auto-compile is enabled, it may already compile after a change.

5. Check the Results

After compiling:

  • A green tick means compilation was successful.

  • If there’s an error, it will be displayed at the bottom.