Added Command for using Geth as a Module in Go

Many users use Geth to interact with EVM blockchains over their go programs with the go get command. 
I added the command for adding geth as a Go project dependency
This commit is contained in:
Ukeje Chukwuemeriwo Goodness 2024-02-18 14:15:46 +01:00 committed by GitHub
parent 593e303485
commit cb827bc463
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -17,18 +17,24 @@ archives are published at https://geth.ethereum.org/downloads/.
For prerequisites and detailed build instructions please read the [Installation Instructions](https://geth.ethereum.org/docs/getting-started/installing-geth).
Building `geth` requires both a Go (version 1.19 or later) and a C compiler. You can install
them using your favourite package manager. Once the dependencies are installed, run
them using your favourite package manager. Once the dependencies are installed, run:
```shell
make geth
```
if you have go installed, you
or, to build the full suite of utilities:
```shell
make all
```
## Executables
The go-ethereum project comes with several wrappers/executables found in the `cmd`
@ -196,6 +202,16 @@ connect via HTTP, WS or IPC to a `geth` node configured with the above flags and
need to speak [JSON-RPC](https://www.jsonrpc.org/specification) on all transports. You
can reuse the same connection for multiple requests!
Also, you can add geth as a project dependency in your Go apps with this command:
```
go get github.com/ethereum/go-ethereum@latest
```
**Note: Please understand the security implications of opening up an HTTP/WS based
transport before doing so! Hackers on the internet are actively trying to subvert
Ethereum nodes with exposed APIs! Further, all browser tabs can access locally