Colle Marketplace
Colle.ioWebApp (Live)WebApp (Test)
  • Contracts Overview
  • Functional Requirements
  • Contract Descriptions
  • Technical Project & Audit Details
  • Test Coverage Report
  • Static Analysis
  • Royalty Pool Explained
  • Sale State Explained
  • Sales Tax Explained
  • marketplace
    • IMarketHub
    • IMarketHubRegistrar
    • MarketHub
    • MarketHubRegistrar
    • MarketHubRegistrarUpgradeable
    • collections
      • ColleCollection
      • ColleCollectionUpgradeable
      • CollectionRegistry
      • IColleCollection
      • IColleCollectionUpgradeable
      • ICollectionRegistry
    • currencies
      • BaseCurrency
      • CurrencyRegistry
      • ICurrency
      • ICurrencyRegistry
      • USDCCurrency
    • escrow
      • EscrowUpgradeable
      • IEscrow
      • IEscrowRegistry
    • kycs
      • Account
      • IKYCRegistry
      • KYCRegistry
    • markets
      • BaseMarketUpgradeable
      • IListingMarket
      • IMarket
      • IMarketRegistry
      • IOfferMarket
      • ListingMarketUpgradeable
      • MarketRegistry
      • OfferMarketUpgradeable
    • royalties
      • BaseRoyalty
      • BlackTierRoyalty
      • GoldTierRoyalty
      • GreenTierRoyalty
      • IRoyalty
      • IRoyaltyPool
      • IRoyaltyRegistry
      • PlatinumTierRoyalty
      • RoyaltyPool
      • RoyaltyRegistry
      • v1
        • BlackTierRoyaltyV1
        • GoldTierRoyaltyV1
        • GreenTierRoyaltyV1
        • PlatinumTierRoyaltyV1
    • taxes
      • ITaxPolicyRegistry
      • Tax
      • TaxPolicyRegistry
    • upgrade-gatekeeper
      • IUpgradeGatekeeper
      • UpgradeGatekeeper
    • vaults
      • IVault
      • IVaultRegistry
      • VaultUpgradeable
  • team-smart-wallet
    • ITeamSmartWallet
    • ITeamSmartWalletHelper
    • TeamSmartWallet
    • TeamSmartWalletFactory
    • TeamSmartWalletPermitHelper
  • utils
    • MarketAccess
    • MarketAccessUpgradeable
    • Signature
    • SignatureValidator
Powered by GitBook
On this page
  • DOMAIN_SEPARATOR
  • DOMAIN_TYPEHASH
  • __SignatureValidator_init
  • isValidSignature
  • Parameters
  • validateSignatureAndUpdateNonce
  • Parameters
  • nonces
  • Parameters
  • Return Values
  • eip712Domain
  • Return Values
  1. utils

SignatureValidator

This contract validates the signatures associated with EIP-712 typed structures.

DOMAIN_SEPARATOR

bytes32 DOMAIN_SEPARATOR

DOMAIN_TYPEHASH

bytes32 DOMAIN_TYPEHASH

__SignatureValidator_init

function __SignatureValidator_init(string _name, string _version) internal

Initializes the DOMAIN_SEPARATOR value.

The function is meant to be called in the constructor of the contract implementing this logic.

isValidSignature

modifier isValidSignature(struct Signature _signature, bytes32 _permitHash)

Validates a signature.

This modifier checks if the signature associated with a _permitHash is valid.

Parameters

Name
Type
Description

_signature

struct Signature

The signer struct containing the signature, signer and deadline.

_permitHash

bytes32

The EIP-712 permit hash.

validateSignatureAndUpdateNonce

function validateSignatureAndUpdateNonce(struct Signature _signature, bytes32 _permitHash) internal

Validates a signature.

This function checks if the signature associated with a _permitHash is valid.

Parameters

Name
Type
Description

_signature

struct Signature

The signer struct containing the signature, signer and deadline.

_permitHash

bytes32

The EIP-712 permit hash.

nonces

function nonces(address _user) public view returns (uint256)

Returns the nonce associated with a user.

The nonce is incremented after each use.

Parameters

Name
Type
Description

_user

address

The user's address.

Return Values

Name
Type
Description

[0]

uint256

Returns the current nonce value.

eip712Domain

function eip712Domain() public view virtual returns (string name, string version, uint256 chainId, address verifyingContract)

Returns the EIP712 domain separator components.

This can be used to verify the domain of the EIP712 signature.

Return Values

Name
Type
Description

name

string

The domain name.

version

string

The domain version.

chainId

uint256

The current chain ID.

verifyingContract

address

The address of the verifying contract.

PreviousSignature

Last updated 1 year ago