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
  • Introduction
  • Letโ€™s Get Started
  • 1. Installing and importing SDK
  • 2. Initializing Gasless SDK (EOA)
  • 3. Initialize your DApp after Biconomy Gasless SDK (EOA) initialization

Was this helpful?

  1. SDK

Gasless SDK (EOA)

Enable meta transactions or gasless transactions in your Dapp by integrating Gasless SDK (EOA) in your DApp in a few lines of code

PreviousGas Tank Balance DataNextConfiguration

Last updated 9 months ago

Was this helpful?

Introduction

Gasless SDK (EOA) enables meta transactions or gasless transactions in your DApp (Decentralized Application) out of the box without any change in your smart contracts and just a few lines of code in your DApp to integrate Gasless SDK (EOA).

By using Gasless SDK (EOA), DApp users are able to use the DApp and send transactions free of cost while developer pays the gas fee on their behalf as a part of user acquisition cost.

Letโ€™s Get Started

  1. Go to to register your DApp and methods on which to enable meta transactions and copy your API Key.

  2. Install Gasless SDK (EOA)

1. Installing and importing SDK

Gasless SDK (EOA) can be installed either via npm repository or using standalone javascript file using html <script/> tag

npm install @biconomy/mexa
// Install Biconomy
<script src="https://cdn.jsdelivr.net/npm/@biconomy/mexa@latest/dist/mexa.js"></script>

// Import Biconomy
let Biconomy = window.Biconomy.default;

2. Initializing Gasless SDK (EOA)

You can use Gasless SDK (EOA) either with or library. It works with both libraries.

import {Biconomy} from "@biconomy/mexa";
const biconomy = new Biconomy(<web3 provider>,{apiKey: <API Key>, debug: true});
web3 = new Web3(biconomy);
import {Biconomy} from "@biconomy/mexa";
const biconomy = new Biconomy(<web3 provider>,{apiKey: <API Key>, debug: true});
let ethersProvider = new ethers.providers.Web3Provider(biconomy);

Note: <web3 provider> could be window.ethereum for Metamask or portis.provider for Portis and so on. It should be a provider object not RPC url.

3. Initialize your DApp after Biconomy Gasless SDK (EOA) initialization

biconomy.onEvent(biconomy.READY, () => {
  // Initialize your dapp here like getting user accounts etc
}).onEvent(biconomy.ERROR, (error, message) => {
  // Handle error while initializing mexa
});

Congratulations ๐Ÿ‘

You have now enabled meta transactions in your DApp. Interact with web3 the way you have been doing it.

Now whenever there is a write transaction action (registered in dashboard also) initiated from the user Gasless SDK (EOA) will ask for userโ€™s signature either format or personal signature as instructed and handle the transaction rather than sending signed transaction directly to blockchain from userโ€™s wallet.

Checkout how you can use Gasless SDK (EOA) to do gasless transactions in

๐Ÿ“™
Dashboard
Web3.js
Ethers.js
EIP-712
different ways either by sponsoring all the gas fee for your users