From 9af0c00ab0c02a2c1c00de6ef7b8a743a8e8e26a Mon Sep 17 00:00:00 2001 From: Tenderdeve Date: Mon, 4 May 2026 15:56:54 +0530 Subject: [PATCH] accounts/abi/bind: re-export ErrEventSignatureMismatch and ErrNoEventSignature Expose the event-unpacking sentinel errors from bind/v2 through the top-level bind package so callers can use errors.Is without importing the v2 sub-package directly. Fixes #34075 --- accounts/abi/bind/old.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/accounts/abi/bind/old.go b/accounts/abi/bind/old.go index b09f5f3c7a..3dfef88103 100644 --- a/accounts/abi/bind/old.go +++ b/accounts/abi/bind/old.go @@ -176,6 +176,14 @@ var ( // ErrNoCodeAfterDeploy is returned by WaitDeployed if contract creation leaves // an empty contract behind. ErrNoCodeAfterDeploy = bind2.ErrNoCodeAfterDeploy + + // ErrNoEventSignature is returned when a log entry has no topics. + ErrNoEventSignature = bind2.ErrNoEventSignature + + // ErrEventSignatureMismatch is returned when a log's topic[0] does not match + // the expected event signature. Callers can use errors.Is to distinguish a + // signature mismatch from other unpacking failures. + ErrEventSignatureMismatch = bind2.ErrEventSignatureMismatch ) // ContractCaller defines the methods needed to allow operating with a contract on a read