You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
Thanks for the owesome module you created.
Recently i have an issue with the example you provide in the readme.
Here is the code snnipet i am using:
package main
import (
"fmt""github.com/ethereum/go-ethereum/ethclient"
ens "github.com/wealdtech/go-ens/v3"
)
funcmain() {
// Replace SECRET with your own access token for this example to work.client, err:=ethclient.Dial("https://cloudflare-eth.com")
iferr!=nil {
panic(err)
}
// Resolve a name to an addressdomain:="avsa.eth"address, err:=ens.Resolve(client, domain)
iferr!=nil {
panic(err)
}
fmt.Printf("Address of %s is %s\n", domain, address.Hex())
// Reverse resolve an address to a namereverse, err:=ens.ReverseResolve(client, address)
iferr!=nil {
panic(err)
}
ifreverse=="" {
fmt.Printf("%s has no reverse lookup\n", address.Hex())
} else {
fmt.Printf("Name of %s is %s\n", address.Hex(), reverse)
}
}
However,the program raise the error:
panic: no contract code at given address
goroutine 1 [running]:
main.main()
/root/go/src/ens/client/main2.go:21 +0x345
exit status 2
The above code worked well in the past several weeks, but failed today.Could you please give some suggestions to fix this problem?
Thank you!
The text was updated successfully, but these errors were encountered:
As far as I am aware https://cloudflare-eth.com is not a valid Ethereum JSON-RPC endpoint, which is why this is failing. Please could you try this with a valid Ethereum JSON-RPC endpoint as per the example?
Hi
Thanks for the owesome module you created.
Recently i have an issue with the example you provide in the readme.
Here is the code snnipet i am using:
However,the program raise the error:
The above code worked well in the past several weeks, but failed today.Could you please give some suggestions to fix this problem?
Thank you!
The text was updated successfully, but these errors were encountered: