# README
go-erc1820
Go module to simplify talking to the ERC-1820 registry contract.
Table of Contents
Install
go-erc1820
is a standard Go module which can be installed with:
go get github.com/wealdtech/go-erc1820
Usage
go-erc1820
provides simple access to the ERC-1820 registry contract.
Example
package main
import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/ethclient"
erc1820 "github.com/wealdtech/go-erc1820"
)
func main() {
client, err := ethclient.Dial("https://infura.io/v3/SECRET")
if err != nil {
panic(err)
}
registry, err := erc1820.New(client)
if err != nil {
panic(err)
}
// Fetch the implementer for an interface
implementer, err := registry.InterfaceImplementer("ERC777TokensRecipient", common.HexToAddress("907b4EB76F423595408C49c0BbB2bb117C91c594"))
if err != nil {
panic(err)
}
fmt.Printf("Implementer is %s\n", implementer.Hex())
}
Maintainers
Jim McDonald: @mcdee.
Contribute
Contributions welcome. Please check out the issues.
License
Apache-2.0 © 2019 Weald Technology Trading Ltd
# Packages
No description provided by the author
# Functions
NewImplementer creates a new ERC-1820 registry implementer client.
NewRegistry creates a new ERC-1820 registry client.
# Structs
Implementer is the struct that holds information about an ERC-1820 interface implementer.
Registry is the struct that holds information about the ERC-1820 registry.