[![Join the chat at https://gitter.im/ethereum/remix](https://badges.gitter.im/ethereum/remix.svg)](https://gitter.im/ethereum/remix?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Join the chat at https://gitter.im/ethereum/remix](https://badges.gitter.im/ethereum/remix.svg)](https://gitter.im/ethereum/remix?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
**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** 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/)** in as well as being a playground for learning and teaching Ethereum.
**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/).
To try web app, visit: [https://remix.ethereum.org](https://remix.ethereum.org).
Start developing using Remix on browser, visit: [https://remix.ethereum.org](https://remix.ethereum.org)
For desktop version, See releases: [https://github.com/ethereum/remix-desktop/releases](https://github.com/ethereum/remix-desktop/releases)
For desktop version, see releases: [https://github.com/ethereum/remix-desktop/releases](https://github.com/ethereum/remix-desktop/releases)
**Remix libraries** work as a core of native plugins of Remix IDE. Read more about libraries [here](libs/README.md)
:point_right: **Remix libraries** work as a core of native plugins of Remix IDE. Read more about libraries [here](libs/README.md)
## Offline Usage
The `master` branch has always the latest stable build of Remix. It also contains a ZIP file with the entire build. Download it to use offline.
The `gh-pages` branch of [remix-live](https://github.com/ethereum/remix-live) always has the latest stable build of Remix. It contains a ZIP file with the entire build. Download it to use offline.
Note: It contains the latest release of Solidity available at the time of the packaging. No other compiler versions are supported.
Note: It contains the latest supported version of Solidity available at the time of the packaging. Other compiler versions can be used online only.
## Setup
Install **npm** and **node.js** (see https://docs.npmjs.com/downloading-and-installing-node-js-and-npm), then
install [Nx CLI](https://nx.dev/react/cli/overview) globally to enable running **nx executable commands**.
* Install **NPM** and **Node.js**. See [Guide](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) <br/>
If you have trouble building the package, Make sure that you have the correct version of `node`, `npm` and `nvm`. Also ensure you have [Nx CLI](https://nx.dev/react/cli/overview) installed globally.
If you have trouble building the project, make sure that you have the correct version of `node`, `npm` and `nvm`. Also ensure [Nx CLI](https://nx.dev/react/cli/overview) is installed globally.
Run:
@ -115,22 +124,23 @@ In Debian based OS such as Ubuntu 14.04LTS you may need to run `apt-get install
## Unit Testing
Run the unit tests via: `nx test <project-name>`
```bash
nx test remix-analyzer
```
Run the unit tests using library name like: `nx test <project-name>`
Running unit tests via `nx test` requires at least node v10.0.0
For example, to run unit tests of `remix-analyzer`, use `nx test remix-analyzer`
## Browser Testing
To run the Selenium tests via Nightwatch:
- Build Remix IDE and serve it: `nx build remix-ide --with-deps && nx serve` # starts web server at localhost:8080
- Make sure Selenium is installed `npm run selenium-install` # don't need to repeat
- Run a selenium server `npm run selenium`
- Run all the tests `npm run nightwatch_local_firefox` or `npm run nightwatch_local_chrome`
- Or run a specific test case:
- Install Selenium for first time: `npm run selenium-install`
- Run a selenium server: `npm run selenium`
- Build & Serve Remix: `nx serve`
- Run all the end-to-end tests:
for Firefox: `npm run nightwatch_local_firefox`, or
for Google Chrome: `npm run nightwatch_local_chrome`
- Run a specific test case instead, use one of following commands:
- npm run nightwatch_local_ballot
@ -185,16 +195,14 @@ To run the Selenium tests via Nightwatch:
**NOTE:**
- **the `ballot` tests suite** requires to run `ganache-cli` locally.
- **The `ballot` tests suite** requires to run `ganache-cli` locally.
- **the `remixd` tests suite** requires to run `remixd` locally.
- **The `remixd` tests suite** requires to run `remixd` locally.
- **the `gist` tests suite** requires specifying a github access token in **.env file**.
- **The `gist` tests suite** requires specifying a github access token in **.env file**.
```
gist_token = <token>
gist_token = <token> // token should have permission to create a gist
```
**note that this token should have permission to create a gist.**
browser.assert.ok(result.value==='Remix requires an access token (which includes gists creation permission). Please go to the settings tab to create one.','Assert failed. Gist token error message not displayed.')
browser.assert.ok(result.value==='Remix requires an access token (which includes gists creation permission). Please go to the settings tab to create one.','Assert failed. Gist token error message not displayed.')
.scrollAndClick('[data-id="https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/token/ERC20/ERC20.sol"]')// click on error which point to ERC20 code
.pause(5000)
.waitForElementContainsText('#input','contract ERC20 is Context, IERC20',60000)
.getEditorValue((content)=>{
browser.assert.ok(content.indexOf('contract ERC20 is Context, IERC20')!==-1,'content does not contain "contract ERC20 is Context, IERC20"')
.waitForElementContainsText('*[data-id="testTabSolidityUnitTestsOutput"]','SyntaxError: No visibility specified',120000)
.waitForElementContainsText('*[data-id="testTabTestsExecutionStoppedError"]','The test execution has been stopped because of error(s) in your test file',120000)
.clickFunction('changeOwner - transact (not payable)',{types:'address newOwner',values:'0xd9145CCE52D386f254917e481eB44e9943F39138'})// execute the "changeOwner" function
.waitForElementContainsText('*[data-id="terminalJournal"]','previousOwner0x5B38Da6a701c568545dCfcB03FcB875f56beddC4',60000)// check that the script is logging the event
.waitForElementContainsText('*[data-id="terminalJournal"]','previousOwner',60000)// check that the script is logging the event
.waitForElementContainsText('*[data-id="terminalJournal"]','0x5B38Da6a701c568545dCfcB03FcB875f56beddC4',60000)// check that the script is logging the event
modalDialogCustom.alert('Welcome to the Remix alpha instance. Please use it to try out latest features. But use preferably https://remix.ethereum.org for any production work.')
toolTip('You are using an `https` connection. Please switch to `http` if you are using Remix against an `http Web3 provider` or allow Mixed Content in your browser.')
modalDialogCustom.alert('Welcome to the Remix alpha instance. Please use it to try out latest features. But use preferably https://remix.ethereum.org for any production work.')
toolTip('You are using an `https` connection. Please switch to `http` if you are using Remix against an `http Web3 provider` or allow Mixed Content in your browser.')
text:"browser/Untitled1.sol: Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier:<SPDX-License>" to each source file. Use "SPDX-License-Identifier:UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.↵"
text:"browser/Untitled1.sol: Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier:<SPDX-License>" to each source file. Use "SPDX-License-Identifier:UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.↵"
modalDialogCustom.alert('Workspaces have not been created on your system. Please use "Migrate old filesystem to workspace" on the home page to transfer your files or start by creating a new workspace in the File Explorers.')