https://github.com/tr1sm0s1n/geth-ethclient-starter
A comprehensive guide to using the ethclient package from Geth (go-ethereum) to build Ethereum applications with Go.
https://github.com/tr1sm0s1n/geth-ethclient-starter
ethereum example fe geth go go-ethereum golang guide smart-contracts solidity starter vyper
Last synced: 3 months ago
JSON representation
A comprehensive guide to using the ethclient package from Geth (go-ethereum) to build Ethereum applications with Go.
- Host: GitHub
- URL: https://github.com/tr1sm0s1n/geth-ethclient-starter
- Owner: tr1sm0s1n
- License: mit
- Created: 2024-10-06T12:15:57.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-03-29T15:18:54.000Z (3 months ago)
- Last Synced: 2025-03-29T16:25:41.565Z (3 months ago)
- Topics: ethereum, example, fe, geth, go, go-ethereum, golang, guide, smart-contracts, solidity, starter, vyper
- Language: Go
- Homepage:
- Size: 115 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Geth ethclient Starter
A comprehensive guide to using the `ethclient` package from **Geth** ([go-ethereum](https://github.com/ethereum/go-ethereum)) to build Ethereum applications with **Go**.
## 🛠 Built With
[](https://go.dev/)
[](https://geth.ethereum.org/)## ⚙️ Run Locally
Clone the project:
```sh
git clone https://github.com/tr1sm0s1n/geth-ethclient-starter.git
cd geth-ethclient-starter
```Use AetherGuild submodule for simulated blockchain:
```sh
git submodule update --init --recursive
cd aetherguild && make
```Generate address-key pair:
```sh
go run cmd/accounts/generator.go
```Visit [Druid Faucet](http://127.0.0.1:8580) to get test ether.
Export private key as env variable:
```sh
export PRIVATE_KEY=
```Install `abigen`:
```bash
go install github.com/ethereum/go-ethereum/cmd/abigen@latest
```Generate Go binding for the contract:
```bash
abigen --v2 --bin contract/output/Cert/Cert.bin --abi contract/output/Cert/Cert_abi.json --pkg contract --type Cert --out contract/Cert.go
```Deploy the contract:
```sh
go run cmd/contracts/deploy.go
```Export contract address as env variable:
```sh
export CONTRACT_ADDRESS=
```Run event listener for the contract:
```sh
go run cmd/events/listener.go
```Run CLI instigator for contract (export values if needed):
```sh
go run .
```Send a blob transaction to the simulation (optional):
```sh
go run cmd/transactions/blob.go
```Use [`graphql/queries`](graphql/queries) to get balance, blocks and receipts via [GraphQL UI](http://127.0.0.1:8545/graphql/ui).