ethereum / remix-project

Remix is a browser-based compiler and IDE that enables users to build Ethereum contracts with Solidity language and to debug transactions.
https://remix-ide.readthedocs.io
MIT License
2.41k stars 916 forks source link

Config file for remix workspace #674

Open Aniket-Engg opened 3 years ago

Aniket-Engg commented 3 years ago

A config file, may be named as remix-config.js can be used for all type of configurations we required from user on Remix IDE platform. It will be dedicated to a certain remix workspace only.

It can have plugin based configuration like version, evmVersion, optimization and auto compile for Solidity Compiler plugin. It also can have settings to enable/disable metadata generation for compiled contracts. Each time a workspace will be loaded, configuration from this config file will be updated for plugins and other places.

We need to figure out:

Aniket-Engg commented 3 years ago

First Draft: Name: remix.config.js Location: Root of workspace/project Types:

  1. General/Global configuration like theme, file structure etc.
  2. Native plugins configuration
  3. External plugins configuration

Priorities: URL Parama > remix config > platform settings tab

Aniket-Engg commented 3 years ago

First Draft Extensive Example:

module.exports = {
    solidityCompiler: {
          type: ‘release/nightly/custom’,
      defaultVersion: ‘soljson-v0.8.2+commit.661d1103.js’,
      url: https://solidity-blog.s3.eu-central-1.amazonaws.com/data/08preview/soljson.js //applicable if type is custom
      language: ‘solidity/yul’,
      evmVersion: ‘istanbul’,
      autoCompile: false,
      enableOptimization: true,
      runs: ‘300’,
      hideWarnings: true,
      generateMetadata: false
      },
      uDapp: {
          environment: ‘JavaScript VM’,
          account: ‘0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2’,
          gasLimit: ‘300000’,
          value: ‘10’,
          valueUnit: ‘wei’,
          lowLevelInteraction: false,
          methodInteractionLayout: ‘expanded/collapsed’, //these are opened now on clicking on carrot
          personalMode: ‘on’
      },
      general: {
      textWrap: true,
      enableAnalytics: true,
          onload: {
            protocol: ‘https’, (will redirect as per this setting)
        theme: ‘dark’,
                defaultWorkspace: 'default_workspace',
        openInEditor: 'homeTab/lastOpenedFile/<some file path>', //first two are keywords the last one is path of file
        plugins: [‘solidityCompiler’, ‘uDapp’],
        activePlugin: ‘solidityCompiler’,
        terminal: ‘collapse’,
        showSocialIcons: false
          }
       }
}
ioedeveloper commented 3 years ago

First Draft: Name: remix.config.js Location: Root of workspace/project Types:

1. General/Global configuration like theme, file structure etc.

2. Native plugins configuration

3. External plugins configuration

Priorities: URL Parama > remix config > platform settings tab

I think we should have the config file type as .json. It will be easier to parse the content in JSON format.

LianaHus commented 2 years ago

Editor config can be here too. for ex. number of spaces in tabs, font size etc