Customize Remix with URL Parameters
There are many ways to customize Remix IDE by using url parameters. Here are some options:
- Activate or deactivate a list of plugins to be activated - and specify which plugin gains the “focus”. SEE MORE
- Send commands to a plugin - once the plugin loads. SEE MORE
- Load a GIST, a file via a url or a base64 encoded string into Remix’s Editor.
- Specify the theme (Dark or Light). SEE MORE
- Specify which panels should be minimized - useful when embedding Remix in your site. SEE MORE
- Select the version of the Solidity compiler, enable/disable the optimizer, turn on auto compile or choose the language for the Solidity compiler. SEE MORE
- Load verified contracts from Etherscan using contract address SEE MORE
Activating a list of plugins
The following example contains the url parameter activate followed by a comma separated list of plugins.
The last plugin in the list will gain the focus.
When you use the activate list, all other plugins that a user had loaded will be deactivated. This does not apply to the file explorer, the plugin manager, and the settings modules because these are never deactivated.
Note: a plugin is called by its name as specified in its profile. There are 3 types of plugins:
- Native Mandatory Plugins that are always loaded (so you don’t need to activate them using the url parameter activate). These include: fileManager, settings, manager (the plugin manager), and udapp (deploy & run).
- Native Optional Plugins that are loaded on demand: debugger, hardhat-provider, solidity, solidityStaticAnalysis, solidityUnitTesting, and vyper
- External Plugins to get these plugins’ names, please go to https://github.com/ethereum/remix-plugins-directory/tree/master/plugins.
Deactiving a list of plugins
Minimizing Remix panels
The following URL will close everything except the main panel & the icon panel (the side and terminal are minimized).
To minimize just the side panel, use this URL:
To minimize just the terminal, use this URL:
Specifying a theme
To link to Remix with a theme specified use this url:
A URL example combining multiple parameters
To link to Remix with the a list of plugins activated and with:
- the Learneth gaining the side panel’s focus (because it is the last in the list)
- the Light theme loaded
- the terminal minimized
- optimize off
use this url:
Pass commands to a plugin’s API via a url param
The URL parameter to issue a command is
call. Following the
call is a // (double slash) separated list of arguments.
An example using call
The URL below uses
call. It activates a number of plugins and calls the File Explorers to tell it to load one of the default Remix files:
Load a specific tutorial in the LearnEth plugin:
Make calls to a number of different plugins’ APIs
calls parameter to call a series of plugins. Use
/// to separate the calls.
For example, this command, after activating a list of plugins, calls the LearnEth plugin’s API and then calls the File Explorer’s API.
Load contracts from Etherscan via address
address parameter takes an address, loads all the verified contracts found for the address on different Ethereum networks and saves them into the
etherscan-code-sample workspace of the File Explorer:
Load a Solidity contract from Github
With a github url of a Solidity contract like this one:
Then delete the github part and type in remix.ethereum.org in its place, like this:
Remix will fetch the Solidity file and open it up in the File Explorer in a Workspace named