CORE CONCEPTS

COMPILATION

How the browser-based Solidity compiler works.

HOW IT WORKS

MantleDevKit compiles Solidity contracts entirely in your browser using a Web Worker running the official solc compiler (v0.8.20). No code is sent to any server.

1

Parse Imports

The compiler scans your code for import statements and identifies all required dependencies.

2

Resolve Dependencies

OpenZeppelin contracts are fetched from GitHub CDN with fallback to unpkg and jsDelivr.

3

Compile in Web Worker

The solc compiler runs in a background thread, keeping the UI responsive during compilation.

4

Generate Artifacts

The compiler outputs bytecode, ABI, and any warnings or errors.

OUTPUT ARTIFACTS

Bytecode

The compiled EVM bytecode that gets deployed to the blockchain.

6080604052600436106100...

ABI (Application Binary Interface)

JSON description of all functions, events, and errors in your contract.

[
  {
    "type": "function",
    "name": "transfer",
    "inputs": [...],
    "outputs": [...]
  }
]

HANDLING ERRORS

Compilation errors and warnings are displayed in the console panel at the bottom of the Studio.

[ERR]ParserError: Expected identifier but got ';'
[WAR]Warning: Unused local variable
[SUC]Compiled: MyToken

PERFORMANCE

MetricTypical Value
Simple contract1-2 seconds
ERC-20 with extensions3-5 seconds
Complex governance5-10 seconds
Timeout limit60 seconds

NEXT STEPS