Merge branch 'master' of github.com:dfuse-io/solana-go

This commit is contained in:
billettc 2020-12-07 13:36:36 -05:00
commit e66b80ff28
6 changed files with 13 additions and 13 deletions

View File

@ -15,7 +15,6 @@
package cmd
import (
"context"
"fmt"
"github.com/spf13/cobra"
@ -27,9 +26,8 @@ var getBalanceCmd = &cobra.Command{
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
client := getClient()
ctx := context.Background()
resp, err := client.GetBalance(ctx, args[0], "")
resp, err := client.GetBalance(cmd.Context(), args[0], "")
if err != nil {
return err
}

View File

@ -15,7 +15,6 @@
package cmd
import (
"context"
"encoding/json"
"fmt"
"os"
@ -33,9 +32,8 @@ var getProgramAccountsCmd = &cobra.Command{
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
client := getClient()
ctx := context.Background()
resp, err := client.GetProgramAccounts(ctx, solana.MustPublicKeyFromBase58(args[0]), nil)
resp, err := client.GetProgramAccounts(cmd.Context(), solana.MustPublicKeyFromBase58(args[0]), nil)
if err != nil {
return err
}

View File

@ -67,6 +67,8 @@ var tokenRegistryRegisterCmd = &cobra.Command{
return fmt.Errorf("unable to continue without a specified registrar")
}
// TODO: we shoul check on chain if the symbol exists
registrarPubKey, err := solana.PublicKeyFromBase58(pkeyStr)
if err != nil {
return fmt.Errorf("invalid registrar key %q: %w", pkeyStr, err)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,7 @@ import (
"github.com/dfuse-io/solana-go"
)
var mainnetProgramID = solana.MustPublicKeyFromBase58("99999999999999999999999999999999999999999999")
var mainnetProgramID = solana.MustPublicKeyFromBase58("CmPVzy88JSB4S223yCvFmBxTLobLya27KgEDeNPnqEub")
var testnetProgramID = solana.MustPublicKeyFromBase58("99999999999999999999999999999999999999999999")
var devnetProgramID = solana.MustPublicKeyFromBase58("99999999999999999999999999999999999999999999")