Loading Files For Editing - Remix Tutorial 15

EatTheBlocksAbout 3 min readMay 27, 2025Watch original
THE SUMMARYAI-generated

Remix: Different Ways to Open Files

Key Concepts: Remix IDE, GitHub Cloning, HTTPS Import, Gist Import, Verified Contract Import, Cookbook.dev Integration, Workspace, Plugin, Remixd.

1. Cloning a GitHub Repository

  • Process:
    1. Go to the File Explorer in Remix.
    2. Click the hamburger menu.
    3. Click the "Clone" button.
    4. Enter the URL of the GitHub repository.
    5. Click "Okay."
  • Outcome: The entire repository is opened in a new workspace within Remix.

2. Importing a GitHub Folder via URL Parameter

  • Process: Add the following parameter to the Remix URL: ?github=<GitHub folder URL>.
  • Outcome: A new, temporary workspace is created containing the contents of the specified GitHub folder.

3. Importing Files from HTTPS Websites

  • Requirement: The website must use HTTPS.
  • Process:
    1. Find the raw file URL on the website (e.g., on GitHub, click "Raw").
    2. In Remix, click the "Import file with https" icon.
    3. Paste the URL.
  • Example: Importing the ERC20 contract file from OpenZeppelin's GitHub page.
  • Alternative Method: Add the following parameter to the Remix URL: ?url=<HTTPS file URL>.

4. Opening a Gist

  • Process:
    1. In the Home tab, click the button for opening a Gist.
    2. Enter the Gist ID or the URL of the Gist.
  • Outcome: The file opens in a new workspace.

5. Opening Verified Contracts

  • Context: Useful for interacting with deployed smart contracts on public blockchains.
  • Process:
    1. Go to the Plugin Manager in Remix.
    2. Search for and activate the "Contract Verification" plugin.
    3. Go to the "Contract Verification" plugin tab.
    4. Go to the "Lookup" menu.
    5. Select the chain of the contract (e.g., Ethereum Mainnet).
    6. Input the contract address.
    7. Click "Lookup."
    8. Click the button to open the source code in Remix.
  • Note: For Etherscan, API keys need to be configured in the settings tab of the Contract Verification plugin.
  • Benefit: Allows you to view and interact with the source code of verified contracts directly within Remix.

6. Opening Contracts from Cookbook.dev

  • Cookbook.dev: A collection of popular smart contracts, DeFi protocols, and libraries.
  • Process:
    1. Go to the Plugin Manager in Remix.
    2. Search for and activate the "Cookbook" plugin.
    3. Go to the "Cookbook" plugin tab.
    4. Search for a smart contract.
    5. Click on the desired contract.
  • Outcome: A new tab opens with the source code of the selected contract.

7. Other Methods (Referenced)

  • Workspace Templates: Pre-configured workspaces for specific purposes (explained in the "Intro to Remix" video).
  • Remixd: Allows opening files and folders stored on your computer's hard drive (explained in the "Remixd" video).

Conclusion

Remix provides multiple flexible ways to access and work with smart contract code, whether it's from GitHub, HTTPS websites, Gists, verified contracts on blockchains, or specialized repositories like Cookbook.dev. These methods streamline the development and interaction with smart contracts within the Remix IDE.

AI summaries can miss context or contain errors. Check important details against the original video.

Go a little deeper.

Have a question about this video? Load its transcript to open the video chat.