Skip to content

Commit

Permalink
Added GetAddresses unit test and fixed SubmitTransaction unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
amit-momin committed Dec 6, 2024
1 parent 9b33790 commit c768ea0
Show file tree
Hide file tree
Showing 6 changed files with 288 additions and 46 deletions.
Binary file removed pkg/solana/chainwriter/__debug_bin2449797533
Binary file not shown.
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 @@ -79,7 +79,7 @@ func TestConfig() {
// 3. Lookup Table content - Get all the accounts from a lookup table
// 4. PDA Account Lookup - Based on another account and a seed/s
// Nested PDA Account with seeds from:
// -> input paramters
// -> input parameters
// -> constant
// PDALookups can resolve to multiple addresses if:
// A) The PublicKey lookup resolves to multiple addresses (i.e. multiple token addresses)
Expand Down
10 changes: 8 additions & 2 deletions pkg/solana/chainwriter/chain_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,14 @@ func (s *SolanaChainWriterService) FilterLookupTableAddresses(
}

func (s *SolanaChainWriterService) SubmitTransaction(ctx context.Context, contractName, method string, args any, transactionID string, toAddress string, meta *types.TxMeta, value *big.Int) error {
programConfig := s.config.Programs[contractName]
methodConfig := programConfig.Methods[method]
programConfig, exists := s.config.Programs[contractName]
if !exists {
return fmt.Errorf("failed to find program config for contract name: %s", contractName)
}
methodConfig, exists := programConfig.Methods[method]
if !exists {
return fmt.Errorf("failed to find method config for method: %s", method)
}

// Configure debug ID
debugID := ""
Expand Down
Loading

0 comments on commit c768ea0

Please sign in to comment.