Biconomy Gasless SDK (EOA)
DashboardMediumWebsite
  • πŸš€Getting Started
  • Introduction
    • 🀘Why Biconomy?
    • πŸ™‚How we simplify transactions
  • Products
    • πŸ’ΈGasless Transactions
      • Choose An Approach to Enable Gasless
        • Standard EIP 2771 Approach
          • 1. Register Artifacts on the Dashboard
          • 2. Code Changes
            • Using SDK
            • Using API
        • Custom Implementation Approach
          • 1. Register Artifacts on the Dashboard
          • 2. Code Changes
            • Using SDK
            • Using API
        • Smart Contract Wallet Approach
          • Gnosis
        • Network Agnostic Transactions
          • EIP-2771 Approach
          • Custom Approach
      • Conditional Whitelisting
      • Gasless SDK (EOA) 3
      • Networks Supported
    • ↔️Hyphen - Instant Cross-Chain Transfers
      • SDK
        • DepositManager
        • TransferManager
        • TokenManager
      • APIs
      • Helper Methods
      • Migrating from Hyphen V1
      • Contract Addresses
      • Hyphen Widget
  • Guides
    • πŸ’»Dashboard
      • DApp Statistics
    • β›½Gas Tank Deposits
      • Via Dashboard
      • Via Smart Contract
  • api
    • πŸ”§Native Meta Transaction
      • Get Retried Hashes
    • 🌎Dashboard APIs
    • βšͺWhitelist API
      • Whitelist Destination Address
      • Whitelist Proxy Contracts
    • 〰️ Check Limits
    • πŸ’ΏBiconomy Data API
      • πŸ‘¨β€πŸš€Unique User Data
      • πŸ§‘β€πŸ”§Per User Limits Data
      • β›½Gas Tank Balance Data
  • SDK
    • πŸ“™Gasless SDK (EOA)
      • Configuration
  • Tutorials
    • πŸ”°Native Meta Transactions
      • How To Build Your First DApp
        • Write Your First Smart Contract
        • Initialize Web3 on Client Side
        • Executing First Blockchain Transaction
      • Enable Native Meta Transactions
        • Smart Contract
          • Describe Your Structs
          • Declare Your Variables
          • Modify Respective Function
        • Client Side
          • Design Your JSON structure
          • Design Your Domain Separator
          • Design Data Types
          • Define Data To Sign
          • Generate Signatures
      • Integrate Biconomy
        • Register On Dashboard
        • Integrate Gasless SDK (EOA)
      • Summary
  • BICO Staking
    • πŸͺSafety Module
  • Get in touch
    • πŸ‘₯Contact Us
  • Misc
    • 🧩Projects on Biconomy
    • 🌐Supported Networks
    • πŸ“«Contract Addresses
    • βœ”οΈŽ Smart Contracts Audit
    • ❓FAQs
Powered by GitBook
On this page

Was this helpful?

  1. Tutorials
  2. Native Meta Transactions
  3. Enable Native Meta Transactions
  4. Client Side

Design Your Domain Separator

To make your signature unique across DApps and Blockchains

PreviousDesign Your JSON structureNextDesign Data Types

Last updated 5 years ago

Was this helpful?

While designing the data structure of our data which needs to be signed, we need to ensure that the signature will be unique across multiple DApps and across Blockchains.

Domain Separator is a mandatory field

This helps to prevent a signature meant for one dApp from working in another. As EIP712 :

It is possible that two DApps come up with an identical structure like Transfer(address from,address to,uint256 amount) that should not be compatible. By introducing a domain separator the dApp developers are guaranteed that there can be no signature collision.

Our domain separator would look like this:

let domainData = {
  name: "Quote",
  version: "1",
  chainId : "42" // Kovan
  verifyingContract: "0x97b1Efe0BA9730d6C0d9fb75F53173F07521A0d3"
};

name: the dApp name, e.g. β€œQuote”

version: The current version number of your dApp or platform. It prevents signatures from one dApp version from working with those of others.

chainId: Network Id e.g. Kovan Testnet = 42; Main Network = 1

verifyingContract: The contract address that will verify the resulting signature.

The domain separator requires careful thought and effort. Developers must decide which of the following fields to include or exclude based on what makes sense for their use case.

πŸ”°
explains