Ethereum Dapp Go API, inspired by
web3.js.
Report Bug
·
Pull Request
This is the Ethereum Golang API which connects to the Generic JSON-RPC spec.
You need to run a local or remote Ethereum node to use this library.
Here is an open source case Web3 Studio reference under.
go get github.com/6boris/web3-go
package main
import (
"context"
"fmt"
"github.com/6boris/web3-go/client"
clientModel "github.com/6boris/web3-go/model/client"
)
func main() {
ec := client.NewPool(clientModel.GetDefaultConfPool())
chainID := int64(1)
callResp, err := ec.GetEvmClient(chainID).SuggestGasTipCap(context.Background())
if err != nil {
panic(err)
}
fmt.Println(fmt.Sprintf("ChainID:%d GasPrice:%s", chainID, callResp.String()))
}
/*
Output:
ChainID:1 GasPrice:10670000
*/
- Client
- Base Method
- eth_chainId
- web3_clientVersion
- eth_gasPrice
- eth_blockNumber
- eth_getBalance
- ...
- Middleware
- LoadBalance
- Metrics
- Grafana
- CircuitBreaker
- Business Cases
- Web3 Studio
- Base Method
- Other ...
- web3.js Ethereum JavaScript API.
- Web3j Web3 Java Ethereum Ðapp API.
- Web3.py A Python library for interacting with Ethereum.
- JSON RPC Defining the JSON RPC specification.
- Go Ethereum Official Golang implementation of the Ethereum protocol.
- Ethereum 1.0 API Ethereum JSON-RPC Specification.