Book a free call

How to Deploy a Smart Contract on the Core Blockchain

Core is EVM-compatible, so you can deploy with Remix or Hardhat and pay gas in CORE. Here is the full deploy flow, from testnet to verification.

Hertiv engineering teamReviewed by a senior engineer
6 min read
How to Deploy a Smart Contract on the Core Blockchain
On this page

Short answer

You deploy a smart contract on the Core blockchain by writing it in Solidity, compiling it with Remix or Hardhat, funding a wallet with CORE tokens for gas, and sending the deploy transaction to Core mainnet or testnet. Core is EVM-compatible, so standard Ethereum tooling works, and you verify the code on CoreScan so others can read it.

What does deploying a smart contract on Core involve?

Deploying a smart contract on the Core blockchain means publishing Solidity code to the Core network so it runs on every Core node. Core is EVM-compatible, which means contracts written for Ethereum work on Core with the same tools, the same language and the same deployment steps.

Core secures its network with Satoshi Plus consensus, which combines Bitcoin mining power with CORE token staking. For a developer, the practical effect is simple: you deploy the same way you would on any EVM chain, but you pay gas in CORE tokens and you verify the code on CoreScan, the Core block explorer.

The deploy itself is one transaction. The work around it, compiling, testing, funding the wallet and verifying the code, is where most of the time goes. For the token side of Core, how to create a token on Core covers the token creation steps.

What do you need before you start?

You need four things before you deploy on Core: a wallet funded with CORE tokens, a development tool, the contract code, and access to a Core network endpoint. The table below shows what each one is for.

What you needWhy you need itCommon choice
WalletHolds CORE and signs the deployMetaMask with Core added
CORE tokensPays gas for the deploy transactionTestnet faucet or an exchange
Dev toolCompiles and sends the contractRemix, Hardhat or Foundry
Network endpointConnects you to Core nodesCore RPC or a node provider
Contract codeThe logic you want to publishSolidity, tested locally

Add Core to your wallet first. Core mainnet uses chain ID 1116 and the testnet uses chain ID 1115, and both need the Core RPC address in the wallet settings. A wallet pointed at the wrong chain will sign a transaction the network cannot use, so check the chain ID before you send anything.

How do you deploy a smart contract on Core, step by step?

You deploy a smart contract on Core by compiling the code, connecting the wallet, sending the deploy transaction, and waiting for confirmation. The steps are the same in Remix and in Hardhat, with different buttons.

  1. Write and test the contract locally. Write the Solidity code, compile it, and run unit tests so the logic is checked before it touches a network.
  2. Connect the wallet to Core testnet. Add the testnet to your wallet, get test CORE from a faucet, and confirm the balance shows.
  3. Deploy to testnet first. Send the deploy transaction on testnet and check the contract address on CoreScan testnet.
  4. Test every function on testnet. Call each function with real inputs and check the results, including the failure cases.
  5. Fund the wallet with mainnet CORE. Buy or transfer enough CORE to cover the deploy gas plus a margin for price moves.
  6. Deploy to mainnet. Send the same compiled code to Core mainnet and save the contract address and transaction hash.
  7. Verify the code on CoreScan. Submit the source code so anyone can read and check what the contract does.

Never deploy to mainnet first. A contract on mainnet cannot be changed, so a bug found after the deploy means deploying a new contract and moving users to it. For the Ethereum comparison, deploying smart contracts on Ethereum shows the same flow on the largest EVM chain.

How do you test a contract before mainnet?

You test a contract before mainnet by running it on Core testnet with the same inputs it will see in production. Testnet CORE has no real value, so you can deploy, break things and redeploy as often as you need without cost beyond time.

Good testnet testing covers the happy path and the failure cases: what happens when a call has the wrong amount, when an address is not allowed, or when a limit is reached. Each of those should fail cleanly with a clear error, not silently accept a bad state.

Test the upgrade path too, if your contract uses one. A proxy contract that cannot be upgraded safely is worse than a simple contract, because it adds a failure mode. Keep the testnet contract and the mainnet contract identical, so the tests prove something about the code that will go live.

How do you verify a contract on CoreScan?

You verify a contract on CoreScan by submitting its source code and compiler settings to the explorer, which recompiles the code and checks that it matches the bytecode on chain. A verified contract shows its source, its functions and its read methods to anyone who opens the page.

Verification matters because users and partners check it before they trust a contract. An unverified contract is a black box: nobody can confirm what it does, and wallets and tools will warn users about it. Most teams verify within an hour of deploying.

