Connect to Ethereum Node

Fast and reliable full nodes and archive full nodes for Ethereum, Ropsten, Goerli, and other testnets coming.

Need a fast and reliable full node, but already have your own backend? Then Speedy Nodes are for you! Get direct JsonRpc access to Moralis full nodes and archive full nodes. Sign up for a free account at Moralis.io to get started!

Get Your ETH Node Url

Once you log into your account go to the "Speedy Nodes" section. Click on the "Endpoints" button for the Ethereum Network. You will see separate urls for each network and each archive version.

  • Mainnet

  • Mainnet Archive (coming soon)

  • Goerli

  • Goerli Archive

  • Ropsten

  • Ropsten Archive

  • Rinkeby

  • Rinkeby Archive

  • Kovan

  • Kovan Archive

Copy the link for Mainnet (or your desired environment). It will look something like this:

https://speedy-nodes-nyc.moralis.io/1a2b3c4d5e6f1a2b3c4d5e6f/eth/mainnet

Connect to Your Speedy Node

With your Speedy Node url in hand it's time put it to use!

Web3 JS

First import the web3.js library.

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/web3.min.js"></script>

Or via npm then import.

npm install web3
const Web3 = require('web3');

Now that the library is imported a provider can be created.

const NODE_URL = "YOUR SPEEDY NODE URL HERE";
const provider = new Web3.providers.HttpProvider(NODE_URL);
const web3 = new Web3(provider);

That's it! See the web3.js docs for more details on how to use the web3 object.

Ethers JS

First import the ethers.js library.

<script src="https://cdn.ethers.io/lib/ethers-5.2.umd.min.js"
type="application/javascript"></script>

Or via npm then import in the browser or NodeJS

npm install ethers
// JavaScript, NodeJS
const { ethers } = require("ethers");
// ES6 or typescript
import { ethers } from "ethers";

Next create a provider and if needed a signer to sign transactions.

const NODE_URL = "YOUR SPEEDY NODE URL HERE";
const provider = new ethers.providers.JsonRpcProvider(NODE_URL);
// provider is read-only get a signer for on-chain transactions
const signer = provider.getSigner();

And there you have it! See the ethers.js docs for more details on how to use providers and signers.