From 478edd1a6afda9a4eeaeb5a4366edaeb5e07c095 Mon Sep 17 00:00:00 2001 From: Alex Forshtat Date: Mon, 12 Aug 2024 17:38:18 +0200 Subject: [PATCH] Align error message strings with what actually happened --- core/rip7560_abi.go | 4 ++-- core/state_processor_rip7560.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/rip7560_abi.go b/core/rip7560_abi.go index 2e8174e521..7687dc6926 100644 --- a/core/rip7560_abi.go +++ b/core/rip7560_abi.go @@ -57,7 +57,7 @@ func abiDecodeAcceptAccount(input []byte) (*AcceptAccountData, error) { if methodSelector == SigFailAccountMethodSig { return nil, errors.New("account signature error") } - return nil, errors.New("account did not call the EntryPoint 'acceptAccount' callback") + return nil, errors.New("account validation did call the EntryPoint but not the 'acceptAccount' callback") } acceptAccountData := &AcceptAccountData{} err = jsonAbi.UnpackIntoInterface(acceptAccountData, "acceptAccount", input[4:]) @@ -71,7 +71,7 @@ func abiDecodeAcceptPaymaster(input []byte) (*AcceptPaymasterData, error) { } methodSelector := new(big.Int).SetBytes(input[:4]).Uint64() if methodSelector != AcceptPaymasterMethodSig { - return nil, errors.New("paymaster did not call the EntryPoint 'acceptPaymaster' callback") + return nil, errors.New("paymaster validation did call the EntryPoint but not the 'acceptPaymaster' callback") } acceptPaymasterData := &AcceptPaymasterData{} err = jsonAbi.UnpackIntoInterface(acceptPaymasterData, "acceptPaymaster", input[4:]) diff --git a/core/state_processor_rip7560.go b/core/state_processor_rip7560.go index 74b5c8c402..61a0828dbd 100644 --- a/core/state_processor_rip7560.go +++ b/core/state_processor_rip7560.go @@ -471,7 +471,7 @@ func validateAccountEntryPointCall(epc *EntryPointCall) (*AcceptAccountData, err return nil, epc.err } if epc.Input == nil { - return nil, errors.New("account validation did not call the EntryPoint callback") + return nil, errors.New("account validation did not call the EntryPoint 'acceptAccount' callback") } if len(epc.Input) != 68 { return nil, errors.New("invalid account return data length") @@ -484,7 +484,7 @@ func validatePaymasterEntryPointCall(epc *EntryPointCall) (*AcceptPaymasterData, return nil, epc.err } if epc.Input == nil { - return nil, errors.New("paymaster validation did not call the EntryPoint callback") + return nil, errors.New("paymaster validation did not call the EntryPoint 'acceptPaymaster' callback") } if len(epc.Input) < 100 {