Skip to content
This repository was archived by the owner on Mar 3, 2021. It is now read-only.

Commit 592408b

Browse files
committed
documentaion: convert rst to md
1 parent 03d5a7c commit 592408b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+2028
-0
lines changed

docs/analysis_tab.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Analysis
2+
========
3+
4+
This section gives information about the last compilation. By default, a
5+
new analysis is run at each compilation.
6+
7+
The analysis tab gives detailed information about the contract code. It
8+
can help you avoid code mistakes and to enforce best practices.
9+
10+
![image](images/remix_analysistab.png)
11+
12+
Here is the list of analyzers:
13+
14+
> - Security:
15+
> : - Transaction origin: Warns if tx.origin is used
16+
> - Check effects: Avoid potential reentrancy bugs
17+
> - Inline assembly: Use of Inline Assembly
18+
> - Block timestamp: Semantics maybe unclear
19+
> - Low level calls: Semantics maybe unclear
20+
> - Block.blockhash usage: Semantics maybe unclear
21+
>
22+
> - Gas & Economy:
23+
> : - Gas costs: Warns if the gas requirements of the functions
24+
> are too high
25+
> - This on local calls: Invocation of local functions via
26+
> this
27+
>
28+
> - Miscellaneous:
29+
> : - Constant functions: Checks for potentially constant
30+
> functions
31+
> - Similar variable names: Checks if variable names are too
32+
> similar
33+
>
34+

docs/compile_tab.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Compiling contracts
2+
===================
3+
4+
By default Remix triggers a compilation each time the current file is
5+
changed or another file is selected. If the contract has a lot of
6+
dependencies and takes a long time to compile, it is possible to disable
7+
the autocompilation.
8+
9+
![image](images/remix_compiletab.png)
10+
11+
After each compilation, a list is updated with all the newly compiled
12+
contracts.
13+
14+
Details modal dialog displays detailed information about the current
15+
selected contract.
16+
17+
From this tab, you can also publish your contract to Swarm (only non
18+
abstract contracts can be published).
19+
20+
Published data notably contains the `abi` and solidity source code.
21+
22+
After a contract is published, you can find its metadata information
23+
using the bzz URL located in the details modal dialog `SWARM LOCATION`.
24+
25+
Compilation Errors and Warning are displayed below the contract section.
26+
At each compilation, the static analysis tab builds a report. It is very
27+
valuable when addressing reported issues even if the compiler doesn't
28+
complain. (see ../analysis\_tab)

docs/debugger_tab.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Debugging
2+
=========
3+
4+
This module allows you to debug the transaction. It can be used to
5+
deploy transactions created from Remix and already mined transactions.
6+
(debugging works only if the current environment provides the necessary
7+
features).
8+
9+
![image](images/remix_debuggertab.png)
10+
11+
For more information about debugging, click on the following link:
12+
../tutorial\_debug

docs/file_explorer.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
File Explorer
2+
=============
3+
4+
The file explorer lists by default all the files stored in your browser.
5+
You can see them in the browser folder. You can always rename, remove or
6+
add new files to the file explorer.
7+
8+
![image](images/remix_file_explorer_browser.png)
9+
10+
Note that clearing the browser storage will permanently delete all the
11+
solidity files you wrote. To avoid this, you can use Remixd, which
12+
enables you to store and sync files in the browser with your local
13+
computer (for more information see ../tutorial\_remixd\_filesystem)
14+
15+
![image](images/remix_file_explorer_menu.png)
16+
17+
We will start by reviewing at the icons at the top left - from left to
18+
the right:
19+
20+
Create new File
21+
---------------
22+
23+
Creates a new file in the browser explorer.
24+
25+
Add Local File
26+
--------------
27+
28+
Allows you to select files from the local file system and import them to
29+
the Remix browser storage.
30+
31+
Publish to Gist
32+
---------------
33+
34+
Publishes files from the browser storage to an anonymous public gist.
35+
36+
Copy to another instance
37+
------------------------
38+
39+
Enables you to copy files from the browser storage to another instance
40+
(URL) of Remix.
41+
42+
Connect to Localhost
43+
--------------------
44+
45+
Allows to use file located in your file system (see
46+
../tutorial\_remixd\_filesystem).

