Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
ilija42 committed Feb 7, 2025
1 parent ab79905 commit 98e102c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkg/solana/chainreader/bindings.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,23 @@ import (
"github.com/smartcontractkit/chainlink-common/pkg/types"
)

type ReadType int

const (
Log ReadType = iota
Account
AccountPDA
AccountMulti
AccountSplitParams
)

type readBinding interface {
SetAddress(solana.PublicKey)
GetAddress(context.Context, any) (solana.PublicKey, error)
SetCodec(types.RemoteCodec)
CreateType(bool) (any, error)
Decode(context.Context, []byte, any) error
ReadType() ReadType
}

// key is namespace
Expand Down
3 changes: 3 additions & 0 deletions pkg/solana/chainreader/lookup.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ import (
type readValues struct {
address string
contract string

// First read in multi read has type info that other sequential reads are filling out.
// this works by having hard coder codec modifier define fields that are filled out by subsequent reads.
multiRead []string
ReadType string
}

// lookup provides basic utilities for mapping a complete readIdentifier to
Expand Down Expand Up @@ -64,6 +66,7 @@ func (l *lookup) bindAddressForContract(contract, address string) {
address: address,
contract: contract,
multiRead: multiRead,
ReadType:
}
}
}
Expand Down

0 comments on commit 98e102c

Please sign in to comment.