Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/fuseio/fuse-docs/llms.txt

Use this file to discover all available pages before exploring further.

Fuse is an EVM-compatible blockchain with 5-second block times and ~10 GWei gas. This guide covers the network details you need, how to deploy a Solidity contract using Hardhat, and how to connect to the FuseBox SDK once your contract is live.

Network details

Fuse MainnetFuse Testnet (Sparknet)
Chain ID122123
RPChttps://rpc.fuse.iohttps://rpc.fusespark.io
SymbolFUSEFUSE
Explorerhttps://explorer.fuse.iohttps://explorer.fusespark.io
WebSocketwss://explorer-node.fuse.io/wswss://explorernode.fusespark.io/ws
Healthhttps://health.fuse.iohttps://health.fusespark.io
Block size20,000,00020,000,000
Block speed5 seconds5 seconds
Gas price10 GWei10 GWei
FaucetStakelyChainDrop, Stakely

Core network contracts

The following contracts govern consensus, block rewards, and on-chain governance on Fuse Mainnet.

Deploy a smart contract with Hardhat

Fuse is EVM-compatible, so any Solidity contract compiles and deploys without modification. The steps below use Hardhat’s Ignition deployment system to deploy an ERC-20 token to Fuse.
1

Create and initialise the project

Open a terminal and scaffold a new Hardhat project:
mkdir hardhat-fuse-guide && cd hardhat-fuse-guide
npm init -y
npx hardhat init
When prompted, accept the sample project defaults and install dependencies including hardhat and @nomicfoundation/hardhat-toolbox.
npm install --save-dev hardhat
npm install --save-dev @nomicfoundation/hardhat-toolbox
2

Write the contract

Inside the contracts/ folder, delete the default Lock.sol and create Token.sol with the following content:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts@4.0.0/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts@4.0.0/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts@4.0.0/access/Ownable.sol";

contract MyToken is ERC20, ERC20Burnable, Ownable {
    constructor(address initialOwner)
        ERC20("MyToken", "MTK")
        Ownable()
    {}

    function mint(address to, uint256 amount) public onlyOwner {
        _mint(to, amount);
    }
}
3

Compile

npx hardhat compile
A successful compile returns:
Compiling...
Compiled 1 contract successfully
4

Create the Ignition deployment module

Create ignition/modules/deploy.js and paste the following:
const { buildModule } = require("@nomicfoundation/hardhat-ignition/modules");

const Token = buildModule("Token", (m) => {
  const contract = m.contract("Token");
  return { contract };
});

module.exports = Token;
5

Configure Fuse networks in Hardhat

Open hardhat.config.js and add the networks block:
module.exports = {
  // ...
  networks: {
    fuse: {
      url: "https://rpc.fuse.io/",
      accounts: [`0xPRIVATE_KEY`], // deployer private key
    },
    spark: {
      url: "https://rpc.fusespark.io/",
      accounts: [`0xPRIVATE_KEY`], // deployer private key
    },
  },
  // ...
};
Never commit private keys to source control. Use environment variables or a secrets manager instead. The EOA that owns the key must hold FUSE tokens to cover the deployment gas fee.
6

Deploy to Fuse

Deploy to Fuse Mainnet:
npx hardhat ignition deploy ./ignition/modules/deploy.js --network fuse
Or to Sparknet testnet:
npx hardhat ignition deploy ./ignition/modules/deploy.js --network spark
After deployment, paste the contract address into the Mainnet Explorer or Testnet Explorer to verify the transaction.

Connect to FuseBox SDK after deployment

FuseBox is the recommended way to connect your deployed contract to a frontend. It provides ERC-4337 smart accounts, a Bundler, and a Paymaster for gasless transactions — no direct RPC calls required. Install the SDK and initialise it with your API key from console.fuse.io:
npm install @fuseio/fusebox-web-sdk ethers
import { FuseSDK } from "@fuseio/fusebox-web-sdk";
import { ethers } from "ethers";

const apiKey = "YOUR_FUSEBOX_API_KEY";
const credentials = new ethers.Wallet(`0xPRIVATE_KEY`);

const fuseSDK = await FuseSDK.init(apiKey, credentials, {
  withPaymaster: true,
});

console.log(
  `Smart account address: https://explorer.fuse.io/address/${fuseSDK.wallet.getSender()}`
);
Setting withPaymaster: true sponsors gas fees for your users. Your Operator account’s Paymaster is pre-funded with 1 FUSE when you create it on the Console.
With the SDK initialised, you can call fuseSDK.transferToken(tokenAddress, recipient, amount) to move tokens, query balances, and carry out other on-chain operations without writing low-level transaction code. See the FuseBox SDK overview for the full API surface.

Build docs developers (and LLMs) love