docs/index.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
Remix - Solidity IDE
2+
====================
3+
4+
Remix is an IDE for the smart contract programming language Solidity and
5+
has an integrated debugger and testing environment.
6+
7+
An up to date online version is available at
8+
[remix.ethereum.org](http://remix.ethereum.org)
9+
10+
This page will host documentation and tutorial about features Remix
11+
provides.
12+
13+
Please go to [solidity.readthedocs.io](http://solidity.readthedocs.io)
14+
for any information regarding `Solidity`
15+
16+
Overview
17+
--------
18+
19+
Remix provides an integrated development environment (IDE) for smart
20+
contract development. It focuses on the development and deployment of
21+
Solidity written smart contracts.
22+
23+
Remix is a good solution if you intend to:
24+
25+
> - Develop smart contracts (remix integrates a solidity editor).
26+
> - Debug a smart contract's execution.
27+
> - Access the state and properties of already deployed smart
28+
> contract.
29+
> - Debug already committed transaction.
30+
> - Analyze solidity code to reduce coding mistakes and to enforce
31+
> best practices.
32+
> - Together with Mist (or any tool which inject web3), Remix can be
33+
> used to test and debug a Dapp (see ../tutorial\_mist)
34+
35+
Developing smart contract requires a deep understanding of the
36+
associated Blockchain technology.
37+
38+
!! Don't use Remix against a production network unless you are
39+
completely sure what you are doing !!
40+
41+
This documentation describes all the features remix provides. The GUI
42+
can be separated in 4 parts. Click on one the link to get more
43+
information.
44+
45+
> - ../file\_explorer
46+
> - ../solidity\_editor
47+
> - ../terminal
48+
> - ../tabs\_panel
49+
> : - ../compile\_tab
50+
> - ../run\_tab
51+
> - ../settings\_tab
52+
> - ../debugger\_tab
53+
> - ../analysis\_tab
54+
> - ../support\_tab
55+
>
56+
Quick Start
57+
-----------
58+
59+
(see ../quickstart\_javascriptvm)
60+
61+
Tutorial
62+
--------

docs/quickstart_javascriptvm.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
Quick Start using the JavaScript VM
2+
===================================
3+
4+
There are 3 type of environments Remix can be plugged to:
5+
`Javascript VM`, `Injected provider`, or `Web3 provider`. (see
6+
../run\_tab)
7+
8+
Both `Web3 provider` and `Injected provider` require the use of an
9+
external tool.
10+
11+
The external tool for `Web3 provider` is an Ethereum node the tools for
12+
`Injected provider` are Mist or Metamask.
13+
14+
The `JavaScript VM` mode is convenient because each execution runs in
15+
your browser. Thus reloading the page will restart Remix with an empty
16+
state.
17+
18+
So for performance purposes, it might also be better to use an external
19+
node.
20+
21+
Selecting the VM mode
22+
---------------------
23+
24+
Make sure the VM mode is selected. All accounts displayed in `Accounts`
25+
should have 100 ether.
26+
27+
Sample contract
28+
---------------
29+
30+
``` {.sourceCode .none}
31+
pragma solidity ^0.4.16;
32+
contract testContract {
33+
34+
uint value;
35+
function testContract(uint _p) {
36+
value = _p;
37+
}
38+
39+
function setP(uint _n) payable {
40+
value = _n;
41+
}
42+
43+
function setNP(uint _n) {
44+
value = _n;
45+
}
46+
47+
function get () constant returns (uint) {
48+
return value;
49+
}
50+
}
51+
```
52+
53+
This contract is very basic. The goal is to quickly start to create and
54+
to interact with a sample contract.
55+
56+
Deploying an instance
57+
---------------------
58+
59+
The `Compile tab` displays information related to the current contract
60+
(note that there can be more than one) (see ../compile\_tab).
61+
62+
Moving on, in the `Run tab` select, `JavaScript VM` to specify that you
63+
are going to deploy an instance of the contract in the `JavaScript VM`
64+
state.
65+
66+
![image](images/remix_quickstart_javascriptvm_creation.png)
67+
68+
The constructor of `testContract` needs a parameter (of type `uint`).
69+
Give any value and click on `Create`.
70+
71+
The transaction which deploys the instance of `testContract` is created.
72+
73+
In a "normal" blockchain, it can take several seconds to execute. This
74+
is the time for the transaction to be mined. However, because we are
75+
using the `JavaScript VM`, our execution is immediate.
76+
77+
The terminal will inform you about the transaction. You can see details
78+
there and start debugging.
79+
80+
The newly created instance is displayed in the `run tab`.
81+
82+
![image](images/remix_quickstart_javascriptvm_creationTransaction.png)
83+
84+
Interacting with an instance
85+
----------------------------
86+
87+
This new instance contains 3 actions which corresponds to the 3
88+
functions (`setP`, `setPN`, `get`). Clicking on `SetP` or `SetPN` will
89+
create a new transaction.
90+
91+
Note that `SetP` is `payable` (red action) : it is possible to send
92+
value (Ether) to the contract.
93+
94+
`SetPN` is not payable (light red action) : it is not possible to send
95+
value (Ether) to the contract.
96+
97+
Clicking on `get` will not execute a transaction (blue action). It is
98+
not necessary to do so because `get` does not modify the state (variable
99+
`value`) of this instance.
100+
101+
As `get` is `constant` you can see the return value just below the
102+
action.
103+
104+
![image](images/remix_quickstart_javascriptvm_callinginstance.png)

0 commit comments

Comments
 (0)