|
| 1 | +# Getting Started |
| 2 | + |
| 3 | +1. clone the repo |
| 4 | + |
| 5 | +```shell |
| 6 | +git clone https://github.com/cryptape/Microscope/ |
| 7 | +``` |
| 8 | + |
| 9 | +2. Install Dependencies |
| 10 | + |
| 11 | +```bash |
| 12 | +yarn install |
| 13 | +``` |
| 14 | + |
| 15 | +3. Build DLL Packages |
| 16 | + |
| 17 | +```shell |
| 18 | +yarn run dll |
| 19 | +``` |
| 20 | + |
| 21 | +4. Add Config |
| 22 | + |
| 23 | +```shell |
| 24 | +cp ./env.example ./env |
| 25 | +``` |
| 26 | + |
| 27 | +set env variables in `./env` |
| 28 | + |
| 29 | +``` |
| 30 | +PUBLIC= # public content server address |
| 31 | +CITA_SERVER= # default appchain address |
| 32 | +APP_NAME= # explorer name |
| 33 | +``` |
| 34 | + |
| 35 | +5. Developing |
| 36 | + |
| 37 | +```shell |
| 38 | +yarn start |
| 39 | +``` |
| 40 | + |
| 41 | +6. Building |
| 42 | + |
| 43 | +```shell |
| 44 | +yarn run build:prod |
| 45 | +``` |
| 46 | + |
| 47 | +# How to use |
| 48 | + |
| 49 | +## Set appchain |
| 50 | + |
| 51 | +If you visit the explorer first time, the side panel will pop up to set appchain address you want to listen to. |
| 52 | + |
| 53 | +## Data in Microscope |
| 54 | + |
| 55 | +The main sections consists of **homepage**, **block**, **transaction**, **account**, **statistics**, **config**, and most of them can be accessed via navigation bar. |
| 56 | + |
| 57 | +### Homepage |
| 58 | + |
| 59 | +Homeage includes `Latest 10 Blocks` and `Latest 10 Transactions` |
| 60 | + |
| 61 | +### Block |
| 62 | + |
| 63 | +> NOTICE: This page only works with [agera_one](https://github.com/Keith-CY/agera_one), the server caching appchain. |
| 64 | +
|
| 65 | +**Block Page** show list of blocks, the table items can be specified in **Config Page** |
| 66 | + |
| 67 | +Filters can be set in **Advanced Selector**, available params are `numberFrom`, `numberTo`, `transactionFrom`, `transactionTo`. |
| 68 | + |
| 69 | +`numberFrom` and `numberTo` limit the range of block number. |
| 70 | + |
| 71 | +`transactionFrom` and `transactionTo` limit the range of transaction count in one block. |
| 72 | + |
| 73 | +Block Detail can be inspected via table link. |
| 74 | + |
| 75 | +### Transaction |
| 76 | + |
| 77 | +> NOTICE: This page only works with [agera_one](https://github.com/Keith-CY/agera_one), the server caching appchain. |
| 78 | +
|
| 79 | +**Transaction Page** show list of transaction, the table items can be specified in **Config Page** |
| 80 | + |
| 81 | +Filters can be set in **Advanced Selector**, available params are `from`, `to`. |
| 82 | + |
| 83 | +`from` and `to` limit `transaction.from` and `transaction.to`. |
| 84 | + |
| 85 | +Transaction Detail can be inspected via `hash`. |
| 86 | + |
| 87 | +Block Detail can be inspected via `height`. |
| 88 | + |
| 89 | +Account Detail can be inspected via `from` and `to`. |
| 90 | + |
| 91 | +### Statisitcs |
| 92 | + |
| 93 | +> NOTICE: Partial diagrams works with [agera_one](https://github.com/Keith-CY/agera_one), the server caching appchain. |
| 94 | +
|
| 95 | +**Statistics Page** show list of diagrams, the displaying items can be specified in **Config Page** |
| 96 | + |
| 97 | +For now, **Statistics Page** includes `Interval/Block`, `Transactions/Block`, `Gas Used/Block`, `Gas Used/Transaction`, `Proposals/Validator` diagrams. |
| 98 | + |
| 99 | +### Account |
| 100 | + |
| 101 | +**Account Page** displays its **balance** and **transaction records**, and if the account is an contract, the abi panel will also be available. |
| 102 | + |
| 103 | +## Other Widgets |
| 104 | + |
| 105 | +### Header |
| 106 | + |
| 107 | +Important Functionalities are shown as badges in the right of header, they are **Chain Name**, **TPS**, **Search**, **Languages**, all of them has their own panel. |
| 108 | + |
| 109 | +### Metadata Panel |
| 110 | + |
| 111 | +On click of **Chain Name** the **Metapata Panel** will be called out. |
| 112 | + |
| 113 | +The **Metadata Panel** is used to check metadata of active chain, or inspect and switch to other chain by entering IP in the search field. |
| 114 | + |
| 115 | +### Statistics Panel |
| 116 | + |
| 117 | +On click of **TPS** the **Statistics Panel** will be called out. |
| 118 | + |
| 119 | +The **Statistics Panel** is used to inspect current status of active chain. |
| 120 | + |
| 121 | +### Search Panel |
| 122 | + |
| 123 | +On click of **Search** the **Search Panel** will be called out. |
| 124 | + |
| 125 | +The **Search Panel** is used to inspect block, transaction and account's detail by searching hash or number. |
| 126 | + |
| 127 | +### Languages |
| 128 | + |
| 129 | +For now, some languages('zh', 'en', 'jp', 'ko', 'de', 'it', 'fr') can be set by language menu. |
| 130 | + |
| 131 | +## Others |
| 132 | + |
| 133 | +> NOTICE: Block Detail can be visited `localhost/#/block/:blockHash` and `localhost/#/height/:blockNumber |
| 134 | +
|
| 135 | +> Transaction Detail can be visited `localhost/#/transaction/:transactionHash` |
| 136 | +
|
| 137 | +> Account Detail can be visited `localhost/#/account/:accountAddress` |
0 commit comments