Swellchain LogoSwellchain

Getting Started

Learn how to connect and start building on Swellchain

Introduction

In this guide, we will cover the following:

  1. Setting up your wallet and network configuration
  2. Bridging assets between Ethereum and Swellchain
  3. Obtaining testnet funds for development
  4. Deploying smart contracts to the network
  5. Interacting with deployed contracts

This will enable you to get a feel of the Swellchain and start building on top of it.


Network Configuration

To interact with Swellchain, you need to add the following networks to your wallet:

ParameterValue
Chain NameSwellchain
Chain ID1923
RPC URLhttps://swell-mainnet.alt.technology
Block Explorerhttps://explorer.swellnetwork.io

The networks can also be added through ChainList.


Development Setup

Obtaining Test ETH

  1. Switch your wallet network to Swellchain Testnet
  2. Bridge ETH from Sepolia testnet using the L1StandardBridgeProxy contract
  3. Or use Superbridge

Bridging Assets

The Standard Bridge contract enables asset transfers between Ethereum and Swellchain through a lock-and-mint mechanism. Please refer to the Contract Addresses page for the addresses of the bridge and token contracts.

Please note that these addresses are subject to change. Always verify contract addresses through official sources before interacting with them.

To bridge assets, call the bridgeERC20To() function on the bridge contract with the following parameters:

PropTypeDefault
sourceToken
address
-
destinationToken
address
-
recipient
address
-
amount
uint256
-
gasLimit
uint256
-
extraData
bytes
0x

Bridge via Superbridge


Bridging ETH

To bridge ETH between Ethereum and Swellchain, call the bridgeETH() or bridgeETHTo() functions on the bridge contract:

PropTypeDefault
recipient
address
-
gasLimit
uint256
-
extraData
bytes
0x

You can also bridge by sending a basic ETH transfer from an EOA directly to the Bridge Contract address. This is possible because the Bridge Contract includes a receive function that enables direct ETH transfers from an EOA on Ethereum to Swellchain without calling specific bridge functions. Find the contract addresses for mainnet and testnet in the Contract Addresses section.

Bridge Mechanics

The bridge locks the tokens on the source chain and mints equivalent tokens on the destination chain. Transfers from Ethereum to Swellchain complete in 1-3 minutes, while transfers back to Ethereum have a 7-day challenge period.

For more information on bridging assets via the Standard Bridge Contract, refer to the Standard Bridge documentation.


Smart Contract Development

Let's deploy your first contract on Swellchain. Use the following code as a template. It is a simple counter contract that can be incremented and decremented.

Counter.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;
 
contract Counter {
    uint256 public count;
 
    // Function to get the current count
    function get() public view returns (uint256) {
        return count;
    }
 
    // Function to increment count by 1
    function inc() public {
        count += 1;
    }
 
    // Function to decrement count by 1
    function dec() public {
        // This function will fail if count = 0
        count -= 1;
    }
}

Open in the Remix IDE


Network Architecture

Swellchain combines the Optimism Superchain with AltLayer's restaking infrastructure:

Core Components

  • Optimism Superchain: A unified network of OP Chains sharing bridging, governance, and communication layers
  • AltLayer AVSs:
    • MACH: Provides accelerated finality
    • VITAL: Enables decentralized verification
    • SQUAD: Powers decentralized sequencing

These services leverage Ethereum's security through EigenLayer's restaking mechanism.

Transaction Fees

Swellchain transactions include two components:

  1. L2 Execution Fee: Cost for transaction execution on L2
  2. L1 Security Fee: Estimated cost for L1 publication

Fee optimization strategies:

  • Submit transactions during low L1 gas periods (weekends)
  • Monitor L2 congestion for optimal execution timing

Network Status

Monitor network status at status.swellnetwork.io

On this page