Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
23c2fa8
[20190508] Added guides on how to push actions and how to connect to …
jcardenas9x May 8, 2019
0299946
[...] Fixed typo in ToC
jcardenas9x May 8, 2019
3474906
[...] Fixed typo in ToC again
jcardenas9x May 8, 2019
0b488b4
[...] Fixed typo in ToC again...
jcardenas9x May 8, 2019
bd2b4b6
[...] Added section on configuration, updated warning in main README.…
jcardenas9x May 8, 2019
0790e0b
[20190510] Fix typos and poor phrasing in documentation
jcardenas9x May 10, 2019
76423e5
[...] Added home README.md for the permissions guide, added extra scr…
jcardenas9x May 10, 2019
c818282
[...] Additional typo fixes
jcardenas9x May 10, 2019
25376b9
New disclaimer in connection readme
jcardenas9x May 10, 2019
55141a1
[20190514] Added extra documentation
jcardenas9x May 14, 2019
d16aeb8
[20190508] Added guides on how to push actions and how to connect to …
jcardenas9x May 8, 2019
3ee2d7a
[...] Fixed typo in ToC
jcardenas9x May 8, 2019
ce6e496
[...] Fixed typo in ToC again
jcardenas9x May 8, 2019
7a7f9bf
[...] Fixed typo in ToC again...
jcardenas9x May 8, 2019
5b88170
[...] Added section on configuration, updated warning in main README.…
jcardenas9x May 8, 2019
a976540
[20190510] Fix typos and poor phrasing in documentation
jcardenas9x May 10, 2019
3703851
[...] Added home README.md for the permissions guide, added extra scr…
jcardenas9x May 10, 2019
15df97f
[...] Additional typo fixes
jcardenas9x May 10, 2019
a05416d
New disclaimer in connection readme
jcardenas9x May 10, 2019
d34d65e
[20190514] Added extra documentation
jcardenas9x May 14, 2019
d85181b
[20190516] Updated image library for permissions guide
jcardenas9x May 16, 2019
a027a2e
Merge branch 'documentation_2' of https://github.com/EOSIO/eosio-expl…
jcardenas9x May 16, 2019
8f76644
[...] Update outdated images, outdated text, added information about …
jcardenas9x May 16, 2019
938eda7
[...] Fix broken image links, typo
jcardenas9x May 16, 2019
6a8a5d6
[...] More typo fixing and missing information
jcardenas9x May 16, 2019
21012e5
[20190517] Edited and updated legal information and disclaimer
jcardenas9x May 17, 2019
f699b4a
Merge branch 'develop' into documentation_2
jcardenas9x May 17, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 40 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* [For Contributors](#for-contributors)
* [OS Platform Specific](#os-platform-specific)
* [Usage](#usage)
* [Modes](#modes)
* [Links to Documentation](#links-to-documentation)
* [Contributing](#contributing)
* [License](#license)
Expand Down Expand Up @@ -67,6 +68,8 @@ The EOSIO Labs™: EOSIO Explorer is designed specifically to be a tool for loca
* [Docker](https://www.docker.com/) with support at Docker Engine `18.09.2` (latest stable)
* [Node.JS](https://nodejs.org/en/) with support at `^10.15.3` LTS (latest stable)

:warning: - When using Docker for this tool, we require a minimum resource of **4 CPU, 8 GB memory** allocation.

## Installation

### For Users
Expand All @@ -77,19 +80,27 @@ yarn global add eosio-explorer

This will create a globally installed instance of the tool which you can run anywhere.

:warning: - `yarn` will install global packages in a directory that may not be in your executable PATH. This may apply to certain OSes such as Ubuntu. In this case, you need to add the output of `yarn global bin` to your PATH such as in `~.bash_profile`.

If you wish to install the tool without `global`, then you can do the following instead:

```bash
git clone https://github.com/EOSIO/eosio-explorer.git
yarn install
```

After installing, you can do `eosio-explorer -v` or `yarn eosio-explorer -v` to check if the installation worked. If it worked, you should get the current version of the tool.

### For Contributors

See: [Development](./docs/development.md)

### OS Platform Specific

:warning: - In summary, for terminal OSes, headless Chrome (`chrome`) must be available, otherwise you cannot start the GUI.

If you want to start the tool without the GUI to simply create an EOSIO blockchain environment (`nodeos` and MongoDB setup), please pass the `--server-mode` flag to the `start` or `init` commands. This may be useful for users who run terminal OSes and want to supply their development team with a development environment quickly and painlessly.

#### Ubuntu 18.04 / Ubuntu 16.04

If you want to start the tool with the bundled UI, you will need to make sure your machine or server can open headless Chrome in a sandbox.
Expand All @@ -98,7 +109,7 @@ If you want to start the tool with the bundled UI, you will need to make sure yo

Out of the box, Amazon Linux will use an outdated version of Docker which this application currently does not support.

In order to install the tool properly, you will need to manually install the latest stable version of Docker using binaries.
In order to install the tool properly, you will need to manually install the latest stable version of Docker using binaries. You can find the relevant binaries [here](https://docs.docker.com/install/linux/docker-ce/binaries/).

Finally, this requires the instance to be able to run or open headless Chrome in a sandbox.

Expand All @@ -113,7 +124,7 @@ You will need to create an exception within SELinux. Setting the following boole
setsebool -P unconfined_chrome_sandbox_transition 0
```

Alternatively, though not necessarily recommended, you can disable `SELinux` entirely.
Alternatively, though not recommended, you can disable `SELinux` entirely.

## Usage

Expand All @@ -126,14 +137,20 @@ Installed via cloning the repository: yarn eosio-explorer <command>
Run the tool with the specified command

Commands:
init Initialize the tool by installing all dependencies, setting up
-v Prints out the current version of the tool
-h or --help Prints out the current list of available commands
init Initialize the tool by installing all dependencies, setting up
all Docker containers, etc.
Available flags:
--server-mode - Starts the blockchain environment for the tool without
opening the web application
-dev / --develop - Starts the tool in development mode
-s / --sample-data - Starts the tool with pre-existing sample accounts
and smart contracts
start Start the tool, assumes the dependencies and Docker images are already prepared
Available flags:
--server-mode - Starts the blockchain environment for the tool without
opening the web application
-dev / --develop - Starts the tool in development mode
-d / --delete - Removes existing Docker containers
--init - Builds a production-ready version of the web tool,
Expand All @@ -148,6 +165,25 @@ Commands:
remove_dockers Remove any currently present Docker containers
```

You can also add the `-h` flag to any of the commands listed above to view the available flags for each command within the terminal.

### Modes

* Development mode sacrifices some performance but enables hot code reloading, allowing you to work on contributing to the project without rebuilding. This will not run as a background process.
* Production mode serves a pre-rendered, pre-loaded version of the tool for speed and performance, and is for users of the tool.

:warning: - The tool, in production mode, will run persistently in the background using `pm2`, meaning that you can choose to keep it running indefinitely. If you want to close the tool, you will need to kill the process which is listening on the port you specified in the configuration. By default, the production mode port is `5111`. You can use utilities like `netstat` and `lsof` to check this.

If you want, you can globally install `pm2` to make managing this process easier, so you can run commands like `pm2 status` to check.

#### Using `pm2`

The quickest way to eliminate all processes on pm2 is to use `pm2 kill`.

Otherwise, you can check the list of processes with `pm2 list`, then use `pm2 delete <id>` to delete the specific processes you want. **You would need to use the process ID of `pm2`, not the process ID of your OS/machine**.

The processes will be called `eosio compiler` for the compiler service and `eosio explorer` for the main tool.

## Links to Documentation

* [Main Documentation](./docs)
Expand All @@ -165,6 +201,4 @@ Interested in contributing? That's awesome! Please view the following links for

## Important

See LICENSE for copyright and license terms. Block.one makes its contribution on a voluntary basis as a member of the EOSIO community and is not responsible for ensuring the overall performance of the software or any related applications. We make no representation, warranty, guarantee or undertaking in respect of the software or any related documentation, whether expressed or implied, including but not limited to the warranties or merchantability, fitness for a particular purpose and noninfringement. In no event shall we be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or documentation or the use or other dealings in the software or documentation. Any test results or performance figures are indicative and will not reflect performance under all conditions. Any reference to any third party or third-party product, service or other resource is not an endorsement or recommendation by Block.one. We are not responsible, and disclaim any and all responsibility and liability, for your use of or reliance on any of these resources. Third-party resources may be updated, changed or terminated at any time, so the information here may be out of date or inaccurate.

Wallets and related components are complex software that require the highest levels of security. If incorrectly built or used, they may compromise users’ private keys and digital assets. Wallet applications and related components should undergo thorough security evaluations before being used. Only experienced developers should work with this software.
See LICENSE for copyright and license terms. Block.one makes its contribution on a voluntary basis as a member of the EOSIO community and is not responsible for ensuring the overall performance of the software or any related applications. We make no representation, warranty, guarantee or undertaking in respect of the software or any related documentation, whether expressed or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall we be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or documentation or the use or other dealings in the software or documentation. Any test results or performance figures are indicative and will not reflect performance under all conditions. Any reference to any third party or third-party product, service or other resource is not an endorsement or recommendation by Block.one. We are not responsible, and disclaim any and all responsibility and liability, for your use of or reliance on any of these resources. Third-party resources may be updated, changed or terminated at any time, so the information here may be out of date or inaccurate. Any person using or offering this software in connection with providing software, goods or services to third parties shall advise such third parties of these license terms, disclaimers and exclusions of liability. Block.one, EOSIO, EOSIO Labs, EOS, the heptahedron and associated logos are trademarks of Block.one.
12 changes: 10 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

You can view documentation on everything related to the EOSIO Labs™: EOSIO Explorer web tool here.

Navigate back to the top [here](../README.md).

## Documentation for Users

* [Configuration](configuration.md)
* Inspect Pages
* [Info Page](./pages/info-page.md)
* [Block List Page](./pages/block-list-page.md)
Expand All @@ -19,15 +22,20 @@ You can view documentation on everything related to the EOSIO Labs™: EOSIO Exp
* [Smart Contract Deployment Page](./pages/interact/deployment-page.md)
* [Push Action Page](./pages/interact/push-action-page.md)
* Guides
* Managing Accounts
* [Managing Connections](./guides/connection)
* [Making a New Connection](./guides/connection/new-connections.md)
* [Resetting the Current Connection](./guides/connection/reset-connections.md)
* [Managing Accounts](./guides/permissions)
* [Create Account](./guides/permissions/create_account.md)
* [Importing Keys](./guides/permissions/import_account.md)
* [Updating Public Keys](./guides/permissions/update_account.md)
* [Deploying a Smart Contract](./guides/deployment)
* [Step 1: Select File Entry Point](./guides/deployment/step-one.md)
* [Step 2: ABI File (Optional)](./guides/deployment/step-two.md)
* [Step 3: Deploy](./guides/deployment/step-three.md)
* [Pushing an Action](./guides/push-action)

## Documentation for Contributors and Developers

* [Development](development.md)
* [Contributing to the Project](../../../CONTRIBUTING.md)
* [Contributing to the Project](../CONTRIBUTING.md)
68 changes: 68 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
[Home](README.md) > Configuration

# Configuration of the Application

This section details information regarding the configuration of the application.

There are several places where you can view and/or modify configuration based on your needs:

* [.env](../.env)
* [init_config.file](../init_config.file)
* [config.file](../config.file)

## :warning: Default Ports

Out of the box, this tool requires several ports to be opened and available for use:

* `3000` [ UI - Web Application in Development Mode (used for development) ]
* `5111` [ UI - Web Application in Standard Mode ]
* `8081` [ EOSIO Compiler/Deployment Local Service (Node.JS) ]
* `8888` [ `nodeos` RPC API Service ]
* `9876` [ `nodeos` Net Plugin Service ]
* `27788` [ MongoDB API Service ]

Currently, the ports for the `nodeos` RPC API and Net Plugin services **cannot** be modified.

## Modifying Configuration when running `init`

When you invoke the `init` command, it will take the values of the keys in the `init_config.file` file.

You can change the ports of the following things in this file:

* Port taken by the EOSIO Compiler/Deployment Local Service with `LOCAL_SERVICE_PORT` key
* Port taken by the web application in development mode with `APP_DEV_PORT` key
* Port taken by the web application in standard mode web with `APP_SERVE_PORT` key

The other keys in this file relate to the Docker services found in the [eosio-toppings](https://github.com/EOSIO/eosio-toppings) monorepo. Try **not** to modify these values **unless you know what you are doing**!

## Modifying Configuration when running `start`

When you invoke the `start` command, it will take the values of the keys in the `config.file` file. Alternatively, if you wish to override the values in those keys without actually changing the `config.file` file, you can create a `config.file.local` file which will take **priority** over `config.file`.

You can change the ports of the following things in this file:

* Port taken by the web application in development mode with `APP_DEV_PORT` key
* Port taken by the web application in standard mode with `APP_SERVE_PORT` key

The other keys in this file relate to the Docker services found in the [eosio-toppings](https://github.com/EOSIO/eosio-toppings) monorepo. Try **not** to modify these values **unless you know what you are doing**!

## Modifying Environment Variables

Sometimes, it is necessary to modify the environment variables used by the main web application. This may be for a multitude of reasons but the safest environment variables to change are:

* `REACT_APP_MONGODB_PORT` - The port of the MongoDB endpoint the web app will connect to on start-up. Defaults to `27788`.
* `REACT_APP_MONGODB_DB_NAME` - The name of the MongoDB database the web app should get data from after connecting to the MongoDB database. Defaults to `eosio_nodeos_mongodb_plugin`.
* `REACT_APP_LOCAL_SERVICE_PORT` - The port of the EOSIO Compiler/Deployment Local Service. It should be the same as `LOCAL_SERVICE_PORT` inside `init_config.file`.
* `REACT_APP_APP_SERVE_PORT` - The port of the web application in standard mode. Should match `APP_SERVE_PORT` in the other config files.

Try not to change the following environment variables:

* `REACT_APP_GTM_ID` - Used for analytics.
* `GENERATE_SOURCEMAP` - Used for page building.

:no_good: Under no circumstances should you change the following variables :no_good:

* `NODE_PATH`
* `SASS_PATH` (exception: [adding custom mixins and variables to the existing CSS](development.md#custom-mixins-and-variables))

They are critical for the web application to run.
10 changes: 5 additions & 5 deletions docs/development.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Start Development

If you want to develop on this application ( etc. adding a new feature, bug fixing... ), please follow these steps to setup your local development environment.
If you want to contribute to the development of this application (adding a new feature, fixing a bug or issue, etc.) please follow the following steps.

Make sure `node.js`, `yarn`, `docker` are installed properly and we assume you are using macOS Mojave or higher to do the development.

Expand All @@ -11,8 +11,8 @@ Make sure `node.js`, `yarn`, `docker` are installed properly and we assume you a
`eosio-toppings` is a monorepo with all the dependecies required for this app, you may need to make changes also in these dependecies while your development.

1. git clone https://github.com/EOSIO/eosio-toppings
2. cd into `eosio-toppings` ( eosio-toppings repository project root)
3. cd into each of the below packages folder and run `yarn link` in each folder. A "success Registered" message should be shown each time you do `yarn link`
2. cd into `eosio-toppings` (eosio-toppings repository project root)
3. cd into each of the below packages folder and run `yarn link` in each folder. A "Success Registered" message should be shown each time you do `yarn link`
- packages/api-eosio-compiler
- packages/api-mongodb-plugin
- packages/api-rpc
Expand All @@ -23,7 +23,7 @@ Make sure `node.js`, `yarn`, `docker` are installed properly and we assume you a
### eosio-explorer

1. git clone https://github.com/EOSIO/eosio-explorer
2. cd into `eosio-explorer` ( eosio-explorer repository project root)
2. cd into `eosio-explorer` (eosio-explorer repository project root)
3. Make symlinks to above local `eosio-toppings` dependecies. Run below commands. "success Using linked package" messages should be shown.
- `yarn link @eosio-toppings/api-eosio-compiler`
- `yarn link @eosio-toppings/api-mongodb-plugin`
Expand Down Expand Up @@ -64,7 +64,7 @@ Then, you can add mixins and variables into the `src/scss` folder according to t
The source, at its core, is composed of three things:

1. Pages - What the user sees when they navigate to a particular URL. A page should be created when you wish to display something at a new URL / route.
2. Components - The building blocks of the page and the template. Individual parts that will be used throughout the site should be placed here/
2. Components - The building blocks of the page and the template. Individual parts that will be used throughout the site should be placed here.
3. Templates - A wrapper by which common components are shown in a particular layout which is used frequently. For example, it is common to have the same header and footer in different pages of the website. The page component should almost always be inside a template component.

Prerendering is done using `react-snap` by crawling all routes and prerendering the pages into `.html` files.
Expand Down
14 changes: 14 additions & 0 deletions docs/guides/connection/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Home](../..) > Guides > Managing Connections

# Managing Connections

:warning: Disclaimer :warning:

As this tool is meant for local development, you should try as much as possible to use this Connections panel when working with remote blockchains other than the local one which this tool starts for you. You should also use this panel if you are starting this tool with the `start_gui` command.

:passport_control: Also, please note that you **cannot** use the tool to connect to multiple `nodeos` instances at the same time, whether by opening multiple tabs or by opening it in multiple browsers. :passport_control:

Possible Actions:

* [Making a New Connection](new-connections.md)
* [Resetting the Current Connection](reset-connections.md)
30 changes: 30 additions & 0 deletions docs/guides/connection/new-connections.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[Home](../..) > Guides > [Managing Connections](README.md) > Establishing New Connections

# Establishing New Connections

When you first open the tool, you will first see the Info Page. After closing the welcome message, you will immediately be able to see the information regarding the `nodeos` instance you are connected to:

![Default Connections](../../images/connect/default_cxn.png)

You can change this by replacing the input fields specified by "Connected Nodeos" and "Connected MongoDB" to whatever you choose.

:warning: - For demonstration purposes, the endpoints shown in this guide have been redacted.

## Changing the Endpoints

After replacing the text to endpoints of your choosing, the "Connect" button will no longer be disabled:

![Changed Connection](../../images/connect/change_cxn.png)

After clicking the "Connect" button, you will be asked to **confirm** if you wish to change your connection or not, since you will lose all currently stored private keys.

:warning: Disclaimer :warning:

1. Be **very certain** that your connected `nodeos` and MongoDB endpoints match one another, otherwise you might encounter some problems regarding mismatched block data and/or permissions.
2. Changing the connection **will clear your locally stored private keys** so please back them up in advance if you need to.

## Successful Connection

After successfully changing the connection, your screen will refresh and reflect the data coming from the new endpoint:

![New Connection](../../images/connect/new_cxn.png)
Loading