This document describes how to integrate Biconomy into your store then enables your users to have a better experience with gasless transactions.
1. Supported functionalities
- Buy from primary sale
- Buy from secondary sale
- Cancel sale order
- Cancel offer/bid
- Transfer NFT
- Open mystery box
- Approve ERC20 token
- Approve NFT (ERC-721 or ERC-1155)
If you would like to allow gasless transactions for token approvals, they must implement the EIP712 interface (https://eips.ethereum.org/EIPS/eip-712)
This section shows you how to enable gasless transactions step by step.
Step 1: Create an account or log in to the Biconomy Dashboard
- Register your account on the dashboard here: https://dashboard.biconomy.io/
- You might choose to connect your wallet with Metamask or WalletConnect
- Once registered, you will see the dashboard home page as shown below.
Step 2: Register your paymaster on the dashboard
- Before registering, you need to verify your email address
- On the top right of the homepage, you will see a form to Register a new Dapp.
For example, here we choose the Polygon Mainnet as the network and the Dapp name selection is up to you. Then, the new DApps board will appear and you need to click on the Dapps to see the DApps configuration page.
Step 3: Set up a gas tank
To enable gasless transactions in your dApp, you must deposit an amount of native token to cover the gas fee. You can withdraw anytime.
- Click on the "Fill gas" button and fill in the deposit amount to pay gas fees for your NFT buyers. Please note setting up a gas tank requires your wallet to have the balance of native tokens of your selected chain.
* Please note that the address you used to connect to Biconomy is the only address to withdraw funds from this gas tank in the future.
- A wallet pop-up will show up, you need to approve it, and after the transaction succeeded, you should see your dapp’s gas balance increase by the deposited amounts:
Step 4: Whitelist NFTify smart contract
- Navigate to the dapp’s dashboard, you will see the Smart Contracts tab in the Navigation bar. You need to fill in the information of the smart contract including name, address, ABI. You must use the smart contract address and ABI listed below.
Application Binary Interface (ABI)
- After adding all necessary information, kindly click "Add" button" to complete whitelisted Smart Contract.
Step 5: Enable Smart Contract API
- Choose "Dapp APIs" tab
- Click "Add" and enter any name, choose the whitelisted smart contract you've added, and select the method as ExecuteMetaTransaction.
- Then click "Add" to generate a Dapps API:
Step 6: Enable Biconomy integration in your store
This is the last step to enable gasless transactions on your store (except for token approval transactions).
- Back to the Overview tab, you can see your paymaster’s API key as shown below.
- Navigate to your store’s settings and click Biconomy Integration.
- Switch on the Biconomy Integration and then enter your API key in the API key field. Then click Save.
Now, your store has enabled gasless transactions.
1. Enable gasless transactions for token approvals
This approach is a little different from the above integration process. It requires your token to implement the EIP-712 interface to enable gasless transactions. If not, ignore this section.
- On the paymaster home page, click Add smart contract to add your token’s contract.
- Enter your token’s name and address. The following is the address of NFTify’s default collections:
- If you are using NFTify’s default collections or your smart contract is verified, the system will automatically populate the ABI for you. If not, contact us to get the ABI file and then paste it into the ABI field.
- Now, select the permit function to whitelist.
- Click Add smart contract button to complete the whitelisting process.
Now, your store has enabled gasless transactions for token approvals.
2. Withdraw from the gas tank
You may want to withdraw any remaining funds in the future. Withdraw funds for the gas tank can be a bit tricky, so either deposit and minimum amount, or you can try to withdraw gas from Biconomy by dropping an email at email@example.com and firstname.lastname@example.org, with your credentials (email that you have used to log in, wallet address used for transferring funds and dapp API key), and also the wallet address where you would like to receive funds