From 6431aa247e7e7b34e60780359c5af8e7622e01f0 Mon Sep 17 00:00:00 2001 From: Joe Huang Date: Wed, 26 Feb 2025 16:49:08 -0600 Subject: [PATCH] update --- core/capabilities/ccip/ccipevm/addresscodec.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/capabilities/ccip/ccipevm/addresscodec.go b/core/capabilities/ccip/ccipevm/addresscodec.go index 373e4dfe8fe..8c9e5ad47e3 100644 --- a/core/capabilities/ccip/ccipevm/addresscodec.go +++ b/core/capabilities/ccip/ccipevm/addresscodec.go @@ -4,11 +4,18 @@ import ( "encoding/hex" "fmt" "strings" + + "github.com/ethereum/go-ethereum/common" ) type AddressCodec struct{} func (a AddressCodec) AddressBytesToString(addr []byte) (string, error) { + // TODO support EIP-55 checksum, https://smartcontract-it.atlassian.net/browse/CCIP-5340 + if len(addr) != common.AddressLength { + return "", fmt.Errorf("invalid EVM address length, expected %v, got %d", common.AddressLength, len(addr)) + } + return "0x" + hex.EncodeToString(addr), nil }