Skip to content

Instantly share code, notes, and snippets.

@MariusVanDerWijden
Created July 8, 2020 09:20
Show Gist options
  • Save MariusVanDerWijden/bca968be0f450c96e6a340e60e763b78 to your computer and use it in GitHub Desktop.
Save MariusVanDerWijden/bca968be0f450c96e6a340e60e763b78 to your computer and use it in GitHub Desktop.
// Connect to a node
backend, err := ethclient.Dial("/tmp/geth.ipc")
// Get the contract address from hex string
addr := common.HexToAddress("0x000")
// Bind to an already deployed contract
ctr, err := contract.NewContract(addr, backend)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment