Skip to main content
Version: ArrowSquid

RPC proxy

Since the Arrowsquid release, Aquarium provides a built-in caching RPC proxy service. Currently, it is a premium feature, with plans to make a subset of calls available to free tier users.

Available networks

EVM
Network namenetwork:protocol
Arbitrum One Mainnetarbitrum-one:http
Arbitrum Goerli Testnetarbitrum-goerli:http
Arbitrum Nova Mainnetarbitrum-nova:http
Astar Mainnetastar:http
Avalanche Mainnetava:http
Avalanche Testnetava-testnet:http
Base Goerlibase-goerli:http
Base Mainnetbase:http
BNB Smart Chain Mainnetbsc:http
BNB Smart Chain Testnetbsc-testnet:http
Ethereum Goerlieth-goerli:http
Ethereum Mainneteth:http
Ethereum Sepoliaeth-sepolia:http
Evmos Mainnetevmos:http
Fantom Mainnetfantom:http
Fantom Testnetfantom-testnet:http
Mantle Mainnetmantle:http
Metis Mainnetmetis:http
Moonbase Alpha Testnetmoonbase-alpha:http
Moonbeam Mainnetmoonbeam:http
Moonriver Mainnetmoonriver:http
OKTC Mainnetoktc:http
Optimism Goerlioptimism-goerli:http
Optimism Mainnetoptimism:http
Polygon Mainnetpolygon:http
Polygon Testnetpolygon-testnet:http
Polygon zkEVM Mainnetpolygon-zkevm:http
Polygon zkEVM Testnetpolygon-zkevm-testnet:http
Shiden Shibuyashibuya:http
Shiden Mainnetshiden:http
StarkNet Mainnetstarknet:http
Sui Testnetsui-testnet:http
Substrate
Network namenetwork:protocol
Acalaacala:http
Alephaleph:http
Amplitudeamplitude:http
Astarastar-substrate:http
Basiliskbasilisk:http
Darwiniadarwinia:http
Darwiniacrabdarwiniacrab:http
Edeneden:http
Frequencyfrequency:http
Hydradxhydradx:http
Interlayinterlay:http
Karurakarura:http
Khalakhala:http
Kiltkilt:http
Kintsugikintsugi:http
Kusamakusama:http
Litentrylitentry:http
Moonbasemoonbase-substrate:http
Moonbeammoonbeam-substrate:http
Moonrivermoonriver-substrate:http
Phalaphala:http
Polkadotpolkadot:http
Shibuyashibuya-substrate:http
Shidenshiden-substrate:http
Turingturing:http
Zeitgeistzeitgeist:http

Enable the RPC add-on like this:

deploy:
addons:
rpc:
- moonriver:http

scale:
addons:
rpc:
max-rate: 10rps

Processor configuration

With the addon successfully enabled, your squid will get a unique proxied endpoint to the requested network. Aquarium will make its URL available at the RPC_${Upper(network)}_${Upper(protocol)} environment variable. Assert it to avoid compilation errors. We also recommend rate limiting RPC proxy requests on the processor side to the same rate as was used in the manifest:

import {assertNotNull} from '@subsquid/util-internal'

processor.setDataSource({
chain: {
url: assertNotNull(process.env.RPC_MOONRIVER_HTTP),
rateLimit: 10
},
archive: /* archive URL */
})