Skip to content

Commit

Permalink
PR Review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
silaslenihan committed Jan 29, 2025
1 parent a5bd8d6 commit 4bd3449
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pkg/solana/chainwriter/ccip_example_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func TestConfig() {
// PDALookups can resolve to multiple addresses if:
// A) The PublicKey lookup resolves to multiple addresses (i.e. multiple token addresses)
// B) The Seeds or ValueSeeds resolve to multiple values
// PDA lokoup with constant seed
// PDA lookup with constant seed
PDALookups{
Name: "RouterAccountConfig",
PublicKey: AccountConstant{
Expand Down
2 changes: 1 addition & 1 deletion pkg/solana/chainwriter/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type DataAccount struct {
//go:embed testContractIDL.json
var testContractIDL string

// FetchCCIPRouterIDL returns
// FetchCCIPRouterIDL returns the IDL for chain components test contract
func FetchTestContractIDL() string {
return testContractIDL
}
Expand Down
8 changes: 3 additions & 5 deletions pkg/solana/chainwriter/transform_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import (
"github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3"
)

// TODO: make this type in the ccipocr3 package
// TODO: consolidate Info and AbstractReport
// TODO: make this type in the chainlink-common CW package
type ReportPreTransform struct {
ReportContext [2][32]byte
Report []byte
Expand All @@ -35,9 +34,8 @@ func FindTransform(id string) (func(context.Context, *SolanaChainWriterService,
}
}

// This example doesn't contain the complete implementation of the function, since the
// types needed to transform can't be imported into this repository. However, in production, this
// function will be implemented in the CCIP plugin, which will have access to all the necessary types.
// This Transform function looks up the token pool addresses in the accounts slice and augments the args
// with the indexes of the token pool addresses in the accounts slice.
func CCIPArgsTransform(ctx context.Context, cw *SolanaChainWriterService, args any, accounts solana.AccountMetaSlice, toAddress string) (any, error) {
TokenPoolLookupTable := LookupTables{
DerivedLookupTables: []DerivedLookupTable{
Expand Down

0 comments on commit 4bd3449

Please sign in to comment.