diff --git a/docs/analysis_tab.rst b/docs/analysis_tab.rst index cf078b3d1b..22f34b19f3 100644 --- a/docs/analysis_tab.rst +++ b/docs/analysis_tab.rst @@ -2,16 +2,16 @@ Analysis ======== This section gives information about the last compilation. -A new analysis is by default run at each compilation. +By default, a new analysis is run at each compilation. -It gives detailed information about the contract code and is a good way to avoid code mistakes and enforce best practices. +The analysis tab gives detailed information about the contract code. It can help you avoid code mistakes and to enforce best practices. .. image:: images/remix_analysistab.png -Here the list of analyzers: +Here is the list of analyzers: - Security: - - Transaction origin: Warn if tx.origin is used + - Transaction origin: Warns if tx.origin is used - Check effects: Avoid potential reentrancy bugs - Inline assembly: Use of Inline Assembly - Block timestamp: Semantics maybe unclear @@ -19,9 +19,9 @@ Here the list of analyzers: - Block.blockhash usage: Semantics maybe unclear - Gas & Economy: - - Gas costs: Warn if the gas requirements of functions are too high + - Gas costs: Warns if the gas requirements of the functions are too high - This on local calls: Invocation of local functions via this - Miscellaneous: - - Constant functions: Check for potentially constant functions - - Similar variable names: Check if variable names are too similar + - Constant functions: Checks for potentially constant functions + - Similar variable names: Checks if variable names are too similar diff --git a/docs/compile_tab.rst b/docs/compile_tab.rst index 9df1d7fc8c..47b376b095 100644 --- a/docs/compile_tab.rst +++ b/docs/compile_tab.rst @@ -10,11 +10,11 @@ After each compilation, a list is updated with all the newly compiled contracts. `Details` modal dialog displays detailed information about the current selected contract. -From this tab, you can also publish your contract to Swarm (only non abstract contract can be published). +From this tab, you can also publish your contract to Swarm (only non abstract contracts can be published). -Published data contains notably the ``abi`` and solidity source code. +Published data notably contains the ``abi`` and solidity source code. After a contract is published, you can find its metadata information using the `bzz` URL located in the details modal dialog ``SWARM LOCATION``. -Compilation Errors and Warning are displayed below the contract section. At each compilation, the static analysis tab builds a report. It is very valuable to address reported issues even if the compiler doesn't complain. +Compilation Errors and Warning are displayed below the contract section. At each compilation, the static analysis tab builds a report. It is very valuable when addressing reported issues even if the compiler doesn't complain. (see :doc:`../analysis_tab`) diff --git a/docs/debugger_tab.rst b/docs/debugger_tab.rst index caeca53453..cb73c90ca8 100644 --- a/docs/debugger_tab.rst +++ b/docs/debugger_tab.rst @@ -3,9 +3,9 @@ Debugging This module allows you to debug the transaction. It can be used to deploy transactions created from Remix and already mined transactions. -(debugging works only if the current environment provides needed features). +(debugging works only if the current environment provides the necessary features). .. image:: images/remix_debuggertab.png -All informations about debugging are describing in the following link: +For more information about debugging, click on the following link: :doc:`../tutorial_debug` diff --git a/docs/file_explorer.rst b/docs/file_explorer.rst index 916f0bc63e..e77ec2976a 100644 --- a/docs/file_explorer.rst +++ b/docs/file_explorer.rst @@ -5,11 +5,11 @@ The file explorer lists by default all the files stored in your browser. You can .. image:: images/remix_file_explorer_browser.png -Note that clearing the browser storage will permanently delete all the solidity sources you wrote. To avoid this, you can use Remixd, which enables you to store and sync files in the browser with your local files (for more information see :doc:`../tutorial_remixd_filesystem`) +Note that clearing the browser storage will permanently delete all the solidity files you wrote. To avoid this, you can use Remixd, which enables you to store and sync files in the browser with your local computer (for more information see :doc:`../tutorial_remixd_filesystem`) .. image:: images/remix_file_explorer_menu.png -From the left to the right: +We will start by reviewing at the icons at the top left - from left to the right: Create new File --------------- diff --git a/docs/index.rst b/docs/index.rst index 5fc8ecb5bf..5534f9ca33 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -4,7 +4,7 @@ Remix - Solidity IDE Remix is an IDE for the smart contract programming language Solidity and has an integrated debugger and testing environment. -An up to date online version is accessible at `remix.ethereum.org `_ +An up to date online version is available at `remix.ethereum.org `_ This page will host documentation and tutorial about features Remix provides. @@ -13,19 +13,19 @@ Please go to `solidity.readthedocs.io `_ for any Overview -------- -Remix provides an integrated development environment for smart contract development. -It focuses on development and deployment of Solidity written smart contract. +Remix provides an integrated development environment (IDE) for smart contract development. +It focuses on the development and deployment of Solidity written smart contracts. Remix is a good solution if you intend to: - - Develop smart contract (remix integrates a solidity editor). - - Debug smart contract execution. + - Develop smart contracts (remix integrates a solidity editor). + - Debug a smart contract's execution. - Access the state and properties of already deployed smart contract. - Debug already committed transaction. - - Analyze solidity code to reduce coding mistake and enforce best practices. - - Together with Mist (or any tool which inject web3), Remix can be used to test and debug Dapp (see :doc:`../tutorial_mist`) + - Analyze solidity code to reduce coding mistakes and to enforce best practices. + - Together with Mist (or any tool which inject web3), Remix can be used to test and debug a Dapp (see :doc:`../tutorial_mist`) -Developping smart contract requires a deep understanding of the associated Blockchain technology. +Developing smart contract requires a deep understanding of the associated Blockchain technology. !! Don't use Remix against a production network unless you are completely sure what you are doing !! diff --git a/docs/quickstart_javascriptvm.rst b/docs/quickstart_javascriptvm.rst index c7663c3f32..4caff3e1c2 100644 --- a/docs/quickstart_javascriptvm.rst +++ b/docs/quickstart_javascriptvm.rst @@ -1,13 +1,16 @@ Quick Start using the JavaScript VM =================================== -There are 3 type of environments Remix can be plugged to (see :doc:`../run_tab`) -both ``Web3 provider`` and ``Injected provider`` requires the use of an external tool. +There are 3 type of environments Remix can be plugged to: ``Javascript VM``, ``Injected provider``, or ``Web3 provider``. (see :doc:`../run_tab`) -An Ethereum node for ``Web3 provider`` and Mist or Metamask for ``Injected provider``. +Both ``Web3 provider`` and ``Injected provider`` require the use of an external tool. -The ``JavaScript VM`` mode is convenient because every execution run in your browser. -Thus reloading the page will restart Remix with en empty state. it might also be better to use an external node for better performances. +The external tool for ``Web3 provider`` is an Ethereum node the tools for ``Injected provider`` are Mist or Metamask. + +The ``JavaScript VM`` mode is convenient because each execution runs in your browser. +Thus reloading the page will restart Remix with an empty state. + +So for performance purposes, it might also be better to use an external node. Selecting the VM mode --------------------- @@ -40,24 +43,24 @@ Sample contract } } -That contract is very very basic, the goal is to quiclky start to create and to interact with. +This contract is very basic. The goal is to quickly start to create and to interact with a sample contract. Deploying an instance --------------------- -The ``Compile tab`` displays informations related to the current contract (note that there can be more than one) (see :doc:`../compile_tab`). +The ``Compile tab`` displays information related to the current contract (note that there can be more than one) (see :doc:`../compile_tab`). -Switching now to ``Run tab`` allows to deploy an instance of the contract in the ``JavaScript VM`` state. +Moving on, in the ``Run tab`` select, ``JavaScript VM`` to specify that you are going to deploy an instance of the contract in the ``JavaScript VM`` state. .. image:: images/remix_quickstart_javascriptvm_creation.png -The constructor of ``testContract`` needs a parameter (of type ``uint``). give any value and click on ``Create``. +The constructor of ``testContract`` needs a parameter (of type ``uint``). Give any value and click on ``Create``. -The transaction which deploy the instance of ``testContract`` is created. +The transaction which deploys the instance of ``testContract`` is created. -That could take several seconds in a "normal" blockchain (time for the transaction to be mined), in our the case execution is immediate (JavaScript VM). +In a "normal" blockchain, it can take several seconds to execute. This is the time for the transaction to be mined. However, because we are using the ``JavaScript VM``, our execution is immediate. -Looking at the terminal will inform you about the transaction. You can see details and start debugging it. +The terminal will inform you about the transaction. You can see details there and start debugging. The newly created instance is displayed in the ``run tab``. diff --git a/docs/run_tab.rst b/docs/run_tab.rst index 7b7d71c771..7971f79471 100644 --- a/docs/run_tab.rst +++ b/docs/run_tab.rst @@ -1,25 +1,25 @@ Running transactions ==================== -This tab is an important section of Remix. It allows you to send transactions to the current environment. +The Run tab is an important section of Remix. It allows you to send transactions to the current environment. .. image:: images/remix_runtab.png Run Setup --------- -These are the settings that enables you to directly influence the transaction execution: +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. That means nothing will be persisted and a page reload will restart a new blockchain from scratch, the old one will not be saved. + - ``JavaScript VM``: All the transactions will be executed in a sandbox blockchain in the browser. This means nothing will be persisted and a page reload will restart a new blockchain from scratch, the old one will not be saved. - ``Injected Provider``: Remix will connect to an injected web3 provider. ``Mist`` and ``Metamask`` are example of providers that inject web3, thus can be used with this option. - ``Web3 Provider``: Remix will connect to a remote node. You will need to provide the URL address to the selected provider: geth, parity or any Ethereum client. - - Account: list of accounts associated with the current environment (and their associated balances) - - Gas Limit: maximum amount of gas that can be set for all the transactions created in Remix - - Value: amount of value for the next created transaction (this value is always reset to 0 after each transaction execution) + - Account: the list of accounts associated with the current environment (and their associated balances). + - Gas Limit: the maximum amount of gas that can be set for all the transactions created in Remix. + - Value: the amount of value for the next created transaction (this value is always reset to 0 after each transaction execution). .. image:: images/remix_runtab_example.png @@ -28,27 +28,27 @@ Initiate Instance This section contains the list of compiled contracts and 2 actions: -- ``At Address`` assumes the given address is an instance of the selected contract. It is then possible to interact with an already deployed contract. There's no check at this point so be careful when using this feature and be sure you trust the contract at that address. +- ``At Address`` assumes the given address is an instance of the selected contract. It is then possible to interact with an already deployed contract. There's no check at this point, so be careful when using this feature, and be sure you trust the contract at that address. -- ``Create`` send a transaction that deploy the selected contract. When the transaction is mined the newly created instance will be added (this might take several seconds). (note that if the ``constructor`` has parameters you need to specify them). +- ``Create`` send a transaction that deploys the selected contract. When the transaction is mined, the newly created instance will be added (this might take several seconds). Note that if the ``constructor`` has parameters, you need to specify them. Pending Instances ----------------- -Validating a transaction take several seconds. During this time the GUI shows it in a pending mode. When transaction is mined the number of pending transactions is updated +Validating a transaction take several seconds. During this time, the GUI shows it in a pending mode. When transaction is mined the number of pending transactions is updated and the transaction is added to the log (see :doc:`../terminal`) -Instances List +Instance List -------------- -This section contains list of instances to interact with. +This section contains a list of instances to interact with. Several cases apply: - - The called function is declared as ``constant`` or ``pure`` in Solidity. The action has a blue background, clicking on it does not create a new transaction. (this is not necessary because there is not state changes) but will update the return value of the function. + - The called function is declared as ``constant`` or ``pure`` in Solidity. The action has a blue background, clicking it does not create a new transaction. Clicking it is not necessary because there are not state changes - but it will update the return value of the function. - The called function has no special keywords. The action has a light red background, clicking on does create a new transaction. But this transaction cannot accept any amount of Ether. - - The called function is declared as ``payable`` in Solidity. The action has a red background, clicking on it does create a new transaction and this transaction can accept value. + - The called function is declared as ``payable`` in Solidity. The action has a red background, clicking it does create a new transaction and this transaction can accept value. For more information about Solidity modifier, see `Solidity modifier `_ . diff --git a/docs/settings_tab.rst b/docs/settings_tab.rst index d76c41a8ae..cc32a9729f 100644 --- a/docs/settings_tab.rst +++ b/docs/settings_tab.rst @@ -1,13 +1,13 @@ Settings ======== -This section displays the current compiler version and allows to change to another version. +This section displays the current compiler version and allows one to change to another version. .. image:: images/remix_settingstab.png Settings, available here: - - Text wrap: defines if the text in the editor should be wrapped. + - Text wrap: controls if the text in the editor should be wrapped. - Enable optimization: defines if the compiler should enable optimization during compilation. Enabling this option saves execution gas. It is useful to enable optimization for contracts ready to be deployed in production - but could lead to some inconsistency when debugging such a contract. + but could lead to some inconsistencies when debugging such a contract. diff --git a/docs/solidity_editor.rst b/docs/solidity_editor.rst index 17924318bd..cc1928664f 100644 --- a/docs/solidity_editor.rst +++ b/docs/solidity_editor.rst @@ -1,7 +1,7 @@ Solidity Editor =============== -Remix editor triggers a compilation each time the current file is changed or another file is selected. It also provides syntax highlighting mapped to solidity keywords. +The Remix editor recompiles the code each time the current file is changed or another file is selected. It also provides syntax highlighting mapped to solidity keywords. .. image:: images/remix_editor.png diff --git a/docs/support_tab.rst b/docs/support_tab.rst index 7ddf7a33b9..fcc1199740 100644 --- a/docs/support_tab.rst +++ b/docs/support_tab.rst @@ -1,6 +1,6 @@ Support ======= -This section provides a link to the Remix issues where users can report a bug or suggest a feature, other useful links and and it displays a `Remix developers' channel `_ +This section provides a link to Remix Issues where users can report a bug or suggest a feature, as well as providing other useful links. It also displays a `Remix developers' channel `_ .. image:: images/remix_supporttab.png diff --git a/docs/tutorial_debug.rst b/docs/tutorial_debug.rst index b1622512d8..8030187f5c 100644 --- a/docs/tutorial_debug.rst +++ b/docs/tutorial_debug.rst @@ -14,7 +14,7 @@ From the Transaction GUI ~~~~~~~~~~~~~~~~~~~~~~~~ We will not explain in detail here how to write or deploy contract. -Let us start with a basic contract (replace this one by yours): +Let us start with a basic contract (replace this one by your's): .. code-block:: none @@ -53,9 +53,9 @@ Let us start with a basic contract (replace this one by yours): } } -For the purpose of this tutorial we will run the ``JavaScript VM`` (that's the default mode if you don't use Remix with Mist or Metamask) which simulates a custom blockchain. You could do the same using a proper backend node. +For the purpose of this tutorial, we will run the ``JavaScript VM`` (that's the default mode when you don't use Remix with Mist or Metamask). This simulates a custom blockchain. You could do the same using a proper backend node. -Let's deploy the contract: +Now, let's deploy the contract: Right panel / Red button ``Create`` @@ -80,7 +80,7 @@ From the Debugger The debugger can be found in the right panel / 5th tab from the left. -You can start a debug session by providing either a ``transaction hash`` or a ``block number`` and ``transaction index`` +You can start a debug session by providing either a ``transaction hash`` or a ``block number`` and ``transaction index``. .. image:: remix3.png @@ -89,10 +89,10 @@ Click the ``play`` button to start debugging. Using the debugger ------------------ -The debugger allows to see detailed informations about the transaction execution. It uses the editor (left panel) to display the location +The debugger allows one to see detailed informations about the transaction's execution. It uses the editor (left panel) to display the location in the source code where the current execution is. -First the transaction panel display basic and simple information about the current transaction. +The transaction panel displays basic information about the current transaction. .. image:: remix_debugtransactioninfo.png @@ -104,32 +104,32 @@ step over back, step into back, step into forward, step over forward, jump out ( .. image:: remix_navigation.png -11 panels give detailed informations about the execution: +11 panels give detailed information about the execution: Instructions ~~~~~~~~~~~~ .. image:: remix_debuginstructions.png -This panel displays the bytecode of the current executing contract, the current step is highlighted. +The Instructions panel displays the bytecode of the current executing contract- with the current step highlighted. Important note: When this panel is hidden, the slider will have a courser granularity and only stop at expression boundaries, even if they are compiled into multiple EVM instructions. -When the panel is diplayed, it will be possible to step over every instruction, even those that refers to the same expression. +When the panel is displayed, it will be possible to step over every instruction, even those that refers to the same expression. Solidity Locals ~~~~~~~~~~~~~~~ .. image:: remix_soliditylocals.png -That panel displays local variables associated with the current context. +The Solidity Locals panel displays local variables associated with the current context. Solidity State ~~~~~~~~~~~~~~ .. image:: remix_soliditystate.png -That panel displays state variables of the current executing contract. +The Solidity State panel displays state variables of the current executing contract. Low level panels ~~~~~~~~~~~~~~~~ diff --git a/docs/tutorial_mist.rst b/docs/tutorial_mist.rst index 0f333ef352..526882d7fc 100644 --- a/docs/tutorial_mist.rst +++ b/docs/tutorial_mist.rst @@ -5,8 +5,8 @@ Debugging a Dapp using Remix - Mist - Geth The ultimate goal of this tutorial is to debug transactions that have been created by a dapp front end. -It is easy in Remix to debug a transaction created from its own GUI. Setting up an environment that allows to -debug transactions created outside of Remix require a bit more of complexity. +It is easy in Remix to debug a transaction created from its own GUI. However, setting up an environment that allows you to +debug transactions created outside of Remix, require a bit more of complexity. We will need four tools for that : @@ -78,9 +78,9 @@ If we run Mist without any argument, its internal Geth node will run. As we have (yes the option is --rpc) -Once Mist is started, Verify that it is connected to the test node (that's important !!). +Once Mist is started, verify that it is connected to the test node (that's very important!!). -On the bottom left check that the network is ``Private-net`` and that the block number is the same as reported by the test node we are currently running. Run the following command in the Geth Console to check: `web3.eth.blockNumber`. +On the bottom left, check that the network is ``Private-net`` and that the block number is the same as reported by the test node we are currently running. Run the following command in the Geth Console to check: `web3.eth.blockNumber`. .. image:: mist1.png @@ -91,7 +91,7 @@ Starting Remix In Mist click on ``Develop`` / ``Open Remix IDE`` -Remix will open in a new window. If this is the first time it is run, the ``Ballot`` contract is loaded. +Remix will open in a new window. If this is the first time it is run, the ``Ballot`` contract will be loaded. Now, we need to check if Remix is connected to Mist: @@ -223,13 +223,14 @@ and here is the front end: } -I would suggest to serve this file using ``http-serve``, but you can use any web server you like. +I would suggest serving this file using ``http-serve``, but you can use any web server you like. Example: Dapp Front End https://github.com/ltfschoen/dapp_front_end Important notice ! +~~~~~~~~~~~~~~~~~~ -The variable ``contractspec`` contains the abi of the ``donation`` contract. it means that if you change something in the contract interface (function names, parameters, ...) +The variable ``contractspec`` contains the abi of the ``donation`` contract. This means that if you change something in the contract interface (function names, parameters, ...) you need to copy the new abi from remix to the front end. Deploying @@ -239,7 +240,7 @@ Right panel / Red button ``Create`` .. image:: remix1.png -This create a new transaction that deploy the ``Donation`` contract (Mist will ask for the usual pasphrase check). +This creates a new transaction that deploys the ``Donation`` contract (Mist will ask for the usual passphrase check). Wait for the transaction to be mined (don't forget to activate mining ``miner.start()``). Once this is done, you can use it by executing the ``moveFund`` and ``donate`` function. But this is not what we @@ -253,11 +254,11 @@ Debugging --------- From Mist, browse the above front end. -In the first field, paste the address of the newly created contract, and let's call the first function (label ``give``). +In the first field, paste the address of the newly created contract. Now, let's call the first function (label ``give``). You will need an account and a value. -The account could be any account that are declared in the Wallet section of Mist. This is the sender of the transaction we are going to create. +The account could be any account that is declared in the Wallet section of Mist. This is the sender of the transaction that we are going to create. The value should be no more than the actual balance of the account - the unit is in `wei`, so just put ``100`` (100 wei), that should be fine. Click on ``Give`` and wait for the transaction to be mined. @@ -267,7 +268,7 @@ It was easier for the purpose of this tutorial to just log transactions in a div There is only one field that we need, this is the ``transactionHash``. -Copy it and switch to Remix. On the right half, the fifth panel shows a small "bug" icon, that is the debugger. +Copy it and switch to Remix. On the right side, the fifth panel shows a small "bug" icon, that is the debugger. Paste the hash into the transaction field and click on the ``play`` button. @@ -275,14 +276,14 @@ Paste the hash into the transaction field and click on the ``play`` button. You are now entering a debug session for the call to ``donate``. -Debugging in Remix is not much easier than with common tools like gdb because you can freely move in time. +Debugging in Remix is easier than with common tools like gdb because you can freely move in time. Use the slider to change the current step and click on the panels below to expand them and explore the curret state, local variables, etc. There are also breakpoints to move between sections of the code quickly, but more on all that later. -At the time of writing there is an issue that could break the contract creation. -There is a workaround for that at https://github.com/ethereum/go-ethereum/issues/3653 . +At the time of this writing, there is an issue that could break the contract creation. +The a workaround for that at https://github.com/ethereum/go-ethereum/issues/3653 . Please follow the workaround or wait for this issue to be closed. -Also, though retrieving a contract's storage when Remix is using the JavaScript VM is working well, +Also, although retrieving a contract's storage when Remix is using the JavaScript VM is working well, there is still work to be done when Remix is using eth or geth as backend.