Merge branch 'master' of https://github.com/ethereum/remix-project into editorcontext

editorcontextDummy
filip mertens 2 years ago
commit 1509c87519
  1. 174
      apps/remix-ide/README.md
  2. 45
      apps/remix-ide/embark/README.md
  3. 66
      apps/remix-ide/embark/index.js
  4. 16
      apps/remix-ide/embark/package.json
  5. 2
      libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx
  6. 2
      libs/remix-ui/terminal/src/lib/reducers/terminalReducer.ts
  7. 48113
      package-lock.json

@ -1,174 +0,0 @@
[![CircleCI](https://circleci.com/gh/ethereum/remix-project.svg?style=svg)](https://circleci.com/gh/ethereum/remix-project)
# Remix
Remix is a browser-based compiler and IDE that enables users to build **Ethereum contracts with Solidity language** and to debug transactions.
To try it out, visit [https://remix.ethereum.org](https://remix.ethereum.org).
https://github.com/ethereum/remix-ide/releases also gives others ways to use Remix locally. Please check it out.
Remix consists of many modules and in this repository you will find the Remix IDE (aka. Browser-Solidity).
![Remix screenshot](https://github.com/ethereum/remix-ide/raw/master/remix_screenshot.png)
## Offline Usage
The `gh-pages` branch has always the latest stable build of Remix. It also 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.
## INSTALLATION:
Install **npm** and **node.js** (see https://docs.npmjs.com/getting-started/installing-node), then do:
Remix-ide has been published as an npm module:
```bash
yarn global add remix-ide
remix-ide
```
Or if you want to clone the github repository (`wget` need to be installed first) :
```bash
git clone https://github.com/ethereum/remix-ide.git
git clone https://github.com/ethereum/remix.git # only if you plan to link remix and remix-ide repositories and develop on it.
cd remix # only if you plan to link remix and remix-ide repositories and develop on it.
yarn install # only if you plan to link remix and remix-ide repositories and develop on it.
yarn run bootstrap # only if you plan to link remix and remix-ide repositories and develop on it.
cd remix-ide
yarn install
yarn run setupremix # only if you plan to link remix and remix-ide repositories and develop on it.
npm start
```
## Docker:
Prerequisites:
* Docker (https://docs.docker.com/desktop/)
* Docker-compose (https://docs.docker.com/compose/install/)
### Run with docker
If you want to run latest changes that are merged into master branch then run:
```
docker pull remixproject/remix-ide:latest
docker run -p 8080:80 remixproject/remix-ide:latest
```
If you want to run latest remix-live release run.
```
docker pull remixproject/remix-ide:remix_live
docker run -p 8080:80 remixproject/remix-ide:remix_live
```
### Run with docker-compose:
To run locally without building you only need docker-compose.yaml file and you can run:
```
docker-compose pull
docker-compose up -d
```
Then go to http://localhost:8080 and you can use you Remix instance.
To fetch docker-compose file without cloning this repo run:
```
curl https://raw.githubusercontent.com/ethereum/remix-ide/master/docker-compose.yaml > docker-compose.yaml
```
## DEVELOPING:
Run `npm start` and open `http://127.0.0.1:8080` in your browser.
Then open your `text editor` and start developing.
The browser will automatically refresh when files are saved.
Most of the the time working with other modules (like debugger etc.) hosted in the [Remix repository](https://github.com/ethereum/remix) is not needed.
### Troubleshooting building
Some things to consider if you have trouble building the package:
- Make sure that you have the correct version of `node`, `npm` and `nvm`. You can find the version that is tested on Travis CI by looking at the log in the [build results](https://travis-ci.org/ethereum/remix-ide).
Run:
```bash
node --version
npm --version
nvm --version
```
- In Debian based OS such as Ubuntu 14.04LTS you may need to run `apt-get install build-essential`. After installing `build-essential` run `npm rebuild`.
## Unit Testing
Register new unit test files in `test/index.js`.
The tests are written using [tape](https://www.npmjs.com/package/tape).
Run the unit tests via: `yarn test`
For local headless browser tests run `yarn run test-browser`
(requires Selenium to be installed - can be done with `yarn run selenium-install`)
Running unit tests via `yarn test` requires at least node v7.0.0
## Browser Testing
To run the Selenium tests via Nightwatch:
- Build Remix IDE and serve it: `yarn run build && yarn run serve` # starts web server at localhost:8080
- Make sure Selenium is installed `yarn run selenium-install` # don't need to repeat
- Run a selenium server `yarn run selenium`
- Run all the tests `yarn run nightwatch_local_firefox` or `yarn run nightwatch_local_chrome`
- Or run a specific test case:
- yarn run nightwatch_local_ballot
- yarn run nightwatch_local_libraryDeployment
- yarn run nightwatch_local_solidityImport
- yarn run nightwatch_local_recorder
- yarn run nightwatch_local_transactionExecution
- yarn run nightwatch_local_staticAnalysis
- yarn run nightwatch_local_signingMessage
- yarn run nightwatch_local_console
- yarn run nightwatch_local_remixd # remixd needs to be run
**NOTE:**
- **the `ballot` tests suite** requires to run `ganache-cli` locally.
- **the `remixd` tests suite** requires to run `remixd` locally.
- **the `gist` tests suite** requires specifying a github access token in **.env file**.
```
gist_token = <token>
```
**note that this token should have permission to create a gist.**
## Usage as a Chrome Extension
If you would like to use this as a Chrome extension, you must either build it first or pull from the `gh-pages` branch, both described above.
After that, follow these steps:
- Browse to `chrome://extensions/`
- Make sure 'Developer mode' has been checked
- Click 'Load unpacked extension...' to pop up a file-selection dialog
- Select your `remix-ide` folder
## Documentation
To see details about how to use Remix for developing and/or debugging Solidity contracts, please see [our documentation page](https://remix-ide.readthedocs.io/en/latest/)

@ -1,45 +0,0 @@
# embark-remix
An Embark plugin that allows Remix to connect to a local DApp via [`remixd`](https://github.com/ethereum/remixd). This plugin serves a local copy of Remix IDE from the machine running the plugin or alternatively allows connection from the public [Remix IDE](https://remix.ethereum.org). The URL of the Remix IDE can be specified in the Embark plugin options, specified below.
## Options
To configure options for the `embark-remix` plugin, modify the `plugins` property of `embark.json` in the DApp.
### How to use default options
To pass no options to the plugin and use the defaults, simply use an empty object:
```
"plugins": {
"embark-remix": {}
}
```
This will provide the default options to the plugin (shown below).
### Available options
The available options for this plugin are below. Default options are shown below. This is equivalent to passing an empty object `{}`.
```
"plugins": {
"embark-remix": {
"readOnly": false,
"remixIde": {
"protocol": "http",
"host": "localhost",
"port": 8088
}
}
}
```
`readOnly` does not let Remix update the contents on the local filesystem.
- Default: `false`
`remixIde` specifies the URL that the Remix IDE will be served from. If this is a `localhost` URL, the plugin creates a server that is responsible for listening on this URL.
- Default: `(see above)`
If it is preferred to connect to the public Remix IDE at https://remix.ethereum.org, set the `remixIde` config to:
```
"remixIde": {
"protocol": "https",
"host": "remix.ethereum.org",
"port": false
}
```

@ -1,66 +0,0 @@
const httpServer = require('http-server')
const remixd = require('remixd')
const path = require('path')
const merge = require('merge')
const colors = require('colors')
const DEFAULT_OPTIONS = {
protocol: 'http',
host: 'localhost',
port: '8088'
}
module.exports = (embark) => {
// plugin options
const readOnly = embark.pluginConfig.readOnly || false
const { protocol, host, port } = merge.recursive(DEFAULT_OPTIONS, embark.pluginConfig.remixIde)
// globals
const remixIdeUrl = `${protocol}://${host}` + `${port ? `:${port}` : ''}`
const sharedFolder = path.join(__dirname, '../../')
const sharedFolderService = remixd.services.sharedFolder
let server
// setup HTTP server
if (['localhost', '127.0.0.1', '0.0.0.0'].includes(host)) {
server = httpServer.createServer({
root: path.join(__dirname, '../../node_modules/remix-ide')
})
server.listen(port, '127.0.0.1', function () {
embark.logger.info('Remix IDE (via embark-remix plugin) available at ' + colors.underline(remixIdeUrl))
})
} else {
embark.logger.info('embark-remix is set to connect to a Remix IDE at ' + colors.underline(remixIdeUrl))
}
// setup Embark service check
embark.registerServiceCheck('Remix IDE', (cb) => {
return cb({ name: `Remix IDE ${host}:${port}`, status: 'on' })
})
// setup remixd shared folder service
const sharedFolderRouter = new remixd.Router(65520, sharedFolderService, { remixIdeUrl }, (webSocket) => {
sharedFolderService.setWebSocket(webSocket)
sharedFolderService.setupNotifications(sharedFolder)
sharedFolderService.sharedFolder(sharedFolder, readOnly)
})
const killRemixD = sharedFolderRouter.start()
const kill = () => {
if (server) server.close()
embark.logger.info(colors.red('embark-remix stopped'))
process.exit()
}
if (process.platform === 'win32') {
require('readline').createInterface({
input: process.stdin,
output: process.stdout
}).on('SIGINT', function () {
process.emit('SIGINT')
})
}
process.on('SIGINT', kill) // catch ctrl-c
process.on('SIGTERM', kill) // catch kill
process.on('exit', killRemixD)
}

@ -1,16 +0,0 @@
{
"name": "embark-remix",
"version": "0.0.2",
"description": "load remix IDE from embark environment",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "MIT",
"dependencies": {
"remix-ide": "latest",
"remixd": "latest",
"http-server": "latest"
}
}

@ -292,7 +292,7 @@ export function ContractGUI (props: ContractGUIProps) {
})}
</div>
<div className="udapp_group udapp_multiArg">
<CopyToClipboard tip='Encode values of input fields & copy to clipboard' icon='fa-clipboard' direction={'left'} getContent={() => getContentOnCTC(multiFields.current)} />
<CopyToClipboard tip='Encode values of input fields & copy to clipboard' icon='fa-clipboard' direction={'bottom'} getContent={() => getContentOnCTC(multiFields.current)} />
<button onClick={() => handleMultiValsSubmit(multiFields.current)} title={buttonOptions.title} data-id={buttonOptions.dataId} className={`udapp_instanceButton ${buttonOptions.classList}`}>{ buttonOptions.content }</button>
</div>
</div>

@ -154,7 +154,7 @@ export const registerScriptRunnerReducer = (state, action) => {
case INFO:
return {
...state,
journalBlocks: initialState.journalBlocks.push({ message: action.payload.message, style: 'text-log', provider: action.payload.provider })
journalBlocks: initialState.journalBlocks.push({ message: action.payload.message, style: 'text-success', provider: action.payload.provider })
}
case WARN:
return {

48113
package-lock.json generated

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save