From 956fa20626915e82b3de02401a10b2d5ce896e44 Mon Sep 17 00:00:00 2001 From: Christian Lohr Date: Thu, 29 Aug 2024 12:19:47 +0200 Subject: [PATCH] fix: eth sender retrieval --- chain/evm/compass.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/chain/evm/compass.go b/chain/evm/compass.go index 2c96969..44cf273 100644 --- a/chain/evm/compass.go +++ b/chain/evm/compass.go @@ -736,7 +736,14 @@ func (t compass) processMessages(ctx context.Context, queueTypeName string, msgs var tx *ethtypes.Transaction var valsetID uint64 msg := rawMsg.Msg.(*evmtypes.Message) - ethSender, err := t.findAssigneeEthAddress(ctx, msg.Assignee) + ethSender, err := func() (common.Address, error) { + // Do not retrieve eth sender for UploadSmartContract messages + switch msg.GetAction().(type) { + case *evmtypes.Message_UploadSmartContract: + return common.Address{}, nil + } + return t.findAssigneeEthAddress(ctx, msg.Assignee) + }() if err != nil { return res, fmt.Errorf("failed to find assignee eth address: %w", err) }