This repo shows how to use Superfuse toolkit to setup the environment for building cross-chain smart contracts on Superchain ecosystem.
It includes a project template using smart contracts generated by Superfuse Wizard, and powered by superfuse-forge.
These are illustrated by modifying their smart contracts components using our Superfuse Wizard. Then, superfuse-forge could be used to deploy such customized contracts in production.
This cross-chaibn building block is intended to better introduce and onboard web3 developer into superchain 's interoperability.
While developer experience and security are our top priorities, we aim to provide the developer-focused educational tool, such that the new experimental dApp can be quicky bootstapped in superchain ecosystem. This greatly align with Optimism 's Interoperability roadmap.
Superfuse consists of:
Superfuse Wizard(Web UI)
We are building Superfuse Wizard, a code generator/ interactive educational playground to customize, mix & match, deploy Interoperable dApp .
superfuse-forge(Framework/Library)
We are also developing redprint-forge, a modular solidity-based framework to deploy sets of interoperable smart contracts. It works as an engine to:
- Provide type-safe deployment functions. This ensures correct type and order of arguments, enhancing security in smart contract development
 - Allow create-2 based deployer to guarantee the same address across the Superchain
 - Save deployment schemas in json file
 - Separate into each of modular and customizable components
 - Provide reusable test suites with All-Solidity-based so no context switching, no new syntax
 
- Clone the repository:
 
git clone [email protected]:Ratimon/superfuse-contracts-examples.git- Enter to the project directory:
 
cd superfuse-contracts-examples- Select the correct node verison:
 
nvm use v22.14.0- Install the dependencies:
 
pnpm i- Initialize the environment variables:
 
pnpm init:envNote
we just copy the following to the .env:
+MNEMONIC="test test test test test test test test test test test junk"
# local network 's default private key so it is still not exposed
+DEPLOYER_PRIVATE_KEY=0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d
+DEPLOYER_ADDRESS=0x70997970C51812dc3A010C7d01b50e0d17dc79C8
# you can add more RPC_URLs in your own .env
+RPC_URL_localhost=http://localhost:8545
+RPC_URL_base=
+RPC_URL_optimism=- Start the development environment:
 
pnpm devThis command will:
- Start the 
supersimlocal development environment - Deploy the smart contracts to the two test networks
 
This repository would not have been possible to build without the advanced iniatiative from opensource software including
So, we are deeply thankful for their contributions in our web3 ecosystem.
If we’ve overlooked anyone, please open an issue so we can correct it. While we always aim to acknowledge the inspirations and code we utilize, mistakes can happen in a team setting, and a reference might unintentionally be missed.