Welcome to the Shibarium deployment quickstart! This guide will help you set up your environment and deploy smart contracts on Shibarium, the L2 for the Shiba Inu ecosystem. Whether you’re a seasoned developer or just starting out, you’ll find everything you need to get your contracts live on Shibarium.

Overview

Shibarium is a fast, low-cost, EVM-compatible L2 built for the Shiba Inu ecosystem. You can use all the familiar Ethereum tools—Remix, Hardhat, Truffle, Web3js, and more. Shibarium supports both mainnet and Puppynet (testnet).
If you know how to deploy on Ethereum, you already know how to deploy on Shibarium!

1. Set Up Your Wallet

You need an Ethereum-compatible wallet (e.g., MetaMask) to interact with Shibarium. Add the Shibarium network to your wallet: Mainnet RPC:
https://www.shibrpc.com
Chain ID: 109 For Puppynet (testnet), see the official docs.

2. Deploy a Smart Contract with Remix

You can quickly deploy contracts using the Remix IDE and MetaMask.
1

Write your contract

Create a new Solidity file in Remix and paste:
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.0 <0.7.0;
contract SimpleStorage {
    uint storedData;
    function set(uint x) public {
        storedData = x;
    }
    function get() public view returns (uint) {
        return storedData;
    }
}
2

Compile the contract

Click the Solidity logo in Remix and compile your contract.
3

Connect your wallet

Select Injected Web3 and connect MetaMask (set to Shibarium network). Make sure you have test BONE tokens (get them from the Shibarium faucet).
4

Deploy and interact

Deploy the contract. After deployment, expand the contract in Remix to call get (should return 0), then use set to update the value and verify with get again.

3. Deploy and Verify with Hardhat

You can also use Hardhat for more advanced workflows, including contract verification.
1

Prerequisites

  • Node.js
  • MetaMask wallet (add Shibarium network)
  • Hardhat (install globally):
npm install -g hardhat
2

Set up your project

mkdir shibarium-smart-contract
cd shibarium-smart-contract
npx hardhat
npm install --save-dev @nomiclabs/hardhat-ethers ethers
3

Write your contract

Create contracts/SimpleStorage.sol:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract SimpleStorage {
    uint256 private storedData;
    function set(uint256 x) public {
        storedData = x;
    }
    function get() public view returns (uint256) {
        return storedData;
    }
}
4

Configure Hardhat for Shibarium

Edit hardhat.config.js:
require("@nomiclabs/hardhat-ethers");

module.exports = {
  solidity: "0.8.0",
  networks: {
    shibarium: {
      url: "https://www.shibrpc.com",
      accounts: [process.env.PRIVATE_KEY]
    }
  }
};
Create a .env file and add your private key:
PRIVATE_KEY=your_private_key_here
5

Write the deployment script

Create scripts/deploy.js:
async function main() {
  const [deployer] = await ethers.getSigners();
  console.log("Deploying contracts with the account:", deployer.address);
  const SimpleStorage = await ethers.getContractFactory("SimpleStorage");
  const simpleStorage = await SimpleStorage.deploy();
  console.log("SimpleStorage deployed to:", simpleStorage.address);
}

main()
  .then(() => process.exit(0))
  .catch(error => {
    console.error(error);
    process.exit(1);
  });
6

Deploy the contract

npx hardhat run scripts/deploy.js --network shibarium
7

Verify the contract (optional)

Install the verification plugin:
npm install --save-dev @nomiclabs/hardhat-etherscan
Update hardhat.config.js:
require("@nomiclabs/hardhat-ethers");
require("@nomiclabs/hardhat-etherscan");

module.exports = {
  solidity: "0.8.0",
  networks: {
    shibarium: {
      url: "https://www.shibrpc.com",
      accounts: [process.env.PRIVATE_KEY]
    }
  },
  etherscan: {
    apiKey: {
      shibarium: "shib",
    },
    customChains: [
      {
        network: "shibarium",
        chainId: 109,
        urls: {
          apiURL: "https://www.shibariumscan.io/api/",
          browserURL: "https://www.shibariumscan.io/"
        }
      },
    ]
  },
};
Verify your contract:
npx hardhat verify --network shibarium <DEPLOYED_CONTRACT_ADDRESS>
For more details, troubleshooting, and advanced topics, visit the official Shibarium docs.