sismo-core / sismo-hub

MIT License
959 stars 206 forks source link

[Proposal] Integrate ERC20 as a Data Provider #1443

Closed ZKentin closed 1 year ago

ZKentin commented 1 year ago

Integrate ERC20 as a Data Provider will enable to create new Groups from holders of an ERC-20 above a min amount.

Specifications

{
  "name": "ERC20",
  "iconUrl": "",
  "providerClassName": "ERC20Provider",
  "functions": [
    {
      "name": "Get holders of ERC-20",
      "functionName": "TODO",
      "countFunctionName": "TODO",
      "description": "Returns all holders of a specific ERC-20 above a min amount (capped at 100k addresses)",
      "args": [
        {
          "name": "chain",
          "argName": "TODO",
          "type": "string",
          "required": "true",
          "example": "Ethereum | BSC | Polygon | Avalanche | Gnosis | Fantom | Arbitrum One | Arbitrum Nova | Celo | Harmony | Optimism | Moonbeam | Metis | Cronos | Boba | Goerli | Base Goerli",
          "description": "A specific chain"
        },
        {
          "name": "address",
          "argName": "TODO",
          "type": "string",
          "required": "true",
          "example": "TODO",
          "description": "A specific contract address"
        },
        {
          "name": "amount",
          "argName": "TODO",
          "type": "TODO",
          "required": "true",
          "example": "500",
          "description": "A minimum amount"
        }
      ]
    }
  ]
}

Tips on how to integrate the Data Provider

The chains supported are: Ethereum, BSC, Polygon, Avalanche, Gnosis, Fantom, Arbitrum One, Arbitrum Nova, Celo, Harmony, Optimism, Moonbeam, Metis, Cronos, Boba, Goerli and Base Goerli.

The easiest way to extract the list of holders’ addresses of a specific ERC-20 is by using BigQuery & Etherscan.

For now, the number of addresses returned will be capped at 100k.

Have a look at Sismo documentation to understand what is a Data Provider, and checkout the tutorial to know how to integrate a Data Provider.

Have fun!

MartinGbz commented 1 year ago

Now that we have the Ankr Provider or the Token Provider (built using bigquery), this issue is outdated