Skip to content

Instantly share code, notes, and snippets.

@SomniaStellarum
Last active April 17, 2019 14:38
Show Gist options
  • Save SomniaStellarum/1753b2b469864e7ce8350cae2a4e2ab2 to your computer and use it in GitHub Desktop.
Save SomniaStellarum/1753b2b469864e7ce8350cae2a4e2ab2 to your computer and use it in GitHub Desktop.
package main
import (
"context"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/ethclient"
)
var server = "http://localhost:8545"
var blockHash = "0xac8e95f7483f7131261bcc0a70873f8236c27444c940defc677f74f281220193"
func main() {
cl, _ := ethclient.Dial(server)
ctx := context.Background()
blk, _ := cl.BlockByHash(ctx, common.HexToHash(blockHash))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment