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
  • MetaTransaction
  • EIP712Domain

Was this helpful?

  1. Tutorials
  2. Native Meta Transactions
  3. Enable Native Meta Transactions
  4. Smart Contract

Describe Your Structs

Prepare the data structure for signatures

PreviousSmart ContractNextDeclare Your Variables

Last updated 5 years ago

Was this helpful?

We need some data structure to store the information that will be signed by the user.

Below we can see two structs EIP712Domain and MetaTransaction.

struct EIP712Domain {
    string name;
    string version;
    uint256 chainId;
    address verifyingContract;
}

struct MetaTransaction {
		uint256 nonce;
		address from;
}

MetaTransaction

It will store the data related to transaction.

nonce : It is a unique value chosen by an entity in a protocol which is used to protect the entity against

from : Public key of the user signing the message.

EIP712Domain

It will store information related to domain to make the the data values unique across DApps and Blockchains.

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.

πŸ”°
replay attacks