Enable meta transactions or gasless transactions in your Dapp by integrating Biconomy SDK in your DApp in a few lines of code
Biconomy SDK, 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 Biconomy SDK,.
By using Biconomy SDK,, 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
Go to Dashboard to register your DApp and methods on which to enable meta transactions and copy your API Key.
Install Biconomy SDK
1. Installing and importing SDK
let ethersProvider =newethers.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 SDK initialization
// Initialize your dapp here like getting user accounts etc
// Handle error while initializing mexa
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, Biconomy SDK, will ask for user’s signature either EIP-712 format or personal signature as instructed and handle the transaction rather than sending signed transaction directly to blockchain from user’s wallet.