Celo x Infura: Continuing our multi-chain expansion with social, regenerative DeFi
Infura users can now build DeFi apps on Celo, an EVM-compatible, carbon-negative, mobile phone-focused Layer 1 network. Learn how to join the ReFi movement with Celo.
We’re excited to continue the expansion of our multi-chain ecosystem that supports the needs of all developers, from those working on side hustles to the developer teams at the biggest Web3 companies. Our goal has been and always will be to grow the entire ecosystem in as many industries as possible. Supporting multiple networks is critical to that future.
Today, we’re thrilled to announce our 12th supported network – Celo – a truly unique community of “developers, designers, dreamers, and doers” laser-focused on building an interoperable ultra-light mobile identity client to help anyone with a smartphone move value anywhere in the world.
As part of ConsenSys, Infura, along with developer tools such as Truffle and Diligence, offer a one-stop shop for developers, that includes complementary Web3 tools and services for all supported networks. Now it’s easier than ever to build for the over six billion smartphone users worldwide on Celo.
The Celo Ecosystem
Celo’s mission of prosperity for all – particularly the financially underserved – as well as their focus on regenerative finance (ReFi), or “DeFi for good,” resonates with many of us at Infura. ReFi utilizes the power of blockchain and Web3 to address climate change, support conservation and biodiversity, and create a more equitable and sustainable financial system.
Celo makes it easier for billions of smartphone users worldwide to send money, with the ability to have transaction fees paid using tokens or a variety of stablecoins. Perhaps most compellingly, Celo allows users of Celo dapps and wallets (including MetaMask, Opera, Valora and others) to send or receive money using only their mobile phone number – a far more simple identity tag than a 42-character randomized wallet address. The simplicity of use coupled with virtually zero fees make Celo one of the most accessible protocols out there, reducing the complexity of financial transactions to the ease of sending a text message.
Celo uses a Byzantine Fault Tolerant consensus mechanism (Proof of Stake) for its decentralized, secure and permissionless carbon negative blockchain transactions. The reduced amount of data needed to sync to the Celo blockchain with the ultra-light client mobile identity client lowers the barrier to participation.
Why build on Celo with Infura
For Infura developers, Celo offers full EVM-compatibility and a broad codebase including Solidity, making the inspiring task of building for 6 billion smartphones surprisingly familiar and accessible. Plus, working with Infura means no syncing or complex setups, 10x faster request response times than self-hosted solutions and 99.99% uptime.
At Infura, the networks we offer aim to meet our developer communities where they most want to be. As such, you’re not limited to one network – signing up for an account with Infura to build on Celo or any single network gets you access to all 12 networks (and counting) through a simple, single line of code. A bonus: get access to free archive data with your Infura plan and exceptional developer resources.
Looking for inspiration on what you could do with Infura and Celo? Some notable DeFi projects in the Celo ecosystem include Ubeswap and Moola, a mobile-first platform for borrowing and lending assets on Celo. The Celo Ecosystem Venture Fund helps developers build on Celo, with over US$77.6M in grants given out so far.
See what kind of impact you could make on the future of decentralized, regenerative, socially inclusive finance by getting started today.
Start building with Celo + Infura
Getting started with Celo on Infura is easy. Follow the few simple steps below, to start building today!
Step 1: Login in or sign up
Login to your Infura account or sign up for a free account and check out our Infura quickstart guide!
Step 2: Create a new key
Once you are logged in click CREATE NEW KEY.
From the “CREATE NEW KEY” pop-up:
- Select Web3 API (Formerly Ethereum) in the NETWORK dropdown list.
- Provide a NAME for your project and click CREATE
Your new project's settings page has all the information you need to connect to the network.
Step 3: Connect to the Celo network
Use the Celo card Mainnet or Alfajores endpoints to send JSON-RPC requests to the Celo network.
Never expose your key secret. It must never be human-readable in your application. We suggest using a .env file
Step 4: Make requests
Celo supports EVM JSON-RPC methods to interact with the Celo network.
Call a CELO JSON-RPC method
Use HTTPS to call a JSON-RPC method. In this example, we use curl to make the HTTPS request to obtain the latest block number.
Ensure that you replace <YOUR-KEY-ID> with a project ID from your Infura dashboard:
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "id": 0, "method": "eth_blockNumber", "params": []}' "https://celo-mainnet.infura.io/v3/<YOUR-KEY-ID>"
The result should look similar to the following:
{"jsonrpc":"2.0","id":0,"result":"0xdde9f2"}
Step 5: Choose a network
Use one of the endpoints below, as your Celo client provider.
Ensure that you replace YOUR-KEY-ID with a KEY ID from your Infura dashboard.
Celo Mainnet
Network: Celo Mainnet
Description: JSON-RPC over HTTPS
URL: https://celo-mainnet.infura.io/v3/YOUR-KEY-ID
Celo Testnet
Network: Celo Alfajores
Description: JSON-RPC over HTTPS
URL: https://celo-alfajores.infura.io/v3/YOUR_KEY_ID
Step 6: Add Celo Network to MetaMask
From MetaMask, select Settings > Networks > Add Network.
Add the Celo network details to MetaMask (shown below).
Celo Mainnnet
- Network Name: Celo (Mainnet)
- New RPC URL: https://celo-mainnet.infura.io/v3/<API-KEY>
- Chain ID: 42220
- Currency Symbol (Optional): CELO
- Block Explorer URL (Optional): https://explorer.celo.org
Celo Testnet
- Network Name: Celo (Alfajores Testnet)
- New RPC URL: https://celo-alfajores.infura.io/v3/<API-KEY>
- Chain ID: 44787
- Currency Symbol: CELOBlock Explorer URL (Optional): https://alfajores-blockscout.celo-testnet.org
Step 7: Fund Your Testnet Account
Create an account on Celo Alfajores with the Celo Faucet and your account will automatically be topped up with the CELO token. You’re ready to go!
For more guidance, see Infura’s Celo documentation.