Skip to content

Commit

Permalink
Updating README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mojtaba-eshghie committed Jun 24, 2024
1 parent b7b7371 commit 868c995
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 56 deletions.
58 changes: 2 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,56 +122,6 @@ Run the `npm install` in the main repository directory and the following directo
`client` -->

## Usage

### Using HighGuard in Client-Server Mode

Run the following commands (in order):

In **server**:

`npm start`

The server will ask for your DCRGraphs credentials the first time you run it. The credentials will be stored under `server/monitor/datastore/` directory as a sqlite database.

In **client**:

`npm start`

Go to the following address in your browser (or alternatives that were used if port 3001 is unavailable), and use the monitor web interface:
[http://localhost:3000](http://localhost:3001)

Fill the forms inputs from top to down for it to work properly.

### Using Clawk Standalone CLI Monitor

Run the following CLI command using the options in the table below:

```sh
node server/monitor/monitorCLI.js
```

Use the following options with the Clawk Standalone CLI Monitor:

| Option | Description | Required |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| `--help` | Show help | No |
| `--version` | Show version number | No |
| `--address` | The address of the deployed contract | Yes |
| `--dcrID` | The DCR model identifier from DCRGraphs.net website | Yes |
| `--simID` | The identifier of the specific simulation you want to model this contract against. This identifier is retrievable by going to address [https://repository.dcrgraphs.net/api/graphs/${dcrID}/sims/](https://repository.dcrgraphs.net/api/graphs/${dcrID}/sims/) replacing ${dcrID} with the ID of the model you are trying to monitor against | Yes |
| `--ABIFileName` | The name of the contract ABI file (for example: PiggyBank.json). You should first put this file in the path `server/monitor/contracts/json-interface` | Yes |
| `--contract` | The contract parameter | Yes |
| `--paramap` | Supply parameter mapping for function calls to DCR graphs semantics for any transaction. The same file name as ABIFileName will be looked up in `server/monitor/contracts/paramaps/` directory. Format of the required json file: <br> `{` <br> ` "functionName": {` <br> ` "paramName": {` <br> ` EVMType: "...",` <br> ` DCRType: "...",` <br> ` DCRNodeID: "..."` <br>` }`<br> `"roleSetter":true ` <br> `"roleVariableIdentifier":"owner"` <br> `}`<br> `}` |
| | No |

#### Example command usage:

```sh
node monitorCLI.js --address 0xB343f140a4426dc4eb40C2aFCe777D0509e4dCC0 --dcrID 1700559 --simID 1925367 \
--ABIFileName PiggyBank.json --contract PiggyBank
```

## Cite Us

```
Expand Down Expand Up @@ -199,10 +149,6 @@ node monitorCLI.js --address 0xB343f140a4426dc4eb40C2aFCe777D0509e4dCC0 --dcrID
```

## Dependencies

- `Foundry` and `Anvil` should have been installed for running the exploits locally. This is required both when you expand and setup the monitor check its capabilities as well as checking the smart contracts themselves.

## Screenshot of the tool web interface (client)
## Using HighGuard in Client-Server Mode

![HighGuard Screenshot](https://raw.githubusercontent.com/mojtaba-eshghie/CLawK/main/client/public/Screenshot%202023-06-21%20at%2016.32.03.png)
This part is deprecated, and is not actively maintained. You can look [here](https://github.com/mojtaba-eshghie/HighGuard/wiki/Using-HighGuard-in-Client%E2%80%90Server-Mode) for the old documentation.
File renamed without changes.

0 comments on commit 868c995

Please sign in to comment.