Skip to content

Commit

Permalink
fix decoding of TokenMeta!
Browse files Browse the repository at this point in the history
  • Loading branch information
billettc committed Nov 24, 2020
1 parent f9fe8d5 commit 44cbbdb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions cmd/slnc/cmd/get_token_meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ var getTokenMetaCmd = &cobra.Command{
err = text.NewEncoder(os.Stdout).Encode(tm, nil)
errorCheck("textEncoding", err)

//fmt.Println("raw data", hex.EncodeToString(accountInfo.Value.Data))
return nil
},
}
Expand Down
13 changes: 10 additions & 3 deletions programs/tokenregistry/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,21 @@
// limitations under the License.
package tokenregistry

import "github.com/dfuse-io/solana-go"

type Logo [32]byte
type Name [32]byte
type Symbol [12]byte

type TokenMeta struct {
Logo Logo
Name Name
Symbol Symbol
IsInitialized bool
Reg [3]byte `text:"-"`
DataType byte
MintAddress *solana.PublicKey
RegistrationAuthority *solana.PublicKey
Logo Logo
Name Name
Symbol Symbol
}

func (l Logo) String() string {
Expand Down

0 comments on commit 44cbbdb

Please sign in to comment.