Build better with Aurora nodes


Aurora Labs have always put the building and scaling of decentralized solutions through its infrastructure as a top priority. That has now become even more more accessible with the help of Chainstack - who brings reliable high-performance infrastructure to the table which makes the processes more easier, faster and much more secure.

Reliable Aurora mainnet and testnet infrastructure

Chainstack makes sure you get access to robust and scalable infrastructure, ready for your Aurora journey, in a matter of minutes. We take away the burden of managing it so that you can instantly focus on building and exploring data on NEAR through Aurora.

Start fast with elastic Aurora RPC nodes

Elastic Aurora RPC nodes* provide personal, and protected API endpoints you can immediately start using to interact with both NEAR networks through your Aurora RPC nodes, starting at $0 per month.
Chainstack elastic Aurora RPC nodes

  • Unlimited requests, no rate limiting or throttling

  • Rapid deployment through Bolt

  • Secure HTTP

Aurora RPC archive nodes

Get access to Aurora RPC archive nodes to query the entire history of the NEAR mainnet—starting at just $49 per month. And with Chainstack’s Bolt fast sync technology, you can deploy your own dedicated archive node in minutes instead of months.

Turbocharged sync

With Chainstack’s Bolt technology users get fully synced dedicated Aurora RPC nodes in almost no time at all. By using up-to-date snapshots of the ledger, Chainstack spins up dedicated Aurora RPC nodes with the latest state—so it is possible to get a node ready same day rather than having to wait long sync times while spinning it from genesis block.

Dedicated nodes for dedicated users

Dedicated nodes for dedicated users

Chainstack’s dedicated nodes are a go-to for request-intensive workloads on NEAR through Aurora, including traders and multiple different DeFi projects.

Chainstack dedicated Aurora RPC nodes

  • Unlimited requests, no rate limiting or throttling

  • Rapid deployment through Bolt

Chainstack Marketplace

Chainstack is designed to work hand-in-hand with the NEAR and Aurora ecosystem: tools, apps and services that you use every day to build your applications or amplify returns. They work closely with developers and the NEAR and Aurora community to ensure seamless integration for our end users.

Deploy an Aurora RPC node

Join an Aurora network

Deploy an elastic or dedicated Aurora RPC node on testnet or mainnet

  1. Select a public chain project and click Get started or Join network.

  2. Under Blockchain protocol, select Aurora.

  3. Under Blockchain network, select Mainnet or Testnet. Click Next.

  4. Under Type, select whether to run an elastic or a dedicated node.

  5. Under Mode, select whether to run a full node or an archive node. See Modes.

  6. Under Hosting, select Chainstack or Private. See Support hosting options.

  7. Provide a node name. Click Next.

  8. Review your changes and click Join network.

The node status will change from Pending to Running once deployed.

Aurora Operations

How to interact with your Aurora RPC.

Metamask

You can set your MetaMask to interact through your Aurora nodes deployed with Chainstack.

  1. Open your MetaMask and click the network selector.

  2. In the network selector, click Custom RPC.

  3. In the New RPC URL field, enter the endpoint.

  4. In the Chain ID field, enter the ID of the network:

  • Mainnet: 1313161554

  • Testnet: 1313161555

Development Tools

Truffle

Configure Truffle Suite

  1. Install Truffle Suite, HD Wallet-enabled Web3 provider, and create a project.

  2. Create a new environment in truffle-config.js, add your mnemonic phrase generated by a wallet and the node endpoint:

const HDWalletProvider = require("@truffle/hdwallet-provider");
const mnemonic = 'pattern enroll upgrade ...';
...
module.exports = {
 networks: {
    chainstack: {
        provider: () => new HDWalletProvider(mnemonic, "https://nd-123-456-789.p2pify.com/3c6e0b8a9c15224a8228b9a98ca1531d"),
        network_id: "*"
    },
   }
  }
};

Hardhat

Configure Hardhat to deploy contracts and interact through your Aurora nodes.

  1. Install Hardhat and create a project.

  2. Create a new environment in hardhat.config.js:

require("@nomiclabs/hardhat-waffle");
...
module.exports = {
  solidity: "0.7.3",
  networks: {
    chainstack: {
        url: "ENDPOINT",
        accounts: ["PRIVATE_KEY"]
    },
   }
};

