Skip to content

Commit

Permalink
update to Deploy & Run docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ryestew committed Mar 31, 2020
1 parent 0c1a2e7 commit 1368bf0
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 19 deletions.
Binary file added docs/images/a-runtab1a.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/images/a-runtab2.png
Binary file not shown.
60 changes: 41 additions & 19 deletions docs/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,69 @@ Deploy & Run

The Deploy & Run module allows you to send transactions to the current environment.

To get to the Run & Deploy module - click the run icon in the icon panel.
To use this module, you need to have a contract compiled. So, if there is a contract name in the <b>CONTRACT</b> select box (the select box is under the VALUE input field), you can use this module. If nothing is there or you do not see the contract you want, you need to select a contract in the editor to make it active, go to a compiler module and compile it, and then come back to Deploy & Run.

In order to use this module you need to have a contract compiled. So, if there is a contract name in the contract select box (in the image below it's the pulldown that says **Ballot**), then you can interact with this contract. If nothing is there - then you need to select a contract. And you do that by clicking the file in the editor panel to make it the active tab ( in the image below - on the right side of the page - in the main panel - you see the ballot.sol so it is the active contract). Once its active, then go to the compiler module and compile it. Then come back to Deploy & Run.
![](images/a-runtab1a.png)

![](images/a-runtab2.png)

Run Setup
Environment
---------

The following settings allow you to directly influence the transaction
execution:

**Environment:**

- `JavaScript VM`: All the transactions will be executed in
a sandbox blockchain in the browser. This means nothing
will be persisted when you reload the page. The JsVM is its own blockchain and on each reload it will start a new blockchain, the old one will not be saved.

- `Injected Provider`: Remix will connect to an injected
web3 provider. `Metamask` is an example of a
provider that inject web3.
web3 provider. `Metamask` is an example of a provider that inject web3.

- `Web3 Provider`: Remix will connect to a remote node. You will need to provide the URL to the selected provider: geth, parity or any Ethereum client.

More about Web3 Provider
-------------
If you are using Geth & https://remix.ethereum.org, please use the following Geth command to allow requests from Remix:

**geth --rpc --rpccorsdomain https://remix.ethereum.org**

Also see [Geth Docs about the rpc server](https://geth.ethereum.org/docs/rpc/server)

---

- `Web3 Provider`: Remix will connect to a remote node. You will need to provide the URL to the selected provider: geth, parity or any Ethereum client.
**WARNING:** It is a bad idea to use the Geth flag <b>--rpccorsdomain</b> with a wildcard: `--rpccorsdomain *`

**Account:**
If you put the wildcard `*`, it means everyone can request the node. Whereas, if you put a URL, it restricts the urls to just that one - e.g. `--rpccorsdomain 'https://remix-alpha.ethereum.org'`

Only use `--rpccorsdomain *` when using a **test chain** AND using only **test accounts**. For real accounts or on the mainchain **specify the url**.

---

To run Remix locally using a local test node, use this Geth command:

**geth --rpc --rpccorsdomain="package://a7df6d3c223593f3550b35e90d7b0b1f.mod" --rpcapi web3,eth,debug,personal,net --vmdebug --datadir <path/to/local/folder/for/test/chain> --dev console**

Also see [Geth Docs on Dev mode](https://geth.ethereum.org/getting-started/dev-mode)

The Web3 Provider Endpoint for a local node is **http://localhost:8545**


Account:
--------
- Account: the list of accounts associated with the current
environment (and their associated balances). On the JsVM, you have a choice of 5 accounts. If using Injected Web3 with MetaMask, you need to change the account in MetaMask.

**Gas Limit:**
Gas Limit:
---------
- This sets the maximum amount of gas that will be allowed for all the
transactions created in Remix.

**Value:**
- This sets the amount of ETH, WEI, GWEI etc that is sent to a contract or a payable function. ( Note: payable functions have a red button). The value is always reset to 0 after each transaction execution).
Value:
-----
- This sets the amount of ETH, WEI, GWEI etc that is sent to a contract or a payable function. ( Note: payable functions have a red button). The value is always reset to 0 after each transaction execution). The Value field is **NOT** for gas.

![](images/a-Runtab-deploy-atAddress.png)

Initiate Instance
-----------------

- In the image above the select box is set to Ballot. This select box will contain the list of compiled contracts.
- In the image above, the select box is set to Ballot. This select box will contain the list of compiled contracts.

- `Deploy` send a transaction that deploys the selected contract. When
the transaction is mined, the newly created instance will be added
Expand All @@ -57,7 +79,7 @@ Pending Instances
-----------------

Validating a transaction takes several seconds. During this time, the GUI
shows it in a pending mode. When the transaction is mined the number of
shows it in a pending mode. When the transaction is mined, the number of
pending transactions is updated and the transaction is added to the log
([see terminal](terminal.html)).

Expand Down

0 comments on commit 1368bf0

Please sign in to comment.