İçeriğe atla

Ücretsiz Metal L2 RPC uç noktası — API key gerekmez

EVM-compatible

Uç noktalar

API key gerekmez. Yalnızca cüzdan yöntemleri, IP başına hız sınırı uygulanır. Güncel yöntemler ve sınırlar için GET /v1/chains adresini inceleyin.

Ücretsiz herkese açık RPC uç noktası
https://api.blockvectra.com/v1/metall2_mainnet/public
curl -X POST 'https://api.blockvectra.com/v1/metall2_mainnet/public' -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'
Hız sınırı: IP başına 3 istek/sn, kısa süreli ani artış en fazla 20, toplu istekte en fazla 10
İşlem gönderme sınırı: IP başına 1 istek/sn, kısa süreli ani artış en fazla 3
Herkese açık yöntemler
  • eth_chainId
  • net_version
  • eth_blockNumber
  • eth_getBalance
  • eth_getTransactionCount
  • eth_getCode
  • eth_getStorageAt
  • eth_call
  • eth_estimateGas
  • eth_gasPrice
  • eth_maxPriorityFeePerGas
  • eth_feeHistory
  • eth_getBlockByNumber
  • eth_getBlockByHash
  • eth_getTransactionByHash
  • eth_getTransactionReceipt
  • eth_syncing
  • web3_clientVersion
  • eth_sendRawTransaction
Tüm ücretsiz herkese açık RPC uç noktaları
Herkese açık geçmiş: son 1,000 blok. Ücretsiz kaydolun ve bu zincirin desteklediği yöntemler için ücretsiz API kredilerini kullanın.
JSON-RPC (anahtar URL yolunda)
https://api.blockvectra.com/v1/metall2_mainnet/{api_key}
JSON-RPC (başlık: x-api-key)
https://api.blockvectra.com/v1/metall2_mainnet
x-api-key: {api_key}

WebSocket

WebSocket (anahtar URL yolunda)
wss://api.blockvectra.com/v1/metall2_mainnet/{api_key}
WebSocket (başlık: x-api-key veya Authorization)
wss://api.blockvectra.com/v1/metall2_mainnet
x-api-key: {api_key}
Authorization: Bearer {api_key}
Desteklenen abonelik türleri
  • newHeads
  • logs (filtre address veya topic0 içermelidir)

Ağ Parametreleri

Chain ID1750
Ücretsiz herkese açık RPC uç noktasıhttps://api.blockvectra.com/v1/metall2_mainnet/public
API anahtarıyla kullanılabilen metot sayısı39
Data APIDesteklenmiyor
WebSocket DesteğiDestekleniyor
Webhook bildirimleriDesteklenmiyor
İşlem GöndermeDestekleniyor
İşlem Gönderme (Key Gerektirmeyen Genel Uç Nokta)Destekleniyor
Durum geçmişi penceresiEn son 10,000 blok için geçmiş durum
eth_getLogs maksimum blok aralığı1,000 blok
Data API Veri KümeleriDesteklenmiyor
Desteklenen abonelik türlerinewHeads, logs
İlgili test ağlarıBilinmiyor
İlgili kılavuzlarBilinmiyor

Hızlı örnek

curl -X POST https://api.blockvectra.com/v1/metall2_mainnet \
  -H "Content-Type: application/json" \
  -H "x-api-key: {api_key}" \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'

Limitler

Durum geçmişi penceresiEn son 10,000 blok için geçmiş durum
eth_getLogs maksimum blok aralığı1,000 blok
Yöntem politikası
İzin verilen: eth_blobBaseFee, eth_blockNumber, eth_call, eth_chainId, eth_createAccessList, eth_estimateGas, eth_feeHistory, eth_gasPrice, eth_getBalance, eth_getBlockByHash, eth_getBlockByNumber, eth_getBlockReceipts, eth_getBlockTransactionCountByHash, eth_getBlockTransactionCountByNumber, eth_getCode, eth_getHeaderByHash, eth_getHeaderByNumber, eth_getLogs, eth_getProof, eth_getRawTransactionByBlockHashAndIndex, eth_getRawTransactionByBlockNumberAndIndex, eth_getRawTransactionByHash, eth_getStorageAt, eth_getTransactionByBlockHashAndIndex, eth_getTransactionByBlockNumberAndIndex, eth_getTransactionByHash, eth_getTransactionCount, eth_getTransactionReceipt, eth_getUncleByBlockHashAndIndex, eth_getUncleByBlockNumberAndIndex, eth_getUncleCountByBlockHash, eth_getUncleCountByBlockNumber, eth_maxPriorityFeePerGas, eth_sendRawTransaction, eth_simulateV1, eth_syncing, net_version, web3_clientVersion, web3_sha3

Görev seçin

Zincir üstü görevleriniz için çözümler

API anahtarı aldıktan sonra

eth_getLogs

set -eu
: "${BLOCKVECTRA_API_KEY:?BLOCKVECTRA_API_KEY is required}"
validate_response='import json,re,sys
response=json.load(sys.stdin)
if not (type(response) is dict and response.get("jsonrpc")=="2.0" and type(response.get("id")) is int and response["id"]==1 and "error" not in response and "result" in response):
    sys.exit("Invalid JSON-RPC response")
result=response["result"]
if sys.argv[1]=="head":
    if not (type(result) is str and re.fullmatch(r"0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)",result)):
        sys.exit("Invalid block quantity")
    print(result)
else:
    if not (type(result) is list and all(type(log) is dict for log in result)):
        sys.exit("Invalid logs result")
    print(json.dumps(response,indent=2))'
head_response=$(curl -fsS 'https://api.blockvectra.com/v1/metall2_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}')
head=$(printf '%s' "$head_response" | python3 -c "$validate_response" head)
logs_response=$(curl -fsS 'https://api.blockvectra.com/v1/metall2_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' \
  -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"$head\",\"toBlock\":\"$head\"}]}")
printf '%s' "$logs_response" | python3 -c "$validate_response" logs
eth_getLogs

WebSocket

echo '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' | websocat --no-close -H="x-api-key: $BLOCKVECTRA_API_KEY" 'wss://api.blockvectra.com/v1/metall2_mainnet'
WebSocket

Sıkça Sorulan Sorular

Metal L2 RPC WebSocket destekliyor mu?

Metal L2 RPC, WebSocket bağlantılarını destekler. Desteklenen abonelik türleri: newHeads, logs.

Metal L2 RPC trace veya debug yöntemlerini destekliyor mu?

Metal L2 RPC için trace ve debug yöntemleri desteklenmemektedir.

Fiyatlandırma

Kayıtta 30,000,000 CU alın, her 30 günde bir yenilenir (bakiyeler ve hız sınırları zincirler arasında havuzlanır; kredi kartı gerekmez); milyon çağrı başına fiyatlandırılır: eth_blockNumber $0.10, eth_call $1.50, eth_getLogs $3.00.

Fiyatlandırma planlarını görüntüleyin →