where

  • ENDPOINT — your node HTTPS or WSS endpoint.

  • PRIVATE_KEY — the private key of the account that you use to deploy the contract.

Example:

require("@nomiclabs/hardhat-waffle");
...
module.exports = {
  solidity: "0.7.3",
  networks: {
    chainstack: {
        url: "https://nd-123-456-789.p2pify.com/3c6e0b8a9c15224a8228b9a98ca1531d",
        accounts: ["ee5dda7d38d194783d32adcfc961401108b8fdde27e8fee115553959d434e68b"]
    },
   }
};

3. Run npx hardhat run scripts/deploy.js --network chainstack and Hardhat will deploy using Chainstack.

web3.js

Build DApps using web3.js and Aurora nodes deployed with Chainstack.

HTTP
  1. Install web3.js

  2. Use the HttpProvider object to connect to your node HTTPS endpoint.

const Web3 = require('web3');

const web3 = new Web3(new Web3.providers.HttpProvider('ENDPOINT'));
ja

where

  • ENDPOINT — your node HTTPS endpoint.

Example to get the latest block number:

const Web3 = require('web3');

const web3 = new Web3(new Web3.providers.HttpProvider('https://nd-123-456-789.p2pify.com/3c6e0b8a9c15224a8228b9a98ca1531d'));

web3.eth.getBlockNumber().then(console.log);

WebSocket

  1. Use the WebsocketProvider object to connect to your node WSS endpoint.

const Web3 = require('web3');

const web3 = new Web3(new Web3.providers.WebsocketProvider('ENDPOINT'));

where

  • ENDPOINT — your node WSS endpoint.

Example to get the latest block number:

const Web3 = require('web3');

const web3 = new Web3(new Web3.providers.WebsocketProvider('wss://ws-nd-123-456-789.p2pify.com/3c6e0b8a9c15224a8228b9a98ca1531d'));

web3.eth.getBlockNumber().then(console.log);

web3.py

Build DApps using web3.py and Aurora nodes deployed with Chainstack.

  1. Install web3.py

  2. Connect over HTTP or WebSocket. See also EVM node connection: HTTP vs WebSocket.

HTTP

Use the HTTPProvider to connect to your node HTTPS endpoint.

from web3 import Web3

web3 = Web3(Web3.HTTPProvider('ENDPOINT'))

where

  • ENDPOINT — your node HTTPS endpoint.

  • HOSTNAME — your node HTTPS endpoint hostname.

  • USERNAME — your node access username.

  • PASSWORD — your node access password.

Example to get the latest block number:

from web3 import Web3

web3 = Web3(Web3.HTTPProvider('https://nd-123-456-789.p2pify.com/3c6e0b8a9c15224a8228b9a98ca1531d'))
print(web3.eth.blockNumber)
websocket

Use the WebsocketProvider object to connect to your node WSS endpoint.

from web3 import Web3

web3 = Web3(Web3.WebsocketProvider('ENDPOINT'))

where

  • ENDPOINT — your node WSS endpoint.

  • HOSTNAME — your node WSS endpoint hostname.

  • USERNAME — your node access username.

  • PASSWORD — your node access password.

Example to get the latest block number:

from web3 import Web3

web3 = Web3(Web3.WebsocketProvider('wss://ws-nd-123-456-789.p2pify.com/3c6e0b8a9c15224a8228b9a98ca1531d'))
print(web3.eth.blockNumber)

web3.php

Build DApps using web3.php and Aurora nodes deployed with Chainstack.

  1. Install web3.php.

  2. Connect over HTTP:

<?php

require_once "vendor/autoload.php";

use Web3\Web3;
use Web3\Providers\HttpProvider;
use Web3\RequestManagers\HttpRequestManager;

$web3 = new Web3(new HttpProvider(new HttpRequestManager("ENDPOINT", 5)));
?>

where ENDPOINT is your node HTTPS endpoint.

  1. Use JSON-RPC methods to interact with the node.

Example to get the latest block number:

<?php

require_once "vendor/autoload.php";

use Web3\Web3;
use Web3\Providers\HttpProvider;
use Web3\RequestManagers\HttpRequestManager;

