Polygon network banner

Polygon Network

Introduction

The Polygon Network brings massive scale to Ethereum using an adapted version of Plasma with PoS based side chains that provides a solution for faster and extremely low-cost transactions with finality on the main chain. The Polygon network ensures liveliness using PoS checkpoints which are pushed to the Ethereum mainchain. This enables a single Polygon sidechain to theoretically achieve 2^16 transactions per block, and possibly millions of transactions on multiple chains in the future.

Quick facts

Property Value
Polygon Mainnet chainId 137
Polygon Mumbai Testnet chainId 80001
Polygon Blockchain Explorer https://polygonscan.com/
Block time ~3 seconds
Data refresh latency ~6 seconds or 2 Blocks

Quickstart overview video

Supported endpoints

Get token balances for address
Class A
Given chain_id and wallet address, return current token balances along with their spot prices. This endpoint supports a variety of token standards like ERC20, ERC721 and ERC1155. As a special case, network native tokens like ETH on Ethereum are also returned even though it’s not a token contract.
GET /v1/:chain_id/address/:address/balances_v2/
Get transactions for address
Class A
Given chain_id and wallet address, return all transactions along with their decoded log events. This endpoint does a deep-crawl of the blockchain to retrieve all kinds of transactions that references the address including indexed topics within the event logs.
GET /v1/:chain_id/address/:address/transactions_v2/
Get ERC20 token transfers for address
Class A
Given chain_id, wallet address and contract-address, return all ERC20 token contract transfers along with their historical prices at the time of their transfer.
GET /v1/:chain_id/address/:address/transfers_v2/
Get token holders as of any block height
Class A
Given chain_id and wallet address, return a paginated list of token holders. If block-height is omitted, the latest block is used.
GET /v1/:chain_id/tokens/:address/token_holders/
Get log events by contract address
Class A
Given chain_id and contract address, return a paginated list of decoded log events emitted by a particular smart contract.
GET /v1/:chain_id/events/address/:address/
Get log events by topic hash(es)
Class A
Given chain_id and topic hash(es), return a paginated list of decoded log events with one or more topic hashes separated by a comma.
GET /v1/:chain_id/events/topics/:topic/

Go to Covalent API docs


Appendix

Matic Gas token

MATIC token is the native token of the Matic network. This is similar to Ether in Ethereum. To interact with the Matic network, MATIC tokens are required to pay as gas fees. Covalent’s responses automatically returns gas_* fields in the MATIC units.

Token mapping

Covalent maintains an on-chain real-time mapping of token addresses between Ethereum mainnet and the Matic chain. These addresses are used to reverse-lookup prices on Matic and also to return the right token logo urls.

Some example of mapped tokens:

Token Ethereum mainnet Matic mainnet
USDT 0xdac17f958d2ee523a2206206994597c13d831ec7 0xc2132d05d31c914a87c6611c10748aeb04b58e8f
Uniswap UNI 0x1f9840a85d5af5bf1d1762f925bdaddc4201f984 0xb33eaad8d922b1083446dc23f610c2567fb5180f

Token prices

For tokens that have a mapping back to Ethereum mainnet, Covalent is able to return the mapped prices.

Infrastructure Providers

The following provide infrastructure for this blockchain network:

Last modified: August 8, 2022: Fix link to tools (eaada5a)