Skip to content

Latest commit

 

History

History
134 lines (94 loc) · 6.08 KB

polygon-api.mdx

File metadata and controls

134 lines (94 loc) · 6.08 KB

Polygon API overview

Polygon is a Layer 2 scaling solution for Ethereum, designed to improve transaction speed and reduce costs while maintaining the security and functionality of the Ethereum blockchain.

Accounts info

Retrieves essential data about an account, including its balance, contract code, and stored data.

eth_accounts
eth_getBalance
eth_getCode
eth_getProof
eth_getStorageAt

Blocks info

Retrieves detailed information from a specified block, including transactions, receipts, and block data.

eth_blockNumber
eth_getBlockByHash
eth_getBlockByHash#full
eth_getBlockByNumber
eth_getBlockByNumber#full
eth_newBlockFilter
eth_getBlockReceipts
eth_getBlockTransactionCountByHash
eth_getBlockTransactionCountByNumber

Chain info

Provides key details about the Polygon network’s state and performance

eth_chainId
eth_protocolVersion
net_listening
net_version
net_peerCount
eth_syncing
eth_hashrate

Debug and trace

Available only on paid tier. Provides advanced debugging and tracing tools to analyze and troubleshoot transactions and blocks on the Polygon network

trace_filter
trace_block
trace_replayBlockTransactions
trace_replayBlockTransactions#vmTrace
debug_traceBlockByHash
debug_traceBlockByNumber
trace_transaction
debug_traceTransaction
trace_replayTransaction
trace_replayTransaction#vmTrace
trace_callMany
trace_call
debug_traceCall

Event logs

Provides methods for filtering and retrieving event logs

eth_getLogs
eth_newFilter
eth_getFilterChanges
eth_uninstallFilter
eth_getFilterLogs

Executing transactions

Provides essential methods for sending transactions, executing smart contract calls, and performing on-chain operations

eth_call
eth_sendRawTransaction

Gas estimation

Provides methods to estimate the gas required for transactions and fetch information related to gas prices

eth_feeHistory
eth_estimateGas
eth_gasPrice
eth_createAccessList
eth_maxPriorityFeePerGas

Getting uncles

Retrieves information about "uncle" blocks, which are valid but not included in the blockchain.

eth_getUncleCountByBlockHash
eth_getUncleCountByBlockNumber

Mining

Contains methods related to mining operations

eth_coinbase
eth_mining

Subscriptions

Allows to subscribe to specific events

eth_subscribe
eth_unsubscribe

Transactions info

Provides methods to retrieve transaction details, counts, and receipts

eth_getTransactionByHash
eth_getTransactionCount
eth_getTransactionReceipt
eth_newPendingTransactionFilter
eth_getTransactionByBlockHashAndIndex
eth_getTransactionByBlockNumberAndIndex
txpool_content

Web3

Provides methods for retrieving basic network configuration data related to nodes

web3_clientVersion
web3_sha3

Bor specific

Contains methods for interacting with the Polygon Bor client, which is responsible for block production

bor_getAuthor
bor_getCurrentProposer
bor_getCurrentValidators
bor_getRootHash
bor_getSignersAtHash