---
# System prepended metadata

title: Geth JS Console Workshop

---

Geth JS Console Workshop
===========

### Clone repo & install dependencies

```
git clone https://github.com/GAtom22/geth_console_workshop.git
cd geth_console_workshop
npm i
```

### Install NPX

Check if already installed running the command:

```
npx -v 
```

Otherwise, install with

```
npm install -g npx
```

### Start local node

#### Ethermint

```
./tests/solidity/init-test-node.sh
```

#### Evmos

if using Evmos node, make sure to remove the current `.tmp-evmosd` directory.

```
./local_node.sh
```


### Deploy contract

```
npx hardhat run scripts/deploy.ts
```

### Change greeting message

```
npx hardhat run scripts/change_greet.ts
```

### Create filter

```
eth.filter({topics: ["0x61ae4cbae83f72235cd9fa781d18fcb08ff5fa4a44fcc1630fde673bb0041151"]})
```

### Get filter changes

```
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getFilterChanges","params":["0xda8c3bd6c8a820a3a2b83401cbeb228c"],"id":1}' -H "Content-Type: application/json" http://localhost:8545
```

To have a prettier format on the response, can use the `jq` tool. To do this, add ` | jq` trailing the curl command.
