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.
Parse Imports
The compiler scans your code for import statements and identifies all required dependencies.
Resolve Dependencies
OpenZeppelin contracts are fetched from GitHub CDN with fallback to unpkg and jsDelivr.
Compile in Web Worker
The solc compiler runs in a background thread, keeping the UI responsive during compilation.
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.
PERFORMANCE
| Metric | Typical Value |
|---|---|
| Simple contract | 1-2 seconds |
| ERC-20 with extensions | 3-5 seconds |
| Complex governance | 5-10 seconds |
| Timeout limit | 60 seconds |