@ -12,6 +12,6 @@ When you add a code in any library, please ensure you add related tests. You can
Please conform to [standard](https://standardjs.com/) for code styles.
Please conform to [standard](https://standardjs.com/) for code styles.
## Submitting Pull Request
## Submitting Pull Request
Please follow Github's standard model of making changes & submitting pull request which is very well explained [here](https://guides.github.com/activities/forking/). Make sure your code works fine locally before submitting a pull request.
Please follow GitHub's standard model of making changes & submitting pull request which is very well explained [here](https://guides.github.com/activities/forking/). Make sure your code works fine locally before submitting a pull request.
**Remix Project** is a rich toolset including Remix IDE, a comprehensive smart contract development tool. The Remix Project also includes Remix Plugin Engine and Remix Libraries which are low-level tools for wider use.
**Remix Project** is a platform for development tools that use a plugin architecture. It encompasses sub-projects including Remix Plugin Engine, Remix Libraries, and of course Remix IDE.
## Remix IDE
**Remix IDE** is used for the entire journey of contract development by users of any knowledge level. It fosters a fast development cycle and has a rich set of plugins with intuitive GUIs. The IDE comes in 2 flavors and a VSCode extension:
**Remix IDE** is an open source web and desktop application. It fosters a fast development cycle and has a rich set of plugins with intuitive GUIs. Remix is used for the **entire journey of contract development with [Solidity language](https://soliditylang.org/)** as well as a playground for learning and teaching [Ethereum](https://ethereum.org/).
Remix libraries are essential for Remix IDE's native plugins. Read more about libraries [here](libs/README.md)
## Offline Usage
## Offline Usage
@ -30,7 +35,7 @@ Note: It contains the latest supported version of Solidity available at the time
## Setup
## Setup
* Install **NPM** and **Node.js**. See [Guide](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) <br/>
* Install **Yarn** and **Node.js**. See [Guide for NodeJs](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) and [Yarn install](https://classic.yarnpkg.com/lang/en/docs/install)<br/>
*Supported versions:*
*Supported versions:*
```bash
```bash
"engines": {
"engines": {
@ -40,7 +45,7 @@ Note: It contains the latest supported version of Solidity available at the time
@ -63,12 +68,12 @@ Go to your `text editor` and start developing. Browser will automatically refres
## Production Build
## Production Build
To generate react production builds for remix-project.
To generate react production builds for remix-project.
```bash
```bash
npm run build:production
yarn run build:production
```
```
Build can be found in `remix-project/dist/apps/remix-ide` directory.
Build can be found in `remix-project/dist/apps/remix-ide` directory.
```bash
```bash
npm run serve:production
yarn run serve:production
```
```
Production build will be served by default to `http://localhost:8080/` or `http://127.0.0.1:8080/`
Production build will be served by default to `http://localhost:8080/` or `http://127.0.0.1:8080/`
@ -133,78 +138,138 @@ For example, to run unit tests of `remix-analyzer`, use `nx test remix-analyzer`
To run the Selenium tests via Nightwatch:
To run the Selenium tests via Nightwatch:
- Install Selenium for first time: `npm run selenium-install`
- Install Selenium for first time: `yarn run selenium-install`
- Run a selenium server: `npm run selenium`
- Run a selenium server: `yarn run selenium`
- Build & Serve Remix: `nx serve`
- Build & Serve Remix: `nx serve`
- Run all the end-to-end tests:
- Run all the end-to-end tests:
for Firefox: `npm run nightwatch_local_firefox`, or
for Firefox: `yarn run nightwatch_local_firefox`, or
for Google Chrome: `npm run nightwatch_local_chrome`
for Google Chrome: `yarn run nightwatch_local_chrome`
- Run a specific test case instead, use one of following commands:
- Run a specific test case instead, use a command like this:
- npm run nightwatch_local_ballot
- yarn run nightwatch_local_ballot
- npm run nightwatch_local_usingWorker
- npm run nightwatch_local_libraryDeployment
- npm run nightwatch_local_solidityImport
- npm run nightwatch_local_recorder
The package.json file contains a list of all the tests you can run.
- npm run nightwatch_local_transactionExecution
**NOTE:**
- npm run nightwatch_local_staticAnalysis
- npm run nightwatch_local_signingMessage
- npm run nightwatch_local_specialFunctions
- **The `ballot` tests suite** requires to run `ganache-cli` locally.
- npm run nightwatch_local_solidityUnitTests
- **The `remixd` tests suite** requires to run `remixd` locally.
- npm run nightwatch_local_remixd # remixd needs to be run
- **The `gist` tests suite** requires specifying a github access token in **.env file**.
```
gist_token = <token> // token should have permission to create a gist
```
- npm run nightwatch_local_terminal
### Using 'select_test' for locally running specific tests
- npm run nightwatch_local_gist
There is a script to allow selecting the browser and a specific test to run:
- npm run nightwatch_local_workspace
```
yarn run select_test
```
- npm run nightwatch_local_defaultLayout
You need to have
- npm run nightwatch_local_pluginManager
- selenium running
- npm run nightwatch_local_publishContract
- the IDE running
- npm run nightwatch_local_generalSettings
- optionally have remixd or ganache running
- npm run nightwatch_local_fileExplorer
### Splitting tests with groups
- npm run nightwatch_local_debugger
Groups can be used to group tests in a test file together. The advantage is you can avoid running long test files when you want to focus on a specific set of tests within a test file.x
- npm run nightwatch_local_editor
These groups only apply to the test file, not across all test files. So for example group1 in the ballot is not related to group1 in another test file.
- npm run nightwatch_local_compiler
Running a group only runs the tests marked as belonging to the group + all the tests in the test file that do not have a group tag. This way you can have tests that run for all groups, for example to peform common actions.
- npm run nightwatch_local_txListener
There is no need to number the groups in a certain order. The number of the group is arbitrary.
- npm run nightwatch_local_fileManager
A test can have multiple group tags, this means that this test will run in different groups.
- npm run nightwatch_local_runAndDeploy
You should write your tests so they can be executed in groups and not depend on other groups.
**NOTE:**
- **The `ballot` tests suite** requires to run `ganache-cli` locally.
To do this you need to:
- **The `remixd` tests suite** requires to run `remixd` locally.
- Add a group to tag to a test, they are formatted as #group followed by a number: so it becomes #group1, #group220, #group4. Any number will do. You don't have to do it in specific order.
- **The `gist` tests suite** requires specifying a github access token in **.env file**.
```
```
gist_token = <token> // token should have permission to create a gist
'Should generate test file #group1': function (browser: NightwatchBrowser) {
The icon marked **C.** above. Publishes all files from the browser folder to a gist. Only file in the root of **browser** will be published. Files in subfolders will not be publish to the Gist.
The icon marked **C.** above. Publishes all files from the browser folder to a gist. Only file in the root of **browser** will be published. Files in subfolders will not be publish to the Gist.
Gist API has changed in 2018 and **requires** users to be authenticated to be able to publish a gist.
Gist API has changed in 2018 and **requires** users to be authenticated to be able to publish a gist.
Click [this link](https://github.com/settings/tokens) to Github tokens setup and select Generate new token. Then check the **Create gists** checkbox and generate a new token.
Click [this link](https://github.com/settings/tokens) to GitHub tokens setup and select Generate new token. Then check the **Create gists** checkbox and generate a new token.
Take the token and paste it in Remix's **Settings** module in the **Github Access Token** section. And then click Save. Now you should be able to use the feature.
Take the token and paste it in Remix's **Settings** module in the **GitHub Access Token** section. And then click Save. Now you should be able to use the feature.
@ -5,6 +5,10 @@ So if you've found the documentation to Remix but don't know where to find Remix
- An online version is available at [https://remix.ethereum.org](https://remix.ethereum.org). This version is stable and is updated at almost every release.
- An online version is available at [https://remix.ethereum.org](https://remix.ethereum.org). This version is stable and is updated at almost every release.
- An alpha online version is available at [https://remix-alpha.ethereum.org](https://remix-alpha.ethereum.org). This is not a stable version.
- An alpha online version is available at [https://remix-alpha.ethereum.org](https://remix-alpha.ethereum.org). This is not a stable version.
- npm `remix-ide` package `npm install remix-ide -g`. `remix-ide` create a new instance of `Remix IDE` available at [http://127.0.0.1:8080](http://127.0.0.1:8080) and make the current folder available to Remix IDE by automatically starting `remixd`.
- npm `remix-ide` package `yarn global add remix-ide`. `remix-ide` create a new instance of `Remix IDE` available at [http://127.0.0.1:8080](http://127.0.0.1:8080) and make the current folder available to Remix IDE by automatically starting `remixd`.
see [Connection to `remixd`](https://remix-ide.readthedocs.io/en/latest/remixd.html) for more information about sharing local file with `Remix IDE`.
see [Connection to `remixd`](https://remix-ide.readthedocs.io/en/latest/remixd.html) for more information about sharing local file with `Remix IDE`.
- Github release: [https://github.com/ethereum/remix-ide/releases](https://github.com/ethereum/remix-ide/releases) . The source code is packaged at every release but still need to be built using `npm run build`.
- GitHub release: [https://github.com/ethereum/remix-ide/releases](https://github.com/ethereum/remix-ide/releases) . The source code is packaged at every release but still need to be built using `npm run build`.
- GitHub release: [https://github.com/ethereum/remix-ide/releases](https://github.com/ethereum/remix-ide/releases) . The source code is packaged at every release but still need to be built using `yarn run build`.
`remixd` can be globally installed using the following command:
`remixd` can be globally installed using the following command:
`npm install -g remixd`
`yarn global add @remix-project/remixd`
Or just install it in the directory of your choice by removing the -g flag:
`npm install remixd`
Then from the terminal, the command `remixd -s <absolute-path-to-the-shared-folder> --remix-ide <your-remix-ide-URL-instance>` will start `remixd` and will share the given folder with remix-ide.
Then from the terminal, the command `remixd -s <absolute-path-to-the-shared-folder> --remix-ide <your-remix-ide-URL-instance>` will start `remixd` and will share the given folder with remix-ide.
Theremixdcommandwithoutoptionsusestheterminal'scurrentdirectoryastheshareddirectoryandthesharedRemixdomaincanonlybehttps://remix.ethereum.org, https://remix-alpha.ethereum.org, or https://remix-beta.ethereum.org
<buttonclassName="btn mx-1 btn-secondary"onClick={()=>showFullMessage('Https','http/https raw content',['https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/token/ERC20/ERC20.sol'])}>https</button>
<buttonclassName="btn mx-1 btn-secondary"onClick={()=>showFullMessage('Https','http/https raw content',['https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/token/ERC20/ERC20.sol'])}>https</button>
modal('Publish To Storage','This contract may be abstract, it may not implement an abstract parent\'s methods completely or it may not invoke an inherited contract\'s constructor correctly.')
modal('Publish To Storage','This contract may be abstract, it may not implement an abstract parent\'s methods completely or it may not invoke an inherited contract\'s constructor correctly.')
exportconstwarnText='Be sure the endpoint is opened before enabling it. \nThis mode allows a user to provide a passphrase in the Remix interface without having to unlock the account. Although this is very convenient, you should completely trust the backend you are connected to (Geth, Parity, ...). Remix never persists any passphrase'.split('\n').map(s=>s.trim()).join(' ')
exportconstwarnText='Be sure the endpoint is opened before enabling it. \nThis mode allows a user to provide a passphrase in the Remix interface without having to unlock the account. Although this is very convenient, you should completely trust the backend you are connected to (Geth, Parity, ...). Remix never persists any passphrase'.split('\n').map(s=>s.trim()).join(' ')
exportconstgitAccessTokenText='Manage the access token used to publish to Gist and retrieve Github contents.'
exportconstgitAccessTokenText='Manage the access token used to publish to Gist and retrieve GitHub contents.'
exportconstgitAccessTokenText2='Go to github token page (link below) to create a new token and save it in Remix. Make sure this token has only \'create gist\' permission.'
exportconstgitAccessTokenText2='Go to github token page (link below) to create a new token and save it in Remix. Make sure this token has only \'create gist\' permission.'
@ -17,6 +17,7 @@ export const enablePersonalModeText = ' Enable Personal Mode for web3 provider.
exportconstmatomoAnalytics='Enable Matomo Analytics. We do not collect personally identifiable information (PII). The info is used to improve the site’s UX & UI. See more about '
exportconstmatomoAnalytics='Enable Matomo Analytics. We do not collect personally identifiable information (PII). The info is used to improve the site’s UX & UI. See more about '
<selectonChange={(e)=>handleLanguageChange(e.target.value)}value={state.language}className="custom-select"id="compilierLanguageSelector"title="Available since v0.5.7">
<selectonChange={(e)=>handleLanguageChange(e.target.value)}disabled={state.useFileConfiguration}value={state.language}className="custom-select"id="compilierLanguageSelector"title="Available since v0.5.7">