# Deploying your contracts

When it comes to deploying, there are no plugins that implement a deployment system for Hardhat yet, but there's an open issue(opens new window) with some ideas and we'd value your opinion on how to best design it.

In the meantime, we recommend deploying your smart contracts using scripts. You can deploy the Greeter contract from the sample project with the deploy script scripts/sample-script.js:

async function main() {
  // We get the contract to deploy
  const Greeter = await ethers.getContractFactory("Greeter");
  const greeter = await Greeter.deploy("Hello, Hardhat!");

  console.log("Greeter deployed to:", greeter.address);

  .then(() => process.exit(0))
  .catch(error => {

You can run it with

npx hardhat run --network <your-network> scripts/sample-script.js

# Truffle migrations support

You can use Hardhat alongside Truffle if you want to use its migration system. Your contracts written using Hardhat will just work with Truffle.

All you need to do is install Truffle and follow their migrations guide(opens new window) .

Last Updated: 1/22/2021, 7:11:18 AM