LogoLogo
WebsiteLinksMedia KitGitHub
  • Introduction
  • Sonic
    • Overview
    • S Token
    • Wallets
    • Sonic Gateway
    • Build on Sonic
      • Getting Started
      • Deploy Contracts
      • Verify Contracts
      • Tooling and Infra
      • Contract Addresses
      • Network Parameters
      • Programmatic Gateway
      • Learn Solidity
    • Node Deployment
      • Archive Node
      • Validator Node
      • Node Recovery
    • FAQ
  • Funding
    • Sonic Airdrop
      • Sonic Points
      • Sonic Gems
      • Game Gems
      • Sonic Boom
        • Winners
    • Fee Monetization
      • Apply
      • Dispute
      • FeeM Vault
    • Innovator Fund
    • Sonic & Sodas
  • MIGRATION
    • Overview
    • App Token Migration
    • Migration FAQ
  • Technology
    • Overview
    • Consensus
    • Database Storage
    • Proof of Stake
    • Audits
Powered by GitBook

© 2025 Sonic Labs

On this page
Export as PDF
  1. Sonic
  2. Build on Sonic

Deploy Contracts

PreviousGetting StartedNextVerify Contracts

Last updated 4 months ago

At the software level, deploying to Sonic is the same as deploying to any other EVM network.

The only difference is which network you connect to. Use as the connection endpoint for the Blaze testnet or for the mainnet.

For the Blaze testnet, you can use the to obtain an initial amount of S to execute transactions on the testnet.

Here are example configurations for Hardhat to deploy on the Sonic mainnet or Blaze testnet:

require("@nomicfoundation/hardhat-toolbox");

// Replace this private key with your Sonic account private key
const SONIC_PRIVATE_KEY = "YOUR SONIC TEST ACCOUNT PRIVATE KEY";

module.exports = {
  solidity: "0.8.26",
  networks: {
    sonic: {
      url: "https://rpc.soniclabs.com",
      accounts: [SONIC_PRIVATE_KEY]
    }
  }
};

require("@nomicfoundation/hardhat-toolbox");

// Replace this private key with your Sonic account private key
const SONIC_PRIVATE_KEY = "YOUR SONIC TEST ACCOUNT PRIVATE KEY";

module.exports = {
  solidity: "0.8.26",
  networks: {
    sonic: {
      url: "https://rpc.blaze.soniclabs.com",
      accounts: [SONIC_PRIVATE_KEY]
    }
  }
};

To deploy, execute npx hardhat run scripts/deploy.js --network sonic.

Please note that the Sonic Blaze testnet is a testing playground designed to showcase technology capabilities. The data stored on the network might eventually be deleted, with or without notice.

https://rpc.blaze.soniclabs.com
https://rpc.soniclabs.com
Sonic Blaze dashboard