diff --git a/core/rip7560_abi.go b/core/rip7560_abi.go index 4d746cc765..2e8174e521 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 return correct MAGIC_VALUE") + return nil, errors.New("account did not call the EntryPoint '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 return correct MAGIC_VALUE") + return nil, errors.New("paymaster did not call the EntryPoint 'acceptPaymaster' callback") } acceptPaymasterData := &AcceptPaymasterData{} err = jsonAbi.UnpackIntoInterface(acceptPaymasterData, "acceptPaymaster", input[4:]) diff --git a/tests/rip7560/rip7560TestUtils.go b/tests/rip7560/rip7560TestUtils.go index 8d11473856..ddf4c55d9c 100644 --- a/tests/rip7560/rip7560TestUtils.go +++ b/tests/rip7560/rip7560TestUtils.go @@ -12,7 +12,6 @@ import ( "github.com/ethereum/go-ethereum/internal/ethapi" "github.com/status-im/keycard-go/hexutils" "math/big" - "slices" "testing" ) @@ -158,7 +157,7 @@ func returnWithData(data []byte) []byte { } func createAccountCode() []byte { - return returnWithData(core.PackValidationData(core.AcceptAccountMethodSig, 0, 0)) + return nil } // create EVM code from OpCode, byte and []bytes @@ -202,13 +201,3 @@ func createCode(items ...interface{}) []byte { func asBytes32(a int) []byte { return common.LeftPadBytes(big.NewInt(int64(a)).Bytes(), 32) } - -func paymasterReturnValue(magic, validUntil, validAfter uint64, context []byte) []byte { - validationData := core.PackValidationData(magic, validUntil, validAfter) - //manual encode (bytes32 validationData, bytes context) - return slices.Concat( - common.LeftPadBytes(validationData, 32), - asBytes32(64), - asBytes32(len(context)), - context) -}