Berachain Fullnode (Artio Testnet)
Gain insights into the Berachain Artio testnet via the Cosmos RPC, node API, and EVM endpoints. The fullnode is provided by Flipside Crypto.
The following query demonstrates the basic usage of LiveQuery by listing each validator in descending order of Berachain Governance token delegation:
WITH api_call as (
SELECT
livequery.live.udf_api(
'https://api.testnet.berachain.flipside.services/cosmos/staking/v1beta1/validators'
) as rawOutput
),
formatted_results as (
SELECT
value:operator_address::string as operator_address,
value:description:moniker::string as name,
value:commission:commission_rates:rate::string as commission_rate,
value:tokens::FLOAT / 1e+18 AS abgt
FROM api_call, LATERAL FLATTEN (input => rawoutput:data:validators)
)
SELECT
*
FROM formatted_results ORDER by abgt DESC
This query has the three basic building blocks of a LiveQuery query:
- Use the livequery
livequery.live.udf_api
function to perform an API request. You can specify the method, URL, headers, and JSON body as parameters. - Format the result into rows using
LATERAL FLATTEN
. - Perform the query on the formatted rows.
Start off by familiarizing yourself with the Flipside Data Studio LiveQuery feature via its documentaton. You will specifically be using the livequery.live.udf_api
function, which is documented with examples here.
After you understand how to use LiveQuery, you can use it to access the Berachain fullnode RPC at https://rpc.testnet.berachain.flipside.services then query the results as though they were tabular data. You can use LiveQuery to query the API as follows:
SELECT
livequery.live.udf_api(
'GET', -- Method
'https://rpc.testnet.berachain.flipside.services', -- URL
{ 'Content-Type': 'application/json' } -- Headers
{ '...' }) -- JSON Body
A body for a JSON-RPC request might look like:
{ 'jsonrpc': '2.0',
'id': 1,
'method': 'my_rpc_call',
'params': [ ... ] }
Flipside provides free, community access to public RPC nodes for emerging Blockchain networks and those that the community shows interest in. This enables builder and analysts on those networks to develop applications on those chains and gather advanced insights via LiveQuery.
Berachain is a high-performance EVM-compatible blockchain built on Proof-of-Liquidity consensus. Build applications on and analyze the Artio testnet via Flipside's public RPC endpoints.
Available API endpoints:
- Cosmos RPC: https://rpc.testnet.berachain.flipside.services
- EVM RPC: https://evm.testnet.berachain.flipside.services
- Node API: https://api.testnet.berachain.flipside.services