Skip to main content

Caldera Chains Integration

What is Caldera?

With Caldera, developers can build dedicated blockchains for their applications, leading to improved performance, UX, and lower fees for their users.

By using Caldera chains, developers can control their entire technology stack, without compromising on the ability to bridge to and inherit security from popular blockchains like Ethereum and Polygon. This enables developers to leverage the liquidity and infrastructure native to existing chains while having control over what matters most to their applications.

Caldera chains are EVM-compatible, enable gas customization, and are interoperable with other EVM-based chains like Ethereum and Polygon. This translates into unprecedented performance, low and predictable fees, and revenue generation for applications.

How to integrate with Caldera

To integrate with Caldera, you will need to customize the rpc provider that Marble uses to interact with the chain. This is done by passing a custom NetworkConfiguration object to the Marble constructor.

import { Marble } from "marble-sdk";
import { NetworkConfiguration } from "@marblexyz/common";
const marble = new Marble({
network: {
networkName: '<YOUR_CALDERA_CHAIN_NAME>',
rpcUrl: '<YOUR_CALDERA_RPC_URL>',
chainId: '<YOUR_CALDERA_RPC_URL>',
baseAsset: {
symbol: '<YOUR_ASSET_SYMBOL>', // Optional
name: '<YOUR_ASSET_NAME>', // Optional
},
}
});

Once you integrated Caldera into Marble, you can use Marble to connect to your chain and interact with your application.

import { ethers } from "ethers";
const provider = new ethers.providers.Web3Provider(marble.rpcProvider);
// Get a signer
const signer = provider.getSigner();
const address = await signer.getAddress();

// Example: Signing Message
const result = await signer.signMessage("Hello world!");

Read more about Caldera