Skip to content

Latest commit

 

History

History
80 lines (56 loc) · 5.21 KB

File metadata and controls

80 lines (56 loc) · 5.21 KB

TOKEN_BALANCE

1.0.3 v3

This document was generated automatically. Please see README Generator for more info.

Usage Notes

evm endpoint network vs chainId input param

At least one of [chainId and network] must be present when using the evm endpoint.

The result is scaled to 18 decimals.

Additional env vars in the form ${NETWORK}_RPC_URL and ${NETWORK}_RPC_CHAIN_ID are required for each supported network.

Environment Variables

Required? Name Description Type Options Default
BACKGROUND_EXECUTE_MS The amount of time the background execute should sleep before performing the next request number 10000

Data Provider Rate Limits

There are no rate limits for this adapter.


Input Parameters

Required? Name Description Type Options Default
endpoint The endpoint to use string erc20, evm evm

Evm Endpoint

Supported names for this endpoint are: erc20, evm.

Input Params

Required? Name Aliases Description Type Options Default Depends On Not Valid With
addresses List of addresses to read object[]
addresses.network chain Network of the contract string
addresses.chainId Chain ID of the network string
addresses.contractAddress Address of token contract string
addresses.wallets Array of wallets to sum balances string[]
addresses.balanceOfSignature Function signature. Should be formatted as human readable ABI string function balanceOf(address account) external view returns (uint256)
addresses.decimalsSignature Function signature. Should be formatted as human readable ABI string function decimals() external pure returns (uint8)

Example

Request:

{
  "data": {
    "endpoint": "evm",
    "addresses": [
      {
        "network": "ethereum",
        "chainId": "1",
        "contractAddress": "0x514910771af9ca656af840dff83e8264ecf986ca",
        "wallets": [
          "0xBc10f2E862ED4502144c7d632a3459F49DFCDB5e",
          "0xF977814e90dA44bFA03b6295A0616a897441aceC"
        ],
        "balanceOfSignature": "function balanceOf(address account) external view returns (uint256)",
        "decimalsSignature": "function decimals() external pure returns (uint8)"
      }
    ]
  }
}

MIT License