All Products

Tenderly Node
Interaction Libraries
Go

Go-Ethereum (geth) - Tenderly Node Integration

Go-Ethereum is the official Ethereum implementation in Go, to interact with the blockchain. Go-Ethereum, also known as geth for short, is the most popular Ethereum client. It provides everything we’ll ever need for reading and writing to the blockchain when developing applications using Golang.

package main
 
import (
    "fmt"
    "log"
    "github.com/ethereum/go-ethereum/ethclient"
)
 
func main() {
    client, err := ethclient.Dial("https://mainnet.gateway.tenderly.co/<TENDERLY_NODE_ACCESS_KEY_MAINNET>")
    if err != nil {
        log.Fatal(err)
    }
 
    fmt.Println("we have a connection")
    _ = client // we'll use this in the upcoming sections
}