Skip to content

Commit

Permalink
remove GetDestinationTokens
Browse files Browse the repository at this point in the history
  • Loading branch information
0xnogo committed Jul 11, 2024
1 parent 2c27db7 commit cb33447
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions core/services/ocr2/plugins/ccip/internal/ccipcommon/shortcuts.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,39 +26,6 @@ type BackfillArgs struct {
SourceStartBlock, DestStartBlock uint64
}

// GetDestinationTokens returns the destination chain fee tokens from the provided price registry
// and the bridgeable tokens from the offramp.
// func GetDestinationTokens(ctx context.Context, offRamp ccipdata.OffRampReader, priceRegistry cciptypes.PriceRegistryReader) (fee, bridged []cciptypes.Address, err error) {
// eg := new(errgroup.Group)

// var destFeeTokens []cciptypes.Address
// var destBridgeableTokens []cciptypes.Address

// eg.Go(func() error {
// tokens, err := priceRegistry.GetFeeTokens(ctx)
// if err != nil {
// return fmt.Errorf("get dest fee tokens: %w", err)
// }
// destFeeTokens = tokens
// return nil
// })

// eg.Go(func() error {
// tokens, err := offRamp.GetTokens(ctx)
// if err != nil {
// return fmt.Errorf("get dest bridgeable tokens: %w", err)
// }
// destBridgeableTokens = tokens.DestinationTokens
// return nil
// })

// if err := eg.Wait(); err != nil {
// return nil, nil, err
// }

// return destFeeTokens, destBridgeableTokens, nil
// }

// FlattenUniqueSlice returns a flattened slice that contains unique elements by preserving their order.
func FlattenUniqueSlice[T comparable](slices ...[]T) []T {
seen := make(map[T]struct{})
Expand Down

0 comments on commit cb33447

Please sign in to comment.