// We require the Hardhat Runtime Environment explicitly here. This is optional
// but useful for running the script in a standalone fashion through `node <script>`.
// When running the script with `hardhat run <script>` you'll find the Hardhat
// Runtime Environment's members available in the global scope.
const hre = require("hardhat");
// Hardhat always runs the compile task when running scripts through it.
// If this runs in a standalone fashion you may want to call compile manually
// to make sure everything is compiled
// await hre.run('compile');
// We get the contract to deploy
const Greeter = await hre.ethers.getContractFactory("Greeter");
const greeter = await Greeter.deploy("Hello, Hardhat!");
await greeter.deployed();
console.log("Greeter deployed to:", greeter.address);
await hre.tenderly.persistArtifacts({
await hre.tenderly.verify({
address: greeter.address,
console.log("Changing greeting");
await greeter.setGreeting("Zdravo, Hardhetu!");
console.log("Greeting changed!");
// We recommend this pattern to be able to use async/await everywhere
// and properly handle errors.
.then(() => process.exit(0))