Omni Bridge
xDai Bridge
Gnosis Beacon Chain Docs
Block Explorer
Search…
Welcome to Gnosis Chain🦉
About Gnosis Chain (GC)
Features
Projects & DApps
Use Cases
News & Information
FAQs
Roadmaps
For users
Getting Started with GC
xDai Stable Token
Bridges
Wallets
Applications & Metrics
Block Explorers
Governance
Incentives
For Stakers
Staking with GNO on the Gnosis Beacon Chain
For developers
Developer Resources & Tools
Smart Contract Deployment
Update RPC URL
Connect to GC with Ethers.js
API & SQL Access with AnyBlock Analytics
Blocknative Notifications
Airdrops: Creating & Receiving
Burner Wallet Factory
Chainlink Price Feeds
Chainbeat Smart Contract Dashboard
Curvegrid MultiBaas Smart Contract Interaction
Pocket Portal
Ankr API
GetBlock Node Access
Dune Analytics
TheGraph Data Indexing
Dappquery Smart Contract Analytics & Visualizations
MEV & Flashbots
Meta Transactions
ERC20 Test Token Faucet
Wrapped xDai (wxDai)
ENS compatibility
Gas Price Oracle
AoX: Arbitrum on GC
Optimism: Optimistic Rollups on GC
Install Gnosis ChainClient - Run a Non-Validator Node
On-Chain Random Numbers
Immunefi Bug Bounty
Security Audits
For validators
Gnosis Beacon Chain Validators (GNO)
Bridge Validators
Consensus Info: AuRa, POSDAO, SBC
Hard Forks
POSDAO Whitepaper
Contact & Media Info
Social Media & Community Channels
Media Kit
Powered By
GitBook
API & SQL Access with AnyBlock Analytics
AnyBlock Analytics (eth.events) offers access to GC 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.
Login to create an 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 to the GC use the xdai eth.events endpoint:
https://api.eth.events/ethereum/xdai/mainnet/es/
Example Queries are located here:
https://www.anyblockanalytics.com/docs/elastic/example-queries/
Documentation regarding ElasticSearch API calls is available here:
https://www.anyblockanalytics.com/docs/elastic
For example, this curl query will show us data about the last 2 blocks.
curl -X POST \
https://api.eth.events/ethereum/xdai/mainnet/es/block/search/ \
-H 'Authorization: Bearer $mytoken' \
-H 'Content-Type: application/json' \
-d '{
"sort": {
"number.num": "desc"
},
"size": 2
}'
SQL Access
1) Download a SQL client Anyblock Analytics favors
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_xdai
to interact with xDai data.
2.
To Query the DB, go to Tools -> Query Tool
Access the Query Tool
6)
Try a Query!
1.
Check you are in the GC xDai 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
Run query with the lightning icon
7) Explore different queries and information in the SQL documentation and tutorials available here:
https://www.anyblockanalytics.com/blog/basic-sql-usage-examples/
Example Query to find transactions for the EternalStorageProxy token contract
SELECT * FROM tx
WHERE tx.to = '0x7301CFA0e1756B71869E93d4e4Dca5c7d0eb0AA6'
LIMIT 50
Previous
Connect to GC with Ethers.js
Next
Blocknative Notifications
Last modified
3mo ago
Copy link
Outline
ElasticSearch
SQL Access