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

ControlPurpose
EnvironmentSelect execution environment (VM, Injected, WalletConnect, etc.)
AccountActive signer address + balance
Gas LimitMax gas per transaction (default 3 000 000)
ValueETH/WEI to send with a payable constructor or call
ContractDropdown of compiled contracts — pick what you want to deploy
Deploy buttonSends the constructor transaction
At AddressLoad a contract at an existing address using its ABI

Deploying a Contract

  1. Compile first (green checkmark in compiler).
  2. Open Deploy & Run.
  3. Select the correct contract from the Contract dropdown.
  4. Fill constructor arguments (fields appear below Deploy if the constructor takes params).
  5. Set Value if the constructor is payable.
  6. 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/pure functions (free calls, no gas in VM).
  • Red buttons = payable functions (you can attach ETH).

Sending ETH to a payable Function

  1. Set Value field (e.g., 1 + unit = ether).
  2. Click the red payable function button.
  3. The contract's balance increases in the Terminal log.

Loading an Existing Contract

If the contract is already deployed (e.g., on a testnet):

  1. Compile the matching source file so Remix has the ABI.
  2. Paste the deployed address into At Address.
  3. Click At Address — the contract panel appears without sending a transaction.

Constructor Arguments Tips

  • address — paste as 0x... (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

ErrorCauseFix
Gas estimation erroredConstructor revertsCheck constructor logic / args
Nonce too lowAccount nonce mismatch with injected walletReset account in MetaMask (Advanced → Reset Account)
Insufficient fundsAccount has no ETHFund the account or switch environment
Contract not selectedDropdown shows wrong artifactRecompile the file you want
Invalid addressMalformed address in At AddressVerify the address is 42 hex chars