Deploy Contracts

How to deploy contracts on Sonic builders testnet

At the software level, deploying to Sonic is the same as deploying to the current Opera mainnet or any other compatible network. The only difference is which network you connect to. Use our open Web3 API balancer at as the connection endpoint. The number of requests is limited, so please do not overload the connection.

You can use the Sonic builders testnet dashboard at to obtain an initial amount of native FTM tokens to execute transactions on the network.

Here is an example configuration for Hardhat:


// Replace this private key with your Sonic account private key

module.exports = {
  solidity: "0.8.21",
  networks: {
    sonic: {
      url: "",
      accounts: [SONIC_PRIVATE_KEY]

Please make sure to use Solidity build target London (Solidity version 0.8.21 or lower).

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

Please note that the Fantom Sonic builders testnet is a testing playground aimed to showcase the technology capabilities, which means the data stored on the network will be deleted eventually.

Last updated

© 2024 Fantom Foundation