$web3 = new Web3(new HttpProvider(new HttpRequestManager("https://nd-123-456-789.p2pify.com/3c6e0b8a9c15224a8228b9a98ca1531d", 5)));

$eth = $web3->eth;

$eth->blockNumber(function ($err, $data) {
        print "$data \n";
});
?>

ethers.js

Build DApps using ethers.js and Aurora nodes deployed with Chainstack.

  1. Install ethers.js

  2. Connect over HTTP or WebSocket.

HTTP

Use the JsonRpcProvider object to connect to your node HTTPS endpoint.

const { ethers } = require("ethers");

var urlInfo = {
    url: 'ENDPOINT'
};
var provider = new ethers.providers.JsonRpcProvider(urlInfo, NETWORK_ID);

where

  • ENDPOINT — your node HTTPS endpoint.

  • USERNAME — your node access username.

  • PASSWORD — your node access password.

  • NETWORK_ID — Aurora network ID:

    • Mainnet: 1313161554

    • Testnet: 1313161555

Example to get the latest block number on mainnet:

const { ethers } = require("ethers");

var urlInfo = {
    url: 'https://nd-123-456-789.p2pify.com/3c6e0b8a9c15224a8228b9a98ca1531d'
};
var provider = new ethers.providers.JsonRpcProvider(urlInfo, 1313161554);

provider.getBlockNumber().then(console.log);
WebSocket

Use the WebSocketProvider object to connect to your node WSS endpoint.

const { ethers } = require("ethers");

const provider = new ethers.providers.WebSocketProvider('ENDPOINT', NETWORK_ID);

where

  • ENDPOINT — your node WSS endpoint.

  • NETWORK_ID — Aurora network ID:

    • Mainnet: 1313161554

    • Testnet: 1313161555

Example to get the latest block number on mainnet:

const { ethers } = require("ethers");

const provider = new ethers.providers.WebSocketProvider('wss://ws-nd-123-456-789.p2pify.com/3c6e0b8a9c15224a8228b9a98ca1531d', 1313161554);

provider.getBlockNumber().then(console.log);

Brownie

  1. Install Brownie

  2. Use the brownie networks add command with the node endpoint:

brownie networks add Aurora ID name="NETWORK_NAME" host=KEY_ENDPOINT chainid=NETWORK_ID

where

  • ID — any name that you will use as the network tag to run a deployment. For example, chainstack-mainnet.

  • NETWORK_NAME — any name that you want to identify the network by in the list of networks. For example, Mainnet (Chainstack).

  • ENDPOINT — your node HTTPS or WSS endpoint.

  • NETWORK_ID — Aurora network ID:

    • Mainnet: 1313161554

    • Testnet: 1313161555

Example to add an Aurora mainnet node to the list of Brownie networks:

brownie networks add Aurora aurora-mainnet name="Mainnet (Chainstack)" host=https://nd-123-456-789.p2pify.com/3c6e0b8a9c15224a8228b9a98ca1531d chainid=1313161554

Example to run the deployment script:

brownie run deploy.py --network aurora-mainnet

Foundry

  1. Install Foundry.

  2. Use --rpc-url to run the operation through your Chainstack node.

Forge

Use forge to develop, test, and deploy your smart contracts.

To deploy a contract:

forge create CONTRACT_NAME --contracts CONTRACT_PATH --private-key PRIVATE_KEY --rpc-url ENDPOINT

where

  • CONTRACT_NAME — name of the contract in the Solidity source code.

  • CONTRACT_PATH — path to your smart contract.

  • PRIVATE_KEY — the private key to your funded account that you will use to deploy the contract.

  • ENDPOINT — your node HTTPS endpoint.

Example to deploy the simple storage contract:

forge create SimpleStorage --contracts /root/foundry/contracts/simplestorage.sol --private-key 9c4b7f4ad48f977dbcdb2323249fd738cc9ff283a7514f3350d344e22c5b923d --rpc-url https://nd-123-456-789.p2pify.com/3c6e0b8a9c15224a8228b9a98ca1531d
Cast

Use cast to interact with the network and the deployed contracts.

To get the latest block number:

cast block-number --rpc-url ENDPOINT

Example:

cast block-number --rpc-url https://nd-123-456-789.p2pify.com/3c6e0b8a9c15224a8228b9a98ca1531d