This document describes how to integrate Biconomy into your store then enables your users to have a better experience with gasless transactions.
OVERVIEW
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)
2. Requirements
If you would like to allow gasless transactions for token approvals, they must implement the EIP712 interface (https://eips.ethereum.org/EIPS/eip-712)
INTEGRATION
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.
No. | Chain | Address |
1 | Ethereum | x25f2F80D9a45B641bEf25342A1B2a0Ae48F78539 |
2 | BNB Chain | 0x366A6E71AAcBF8429D835F777DDaB7B24E164a81 |
3 | Polygon Mainnet | 0xf4EB730139AE9DEA2091b768Eb457Fd6304780fb |
Application Binary Interface (ABI)
[
{
"inputs": [
{
"internalType": "uint256[]",
"name": "",
"type": "uint256[]"
},
{
"internalType": "address[]",
"name": "",
"type": "address[]"
},
{
"internalType": "bytes[]",
"name": "",
"type": "bytes[]"
},
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
},
{
"internalType": "uint8",
"name": "",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"name": "executeMetaTransaction",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]
- 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.
ALTERNATIVES
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:
No. | Chain | Collection address | |
ERC-721 | ERC-1155 | ||
1 | Ethereum | 0x87cCB95cA42dac3D1007299e0baB5Cf9e911bE8E | 0x4B5809Bc3e6082Ac554088C94Ad39A1A73268EA8 |
2 | BNB Chain | 0x188DFF332D32bdC7519617249C43d790A8e2B3F4 | 0x42866ef654feE1a6447C644d57B63824ec1CF521 |
3 | Polygon Mainnet | 0x2C6362e7Db64CDde0BF81f897c8A38D6fA037f18 | 0xea6b406De2ca02111Bb1597354b552B473a5C054 |
- 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 support@biconomy.io and divya@biconomy.io, 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
Comments
0 comments
Please sign in to leave a comment.