🔧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.
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 How to enable native meta transactions in your smart contracts.
/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
x-api-key
string
API key present on the dashboard for your DApp after DApp registration. This is specific to DApp registered.
Request Body
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.
Example Curl Request
curl --request POST 'https://api.biconomy.io/api/v2/meta-tx/native' --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" }'
Last updated