Initializing a Client
Before interacting with the blockchain, you need to initialize a client. First import the relevant packages:
// Import the latest version of the package
import (
phoenixClient "github.com/PhoenixGlobal/Phoenix-Chain-SDK/ethereum/ethclient"
)
Then connect a client:
// Connect to a phoenix node
client, err := phoenixClient.Dial("https://dataseed1.phoenix.global/rpc")
if err != nil {
log.Fatal(err)
}
Last updated