The common verification failure is a compiler mismatch. If the compiler version or the optimisation settings differ from the deploy, the bytecode will not match and verification fails. Save the exact compiler version, optimisation flag and runs value from the deploy step, and use the same values when you verify.

What does deploying on Core cost?

Deploying on Core costs gas paid in CORE tokens, and the amount depends on the size of the contract and how busy the network is. A small contract costs less than a large one, and a deploy at a quiet time costs less than one at a busy time.

Estimate the cost before you deploy by simulating the transaction in your tool. Remix and Hardhat both show an estimated gas amount before you send, and you can multiply it by the current gas price to get the CORE cost. Keep a margin in the wallet, because a transaction that runs out of gas still costs the gas used.

Testnet deploys cost nothing in real terms, because testnet CORE comes from a faucet. Use testnet for every practice deploy, and treat mainnet as the one deploy that matters. For help scoping a build, smart contract development covers the design and audit steps around a deploy.

Example (hypothetical): deploying a simple storage contract on Core

Example (hypothetical): a developer wants to deploy a simple storage contract on Core that holds one number and lets only the owner change it. The contract is 24 lines of Solidity, compiled with version 0.8.20 and optimisation on.

She writes the code in Remix, compiles it, and connects MetaMask to Core testnet with 1 test CORE from the faucet. The deploy transaction uses 210,000 gas, and the contract address appears on CoreScan testnet. She calls the set function with 42, reads the value back, and confirms it shows 42.

Next she tries to call set from a second wallet and the call fails, as designed, because only the owner may change the value. Satisfied, she funds her mainnet wallet with 0.5 CORE, deploys the same code to mainnet, and verifies it on CoreScan with the same compiler settings. The whole flow, from first compile to verified mainnet contract, takes one afternoon.

What are the common mistakes?

The most common Core deploy mistakes are deploying to mainnet without a testnet run, pointing the wallet at the wrong chain, and verifying with the wrong compiler settings.

  • Skipping testnet. A bug on mainnet cannot be fixed in place; test every function on testnet first.
  • Wrong chain ID. A wallet on Ethereum mainnet will not reach Core; check chain ID 1116 for mainnet and 1115 for testnet.
  • Verification mismatch. Save the compiler version and optimisation settings from the deploy, or verification will fail.
  • Too little gas in the wallet. A deploy that runs out of gas still costs the gas used, and the contract is not published.
  • Untested failure cases. A contract that only works on the happy path will fail the first time a user sends a wrong value.
  • Sharing the deployer key. The wallet that deploys often owns the contract; keep its key private and separate.

Key takeaways

  • Core is EVM-compatible, so Remix, Hardhat and Solidity all work
  • Deploy to testnet first; a mainnet contract cannot be changed
  • Check chain ID 1116 for mainnet and 1115 for testnet before sending
  • Verify on CoreScan with the exact compiler settings from the deploy
  • Keep a gas margin in the wallet, because a failed deploy still costs gas

Frequently asked questions

Is Core compatible with Ethereum tooling?

Yes. Core is EVM-compatible, so Solidity contracts and tools such as Remix, Hardhat and Foundry work on Core the same way they work on Ethereum. The differences are the network settings, the CORE token for gas, and the CoreScan explorer.

What is the Core mainnet chain ID?

Core mainnet uses chain ID 1116 and Core testnet uses chain ID 1115. Add the right chain to your wallet before you deploy, because a wallet on the wrong chain cannot send a usable transaction.

How much does it cost to deploy on Core?

It costs gas paid in CORE tokens, and the amount depends on contract size and network load. Simulate the deploy in Remix or Hardhat first to see the estimate, and keep a margin in the wallet for price moves.

Do I need to verify my contract on CoreScan?

You should. Verification publishes the source code so users and partners can check what the contract does. An unverified contract is a black box, and wallets and tools will warn users about it.

Can I update a contract after deploying it on Core?

Not directly. A deployed contract cannot be changed, so a fix means deploying a new contract and moving users to it. Proxy patterns allow upgrades, but they add risk and need careful testing.

Where do I get testnet CORE tokens?

From a Core testnet faucet, which sends a small amount of test CORE to a testnet wallet address. Testnet tokens have no real value, so you can deploy and test as often as you need.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: blockchain systems in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Building or deploying smart contracts on Core or another EVM chain? Talk to Hertiv.

A senior engineer replies within one business day. Or see our Smart Contract Development service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to contact@hertiv.com.

Prefer email? Write to contact@hertiv.com
Estimate costBook a call