From 62e7bca196d73e55e2ff17c114b201de37e585d1 Mon Sep 17 00:00:00 2001 From: Mateusz Sekara Date: Mon, 30 Sep 2024 16:21:17 +0200 Subject: [PATCH] CCIP-3555 Attestation encoder interfaces (#813) * Attestation encoder interfaces * Attestation encoder interfaces * Attestation encoder interfaces * Comment --- pkg/types/ccipocr3/interfaces.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/types/ccipocr3/interfaces.go b/pkg/types/ccipocr3/interfaces.go index 1e4a77dfd..3a263666e 100644 --- a/pkg/types/ccipocr3/interfaces.go +++ b/pkg/types/ccipocr3/interfaces.go @@ -31,3 +31,10 @@ type RMNCrypto interface { signerAddresses []Bytes, ) error } + +// TokenDataEncoder is a generic interface for encoding offchain token data for different chain families. +// Right now it supports only USDC/CCTP, but every new token that requires offchain data processsing +// should be added to that interface and implemented in the downstream repositories (e.g. chainlink-ccip, chainlink). +type TokenDataEncoder interface { + EncodeUSDC(ctx context.Context, message Bytes, attestation Bytes) (Bytes, error) +}