Skip to content

Instantly share code, notes, and snippets.

@think-in-universe
Last active May 21, 2023 10:24
Show Gist options
  • Select an option

  • Save think-in-universe/019671d56a949ec8a475126f22d21248 to your computer and use it in GitHub Desktop.

Select an option

Save think-in-universe/019671d56a949ec8a475126f22d21248 to your computer and use it in GitHub Desktop.
RPC nodes for CN developers

NEAR RPC Nodes for CN Developers

If you have trouble with using NEAR CLI on testnet, try run the below commands to configure alternative RPC nodes.

Testnet Nodes

BlockPi Node

export NEAR_CLI_TESTNET_RPC_SERVER_URL=https://public-rpc.blockpi.io/http/near-testnet

BSN Node

export NEAR_CLI_TESTNET_RPC_SERVER_URL=https://hk.bsngate.com/api/1e7227ced74cdd9507575cf08bef7d1ff715db9c8d9befd945b766a86c2ea1fd/Near-Testnet/rpc
near set-api-key https://hk.bsngate.com/api/1e7227ced74cdd9507575cf08bef7d1ff715db9c8d9befd945b766a86c2ea1fd/Near-Testnet/rpc 29e93a93a9868bb25fadf2f5cf19848ca87b31797f963b314b462cbb79dc32ea

Please make sure run set-api-key before using NEAR CLI

You can also create your own NEAR RPC nodes in https://bsnbase.io/. Check out the tutorial here

Helper Service Error

In case you met error related to https://helper.testnet.near.org when running near dev-deploy, please add parameter --helperUrl with the alternative helper service URL https://near-contract-helper.onrender.com.

Run the command near dev-deploy --helperUrl https://near-contract-helper.onrender.com should fix the issue.

Mainnet Nodes

BlockPi Node

export NEAR_CLI_MAINNET_RPC_SERVER_URL=https://public-rpc.blockpi.io/http/near

BSN Node

export NEAR_CLI_MAINNET_RPC_SERVER_URL=https://hk.bsngate.com/api/290be6539c06ed5916111968e82218b3eba96349a184bec16bec18ce6dbb764a/Near-Mainnet/rpc
near set-api-key https://hk.bsngate.com/api/290be6539c06ed5916111968e82218b3eba96349a184bec16bec18ce6dbb764a/Near-Mainnet/rpc 50a96edacbdf873462cf9548adff8808dea2f3d7e5e2b1b268399b86fde96afa

Please make sure run set-api-key before using NEAR CLI

You can also create your own NEAR RPC nodes in https://bsnbase.io/. Check out the tutorial here

More RPC Nodes

For more RPC providers that are available in China, please check out this doc: https://docs.near.org/api/rpc/providers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment