POA
Search…
English
Welcome to POA
Features
Use Cases
DApp Spotlights
Roadmap
For users
POA Tokens
POA Token Use Cases
POA to POA20 Bridge
Accept POA20 Payments
Tutorials
Governance
❌
Nifty Wallet (Discontinued)
3rd Party Wallets
POA Mania
Whitepaper
For developers
Developer Resources
Getting Tokens For Tests
Full Node Setup
DApp Deployment
TheGraph Data Indexing
On-Chain Random Numbers
API & SQL Access
Smart Contract Dashboard
Grants for Building on POA
For validators
Getting Started
Bootnode Setup
Validator Node Setup
Hard Forks
Validator DApps
Media
Social Media
Media Kit
Contact Us
Powered By
GitBook
API & SQL Access
AnyBlock Analytics (eth.events) offers access to POA core and Sokol testnet through ElasticSearch and the ability to query a SQL Database.
1) Go to
https://account.anyblock.tools/auth/login/
and sign up for a free account.
2) You will receive an API key and SQL username/password.
ElasticSearch
Your API key is used to replace
$mytoken
in standard queries.
Queries use the poa eth.events endpoint:
Core:
https://api.eth.events/ethereum/poa/core/es/
Sokol Testnet:
https://api.eth.events/ethereum/poa/sokol/es/
Example Queries are located here:
https://docs.anyblockanalytics.com/en/latest/elastic/example-queries/index.html
Documentation regarding ElasticSearch API calls is available here:
https://docs.anyblockanalytics.com/en/latest/elastic/index.html
For example, this curl query will show us data about the last 2 blocks.
1
curl
-X POST
\
2
https://api.eth.events/ethereum/poa/core/es/block/search/
\
3
-H
'Authorization: Bearer $mytoken'
\
4
-H
'Content-Type: application/json'
\
5
-d
'{
6
"sort": {
7
"number.num": "desc"
8
},
9
"size": 2
10
}'
Copied!
SQL Access
1) Download a SQL client Anyblock Analytics suggests
PGAdmin4
2) Click on Server -> Create -> Server
3) In the
General
Tab, choose a
Name
for your server instance
4) Go to the
Connection
Tab, and fill in the information from your AnyBlock Analytics Account and click
Save
:
Host name.address
sql.anyblock.tools
Port
45432
Maintenance database
ethereum_ethereum_mainnet (or another db from the list)
Username
<your_username>
Password
<your_password>
5) You will see a list of all databases.
1.
Click on
ethereum_poa_core
or
ethereum_poa_sokol
to interact with POA data.
2.
To Query the DB, go to Tools -> Query Tool
6)
Try a Query!
1.
Check you are in the correct POA database.
2.
Enter your Query (this query shows info about the most recent block).
3.
Click the lighting icon to execute.
4.
Output from query.
7) Explore different queries and information in the SQL documentation and tutorials available here:
https://docs.anyblockanalytics.com/en/latest/sql/tutorials/sql.html
Example query to get transactions to the AMB contract on POA Mainnet
1
SELECT * FROM tx
2
WHERE tx.to = '0xD9a3039cfC70aF84AC9E566A2526fD3b683B995B'
3
LIMIT 50
Copied!
Previous
Randomness FAQs
Next - For developers
Smart Contract Dashboard
Last modified
2yr ago
Copy link
Contents
ElasticSearch
SQL Access