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:
'udapp.transactionsRecordedText':'All transactions (deployed contracts and function executions) can be saved and replayed inanother environment. e.g Transactions created in Javascript VM can be replayed in the Injected Web3.',
<divstyle={{marginLeft:-5}}><CopyToClipboardtip='Copy account to clipboard'content={selectedAccount}direction='top'/></div>
<iid="remixRunSignMsg"data-id="settingsRemixRunSignMsg"className="mx-1 fas fa-edit udapp_icon"aria-hidden="true"onClick={signMessage}title="Sign a message using this account key"></i>
<iid="remixRunSignMsg"data-id="settingsRemixRunSignMsg"className="mx-1 fas fa-edit udapp_icon"aria-hidden="true"onClick={signMessage}title="Sign a message using this account"></i>
@ -121,12 +121,12 @@ export function ContractDropdownUI (props: ContractDropdownProps) {
if(enable){
if(enable){
setAtAddressOptions({
setAtAddressOptions({
disabled: false,
disabled: false,
title:'Interact with the given contract.'
title:'Interact with the deployed contract - requires the .abi file or compiled .sol file to be selected in the editor (with the same compiler configuration)'
})
})
}else{
}else{
setAtAddressOptions({
setAtAddressOptions({
disabled: true,
disabled: true,
title: loadedAddress?'⚠ Compile *.sol file or select *.abi file.':'⚠ Compile *.sol file or select *.abi file & then enter the address of deployed contract.'
title: loadedAddress?'Compile a *.sol file or select a *.abi file.':'To interact with a deployed contract, enter its address and compile its source *.sol file (with the same compiler settings) or select its .abi file in the editor. '
})
})
}
}
}
}
@ -135,12 +135,12 @@ export function ContractDropdownUI (props: ContractDropdownProps) {
if(enable){
if(enable){
setContractOptions({
setContractOptions({
disabled: false,
disabled: false,
title:'Select contract for Deploy or At Address.'
title:'Select a compiled contract to deploy or to use with At Address.'
})
})
}else{
}else{
setContractOptions({
setContractOptions({
disabled: true,
disabled: true,
title: loadType==='sol'?'⚠ Select and compile *.sol file to deploy or access a contract.':'⚠ Selected *.abi file allows accessing contracts, select and compile *.sol file to deploy and access one.'
title: loadType==='sol'?'Select and compile *.sol file to deploy or access a contract.':'When there is a compiled .sol file, the choice of contracts to deploy or to use with AtAddress is made here.'
@ -292,7 +292,7 @@ export function ContractGUI (props: ContractGUIProps) {
})}
})}
</div>
</div>
<divclassName="udapp_group udapp_multiArg">
<divclassName="udapp_group udapp_multiArg">
<CopyToClipboardtip='Encode values of input fields & copy to clipboard'icon='fa-clipboard'direction={'left'}getContent={()=>getContentOnCTC(multiFields.current)}/>
<CopyToClipboardtip='Encode values of input fields & copy to clipboard'icon='fa-clipboard'direction={'bottom'}getContent={()=>getContentOnCTC(multiFields.current)}/>
<inputtype="number"className="form-control udapp_gasNval udapp_col2"title="The default gas limit is 3M. Adjust as needed."id="gasLimit"value={props.gasLimit}onChange={handleGasLimit}/>
title:`Execution environment connects to node at localhost (or via IPC if available), transactions will be sent to the network and can cause loss of money or worse!
title:`Execution environment connects to an external node. For security, only connect to trusted networks. If Remix is served via https and your node is accessed via http, it might not work. In this case, try cloning the repository and serving it via http.`,
<selectonChange={(e)=>handleLanguageChange(e.target.value)}disabled={state.useFileConfiguration}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="Language specification available from Compiler >= v0.5.7">