Skip to main content

Forno

How to connect to Celo without running a full node using Forno.


What is Forno?

Forno is a cLabs hosted node service for interacting with the Celo network. This allows you to connect to the Celo Blockchain without having to run your own node.

tip

Forno does not offer a terms of service and there are no guarantees about service uptime. For production applications, consider using or Quicknode.

Forno has HTTP and websocket endpoints that you can use to query current Celo data or post transactions that you would like to broadcast to the network. The service runs full nodes in non-archive mode, so you can query the current state of the blockchain, but cannot access historic state.

Forno can be used as an Http Provider with ContractKit.

const Web3 = require("web3");
const ContractKit = require("@celo/contractkit");

const web3 = new Web3("https://forno.celo.org");
const kit = ContractKit.newKitFromWeb3(web3);

Forno is a public node, so to send transactions from a Forno connection you will have to sign transactions with a private key before sending them to Forno.

Forno networks

Consult this page to determine which network is right for you.

Celo Mainnet

https://forno.celo.org

Websocket support:

wss://forno.celo.org/ws

Alfajores Testnet

https://alfajores-forno.celo-testnet.org

Websocket support:

wss://alfajores-forno.celo-testnet.org/ws

Websocket connections & Event listeners

Websocket connections are useful for listening to logs (aka events) emitted by a smart contract, but Forno only allows a websocket connection for 20 minutes before disconnecting. On disconnect, you can reconnect to the websocket endpoint to keep listening. Here is an example script of how to set up an event listener that reconnects when the connection is broken.