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
  • Note:
  • /api/v2/meta-tx/native

Was this helpful?

  1. api

Native Meta Transaction

Enable meta transactions or gasless transactions in your Dapp with our native meta transaction API. No extra signature and no Contract Wallets involved here.

PreviousVia Smart ContractNextGet Retried Hashes

Last updated 3 years ago

Was this helpful?

Note:

Before using this API, make sure you have native meta transaction support in your smart contracts i.e., you have removed the dependency on msg.sender property from your smart contracts.

If your contracts do not support native meta transactions yet, check out .

/api/v2/meta-tx/native

POST https://api.biconomy.io/api/v2/meta-tx/native

This API lets you relay the transaction directly to your smart contract without the end-user having to pay transaction fees. Just register your DApp on the developer dashboard, upload your smart contracts and select your methods in which you want to enable native meta transaction support

Headers

Name
Type
Description

x-api-key

string

API key present on the dashboard for your DApp after DApp registration. This is specific to DApp registered.

Request Body

Name
Type
Description

to

string

Target Contract Address. In case of SCW, It represents user's proxy wallet address.

apiId

string

API id corresponding to the method you want to call in your smart contract. It can be found on the dashboard under 'Manage APIs' section.

params

array

Array of all the parameters required to call the method in the same order they appear in your Smart Contract.

from

string

User client wallet public address who is supposed to be sending the transaction eg. metamask wallet address or portis wallet address.

gasLimit

string

Gas limit to be set in the transaction. It can be a decimal number or hexadecimal string. If omitted web3 estimateGas method will be used to calculate the gasLimit for the transaction.

{
    "txHash": "0x84bc6f25b964f794f90c59b4f97a16aadc878ce53187703124b5e0ee52e15af9",
    "log": "Meta transaction sent to blockchain",
    "retryDuration": 158, 
    "flag": 200
}
//retryDuration : time in seconds after which you 
//can check resubmitted? endpoint for new hash in case of
//potential resubmits.
{
    "log": "Api does not exist",
    "flag": 404
}
{
  "code": 150,
  "message": "DApp limit reached",
  "responseCode": 409,
  "limit": {
    "allowed": false,
    "type": 1,
    "limitLeft": -6,
    "resetTime": 1608940800000
  },
  "allowed": false
}
{
    "log": "Error while executing Blockchain Transactions",
    "error": "Error: Invalid number of parameters for \"methodName\". Got 1 expected 0!",
    "message":"Error while gas estimation with message Returned error: The execution failed due to an exception.",
    "code":417
}
{
    "log": "Error while executing Blockchain Transactions",
    "error": "Error: Invalid number of parameters for \"methodName\". Got 1 expected 0!",
    "flag": 500
}

Example Curl Request

curl --request POST '' --header 'x-api-key: <api_key_from_dashboard>' --header 'Content-Type: application/json' --data-raw '{ "userAddress": "<user_public_address>", "apiId": "<api_id_from_dashboard>", "params": [<param1>,<param2>,...... ], "gasLimit":"0xF4240" }'

🔧
How to enable native meta transactions in your smart contracts
https://api.biconomy.io/api/v2/meta-tx/native