📗
HyperGraph English
  • Welcome to HyperGraph
  • 💰 Farming
    • Introduction of Minning
      • Connecting MetaMask to Binance Smart Chain
      • MathWallet on Binance Smart Chain APP Guide
      • Token Pocket App on Binance Smart Chain (BSC)
  • 🛠️ PRODUCT
  • Product usage
    • Product business
    • Registration and login
    • Create subgraph
    • View subgraph
  • Development
    • Business interaction process
    • Quick start
    • Remote deployment
    • Development and deployment FAQ
    • Subgraph development
    • GraphQL API
    • AssemblyScript API Part 1
    • AssemblyScript API Part 2
  • Example
    • Uniswap subgraph example
    • Uniswap-info example
  • User Cases
  • Public subgraph
  • 🪜HYPERBRIDGE
    • HyperBridge
    • Token cross-chain
    • Mainstream assets cross-chain
    • Mainstream assets liquidity provision
    • Cross-chain purchase of Gas
  • 📖 Project
    • Operation Flow
    • Index Nodes
    • Token Allocation
    • Contract Address
  • 🧩 Network
    • HyperGraph Introduction
    • Network Construction
    • Network Role
    • Node Device
    • Node Hosting Type
    • Pricing Plan Second Edition
    • Node Network FAQ
    • Heco archive node for public use
  • 🔗 Links
    • HyperGraph Site
    • HyperGraph Farming
    • BSC Explorer
    • 中文文档
Powered by GitBook
On this page

Was this helpful?

  1. Network

Heco archive node for public use

PreviousNode Network FAQ

Last updated 3 years ago

Was this helpful?

With the official support of heco, HyperGraph has set up two public archive nodes for public use. These node supports RPC and WS mode, but since they are public and free resources, please do not overuse them or use them for long-term and large-scale data services.

The specific configuration and test methods are as follows:

Node 1:

http Mode:

URL:

WS Mode:

URL:

wss://pub001.hg.network/ws

The connection configuration in metamask is shown in the figure below:

RPC can be used to test node No.1 to obtain the chain ID and the latest block number respectively. Examples and results are as follows:

# curl -X POST --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' -H "Content-Type: application/json" https://pub001.hg.network/rpc

{"jsonrpc":"2.0","id":1,"result":"0x80"}

# curl -X POST --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' -H "Content-Type: application/json" https://pub001.hg.network/rpc

{"jsonrpc":"2.0","id":1,"result":"0x6479e9"}

You can also write the following code to test the connectivity of websocket protocol::

var Web3 = require('web3');

var web3 = new Web3('wss://pub001.hg.network/ws');

subscription = web3.eth.subscribe('pendingTransactions', function (error, result) {})

.on("data", function (transactionHash) {

web3.eth.getTransaction(transactionHash)

.then(function (transaction) {

console.log(transaction)

});

})

Output:

Node 2:

http Mode:

URL:

https://pub002.hg.network/rpc

WS Mode:

URL:

wss://pub002.hg.network/ws

The connection configuration in metamask is shown in the figure below:

RPC can be used to test node No.2 to obtain the chain ID and the latest block number respectively. Examples and results are as follows:

# curl -X POST --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' -H "Content-Type: application/json" https://pub002.hg.network/rpc

{"jsonrpc":"2.0","id":1,"result":"0x80"}

# curl -X POST --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' -H "Content-Type: application/json" https://pub002.hg.network/rpc

{"jsonrpc":"2.0","id":1,"result":"0x6479ea"}

You can also write the following code to test the connectivity of websocket protocol:

var Web3 = require('web3');

var web3 = new Web3('wss://pub002.hg.network/ws');

subscription = web3.eth.subscribe('pendingTransactions', function (error, result) {})

.on("data", function (transactionHash) {

web3.eth.getTransaction(transactionHash)

.then(function (transaction) {

console.log(transaction)

});

})

Output:

🧩
https://pub001.hg.network/rpc