Tooling
ModuleKit
Reference
Testing
Signature Validation
Formaterc1271signature

⚠️ Deprecation Notice

ModuleKit was developed by Rhinestone and is no longer actively supported. If you're building modules and need assistance, reach out to Rhinestone at gm@rhinestone.dev


title: "formatERC1271Signature"

Formats an ERC1271 signature to send to an account. Note: this is not needed if using isValidSignature from the ModuleKit.

Usage

bytes memory formattedSignature = instance.formatERC1271Hash({validator: address(instance.defaultValidator), signature: signature});

Parameters

instance

The instance of the account used for testing.

validator

  • Type: address

The address of the validator contract.

signature

  • Type: bytes

The signature to format for ERC1271 signature validation.

Returns

formattedSignature

  • Type: bytes

The formatted signature to use for ERC1271.