MetaTxLib

Git Source

State Variables

EIP712_DOMAIN_TYPEHASH

bytes32 internal constant EIP712_DOMAIN_TYPEHASH =
    keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");

GRANT_OPERATOR_PERMISSIONS_WITH_SIG_TYPEHASH

bytes32 internal constant GRANT_OPERATOR_PERMISSIONS_WITH_SIG_TYPEHASH = keccak256(
    "grantOperatorPermissions(uint256 characterId,address operator,uint256 permissionBitMap,uint256 nonce,uint256 deadline)"
);

EIP1271_MAGIC_VALUE

bytes4 public constant EIP1271_MAGIC_VALUE = 0x1626ba7e;

Functions

validateGrantOperatorPermissionsSignature

function validateGrantOperatorPermissionsSignature(
    DataTypes.EIP712Signature calldata signature,
    uint256 characterId,
    address operator,
    uint256 permissionBitMap
) external;

_getAndIncrementNonce

This fetches a user's signing nonce and increments it, akin to sigNonces++.

function _getAndIncrementNonce(address user) internal returns (uint256);

_calculateDomainSeparator

Calculates EIP712 DOMAIN_SEPARATOR based on the current contract and chain ID.

function _calculateDomainSeparator() internal view returns (bytes32);

_validateRecoveredAddress

Wrapper for ecrecover to reduce code size, used in meta-tx specific functions.

function _validateRecoveredAddress(bytes32 digest, DataTypes.EIP712Signature calldata signature) internal view;