Skip to content

Add isValidSignatureAndData to Bouncer to verify method calls. #891

@shrugs

Description

@shrugs

🎉 Description

Add the ability for Bouncer.sol to check the method signature and/or arguments to a method, to allow a bouncer to sign a message for a very specific function call.

The naive approach of

return isValidDataHash(
      keccak256(address(this), _address, msg.data),
      _sig
    );

won't work because the signature is part of the data and you need the data to sign and you need the signature to get the data and you need the data to sign you get the point.

One option is to enforce that the signature is always at the end of the msg.data and then ignore the last 32 bytes.

  • 📈 This is a feature request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew contracts, functions, or helpers.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions