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
This commit is contained in:
Tenderdeve 2026-05-04 15:56:54 +05:30
parent f0b21fa110
commit 9af0c00ab0

View file

@ -176,6 +176,14 @@ var (
// ErrNoCodeAfterDeploy is returned by WaitDeployed if contract creation leaves // ErrNoCodeAfterDeploy is returned by WaitDeployed if contract creation leaves
// an empty contract behind. // an empty contract behind.
ErrNoCodeAfterDeploy = bind2.ErrNoCodeAfterDeploy 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 // ContractCaller defines the methods needed to allow operating with a contract on a read