-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5759fd3
commit c908c87
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { deployments, ethers } from "hardhat"; | ||
import { HardhatRuntimeEnvironment } from "hardhat/types"; | ||
import { DeployFunction } from "hardhat-deploy/types"; | ||
import { verifyContract } from "./helpers"; | ||
|
||
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { | ||
const [deployer] = await ethers.getSigners(); | ||
const ownerAddress = process.env.OWNER_ADDRESS ?? deployer.address; | ||
const tokenContractName = "UAVToken"; | ||
const tokenName = process.env.TOKEN_NAME ?? "Urban Agri Token"; | ||
const tokenSymbol = process.env.TOKEN_SYMBOL ?? "UAV"; | ||
|
||
console.log(""); | ||
console.log(""); | ||
console.log(""); | ||
console.log("**************************************************************"); | ||
console.log("**************************************************************"); | ||
console.log("**************************************************************"); | ||
console.log(`********** Deploying ${tokenContractName} **********`); | ||
|
||
const tokenDeploy = await deployments.deploy(tokenContractName, { | ||
from: deployer.address, | ||
args: [tokenName, tokenSymbol, ownerAddress], | ||
log: true, | ||
}); | ||
|
||
await verifyContract(tokenDeploy.address, [tokenName, tokenSymbol, ownerAddress]); | ||
}; | ||
|
||
export default func; | ||
func.tags = ["TokenDeploy"]; |