How to verify address transaction eligibility in the campaign

When you build a campaign platform like QuestN, you often need to set the eligibility requirements for the campaign, such as users needing to create transactions or spend gas fees.

Step 1: Get transactions statistics by address

Here you'll need 4 parameters: chain, wallet_address and contract_address.

Once you have obtained all parameters, you can copy the following code:

curl --request GET \
     --url 'https://api.footprint.network/api/v3/address/getWalletContractTxnStats?chain=Ethereum&wallet_address=0x46efbaedc92067e6d60e84ed6395099723252496&contract_address=0xba30e5f9bb24caa003e9f2f0497ad287fdf95623' \
     --header 'accept: application/json' \
     --header 'api-key: demo-api-key'

Step 2: Run the script

In your terminal, you should see the following JSON response:

{
  "message": "success",
  "code": 0,
  "data": {
    "wallet_address": "0x46efbaedc92067e6d60e84ed6395099723252496",
    "contract_address": "0xba30e5f9bb24caa003e9f2f0497ad287fdf95623",
    "total_gas_fee": 0.015553428,
    "number_of_txn": 1,
    "first_txn_time": "2021-06-22 16:40:44.000 UTC",
    "number_of_active_days": 1
  }
}

Step 3: Deploy your product

After successfully testing the previous two steps, you can now embed it into your product and provide a template for users to start using it.

API Reference

If you want to know more details on the endpoint and optional parameters, check out: