Remix IDE Cheatsheet
Deploy and Run
Use this Remix IDE reference while you build software engineering projects, review code for technical interview prep, or polish examples for a software engineer resume.
Opening Deploy & Run
Click the rocket icon in the left icon bar (there is no keyboard shortcut for this panel).
Panel Controls at a Glance
| Control | Purpose |
|---|---|
| Environment | Select execution environment (VM, Injected, WalletConnect, etc.) |
| Account | Active signer address + balance |
| Gas Limit | Max gas per transaction (default 3 000 000) |
| Value | ETH/WEI to send with a payable constructor or call |
| Contract | Dropdown of compiled contracts — pick what you want to deploy |
| Deploy button | Sends the constructor transaction |
| At Address | Load a contract at an existing address using its ABI |
Deploying a Contract
- Compile first (green checkmark in compiler).
- Open Deploy & Run.
- Select the correct contract from the Contract dropdown.
- Fill constructor arguments (fields appear below Deploy if the constructor takes params).
- Set Value if the constructor is
payable. - Click Deploy — transaction appears in the Terminal.
// Constructor with args — Remix generates input fields automatically constructor(string memory _name, uint256 _supply) { name = _name; supply = _supply; }
Deployed Contracts Panel
After deployment a card appears under Deployed Contracts:
- Click the chevron to expand and see all public/external functions + state variables.
- Orange buttons = functions that write state (send transactions, cost gas).
- Blue buttons =
view/purefunctions (free calls, no gas in VM). - Red buttons =
payablefunctions (you can attach ETH).
Sending ETH to a payable Function
- Set Value field (e.g.,
1+ unit =ether). - Click the red payable function button.
- The contract's balance increases in the Terminal log.
Loading an Existing Contract
If the contract is already deployed (e.g., on a testnet):
- Compile the matching source file so Remix has the ABI.
- Paste the deployed address into At Address.
- Click At Address — the contract panel appears without sending a transaction.
Constructor Arguments Tips
address— paste as0x...(42 chars).bytes32— use hex:0x48656c6c6f000...or the Remix bytes32 helper.uint256[]— enter as[1,2,3](no spaces around brackets).string— wrap in double quotes:"Hello".- Tuples/structs — enter as a JSON array:
["Alice", 30].
Transaction Log in Terminal
Each deploy or call prints:
[vm] from: 0xAb8..., to: Hello.(constructor), value: 0 wei, data: 0x..., logs: 0, hash: 0x... status: 0x1 Transaction mined and execution succeed gas used: 134218
Click Debug next to any transaction to open the Debugger.
Saving & Re-loading Deployed Instances
Deployed contract state lives in the VM and is lost on page refresh. To persist:
- Pin the instance — the pin icon on a deployed-contract card saves its address + ABI to the workspace (
.deploys/pinned-contracts/), and pinned instances reappear when you return to the same environment. - Save the VM state — the save control next to the environment selector writes the whole VM (contracts, balances, storage) to
.states/in the workspace, and saved states are reloadable from the environment dropdown. - On live networks, keep the address and reload via At Address — the contract itself never disappears from the chain.
Common Deployment Errors
| Error | Cause | Fix |
|---|---|---|
Gas estimation errored | Constructor reverts | Check constructor logic / args |
Nonce too low | Account nonce mismatch with injected wallet | Reset account in MetaMask (Advanced → Reset Account) |
Insufficient funds | Account has no ETH | Fund the account or switch environment |
Contract not selected | Dropdown shows wrong artifact | Recompile the file you want |
Invalid address | Malformed address in At Address | Verify the address is 42 hex chars |